The MCUXpresso SDK provides a peripheral driver for the keyboard interrupt block of MCUXpresso SDK devices.
KBI Operations
KBI Initialization Operation
The KBI Initialize is to initialize for common configure: gate the KBI clock, configure enabled KBI pins, and enable the interrupt. The KBI Deinitialize is to disable the interrupt/pins and ungate the clock.
KBI Basic Operation
The KBI provide the function to enable/disable interrupts. KBI still provide functions to get and clear status flags.
Typical use case
uint32_t kbi_config_t::pinsEnabled |
uint32_t kbi_config_t::pinsEdge |
Enumerator |
---|
kKBI_EdgesDetect |
The keyboard detects edges only.
|
kKBI_EdgesLevelDetect |
The keyboard detects both edges and levels.
|
This function ungates the KBI clock and initializes KBI. This function must be called before calling any other KBI driver functions.
- Parameters
-
base | KBI peripheral base address. |
configure | The KBI configuration structure pointer. |
void KBI_Deinit |
( |
KBI_Type * |
base | ) |
|
This function gates the KBI clock. As a result, the KBI module doesn't work after calling this function.
- Parameters
-
base | KBI peripheral base address. |
static void KBI_EnableInterrupts |
( |
KBI_Type * |
base | ) |
|
|
inlinestatic |
- Parameters
-
base | KBI peripheral base address. |
static void KBI_DisableInterrupts |
( |
KBI_Type * |
base | ) |
|
|
inlinestatic |
- Parameters
-
base | KBI peripheral base address. |
static bool KBI_IsInterruptRequestDetected |
( |
KBI_Type * |
base | ) |
|
|
inlinestatic |
- Parameters
-
base | KBI peripheral base address. |
- Returns
- The status of the KBI interrupt request is detected.
static void KBI_ClearInterruptFlag |
( |
KBI_Type * |
base | ) |
|
|
inlinestatic |
- Parameters
-
base | KBI peripheral base address. |
static uint32_t KBI_GetSourcePinStatus |
( |
KBI_Type * |
base | ) |
|
|
inlinestatic |
- Parameters
-
base | KBI peripheral base address. |
- Returns
- The status indicates the active pin defined as keyboard interrupt which is pushed.