LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CHIP: LPC18xx/43xx D/A conversion driver

Detailed Description

Functions

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

Function Documentation

STATIC INLINE void Chip_DAC_ConfigDAConverterControl ( IP_DAC_001_T pDAC,
uint32_t  dacFlags 
)

Enables the DMA operation and controls DMA timer.

Parameters
pDAC: pointer to the DAC peripheral block
dacFlags: An Or'ed value of the following DAC values:
  • DAC_DBLBUF_ENA :enable/disable DACR double buffering feature
  • DAC_CNT_ENA :enable/disable timer out counter
  • DAC_DMA_ENA :enable/disable DMA access
Returns
Nothing
Note
Pass an Or'ed value of the DAC flags to enable those options.

Definition at line 96 of file dac_18xx_43xx.h.

void Chip_DAC_DeInit ( LPC_DAC_T pDAC)

Shutdown DAC.

Parameters
pDAC: pointer to LPC_DAC_T
Returns
Nothing

Definition at line 58 of file dac_17xx_40xx.h.

STATIC INLINE IntStatus Chip_DAC_GetIntStatus ( LPC_DAC_T pDAC)

Get status for interrupt/DMA time out.

Parameters
pDAC: pointer to LPC_DAC_T
Returns
interrupt/DMA time out status, should be SET or RESET

Definition at line 117 of file dac_18xx_43xx.h.

void Chip_DAC_Init ( LPC_DAC_T pDAC)

Initial DAC configuration.

         - Maximum current is 700 uA
         - Value to AOUT is 0
Parameters
pDAC: pointer to LPC_DAC_T
Returns
Nothing

Definition at line 51 of file dac_17xx_40xx.c.

STATIC INLINE void Chip_DAC_SetBias ( LPC_DAC_T pDAC,
uint32_t  bias 
)

Set maximum update rate for DAC.

Parameters
pDAC: pointer to LPC_DAC_T
bias: Using Bias value, should be:
  • 0 is 1MHz
  • 1 is 400kHz
Returns
Nothing

Definition at line 81 of file dac_18xx_43xx.h.

STATIC INLINE void Chip_DAC_SetDMATimeOut ( LPC_DAC_T pDAC,
uint32_t  time_out 
)

Set reload value for interrupt/DMA counter.

Parameters
pDAC: pointer to LPC_DAC_T
time_out: time out to reload for interrupt/DMA counter
Returns
Nothing

Definition at line 107 of file dac_18xx_43xx.h.

STATIC INLINE void Chip_DAC_UpdateValue ( LPC_DAC_T pDAC,
uint32_t  dac_value 
)

Update value to DAC buffer.

Parameters
pDAC: pointer to LPC_DAC_T
dac_value: value 10 bit to be converted to output
Returns
Nothing

Definition at line 68 of file dac_18xx_43xx.h.