     @moduledoc "Struct for a HCI event"
     @type t :: %__MODULE__{
       event: atom,
-      op_code: atom,
       parameter: binary
     }
-    defstruct [event: nil, op_code: nil, parameter: ""]
+    defstruct [event: nil, parameter: ""]
   end
-  
+
   @spec start_link() :: {:ok, pid}
   def start_link() do
     GenServer.start_link(__MODULE__, [], [name: __MODULE__])

  def foo(x) do
    GenServer.call(__MODULE__, {:foo, [x]})
  end

  def stop() do
    GenServer.stop(__MODULE__, :normal)

defmodule Bluetooth.HCI do
  @moduledoc """
  HCI interface implemented as a port.

  ## Port Protocol

  The functions are encoded as a tuple with the function name as `atom` and the parameters as an
  (possibly empty) list. All Port functions are prefixed with `hci_`. The call of function `foo(x)`
  would thus transferred as `{:hci_foo, [x]}`. Since the port communication is asynchronous by
  nature and to prevent locks inside the gen server, we use an asynchronous reply and remember
  pending calls inside the gen server. To identify a pending call, a `reference` is created and
  passed to the port. Every replying message must contain this reference. Therefore the message
  send to the port is `{ref, {:hci_foo, [x]}}` and the answer is `{ref, return_val}`.
  """
