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.

Note: NMI channel callbacks cannot be registered via this function; the device's NMI interrupt should be hooked directly in the user application and the NMI flags manually cleared via extint_nmi_clear_detected().
Table 9-18. Parameters
Data directionParameter nameDescription

[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.

Table 9-19. Return Values
Return valueDescription

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