GPIOIRQDevice (ili9486_elixir v0.1.6)

View Source

GenServer that listens for Circuits.GPIO interrupts and forwards them to a user callback.

Summary

Types

Callback invoked on IRQ

IRQ pin number

IRQ status value

IRQ timestamp (from Circuits.GPIO)

Functions

Returns a specification to start this module under a supervisor.

Set the IRQ callback. Returns the pid of the spawned listener process.

Types

irq_callback()

@type irq_callback() :: (irq_pin(), irq_timestamp(), irq_status() -> any())

Callback invoked on IRQ

irq_pin()

@type irq_pin() :: non_neg_integer()

IRQ pin number

irq_status()

@type irq_status() :: 0 | 1

IRQ status value

irq_timestamp()

@type irq_timestamp() :: non_neg_integer()

IRQ timestamp (from Circuits.GPIO)

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

irq_event_loop(gpio, callback)

@spec irq_event_loop(any(), irq_callback()) :: no_return()

irq_event_loop_init(gpio, callback)

@spec irq_event_loop_init(any(), irq_callback()) :: no_return()

set_callback(pid, callback)

@spec set_callback(pid(), irq_callback()) :: pid()

Set the IRQ callback. Returns the pid of the spawned listener process.