Appiko
|
Driver for the generating all the button related UI events for the application. More...
Enumerations | |
enum | button_ui_action { BUTTON_UI_ACT_CROSS, BUTTON_UI_ACT_RELEASE } |
enum | button_ui_steps { BUTTON_UI_STEP_QUICK, BUTTON_UI_STEP_SHORT, BUTTON_UI_STEP_LONG, BUTTON_UI_STEP_WAKE } |
Functions | |
void | button_ui_init (uint32_t button_pin, uint32_t irq_priority, void(*button_ui_handler)(button_ui_steps step, button_ui_action act)) |
Initialize the button ui event generator module. More... | |
void | button_ui_add_tick (uint32_t ui_ticks) |
The ticks that need to be sent to the button UI module for its processing. More... | |
void | button_ui_config_wake (bool set_wake_on) |
To enable/disable the button UI GPIOTE IRQ. More... | |
enum button_ui_action |
Enum defining the type of actions possible with buttons
Enumerator | |
---|---|
BUTTON_UI_ACT_CROSS | When a button press crosses a particular time. |
BUTTON_UI_ACT_RELEASE | When a button is released. |
Definition at line 42 of file button_ui.h.
enum button_ui_steps |
Enum to define the different kinds of button presses
Definition at line 51 of file button_ui.h.
void button_ui_add_tick | ( | uint32_t | ui_ticks | ) |
ui_ticks | UI ticks generated by next interval handler |
Definition at line 86 of file button_ui.c.
Referenced by next_interval_handler().
void button_ui_config_wake | ( | bool | set_wake_on | ) |
set_wake_on | Set to true to enable and false to disable |
Definition at line 128 of file button_ui.c.
Referenced by button_handler().
void button_ui_init | ( | uint32_t | button_pin, |
uint32_t | irq_priority, | ||
void(*)(button_ui_steps step, button_ui_action act) | button_ui_handler | ||
) |
button_pin | Button Pin number to monitor |
irq_priority | IRQ priority of the GPIOTE irq used |
button_ui_handler | Handler to be called for all the button events |
Definition at line 66 of file button_ui.c.