The MCUXpresso SDK provides a peripheral driver for the cmp driver module of MCUXpresso SDK devices.
Enumerator |
---|
kCMP_In0BiggerThanIn1 |
comparator input 0 is bigger than input 1
|
kCMP_In1BiggerThanIn0 |
comparator input 1 is bigger than input 0
|
Enumerator |
---|
kCMP_EdgeRising |
Edge sensitive, falling edge.
|
kCMP_EdgeFalling |
Edge sensitive, rising edge.
|
kCMP_EdgeRisingFalling |
Edge sensitive, rising and falling edge.
|
kCMP_LevelLow |
Level sensitive, low level.
|
kCMP_LevelHigh |
Level sensitive, high level.
|
Enumerator |
---|
kCMP_FastMode |
Used in an active or deep sleep mode, this mode requires PMU bias enabled.
|
kCMP_LowpowerMode |
Used for all power mode, doesn't require PMU bias enabled.
|
Enumerator |
---|
kCMP_InputAllExternal |
Cmp input from two external source.
|
kCMP_InputOneExternalOneInternal |
Cmp input from one external input and one internal voltage reference 0.8V.
|
- Parameters
-
config | init configurations. |
static void CMP_SwapExtInput |
( |
void |
| ) |
|
|
inlinestatic |
static void CMP_EnableLowePowerMode |
( |
bool |
enable | ) |
|
|
inlinestatic |
- Parameters
-
enable | true is enter lowe power mode, false is enter fast mode |
static void CMP_EnableInnerInput |
( |
bool |
enable | ) |
|
|
inlinestatic |
- Parameters
-
enable | true is one external and one internal, false is all external. |
static uint32_t CMP_GetOutput |
( |
void |
| ) |
|
|
inlinestatic |
- Returns
- 0 is kCMP_In1BiggerThanIn0, 1 is kCMP_In0BiggerThanIn1.
static bool CMP_GetInterruptStatus |
( |
void |
| ) |
|
|
inlinestatic |
- Returns
- true is interrupt pending, false is no interrupt pending.
static void CMP_ClearInterruptStatus |
( |
void |
| ) |
|
|
inlinestatic |
- Returns
- true is interrupt pending, false is no interrupt pending.