Go to the source code of this file.
Functions | |
BUTTON_Error | BUTTON_Init (u8 options) |
Initializes the BUTTON peripherals. | |
void | BUTTON_Deinit (void) |
Deinitializes the buttons, by removing all jobs, disabling the interrupts, and removing the debouncing job from the RIT. | |
BUTTON_Error | BUTTON_EnableSource (BUTTON_Source source, u8 int_priority) |
Enables the interrupt generation of the given source, provided that there's a function associated to it. | |
void | BUTTON_DisableSource (BUTTON_Source source) |
Disables the interrupt generation of the given source, but it leaves the function binding. | |
void | BUTTON_SetFunction (BUTTON_Source source, BUTTON_Function func) |
Binds a given interrupt to a functionality. | |
void | BUTTON_UnsetFunction (BUTTON_Source source) |
Unbinds the previously set function from the selected interrupt source. | |
void BUTTON_Deinit | ( | void | ) |
Deinitializes the buttons, by removing all jobs, disabling the interrupts, and removing the debouncing job from the RIT.
Definition at line 43 of file buttons.c.
void BUTTON_DisableSource | ( | BUTTON_Source | source | ) |
Disables the interrupt generation of the given source, but it leaves the function binding.
source | THe source to disable. |
Definition at line 121 of file buttons_irq.c.
BUTTON_Error BUTTON_EnableSource | ( | BUTTON_Source | source, |
u8 | int_priority | ||
) |
Enables the interrupt generation of the given source, provided that there's a function associated to it.
source | The source to enable. |
int_priority | The priority to assign to the specified source. |
Definition at line 84 of file buttons_irq.c.
BUTTON_Error BUTTON_Init | ( | u8 | options | ) |
Initializes the BUTTON peripherals.
options | Button options from the BUTTON_Config enum |
Definition at line 15 of file buttons.c.
void BUTTON_SetFunction | ( | BUTTON_Source | source, |
BUTTON_Function | func | ||
) |
Binds a given interrupt to a functionality.
source | Button interrupt source (enum BUTTON_Source) |
handler | Function pointer to the interrupt handler. |
int_priority | The priority to assign to the interrupts coming from the selected source. |
enable | Whether to enable the function binding right away. |
Definition at line 129 of file buttons_irq.c.
void BUTTON_UnsetFunction | ( | BUTTON_Source | source | ) |
Unbinds the previously set function from the selected interrupt source.
source | Interrupt source (enum BUTTON_Source) |
Definition at line 137 of file buttons_irq.c.