SAM TCC - Timer Counter for Control Applications Callback Driver.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
Functions | |
Callback Management | |
{@ | |
enum status_code | tcc_register_callback (struct tcc_module *const module, tcc_callback_t callback_func, const enum tcc_callback callback_type) |
Registers a callback. More... | |
enum status_code | tcc_unregister_callback (struct tcc_module *const module, const enum tcc_callback callback_type) |
Unregisters a callback. More... | |
void | tcc_enable_callback (struct tcc_module *const module, const enum tcc_callback callback_type) |
Enables callback. More... | |
void | tcc_disable_callback (struct tcc_module *const module, const enum tcc_callback callback_type) |
Disables callback. More... | |
void tcc_disable_callback | ( | struct tcc_module *const | module, |
const enum tcc_callback | callback_type | ||
) |
Disables callback.
Disables the callback function registered by the tcc_register_callback, and the callback will not be called from the interrupt routine. The function will also disable the appropriate interrupts.
[in] | module | Pointer to TCC software instance struct |
[in] | callback_type | Callback type given by an enum |
References _tcc_get_inst_index(), _tcc_interrupt_get_interrupt_vector(), _tcc_intflag, Assert, tcc_module::enable_callback_mask, tcc_module::hw, and system_interrupt_disable().
Referenced by nm_bsp_stop_configurable_timer(), and run_callback_test().
void tcc_enable_callback | ( | struct tcc_module *const | module, |
const enum tcc_callback | callback_type | ||
) |
Enables callback.
Enables the callback function registered by the tcc_register_callback. The callback function will be called from the interrupt handler when the conditions for the callback type are met. This function will also enable the appropriate interrupts.
[in] | module | Pointer to TCC software instance struct |
[in] | callback_type | Callback type given by an enum |
References _tcc_get_inst_index(), _tcc_interrupt_get_interrupt_vector(), _tcc_intflag, Assert, tcc_module::enable_callback_mask, tcc_module::hw, and system_interrupt_enable().
Referenced by configure_tcc_callbacks(), nm_bsp_start_configurable_timer(), run_callback_test(), run_capture_and_compare_test(), sw_timer_init(), timer0_init(), and wifi_cb().
enum status_code tcc_register_callback | ( | struct tcc_module *const | module, |
tcc_callback_t | callback_func, | ||
const enum tcc_callback | callback_type | ||
) |
Registers a callback.
Registers a callback function which is implemented by the user.
[in] | module | Pointer to TCC software instance struct |
[in] | callback_func | Pointer to callback function |
[in] | callback_type | Callback type given by an enum |
References _tcc_intflag, Assert, tcc_module::callback, tcc_module::register_callback_mask, and STATUS_OK.
Referenced by configurable_timer_init(), configure_tcc_callbacks(), configure_timer(), run_callback_test(), run_capture_and_compare_test(), sw_timer_init(), and timer0_init().
enum status_code tcc_unregister_callback | ( | struct tcc_module *const | module, |
const enum tcc_callback | callback_type | ||
) |
Unregisters a callback.
Unregisters a callback function implemented by the user. The callback should be disabled before it is unregistered.
[in] | module | Pointer to TCC software instance struct |
[in] | callback_type | Callback type given by an enum |
References _tcc_intflag, Assert, tcc_module::callback, NULL, tcc_module::register_callback_mask, and STATUS_OK.