![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides a peripheral driver for the Analog Comparator (CMP) module of MCUXpresso SDK devices.
The driver provides a set of functions to set two input sources of the on-chip comparator and compare the voltage of them.
The function CMP_Init() initializes the CMP with specified configurations. The function CMP_GetDefaultConfig() gets the default configurations.
The function CMP_Deinit() disables the module clock.
The function CMP_SetInputChannels() configures the P-side and N-side input sources.
The function CMP_SetVREF() sets the reference voltage which can be dedicated to input 0 of both P and N sides.
The function CMP_GetOutput() gets the compare result of the two sides.
Provides functions to enable/disable/clear CMP interrupts.
The function CMP_EnableFilteredInterruptSource() allows users to select which analog comparator output (filtered or un-filtered) is used for interrupt detection.
Provides functions to get the CMP status.
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/cmp_1
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/cmp_1