1.11. lpc17xx_dac
Module¶
DAC client library functions. See LPC17xx CMSIS-Compliant Standard Peripheral Firmware Driver Library documentation.
-
robovero.lpc17xx_dac.
DAC_CCNT_VALUE
(n)¶ Value to reload interrupt DMA counter.
-
class
robovero.lpc17xx_dac.
DAC_CONVERTER_CFG_Type
(**kwargs)¶ Bases:
robovero.internals.cstruct
Configuration for DAC converter control register.
- DBLBUF_ENA:
- 0: Disable DACR double buffering
- 1: when bit CNT_ENA, enable DACR double buffering feature
- CNT_ENA:
- 0: Time out counter is disable
- 1: Time out conter is enable
- DMA_ENA:
- 0: DMA access is disable
- 1: DMA burst request
- DBLBUF_ENA:
-
class
robovero.lpc17xx_dac.
DAC_CURRENT_OPT
¶ Current option in DAC configuration option.
-
DAC_MAX_CURRENT_350uA
= 1¶
-
DAC_MAX_CURRENT_700uA
= 0¶
-
-
robovero.lpc17xx_dac.
DAC_ConfigDAConverterControl
(DACx, DAC_ConverterConfigStruct)¶ To enable the DMA operation and control DMA timer.
Args:
- DACx: pointer to LPC_DAC_TypeDef, should be: LPC_DAC
- DAC_ConverterConfigStruct: pointer to DAC_CONVERTER_CFG_Type
-
robovero.lpc17xx_dac.
DAC_Init
(DACx)¶ Initial ADC configuration. Maximum current is 700 uA, Value to AOUT is 0.
Args:
- DACx: pointer to LPC_DAC_TypeDef, should be: LPC_DAC
-
robovero.lpc17xx_dac.
DAC_SetBias
(DACx, bias)¶ Set Maximum current for DAC.
Args:
- DACx: pointer to LPC_DAC_TypeDef, should be: LPC_DAC
- bias:
- 0 is 700 uA
- 1 is 350 uA
-
robovero.lpc17xx_dac.
DAC_SetDMATimeOut
(DACx, time_out)¶ Set reload value for interrupt/DMA counter.
Args:
- DACx: pointer to LPC_DAC_TypeDef, should be: LPC_DAC
- time_out: time out to reload for interrupt/DMA counter
-
robovero.lpc17xx_dac.
DAC_UpdateValue
(DACx, dac_value)¶ Update value to DAC.
Args:
- DACx: pointer to LPC_DAC_TypeDef, should be: LPC_DAC
- dac_value: value 10 bit to be converted to output
-
robovero.lpc17xx_dac.
DAC_VALUE
(n)¶ After the selected settling time after this field is written with a new VALUE, the voltage on the AOUT pin (with respect to VSSA) is VALUE/1024 * VREF.
-
robovero.lpc17xx_dac.
PARAM_DAC_CURRENT_OPT
(OPTION)¶ Macro to check DAC current optional parameter.
-
robovero.lpc17xx_dac.
PARAM_DACx
(n)¶ Macro to determine if it is valid DAC peripheral.