RTEMS 6.1-rc5
|
Data Structures | |
struct | _kpp_config |
Lists of KPP status. More... | |
Variables | |
uint8_t | _kpp_config::activeRow |
uint8_t | _kpp_config::activeColumn |
uint16_t | _kpp_config::interrupt |
Driver version | |
enum | _kpp_interrupt_enable { kKPP_keyDepressInterrupt = KPP_KPSR_KDIE_MASK , kKPP_keyReleaseInterrupt = KPP_KPSR_KRIE_MASK } |
List of interrupts supported by the peripheral. This enumeration uses one-bot encoding to allow a logical OR of multiple members. Members usually map to interrupt enable bits in one or more peripheral registers. More... | |
enum | _kpp_sync_operation { kKPP_ClearKeyDepressSyncChain = KPP_KPSR_KDSC_MASK , kKPP_SetKeyReleasesSyncChain = KPP_KPSR_KRSS_MASK } |
Lists of KPP synchronize chain operation. More... | |
typedef enum _kpp_interrupt_enable | kpp_interrupt_enable_t |
List of interrupts supported by the peripheral. This enumeration uses one-bot encoding to allow a logical OR of multiple members. Members usually map to interrupt enable bits in one or more peripheral registers. | |
typedef enum _kpp_sync_operation | kpp_sync_operation_t |
Lists of KPP synchronize chain operation. | |
typedef struct _kpp_config | kpp_config_t |
Lists of KPP status. | |
#define | FSL_KPP_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) |
KPP driver version 2.0.0. | |
#define | KPP_KEYPAD_COLUMNNUM_MAX (8U) |
#define | KPP_KEYPAD_ROWNUM_MAX (8U) |
Initialization and De-initialization | |
void | KPP_Init (KPP_Type *base, kpp_config_t *configure) |
KPP initialize. This function ungates the KPP clock and initializes KPP. This function must be called before calling any other KPP driver functions. | |
void | KPP_Deinit (KPP_Type *base) |
Deinitializes the KPP module and gates the clock. This function gates the KPP clock. As a result, the KPP module doesn't work after calling this function. | |
KPP Basic Operation | |
void | KPP_keyPressScanning (KPP_Type *base, uint8_t *data, uint32_t clockSrc_Hz) |
Keypad press scanning. | |
List of interrupts supported by the peripheral. This enumeration uses one-bot encoding to allow a logical OR of multiple members. Members usually map to interrupt enable bits in one or more peripheral registers.
Enumerator | |
---|---|
kKPP_keyDepressInterrupt | Keypad depress interrupt source |
kKPP_keyReleaseInterrupt | Keypad release interrupt source |
enum _kpp_sync_operation |
void KPP_Deinit | ( | KPP_Type * | base | ) |
Deinitializes the KPP module and gates the clock. This function gates the KPP clock. As a result, the KPP module doesn't work after calling this function.
base | KPP peripheral base address. |
brief Deinitializes the KPP module and gates the clock. This function gates the KPP clock. As a result, the KPP module doesn't work after calling this function.
param base KPP peripheral base address.
void KPP_Init | ( | KPP_Type * | base, |
kpp_config_t * | configure | ||
) |
KPP initialize. This function ungates the KPP clock and initializes KPP. This function must be called before calling any other KPP driver functions.
base | KPP peripheral base address. |
configure | The KPP configuration structure pointer. |
brief KPP initialize. This function ungates the KPP clock and initializes KPP. This function must be called before calling any other KPP driver functions.
param base KPP peripheral base address. param configure The KPP configuration structure pointer.
void KPP_keyPressScanning | ( | KPP_Type * | base, |
uint8_t * | data, | ||
uint32_t | clockSrc_Hz | ||
) |
Keypad press scanning.
This function will scanning all columns and rows. so all scanning data will be stored in the data pointer.
base | KPP peripheral base address. |
data | KPP key press scanning data. The data buffer should be prepared with length at least equal to KPP_KEYPAD_COLUMNNUM_MAX * KPP_KEYPAD_ROWNUM_MAX. the data pointer is recommended to be a array like uint8_t data[KPP_KEYPAD_COLUMNNUM_MAX]. for example the data[2] = 4, that means in column 1 row 2 has a key press event. |
clockSrc_Hz | Source clock. |
brief Keypad press scanning.
This function will scanning all columns and rows. so all scanning data will be stored in the data pointer.
param base KPP peripheral base address. param data KPP key press scanning data. The data buffer should be prepared with length at least equal to KPP_KEYPAD_COLUMNNUM_MAX * KPP_KEYPAD_ROWNUM_MAX. the data pointer is recommended to be a array like uint8_t data[KPP_KEYPAD_COLUMNNUM_MAX]. for example the data[2] = 4, that means in column 1 row 2 has a key press event. param clockSrc_Hz Source clock.
uint8_t _kpp_config::activeColumn |
The column number: bit 7 ~ 0 represents the column 7 ~ 0.
uint8_t _kpp_config::activeRow |
The row number: bit 7 ~ 0 represents the row 7 ~ 0.
uint16_t _kpp_config::interrupt |
KPP interrupt source. A logical OR of "kpp_interrupt_enable_t".