![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
#include "sys_config.h"#include "cmsis.h"Go to the source code of this file.
Data Structures | |
| struct | IP_CMP_001_T |
| Comparator (CMP) register block structure. More... | |
Enumerations | |
| enum | IP_CMP_ENCTRL_T { CMP_ENCTRL_DISABLE, CMP_ENCTRL_DIS_IN_DS_PWD, CMP_ENCTRL_DIS_IN_PWD, CMP_ENCTRL_ENABLE } |
| Comparator control definition. More... | |
| enum | IP_CMP_INPUT_T { CMP_INPUT_VREF_DIV, CMP_INPUT_CMPx_IN0, CMP_INPUT_CMPx_IN1, CMP_INPUT_CMPx_IN2, CMP_INPUT_CMPx_IN3, CMP_INPUT_CMP_OTHER_IN0, CMP_INPUT_INTERNAL_09VBG } |
| Comparator VM/VP input definitions. More... | |
| enum | IP_CMP_HYS_T { CMP_HYS_NONE = CMP_CTRLx_HYS(0), CMP_HYS_5MV = CMP_CTRLx_HYS(1), CMP_HYS_10MV = CMP_CTRLx_HYS(2), CMP_HYS_15MV = CMP_CTRLx_HYS(3) } |
| Comparator hysteresis selection definitions. More... | |
| enum | IP_CMP_INTEDGE_T { CMP_INTEDGE_FALLING = CMP_CTRLx_INTEDGE(0), CMP_INTEDGE_RISING = CMP_CTRLx_INTEDGE(1), CMP_INTEDGE_BOTH = CMP_CTRLx_INTEDGE(2) } |
| Comparator interrupt edge selection definitions. More... | |
Functions | |
| STATIC INLINE void | IP_CMP_Init (IP_CMP_001_T *pCMP) |
| Initializes the CMP. | |
| STATIC INLINE void | IP_CMP_DeInit (IP_CMP_001_T *pCMP) |
| De-initializes the CMP. | |
| STATIC INLINE void | IP_CMP_EnableCurrentSrc (IP_CMP_001_T *pCMP, IP_CMP_ENCTRL_T en) |
| Enables comparator current source. | |
| STATIC INLINE void | IP_CMP_EnableBandGap (IP_CMP_001_T *pCMP, IP_CMP_ENCTRL_T en) |
| Enables comparator bandgap reference. | |
| STATIC INLINE void | IP_CMP_ControlROSC (IP_CMP_001_T *pCMP, uint32_t flag) |
| Control CMP_ROSC. | |
| STATIC INLINE void | IP_CMP_SetTimerCapInput (IP_CMP_001_T *pCMP, uint32_t flag) |
| Control CMP_ROSC. | |
| STATIC INLINE void | IP_CMP_SetupVoltLadder (IP_CMP_001_T *pCMP, uint8_t id, uint16_t ladSel, uint32_t flag) |
| Sets up voltage ladder. | |
| STATIC INLINE void | IP_CMP_EnableVoltLadder (IP_CMP_001_T *pCMP, uint8_t id, IP_CMP_ENCTRL_T en) |
| Enables voltage ladder. | |
| STATIC INLINE void | IP_CMP_SetPosVoltRef (IP_CMP_001_T *pCMP, uint8_t id, IP_CMP_INPUT_T input) |
| Selects positive voltage input. | |
| STATIC INLINE void | IP_CMP_SetNegVoltRef (IP_CMP_001_T *pCMP, uint8_t id, IP_CMP_INPUT_T input) |
| Selects negative voltage input. | |
| STATIC INLINE void | IP_CMP_SetHysteresis (IP_CMP_001_T *pCMP, uint8_t id, IP_CMP_HYS_T hys) |
| Selects hysteresis level. | |
| STATIC INLINE void | IP_CMP_Enable (IP_CMP_001_T *pCMP, uint8_t id, IP_CMP_ENCTRL_T en) |
| Enables specified comparator. | |
| STATIC INLINE FlagStatus | IP_CMP_GetCmpStatus (IP_CMP_001_T *pCMP, uint8_t id) |
| Returns the current comparator status. | |
| STATIC INLINE void | IP_CMP_EnableOuput (IP_CMP_001_T *pCMP, uint8_t id) |
| Enable comparator output. | |
| STATIC INLINE void | IP_CMP_DisableOutput (IP_CMP_001_T *pCMP, uint8_t id) |
| Disable comparator output. | |
| STATIC INLINE void | IP_CMP_EnableSyncCmpOut (IP_CMP_001_T *pCMP, uint8_t id) |
| Synchronizes Comparator output to bus clock. | |
| STATIC INLINE void | IP_CMP_DisableSyncCmpOut (IP_CMP_001_T *pCMP, uint8_t id) |
| Sets comparator output to be used directly (no sync) | |
| STATIC INLINE void | IP_CMP_ConfigInt (IP_CMP_001_T *pCMP, uint8_t id, uint32_t intFlag, IP_CMP_INTEDGE_T edgeSel) |
| Sets up comparator interrupt. | |
| STATIC INLINE FlagStatus | IP_CMP_GetIntStatus (IP_CMP_001_T *pCMP, uint8_t id) |
| Get the CMP interrupt status. | |
| STATIC INLINE void | IP_CMP_CMP_ClearIntStatus (IP_CMP_001_T *pCMP, uint8_t id) |
| Clears the CMP interrupt status. | |