SAM AC - Analog Comparator Callback Driver.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
#include "ac_callback.h"
Functions | |
void | _ac_interrupt_handler (const uint32_t instance_index) |
Interrupt Handler for AC module. More... | |
enum status_code | ac_register_callback (struct ac_module *const module, ac_callback_t callback_func, const enum ac_callback callback_type) |
Registers a callback. More... | |
enum status_code | ac_unregister_callback (struct ac_module *const module, const enum ac_callback callback_type) |
Unregisters a callback. More... | |
Variables | |
struct ac_module * | _ac_instance [AC_INST_NUM] |
void _ac_interrupt_handler | ( | const uint32_t | instance_index | ) |
Interrupt Handler for AC module.
ISR handler for AC
Handles interrupts as they occur, it will run the callback functions that are registered and enabled.
[in] | instance_index | Default value 0 |
References AC_CALLBACK_COMPARATOR_0, AC_CALLBACK_COMPARATOR_1, and AC_CALLBACK_WINDOW_0.
enum status_code ac_register_callback | ( | struct ac_module *const | module, |
ac_callback_t | callback_func, | ||
const enum ac_callback | callback_type | ||
) |
Registers a callback.
Registers a callback function which is implemented by the user.
[in] | module | Pointer to software instance struct |
[in] | callback_func | Pointer to callback function |
[in] | callback_type | Callback type given by an enum |
STATUS_OK | The function exited successfully |
enum status_code ac_unregister_callback | ( | struct ac_module *const | module, |
const enum ac_callback | callback_type | ||
) |