![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Data Structures | |
struct | cmp_config_t |
CMP configuration structure. More... | |
Enumerations | |
enum | _cmp_input_mux { kCMP_InputVREF = 0U, kCMP_Input1 = 1U, kCMP_Input2 = 2U, kCMP_Input3 = 3U, kCMP_Input4 = 4U, kCMP_Input5 = 5U } |
CMP input mux for positive and negative sides. More... | |
enum | _cmp_interrupt_type { kCMP_EdgeDisable = 0U, kCMP_EdgeRising = 2U, kCMP_EdgeFalling = 4U, kCMP_EdgeRisingFalling = 6U, kCMP_LevelDisable = 1U, kCMP_LevelHigh = 3U, kCMP_LevelLow = 5U } |
CMP interrupt type. More... | |
enum | cmp_vref_source_t { KCMP_VREFSourceVDDA = 1U, KCMP_VREFSourceInternalVREF = 0U } |
CMP Voltage Reference source. More... | |
Driver version | |
#define | FSL_CMP_DRIVER_VERSION (MAKE_VERSION(2U, 1U, 0U)) |
Driver version 2.1.0. More... | |
Initialization and deinitialization | |
void | CMP_Init (const cmp_config_t *config) |
CMP initialization. More... | |
void | CMP_Deinit (void) |
CMP deinitialization. More... | |
void | CMP_GetDefaultConfig (cmp_config_t *config) |
Initializes the CMP user configuration structure. More... | |
Compare Interface | |
static void | CMP_SetInputChannels (uint8_t positiveChannel, uint8_t negativeChannel) |
void | CMP_SetVREF (const cmp_vref_config_t *config) |
Configures the VREFINPUT. More... | |
static bool | CMP_GetOutput (void) |
Get CMP compare output. More... | |
Interrupt Interface | |
static void | CMP_EnableInterrupt (uint32_t type) |
CMP enable interrupt. More... | |
static void | CMP_DisableInterrupt (void) |
CMP disable interrupt. | |
static void | CMP_ClearInterrupt (void) |
CMP clear interrupt. | |
static void | CMP_EnableFilteredInterruptSource (bool enable) |
Select which Analog comparator output (filtered or un-filtered) is used for interrupt detection. More... | |
Status Interface | |
static bool | CMP_GetPreviousInterruptStatus (void) |
Get CMP interrupt status before interupt enable. More... | |
static bool | CMP_GetInterruptStatus (void) |
Get CMP interrupt status after interupt enable. More... | |
struct cmp_config_t |
Data Fields | |
bool | enableHysteresis |
Enable hysteresis. More... | |
bool | enableLowPower |
Enable low power mode. More... | |
bool cmp_config_t::enableHysteresis |
bool cmp_config_t::enableLowPower |
#define FSL_CMP_DRIVER_VERSION (MAKE_VERSION(2U, 1U, 0U)) |
enum _cmp_input_mux |
enum _cmp_interrupt_type |
enum cmp_vref_source_t |
void CMP_Init | ( | const cmp_config_t * | config | ) |
This function enables the CMP module and do necessary settings.
config | Pointer to the configuration structure. |
void CMP_Deinit | ( | void | ) |
This function gates the clock for CMP module.
void CMP_GetDefaultConfig | ( | cmp_config_t * | config | ) |
This function initializes the user configuration structure to these default values.
config | Pointer to the configuration structure. |
void CMP_SetVREF | ( | const cmp_vref_config_t * | config | ) |
config | Pointer to the configuration structure. |
|
inlinestatic |
|
inlinestatic |
type | CMP interrupt type. See "_cmp_interrupt_type". |
|
inlinestatic |
enable | false: Select Analog Comparator raw output (unfiltered) as input for interrupt detection. true: Select Analog Comparator filtered output as input for interrupt detection. |
|
inlinestatic |
|
inlinestatic |