9.6.4.6.1 Function extint_register_callback()
Registers an asynchronous callback function with the driver.
enum status_code extint_register_callback( const extint_callback_t callback, const uint8_t channel, const enum extint_callback_type type)
Registers an asynchronous callback with the EXTINT driver, fired when a channel detects the configured channel detection criteria (e.g. edge or level). Callbacks are fired once for each detected channel.
Data direction | Parameter name | Description |
---|---|---|
[in] |
callback |
Pointer to the callback function to register |
[in] |
channel |
Logical channel to register callback for |
[in] |
type |
Type of callback function to register |
Returns
Status of the registration operation.
Return value | Description |
---|---|
STATUS_OK |
The callback was registered successfully |
STATUS_ERR_INVALID_ARG |
If an invalid callback type was supplied |
STATUS_ERR_ALREADY_INITIALIZED |
Callback function has been registered, need unregister first |