4 * Copyright 2003, 2004, 2005 Develer S.r.l. (http://www.develer.com/)
5 * Copyright 1999, 2003 Bernardo Innocenti
6 * This file is part of DevLib - See README.devlib for information.
9 * \brief Keyboard driver (interface)
12 * \author Bernardo Innocenti <bernie@develer.com>
13 * \author Stefano Fedrigo <aleph@develer.com>
14 * \author Francesco Sacchi <batt@develer.com>
19 *#* Revision 1.1 2005/06/27 21:28:45 bernie
20 *#* Import generic keyboard driver.
27 #include <cfg/compiler.h>
28 #include <arch_config.h>
29 #include <mware/list.h>
33 * Keyboard handler descriptor
35 typedef struct KbdHandler
38 keymask_t (*hook)(keymask_t); /*!< Hook function */
39 int8_t pri; /*!< Priority in input queue */
40 uint8_t flags; /*!< See below for definitions */
43 #define KHF_RAWKEYS BV(0) /*!< Handler gets raw key events */
46 extern void kbd_init(void);
47 extern keymask_t kbd_peek(void);
48 extern keymask_t kbd_get(void);
49 extern keymask_t kbd_get_timeout(mtime_t timeout);
50 extern void kbd_addHandler(struct KbdHandler *handler);
51 extern void kbd_remHandler(struct KbdHandler *handler);
53 #endif /* DRV_KBD_H */