NXP's driver library for LPC17xx, ported to mbed's online compiler. Not tested! I had to fix a lot of warings and found a couple of pretty obvious bugs, so the chances are there are more. Original: http://ics.nxp.com/support/documents/microcontrollers/zip/lpc17xx.cmsis.driver.library.zip

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

DAC_Public_Functions

DAC_Public_Functions
[DAC]

Functions

void DAC_Init (LPC_DAC_TypeDef *DACx)
 Initial ADC configuration

  • Maximum current is 700 uA
  • Value to AOUT is 0.

void DAC_UpdateValue (LPC_DAC_TypeDef *DACx, uint32_t dac_value)
 Update value to DAC.
void DAC_SetBias (LPC_DAC_TypeDef *DACx, uint32_t bias)
 Set Maximum current for DAC.
void DAC_ConfigDAConverterControl (LPC_DAC_TypeDef *DACx, DAC_CONVERTER_CFG_Type *DAC_ConverterConfigStruct)
 To enable the DMA operation and control DMA timer.
void DAC_SetDMATimeOut (LPC_DAC_TypeDef *DACx, uint32_t time_out)
 Set reload value for interrupt/DMA counter.

Function Documentation

void DAC_ConfigDAConverterControl ( LPC_DAC_TypeDef *  DACx,
DAC_CONVERTER_CFG_Type DAC_ConverterConfigStruct 
)

To enable the DMA operation and control DMA timer.

Parameters:
[in]DACxpointer to LPC_DAC_TypeDef
[in]DAC_ConverterConfigStructpointer to DAC_CONVERTER_CFG_Type

  • DBLBUF_ENA : enable/disable DACR double buffering feature
  • CNT_ENA : enable/disable timer out counter
  • DMA_ENA : enable/disable DMA access
Returns:
None

Definition at line 108 of file lpc17xx_dac.c.

void DAC_Init ( LPC_DAC_TypeDef *  DACx )

Initial ADC configuration

  • Maximum current is 700 uA
  • Value to AOUT is 0.

Parameters:
[in]DACxpointer to LPC_DAC_TypeDef
Returns:
None

Definition at line 54 of file lpc17xx_dac.c.

void DAC_SetBias ( LPC_DAC_TypeDef *  DACx,
uint32_t  bias 
)

Set Maximum current for DAC.

Parameters:
[in]DACxpointer to LPC_DAC_TypeDef
[in]bias: 0 is 700 uA 1 350 uA
Returns:
None

Definition at line 90 of file lpc17xx_dac.c.

void DAC_SetDMATimeOut ( LPC_DAC_TypeDef *  DACx,
uint32_t  time_out 
)

Set reload value for interrupt/DMA counter.

Parameters:
[in]DACxpointer to LPC_DAC_TypeDef
[in]time_outtime out to reload for interrupt/DMA counter
Returns:
None

Definition at line 125 of file lpc17xx_dac.c.

void DAC_UpdateValue ( LPC_DAC_TypeDef *  DACx,
uint32_t  dac_value 
)

Update value to DAC.

Parameters:
[in]DACxpointer to LPC_DAC_TypeDef
[in]dac_value: value 10 bit to be converted to output
Returns:
None

Definition at line 71 of file lpc17xx_dac.c.