kbd.h File Reference
Keyboard driver. More...
#include "hw/kbd_map.h"#include "cfg/cfg_kbd.h"#include <cfg/compiler.h>#include <struct/list.h>Go to the source code of this file.
Data Structures | |
| struct | KbdHandler |
| Keyboard handler descriptor. More... | |
Defines | |
| #define | KHF_RAWKEYS BV(0) |
| Handler gets raw key events. | |
Keyboard polling modes. | |
| #define | KBD_POLL_SOFTINT 1 |
Functions | |
| void | kbd_init (void) |
| Initialize keyboard ports and softtimer. | |
| keymask_t | kbd_peek (void) |
| Read a key from the keyboard buffer. | |
| keymask_t | kbd_get (void) |
| Wait for a keypress and return the mask of depressed keys. | |
| keymask_t | kbd_get_timeout (mtime_t timeout) |
Wait up to timeout ms for a keypress and return the mask of depressed keys, or K_TIMEOUT if the timeout was reacked. | |
| keymask_t | kbd_setRepeatMask (keymask_t mask) |
| Set current mask of repeatable keys. | |
Detailed Description
Keyboard driver.
- Version:
- Id
- kbd.h 2554 2009-04-17 17:27:13Z batt
Definition in file kbd.h.
Function Documentation
| keymask_t kbd_get | ( | void | ) |
| keymask_t kbd_peek | ( | void | ) |
Read a key from the keyboard buffer.
When a key is kept depressed between calls of this function a value is returned only after the time specified with KBD_REPAT_DELAY to avoid too fast keyboard repeat.
- Note:
- Calls
schedule()internally. - This function is not interrupt safe!
- Returns:
- The mask of depressed keys or 0 if no keys are depressed.
