LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
acmp_001.c File Reference
#include "acmp_001.h"

Go to the source code of this file.

Macros

#define ACMP_EDGECLR_BIT   (1 << 20)
 
#define ACMP_EDGESEL_MASK   (0x3 << 3)
 
#define ACMP_COMPVPSEL_MASK   (0x7 << 8)
 
#define ACMP_COMPVMSEL_MASK   (0x7 << 11)
 
#define ACMP_HYSTERESIS_MASK   (0x3 << 25)
 
#define ACMP_LADSEL_MASK   (0x1F << 1)
 
#define ACMP_LADREF_MASK   (0x1 << 6)
 

Functions

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.
 
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.
 

Macro Definition Documentation

#define ACMP_COMPVMSEL_MASK   (0x7 << 11)

Definition at line 38 of file acmp_001.c.

#define ACMP_COMPVPSEL_MASK   (0x7 << 8)

Definition at line 37 of file acmp_001.c.

#define ACMP_EDGECLR_BIT   (1 << 20)

Definition at line 34 of file acmp_001.c.

#define ACMP_EDGESEL_MASK   (0x3 << 3)

Definition at line 36 of file acmp_001.c.

#define ACMP_HYSTERESIS_MASK   (0x3 << 25)

Definition at line 39 of file acmp_001.c.

#define ACMP_LADREF_MASK   (0x1 << 6)

Definition at line 41 of file acmp_001.c.

#define ACMP_LADSEL_MASK   (0x1F << 1)

Definition at line 40 of file acmp_001.c.