/* Registers an asynchronous callback function with the driver. 
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. */
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 function with the driver. 
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. */
enum status_code extint_register_callback(const extint_callback_t callback, const uint8_t channel, const enum extint_callback_type type)
{
	Assert(callback);
	if (type != EXTINT_CALLBACK_TYPE_DETECT) {
		Assert(false);
		return STATUS_ERR_INVALID_ARG;
	}
	if (_extint_dev.callbacks[channel] == NULL) {
		_extint_dev.callbacks[channel] = callback;
		return STATUS_OK;
	} else if (_extint_dev.callbacks[channel] == callback) {
		return STATUS_OK;
	}
	return STATUS_ERR_ALREADY_INITIALIZED;
}