STM32L443xx HAL User Manual
|
Defines | |
#define | __LL_DAC_CHANNEL_TO_DECIMAL_NB(__CHANNEL__) ((__CHANNEL__) & DAC_SWTR_CHX_MASK) |
Helper macro to get DAC channel number in decimal format from literals LL_DAC_CHANNEL_x. | |
#define | __LL_DAC_DECIMAL_NB_TO_CHANNEL(__DECIMAL_NB__) |
Helper macro to get DAC channel in literal format LL_DAC_CHANNEL_x from number in decimal format. | |
#define | __LL_DAC_DIGITAL_SCALE(__DAC_RESOLUTION__) ((0x00000FFFU) >> ((__DAC_RESOLUTION__) << 1U)) |
Helper macro to define the DAC conversion data full-scale digital value corresponding to the selected DAC resolution. | |
#define | __LL_DAC_CALC_VOLTAGE_TO_DATA(__VREFANALOG_VOLTAGE__, __DAC_VOLTAGE__, __DAC_RESOLUTION__) |
Helper macro to calculate the DAC conversion data (unit: digital value) corresponding to a voltage (unit: mVolt). |
#define __LL_DAC_CALC_VOLTAGE_TO_DATA | ( | __VREFANALOG_VOLTAGE__, | |
__DAC_VOLTAGE__, | |||
__DAC_RESOLUTION__ | |||
) |
((__DAC_VOLTAGE__) * __LL_DAC_DIGITAL_SCALE(__DAC_RESOLUTION__) \ / (__VREFANALOG_VOLTAGE__) \ )
Helper macro to calculate the DAC conversion data (unit: digital value) corresponding to a voltage (unit: mVolt).
__VREFANALOG_VOLTAGE__ | Analog reference voltage (unit: mV) |
__DAC_VOLTAGE__ | Voltage to be generated by DAC channel (unit: mVolt). |
__DAC_RESOLUTION__ | This parameter can be one of the following values: |
DAC | conversion data (unit: digital value) |
Definition at line 557 of file stm32l4xx_ll_dac.h.
#define __LL_DAC_CHANNEL_TO_DECIMAL_NB | ( | __CHANNEL__ | ) | ((__CHANNEL__) & DAC_SWTR_CHX_MASK) |
Helper macro to get DAC channel number in decimal format from literals LL_DAC_CHANNEL_x.
Example: __LL_DAC_CHANNEL_TO_DECIMAL_NB(LL_DAC_CHANNEL_1) will return decimal number "1".
__CHANNEL__ | This parameter can be one of the following values: |
1...2 |
Definition at line 479 of file stm32l4xx_ll_dac.h.
#define __LL_DAC_DECIMAL_NB_TO_CHANNEL | ( | __DECIMAL_NB__ | ) |
(((__DECIMAL_NB__) == 1U) \ ? ( \ LL_DAC_CHANNEL_1 \ ) \ : \ (((__DECIMAL_NB__) == 2U) \ ? ( \ LL_DAC_CHANNEL_2 \ ) \ : \ ( \ 0U \ ) \ ) \ )
Helper macro to get DAC channel in literal format LL_DAC_CHANNEL_x from number in decimal format.
Example: __LL_DAC_DECIMAL_NB_TO_CHANNEL(1) will return a data equivalent to "LL_DAC_CHANNEL_1".
__DECIMAL_NB__ | 1...2 |
Returned | value can be one of the following values: |
Definition at line 496 of file stm32l4xx_ll_dac.h.
#define __LL_DAC_DIGITAL_SCALE | ( | __DAC_RESOLUTION__ | ) | ((0x00000FFFU) >> ((__DAC_RESOLUTION__) << 1U)) |
Helper macro to define the DAC conversion data full-scale digital value corresponding to the selected DAC resolution.
__DAC_RESOLUTION__ | This parameter can be one of the following values: |
ADC | conversion data equivalent voltage value (unit: mVolt) |
Definition at line 536 of file stm32l4xx_ll_dac.h.