LPCOpen Platform for LPC18XX/43XX microcontrollers  18XX43XX
LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers
Data Structures | Macros | Enumerations | Functions
dac_18xx_43xx.h File Reference

Go to the source code of this file.

Data Structures

struct  LPC_DAC_T
 DAC register block structure. More...
 

Macros

#define DAC_VALUE(n)   ((uint32_t) ((n & 0x3FF) << 6))
 
#define DAC_BIAS_EN   ((uint32_t) (1 << 16))
 
#define DAC_CCNT_VALUE(n)   ((uint32_t) (n & 0xffff))
 
#define DAC_DBLBUF_ENA   ((uint32_t) (1 << 1))
 
#define DAC_CNT_ENA   ((uint32_t) (1 << 2))
 
#define DAC_DMA_ENA   ((uint32_t) (1 << 3))
 
#define DAC_DACCTRL_MASK   ((uint32_t) (0x0F))
 

Enumerations

enum  DAC_CURRENT_OPT_T { DAC_MAX_UPDATE_RATE_1MHz = 0, DAC_MAX_UPDATE_RATE_400kHz }
 Current option in DAC configuration option. More...
 

Functions

void Chip_DAC_Init (LPC_DAC_T *pDAC)
 Initial DAC configuration. More...
 
void Chip_DAC_DeInit (LPC_DAC_T *pDAC)
 Shutdown DAC. More...
 
void Chip_DAC_UpdateValue (LPC_DAC_T *pDAC, uint32_t dac_value)
 Update value to DAC buffer. More...
 
void Chip_DAC_SetBias (LPC_DAC_T *pDAC, uint32_t bias)
 Set maximum update rate for DAC. More...
 
STATIC INLINE void Chip_DAC_ConfigDAConverterControl (LPC_DAC_T *pDAC, uint32_t dacFlags)
 Enables the DMA operation and controls DMA timer. More...
 
STATIC INLINE void Chip_DAC_SetDMATimeOut (LPC_DAC_T *pDAC, uint32_t time_out)
 Set reload value for interrupt/DMA counter. More...
 
STATIC INLINE IntStatus Chip_DAC_GetIntStatus (LPC_DAC_T *pDAC)
 Get status for interrupt/DMA time out. More...