[−][src]Function mynewt::hw::hal::hal_gpio_irq_init
pub unsafe extern "C" fn hal_gpio_irq_init(
pin: c_int,
handler: hal_gpio_irq_handler_t,
arg: *mut c_void,
trig: hal_gpio_irq_trig_t,
pull: hal_gpio_pull_t
) -> c_int
Initialize a given pin to trigger a GPIO IRQ callback.
pin
: The pin to trigger GPIO interrupt onhandler
: The handler function to callarg
: The argument to provide to the IRQ handlertrig
: The trigger mode (e.g. rising, falling)pull
: The mode of the pin (e.g. pullup, pulldown)
Return: 0 on success, non-zero error code on failure.