Main Page   Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

legOS/include/dkey.h File Reference

debounced key driver. More...


Defines

#define KEY_ONOFF
the on/off key is pressed.

#define KEY_RUN
the run key is pressed.

#define KEY_VIEW
the view key is pressed.

#define KEY_PRGM
the program key is pressed.

#define KEY_ANY
any of the keys.


Functions

wakeup_t dkey_pressed (wakeup_t data)
wakeup if any of the given keys is pressed.

wakeup_t dkey_released (wakeup_t data)
wakeup if all of the given keys are released.

int getchar ()
wait for keypress and return key code. More...


Variables

volatile unsigned char dkey_multi
the currently active keys. More...

volatile unsigned char dkey
the current key. More...


Detailed Description

debounced key driver.

Author(s):
Markus L. Noga <markus@noga.de>

Define Documentation

#define KEY_ONOFF ()

the on/off key is pressed.

#define KEY_RUN ()

the run key is pressed.

#define KEY_VIEW ()

the view key is pressed.

#define KEY_PRGM ()

the program key is pressed.

#define KEY_ANY ()

any of the keys.


Function Documentation

wakeup_t dkey_pressed (wakeup_t data)

wakeup if any of the given keys is pressed.

wakeup_t dkey_released (wakeup_t data)

wakeup if all of the given keys are released.

int getchar (void)

wait for keypress and return key code.

key combinations not admissible.


Variable Documentation

volatile unsigned char dkey_multi

the currently active keys.

this is a bitmask - multi-key combinations are admissible.

volatile unsigned char dkey

the current key.

this is not a bitmask - at most one key at a time.

legOS-0.2.4 is released under the Mozilla Public License. Original code copyright 1998-1999 by the authors.