Compounds | |
struct | button_stat_t |
Defines | |
#define | GEL_MAX_BUTTONS 4 |
Typedefs | |
typedef unsigned short | button_t |
typedef unsigned char | button_mask_t |
Enumerations | |
enum | button { BUTTON_1 = 0, BUTTON_2 = 1, BUTTON_3 = 2, BUTTON_4 = 3 } |
enum | key_mode { KEY_PRESS, KEY_RELEASE } |
Functions | |
void | button_initialize (void) |
button_mask_t | button_get_pressed (void) |
void | button_enable (void) |
void | button_disable (void) |
int | button_is_enabled (void) |
Variables | |
event_def | button_change_event |
|
Button enumeration. |
|
Disable the polling of buttons. Disable the polling of buttons. This operation must be called before sending LCD commands. Otherwise, these commands can disturb the button polling. The accumulator interrupts (PA7) are disabled and the button timers are deactivated.
|
|
Enable the polling of buttons. Enable the polling of buttons. The button are scanned periodically and their state can be queried using button_get_pressed or by waiting for button events. The accumulator interrupts (PA7) are enabled and the button timer is activated. While buttons are polled, the application must not print on the LCD panel. It is necessary to disable the polling.
|
|
Return a mask for pressed buttons.
|
|
Initialize the button module. Configure the button module. This function must be called once before any other. After initialization, the button polling is disabled.
|
|
Return true if the buttons are enabled.
|
|
Button change event. The button change event is triggerred each time the state of the buttons change. It is activated when a button is pressed or when a button is released. |