![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
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. | |
| #define ACMP_COMPEDGE_BIT (1 << 23) /* Comparator edge-detect status */ |
Definition at line 57 of file acmp_001.h.
| #define ACMP_COMPSA_BIT (1 << 6) /* Comparator output control bit */ |
Definition at line 55 of file acmp_001.h.
| #define ACMP_COMPSTAT_BIT (1 << 21) /* Comparator status, reflects the state of the comparator output */ |
Definition at line 56 of file acmp_001.h.
| #define ACMP_LADENAB_BIT (1 << 0) /* Voltage ladder enable bit */ |
Definition at line 58 of file acmp_001.h.
Edge selection for comparator
Definition at line 61 of file acmp_001.h.
| enum IP_ACMP_HYS_001_T |
Hysteresis selection for comparator
Definition at line 68 of file acmp_001.h.
| STATIC INLINE void IP_ACMP_Deinit | ( | ACMP_001_T * | pACMP | ) |
De-initializes the ACMP.
| pACMP | : Pointer to Analog Comparator block |
Definition at line 87 of file acmp_001.h.
| STATIC INLINE void IP_ACMP_DisableSyncCompOut | ( | ACMP_001_T * | pACMP | ) |
Sets comparator output to be used directly (no sync)
| pACMP | : Pointer to Analog Comparator block |
Definition at line 129 of file acmp_001.h.
| STATIC INLINE void IP_ACMP_DisableVoltLadder | ( | ACMP_001_T * | pACMP | ) |
Disables voltage ladder.
| pACMP | : Pointer to Analog Comparator block |
Definition at line 203 of file acmp_001.h.
| void IP_ACMP_EdgeClear | ( | ACMP_001_T * | pACMP | ) |
Clears the ACMP interrupt (EDGECLR bit)
| pACMP | : Pointer to Analog Comparator block |
Definition at line 56 of file acmp_001.c.
| STATIC INLINE void IP_ACMP_EnableSyncCompOut | ( | ACMP_001_T * | pACMP | ) |
Synchronizes Comparator output to bus clock.
| pACMP | : Pointer to Analog Comparator block |
Definition at line 119 of file acmp_001.h.
| STATIC INLINE void IP_ACMP_EnableVoltLadder | ( | ACMP_001_T * | pACMP | ) |
Enables voltage ladder.
| pACMP | : Pointer to Analog Comparator block |
Definition at line 193 of file acmp_001.h.
| STATIC INLINE uint32_t IP_ACMP_GetCompStatus | ( | ACMP_001_T * | pACMP | ) |
Returns the current comparator status.
| pACMP | : Pointer to Analog Comparator block |
Definition at line 94 of file acmp_001.h.
| STATIC INLINE void IP_ACMP_Init | ( | ACMP_001_T * | pACMP | ) |
Initializes the ACMP.
| pACMP | : Pointer to Analog Comparator block |
Definition at line 80 of file acmp_001.h.
| void IP_ACMP_SetEdgeSelection | ( | ACMP_001_T * | pACMP, |
| IP_ACMP_001_EDGESEL_T | edgeSel | ||
| ) |
Sets up ACMP edge selection.
| pACMP | : Pointer to Analog Comparator block |
| edgeSel | : Edge selection value |
Definition at line 66 of file acmp_001.c.
| void IP_ACMP_SetHysteresis | ( | ACMP_001_T * | pACMP, |
| IP_ACMP_HYS_001_T | hys | ||
| ) |
Selects hysteresis level.
| pACMP | : Pointer to Analog Comparator block |
| hys | : Selected Hysteresis level |
Definition at line 93 of file acmp_001.c.
| void IP_ACMP_SetNegVoltRef | ( | ACMP_001_T * | pACMP, |
| uint32_t | Neginput | ||
| ) |
Selects negative voltage input.
| pACMP | : Pointer to Analog Comparator block |
| Neginput | : one of the negative input voltage sources |
Definition at line 84 of file acmp_001.c.
| void IP_ACMP_SetPosVoltRef | ( | ACMP_001_T * | pACMP, |
| uint32_t | Posinput | ||
| ) |
Selects positive voltage input.
| pACMP | : Pointer to Analog Comparator block |
| Posinput | : one of the positive input voltage sources |
Definition at line 75 of file acmp_001.c.
| 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.
| pACMP | : Pointer to Analog Comparator block |
| edgeSel | : Edge selection value |
| Posinput | : one of the positive input voltage sources |
| Neginput | : one of the negative input voltage sources |
| hys | : Selected Hysteresis level |
Definition at line 102 of file acmp_001.c.
| void IP_ACMP_SetupVoltLadder | ( | ACMP_001_T * | pACMP, |
| uint32_t | ladsel, | ||
| bool | ladrefVDDCMP | ||
| ) |
Sets up voltage ladder.
| pACMP | : Pointer to Analog Comparator block |
| ladsel | : Voltage ladder value |
| ladrefVDDCMP | : Selects the reference voltage Vref for the voltage ladder : false for VDD, true for VDDCMP pin |
Definition at line 114 of file acmp_001.c.