| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
acmp_001.h File Reference
`#include "sys_config.h"`
`#include "cmsis.h"`

Go to the source code of this file.

## Data Structures
struct | ACMP_001_T
| Analog Comparator register block structure. More...

## Macros
#define | ACMP_COMPSA_BIT (1 << 6) /* Comparator output control bit */
#define | ACMP_COMPSTAT_BIT (1 << 21) /* Comparator status, reflects the state of the comparator output */
#define | ACMP_COMPEDGE_BIT (1 << 23) /* Comparator edge-detect status */
#define | ACMP_LADENAB_BIT (1 << 0) /* Voltage ladder enable bit */

## Enumerations
enum | IP_ACMP_001_EDGESEL_T { ACMP_EDGESEL_FALLING = (0 << 3), ACMP_EDGESEL_RISING = (1 << 3), ACMP_EDGESEL_BOTH = (2 << 3) }
enum | IP_ACMP_HYS_001_T { ACMP_HYS_NONE = (0 << 25), ACMP_HYS_5MV = (1 << 25), ACMP_HYS_10MV = (2 << 25), ACMP_HYS_20MV = (3 << 25) }

## Functions
STATIC INLINE void | IP_ACMP_Init (ACMP_001_T *pACMP)
| Initializes the ACMP.
STATIC INLINE void | IP_ACMP_Deinit (ACMP_001_T *pACMP)
| De-initializes the ACMP.
STATIC INLINE uint32_t | IP_ACMP_GetCompStatus (ACMP_001_T *pACMP)
| Returns the current comparator status.
void | IP_ACMP_EdgeClear (ACMP_001_T *pACMP)
| Clears the ACMP interrupt (EDGECLR bit)
void | IP_ACMP_SetEdgeSelection (ACMP_001_T *pACMP, IP_ACMP_001_EDGESEL_T edgeSel)
| Sets up ACMP edge selection.
STATIC INLINE void | IP_ACMP_EnableSyncCompOut (ACMP_001_T *pACMP)
| Synchronizes Comparator output to bus clock.
STATIC INLINE void | IP_ACMP_DisableSyncCompOut (ACMP_001_T *pACMP)
| Sets comparator output to be used directly (no sync)
void | IP_ACMP_SetPosVoltRef (ACMP_001_T *pACMP, uint32_t Posinput)
| Selects positive voltage input.
void | IP_ACMP_SetNegVoltRef (ACMP_001_T *pACMP, uint32_t Neginput)
| Selects negative voltage input.
void | IP_ACMP_SetHysteresis (ACMP_001_T *pACMP, IP_ACMP_HYS_001_T hys)
| Selects hysteresis level.
void | IP_ACMP_SetupAMCPRefs (ACMP_001_T *pACMP, IP_ACMP_001_EDGESEL_T edgeSel, uint32_t Posinput, uint32_t Neginput, IP_ACMP_HYS_001_T hys)
| Helper function for setting up ACMP control.
void | IP_ACMP_SetupVoltLadder (ACMP_001_T *pACMP, uint32_t ladsel, bool ladrefVDDCMP)
| Sets up voltage ladder.
STATIC INLINE void | IP_ACMP_EnableVoltLadder (ACMP_001_T *pACMP)
| Enables voltage ladder.
STATIC INLINE void | IP_ACMP_DisableVoltLadder (ACMP_001_T *pACMP)
| Disables voltage ladder.