10#include "fsl_common.h"
24#define FSL_KPP_DRIVER_VERSION (MAKE_VERSION(2, 0, 0))
27#define KPP_KEYPAD_COLUMNNUM_MAX (8U)
28#define KPP_KEYPAD_ROWNUM_MAX (8U)
60#if defined(__cplusplus)
102static inline void KPP_EnableInterrupts(
KPP_Type *base, uint16_t mask)
104 uint16_t data = (uint16_t)(base->KPSR & ~(KPP_KPSR_KPKR_MASK | KPP_KPSR_KPKD_MASK));
105 base->KPSR = data | mask;
115static inline void KPP_DisableInterrupts(
KPP_Type *base, uint16_t mask)
117 base->KPSR &= ~(mask | KPP_KPSR_KPKR_MASK | KPP_KPSR_KPKD_MASK);
127static inline uint16_t KPP_GetStatusFlag(
KPP_Type *base)
129 return (base->KPSR & (KPP_KPSR_KPKR_MASK | KPP_KPSR_KPKD_MASK)) << KPP_KPSR_KDIE_SHIFT;
139static inline void KPP_ClearStatusFlag(
KPP_Type *base, uint16_t mask)
141 base->KPSR |= (uint16_t)((mask) >> KPP_KPSR_KDIE_SHIFT);
151static inline void KPP_SetSynchronizeChain(
KPP_Type *base, uint16_t mask)
153 uint16_t data = base->KPSR & (KPP_KPSR_KRSS_MASK | KPP_KPSR_KDSC_MASK | KPP_KPSR_KRIE_MASK | KPP_KPSR_KDIE_MASK);
154 base->KPSR = data | mask;
174#if defined(__cplusplus)
struct _kpp_config kpp_config_t
Lists of KPP status.
enum _kpp_sync_operation kpp_sync_operation_t
Lists of KPP synchronize chain operation.
uint8_t activeRow
Definition: fsl_kpp.h:51
void KPP_keyPressScanning(KPP_Type *base, uint8_t *data, uint32_t clockSrc_Hz)
Keypad press scanning.
Definition: fsl_kpp.c:138
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...
Definition: fsl_kpp.c:74
_kpp_interrupt_enable
List of interrupts supported by the peripheral. This enumeration uses one-bot encoding to allow a log...
Definition: fsl_kpp.h:36
void KPP_Deinit(KPP_Type *base)
Deinitializes the KPP module and gates the clock. This function gates the KPP clock....
Definition: fsl_kpp.c:113
enum _kpp_interrupt_enable kpp_interrupt_enable_t
List of interrupts supported by the peripheral. This enumeration uses one-bot encoding to allow a log...
uint16_t interrupt
Definition: fsl_kpp.h:53
uint8_t activeColumn
Definition: fsl_kpp.h:52
_kpp_sync_operation
Lists of KPP synchronize chain operation.
Definition: fsl_kpp.h:43
@ kKPP_keyReleaseInterrupt
Definition: fsl_kpp.h:38
@ kKPP_keyDepressInterrupt
Definition: fsl_kpp.h:37
@ kKPP_SetKeyReleasesSyncChain
Definition: fsl_kpp.h:45
@ kKPP_ClearKeyDepressSyncChain
Definition: fsl_kpp.h:44
Definition: MIMXRT1052.h:27207
Lists of KPP status.
Definition: fsl_kpp.h:50