Set callback for given GPIO pin.
bool gpio_set_pin_callback( ioport_pin_t pin, gpio_pin_callback_t callback, uint8_t irq_level)
Data direction | Parameter name | Description |
---|---|---|
[in] |
pin |
The pin number |
[in] |
callback |
callback function pointer |
[in] |
irq_level |
interrupt level |
Return value | Description |
---|---|
true |
Set successfully |
false |
Wrong parameters or maximum number of interrupt sources has been exceeding |