STM32L4xx_HAL_Driver  1.14.0

Functions

__STATIC_INLINE void LL_DAC_EnableDMAReq (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Enable DAC DMA transfer request of the selected channel. More...
 
__STATIC_INLINE void LL_DAC_DisableDMAReq (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Disable DAC DMA transfer request of the selected channel. More...
 
__STATIC_INLINE uint32_t LL_DAC_IsDMAReqEnabled (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get DAC DMA transfer request state of the selected channel. (0: DAC DMA transfer request is disabled, 1: DAC DMA transfer request is enabled) CR DMAEN1 LL_DAC_IsDMAReqEnabled
CR DMAEN2 LL_DAC_IsDMAReqEnabled. More...
 
__STATIC_INLINE uint32_t LL_DAC_DMA_GetRegAddr (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t Register)
 Function to help to configure DMA transfer to DAC: retrieve the DAC register address from DAC instance and a list of DAC registers intended to be used (most commonly) with DMA transfer. More...
 

Detailed Description

Function Documentation

◆ LL_DAC_DisableDMAReq()

__STATIC_INLINE void LL_DAC_DisableDMAReq ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Disable DAC DMA transfer request of the selected channel.

Note
To configure DMA source address (peripheral address), use function LL_DAC_DMA_GetRegAddr(). CR DMAEN1 LL_DAC_DisableDMAReq
CR DMAEN2 LL_DAC_DisableDMAReq
Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
Return values
None

Definition at line 1366 of file stm32l4xx_ll_dac.h.

1367 {
1368  CLEAR_BIT(DACx->CR,
1369  DAC_CR_DMAEN1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK));
1370 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_DAC_DMA_GetRegAddr()

__STATIC_INLINE uint32_t LL_DAC_DMA_GetRegAddr ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel,
uint32_t  Register 
)

Function to help to configure DMA transfer to DAC: retrieve the DAC register address from DAC instance and a list of DAC registers intended to be used (most commonly) with DMA transfer.

Note
These DAC registers are data holding registers: when DAC conversion is requested, DAC generates a DMA transfer request to have data available in DAC data holding registers.
This macro is intended to be used with LL DMA driver, refer to function "LL_DMA_ConfigAddresses()". Example: LL_DMA_ConfigAddresses(DMA1, LL_DMA_CHANNEL_1, (uint32_t)&< array or variable >, LL_DAC_DMA_GetRegAddr(DAC1, LL_DAC_CHANNEL_1, LL_DAC_DMA_REG_DATA_12BITS_RIGHT_ALIGNED), LL_DMA_DIRECTION_MEMORY_TO_PERIPH); DHR12R1 DACC1DHR LL_DAC_DMA_GetRegAddr
DHR12L1 DACC1DHR LL_DAC_DMA_GetRegAddr
DHR8R1 DACC1DHR LL_DAC_DMA_GetRegAddr
DHR12R2 DACC2DHR LL_DAC_DMA_GetRegAddr
DHR12L2 DACC2DHR LL_DAC_DMA_GetRegAddr
DHR8R2 DACC2DHR LL_DAC_DMA_GetRegAddr
Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
RegisterThis parameter can be one of the following values:
  • LL_DAC_DMA_REG_DATA_12BITS_RIGHT_ALIGNED
  • LL_DAC_DMA_REG_DATA_12BITS_LEFT_ALIGNED
  • LL_DAC_DMA_REG_DATA_8BITS_RIGHT_ALIGNED
Return values
DACregister address

Definition at line 1427 of file stm32l4xx_ll_dac.h.

1428 {
1429  /* Retrieve address of register DHR12Rx, DHR12Lx or DHR8Rx depending on */
1430  /* DAC channel selected. */
1431  return ((uint32_t)(__DAC_PTR_REG_OFFSET((DACx)->DHR12R1,
1432  ((DAC_Channel >> (Register & 0x1FUL)) & DAC_REG_DHR_REGOFFSET_MASK_POSBIT0))));
1433 }

◆ LL_DAC_EnableDMAReq()

__STATIC_INLINE void LL_DAC_EnableDMAReq ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Enable DAC DMA transfer request of the selected channel.

Note
To configure DMA source address (peripheral address), use function LL_DAC_DMA_GetRegAddr(). CR DMAEN1 LL_DAC_EnableDMAReq
CR DMAEN2 LL_DAC_EnableDMAReq
Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
Return values
None

Definition at line 1345 of file stm32l4xx_ll_dac.h.

1346 {
1347  SET_BIT(DACx->CR,
1348  DAC_CR_DMAEN1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK));
1349 }

◆ LL_DAC_IsDMAReqEnabled()

__STATIC_INLINE uint32_t LL_DAC_IsDMAReqEnabled ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get DAC DMA transfer request state of the selected channel. (0: DAC DMA transfer request is disabled, 1: DAC DMA transfer request is enabled) CR DMAEN1 LL_DAC_IsDMAReqEnabled
CR DMAEN2 LL_DAC_IsDMAReqEnabled.

Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
Return values
Stateof bit (1 or 0).

Definition at line 1386 of file stm32l4xx_ll_dac.h.

1387 {
1388  return ((READ_BIT(DACx->CR,
1389  DAC_CR_DMAEN1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK))
1390  == (DAC_CR_DMAEN1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK))) ? 1UL : 0UL);
1391 }