EVE 1.0
key.h File Reference

Interface for Key driver in key.c. More...

#include <core/mwork.h>
#include <sys/process.h>
#include <sys/event-base.h>
#include <lib/assert.h>
Include dependency graph for key.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  key_repeat_t
 The structure defines key repeat parameters. More...
 
struct  key_combi_t
 The structure defines combi key parameters. Note that it is possible to define individual debounce time for each group. Thus it is also the way to define an individual key with debouncing which differs from default KEY_PRELL_TIME : just define a "group of 1 key. More...
 

Enumerations

Functions

Functions called from application programs
void StartKeyScan (void)
 Start Keys scanning. More...
 
void KeyInterruptCb (void)
 This callback function must be called when a key interrupt is received by the platform. More...
 
void KeyDebounceTimeSet (uint16_t Time)
 Sets key debounce time. Default time is KEY_PRELL_TIME. More...
 
bool KeyStatusGet (uint8_t KeyIndex)
 Returns status of debounced key. More...
 

Application' keypad configuration and supplied functions.

The following is the keypad driver setup for application's board.h and board.c files.

#define KEY_ENABLED   true/false
 
#define KEYS_HAVE_NO_INTERRUPT   true/false
 
#define REPEAT_KEY_ENABLED   true/false
 
#define REPEAT_KEY_STEP2_ENABLED   true/false
 
#define COMBI_KEYS_ENABLED   true/false
 
#define COMBI_KEY_RELEASE_ENABLED   true/false
 
#define NUMBER_OF_KEYS   <N>
 
#define NUMBER_OF_REPEAT_KEYS   <N>
 
#define NUMBER_OF_COMBI_GROUPS   <N>
 
#define KEY_SIGNAL_RECEIVER   <struct process *p>
 
#define SCAN_KEY_INTERVAL   <T>
 
#define KEY_PRELL_TIME   <T>
 
struct key_repeat_t ConfigKeyRepeat [NUMBER_OF_REPEAT_KEYS]
 User defined array of key_repeat_t structures defines key repeat parameters.
 
struct key_combi_t ConfigKeyCombi [NUMBER_OF_COMBI_GROUPS]
 User defined array of key_combi_t structures defines combi key groups parameters.
 
static __inline uint32_t ReadKeyInput (void)
 Application supplied board-specific callback function for reading key inputs. More...
 
void KeyInterruptEnable (bool Enable)
 Application supplied board-specific callback function to enable or disable HW interrupts for all keys. More...
 

Detailed Description

Interface for Key driver in key.c.

Author
AMO, Jetro AS

Definition in file key.h.