42 #include <sys/event-base.h> 43 #include <lib/assert.h> 178 #ifdef KEY_DRIVER_DOXYGEN 180 #define KEY_ENABLED true/false 181 #define KEYS_HAVE_NO_INTERRUPT true/false
182 #define REPEAT_KEY_ENABLED true/false
183 #define REPEAT_KEY_STEP2_ENABLED true/false
184 #define COMBI_KEYS_ENABLED true/false
185 #define COMBI_KEY_RELEASE_ENABLED true/false
187 #define NUMBER_OF_KEYS <N> 188 #define NUMBER_OF_REPEAT_KEYS <N>
189 #define NUMBER_OF_COMBI_GROUPS <N>
191 #define KEY_SIGNAL_RECEIVER <struct process *p> 192 #define SCAN_KEY_INTERVAL <T>
193 #define KEY_PRELL_TIME <T>
202 #endif // KEY_DRIVER_DOXYGEN 273 #endif //DRIVER_KEY_H Header file for the EVE millisecond-scale work scheduling.
Key combination was pressed.
uint32_t Keys
Bit positions = key number.
key_events_t
Event numbers being sent to the application process. Event's void *data field contains key number...
uint8_t KeyIndex
Index 0-31 for actual repeat key.
void KeyInterruptCb(void)
This callback function must be called when a key interrupt is received by the platform.
uint16_t Step2Time
Number of step2 scans (wanted step2 time in ms / SCAN_KEY_INTERVAL), must be > Step1Time.
Key press repeat after Step1Time.
struct key_combi_t ConfigKeyCombi[NUMBER_OF_COMBI_GROUPS]
User defined array of key_combi_t structures defines combi key groups parameters. ...
void KeyDebounceTimeSet(uint16_t Time)
Sets key debounce time. Default time is KEY_PRELL_TIME.
Key press repeat after Step2Time.
static __inline uint32_t ReadKeyInput(void)
Application supplied board-specific callback function for reading key inputs.
bool KeyStatusGet(uint8_t KeyIndex)
Returns status of debounced key.
The structure defines combi key parameters. Note that it is possible to define individual debounce ti...
The structure defines key repeat parameters.
Key combination was released.
void StartKeyScan(void)
Start Keys scanning.
struct key_repeat_t ConfigKeyRepeat[NUMBER_OF_REPEAT_KEYS]
User defined array of key_repeat_t structures defines key repeat parameters.
Gives the size of allocated event numbers.
uint16_t Time
Number of debounce scans (wanted debounce time in ms / SCAN_KEY_INTERVAL)
uint16_t Step1Time
Number of step1 scans (wanted step1 time in ms / SCAN_KEY_INTERVAL), must be > RepeatTime.
uint16_t RepeatTime
Number of repeat scans (wanted repeat time in ms / SCAN_KEY_INTERVAL)
void KeyInterruptEnable(bool Enable)
Application supplied board-specific callback function to enable or disable HW interrupts for all keys...