Go to the source code of this file.
Classes | |
struct | InterruptHandlerWrapper |
Functions | |
void | handle_debouncing (void) |
RIT job for managing debouncing. | |
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 | EINT0_IRQHandler (void) |
void | EINT1_IRQHandler (void) |
void | EINT2_IRQHandler (void) |
Variables | |
_PRIVATE InterruptHandlerWrapper | handlers [BTN_SRC_COUNT] = {NULL} |
Array of function pointers to the interrupt handlers for each BUTTON peripheral. This is defined regardless of the debouncing option, since the handlers will be used by the debouncing code as well. Hence the array is marked _USED_EXTERNALLY. | |
_PRIVATE u8 | eint0_down |
Flag to indicate if the button is currently pressed. Used for debouncing. | |
_PRIVATE u8 | eint1_down |
_PRIVATE u8 | eint2_down |
_DECL_EXTERNALLY bool | debouncer_on |
Flag to indicate if the debouncer is currently active. | |
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.
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.
|
extern |
Definition at line 148 of file buttons_irq.c.
|
extern |
Definition at line 166 of file buttons_irq.c.
|
extern |
Definition at line 184 of file buttons_irq.c.
void handle_debouncing | ( | void | ) |
RIT job for managing debouncing.
RIT job for handling debouncing. Defined & used in button_irq.c.
Definition at line 29 of file buttons_irq.c.
_DECL_EXTERNALLY bool debouncer_on |
Flag to indicate if the debouncer is currently active.
Definition at line 26 of file buttons_irq.c.
Flag to indicate if the button is currently pressed. Used for debouncing.
Definition at line 23 of file buttons_irq.c.
Definition at line 23 of file buttons_irq.c.
Definition at line 23 of file buttons_irq.c.
_PRIVATE InterruptHandlerWrapper handlers[BTN_SRC_COUNT] = {NULL} |
Array of function pointers to the interrupt handlers for each BUTTON peripheral. This is defined regardless of the debouncing option, since the handlers will be used by the debouncing code as well. Hence the array is marked _USED_EXTERNALLY.
Definition at line 20 of file buttons_irq.c.