nerves_hal v0.5.0 Nerves.HAL.Device.Spec behaviour

Link to this section Summary

Link to this section Functions

Link to this function call(pid, call, timeout \\ 5000)
Link to this function cast(pid, request)
Link to this function connect_device(device, s)
Link to this function disconnect_device(device, s)
Link to this function handle_call(request, from, s)
Link to this function handle_cast(request, s)
Link to this function handle_events(arg1, from, s)
Link to this function handle_info(request, s)
Link to this function start_link(mod, state, opts \\ [])

Link to this section Callbacks

Link to this callback handle_call(call, arg1, state)
handle_call(call :: term(), GenServer.from(), state :: term()) ::
  {:noreply, new_state :: term()}
  | {:reply, reply :: term(), new_state :: term()}
Link to this callback handle_cast(cast, state)
handle_cast(cast :: term(), state :: term()) :: {:noreply, new_state :: term()}
Link to this callback handle_connect(device, state)
handle_connect(device :: Device.t(), state :: term()) ::
  {:noreply, new_state :: term()}
Link to this callback handle_disconnect(device, state)
handle_disconnect(device :: Device.t(), state :: term()) ::
  {:noreply, new_state :: term()}
Link to this callback handle_discover(device, state)
handle_discover(device :: Device.t(), state :: term()) ::
  {:connect, new_state :: term()} | {:noreply, new_state :: term()}
Link to this callback terminate(reason, state)
terminate(reason, state :: term()) :: term()
when reason: :normal | :shutdown | {:shutdown, term()} | term()