EBCS Button Module
Compounds
struct button_stat_tDefines
Typedefs
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_eventEnumeration Type Documentation
enum buttonFunction Documentation
void button_disable ( void )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.
- See also:
- button_enable
void button_enable ( void )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.
- See also:
- button_disable, button_get_pressed
button_mask_t button_get_pressed ( void )Return a mask for pressed buttons.
- Returns:
- the mask identifying pressed buttons
- See also:
- button_enable, button_disable
void button_initialize ( void )Initialize the button module.
Configure the button module. This function must be called once before any other. After initialization, the button polling is disabled.
- See also:
- button_enable, button_disable, button_get_pressed
int button_is_enabled ( void )Return true if the buttons are enabled.
- Returns:
- 1 if the buttons are enabled.
- See also:
- button_enable, button_disable
Variable Documentation
Copyright (C) 1999, 2000, 2001, 2002, 2003 Stéphane Carrez, France
Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.