Go to the source code of this file.
◆ STM32_ADC
#define STM32_ADC |
( |
| real_val, |
|
|
| reg_val, |
|
|
| mask, |
|
|
| shift, |
|
|
| reg ) |
Value:
#define STM32_ADC_SHIFT_MASK
Definition stm32_adc.h:13
#define STM32_ADC_REAL_VAL_SHIFT
Definition stm32_adc.h:20
#define STM32_ADC_REG_SHIFT
Definition stm32_adc.h:12
#define STM32_ADC_SHIFT_SHIFT
Definition stm32_adc.h:14
#define STM32_ADC_MASK_MASK
Definition stm32_adc.h:15
#define STM32_ADC_REG_VAL_SHIFT
Definition stm32_adc.h:18
#define STM32_ADC_MASK_SHIFT
Definition stm32_adc.h:16
#define STM32_ADC_REAL_VAL_MASK
Definition stm32_adc.h:19
#define STM32_ADC_REG_MASK
Definition stm32_adc.h:11
#define STM32_ADC_REG_VAL_MASK
Definition stm32_adc.h:17
STM32 ADC configuration bit field.
- reg (0..0xFF) [ 0 : 7 ]
- shift (0..31) [ 8 : 12 ]
- mask (0x1, 0x3, 0x7) [ 13 : 15 ]
- reg_val (0..7) [ 16 : 18 ]
- real_val (0..8191) [ 19 : 31 ]
- Parameters
-
reg | ADC_x register offset |
shift | Position within ADC_x. |
mask | Mask for the ADC_x field. |
reg_val | Register value (0, 1, ... 7). |
real_val | Real corresponding value (0, 1, ... 8191). |
◆ STM32_ADC_GET_MASK
#define STM32_ADC_GET_MASK |
( |
| val | ) |
|
◆ STM32_ADC_GET_REAL_VAL
#define STM32_ADC_GET_REAL_VAL |
( |
| val | ) |
|
◆ STM32_ADC_GET_REG
#define STM32_ADC_GET_REG |
( |
| val | ) |
|
◆ STM32_ADC_GET_REG_VAL
#define STM32_ADC_GET_REG_VAL |
( |
| val | ) |
|
◆ STM32_ADC_GET_SHIFT
#define STM32_ADC_GET_SHIFT |
( |
| val | ) |
|
◆ STM32_ADC_MASK_MASK
◆ STM32_ADC_MASK_SHIFT
#define STM32_ADC_MASK_SHIFT 13U |
◆ STM32_ADC_REAL_VAL_MASK
#define STM32_ADC_REAL_VAL_MASK BIT_MASK(13) |
◆ STM32_ADC_REAL_VAL_SHIFT
#define STM32_ADC_REAL_VAL_SHIFT 19U |
◆ STM32_ADC_REG_MASK
◆ STM32_ADC_REG_SHIFT
#define STM32_ADC_REG_SHIFT 0U |
◆ STM32_ADC_REG_VAL_MASK
#define STM32_ADC_REG_VAL_MASK BIT_MASK(3) |
◆ STM32_ADC_REG_VAL_SHIFT
#define STM32_ADC_REG_VAL_SHIFT 16U |
◆ STM32_ADC_RES
#define STM32_ADC_RES |
( |
| resolution, |
|
|
| reg_val ) |
Value:
#define STM32_ADC(real_val, reg_val, mask, shift, reg)
STM32 ADC configuration bit field.
Definition stm32_adc.h:37
#define STM32_ADC_RES_REG
Definition stm32f1_adc.h:18
#define STM32_ADC_RES_MASK
Definition stm32f1_adc.h:20
#define STM32_ADC_RES_SHIFT
Definition stm32f1_adc.h:19
◆ STM32_ADC_SHIFT_MASK
#define STM32_ADC_SHIFT_MASK BIT_MASK(5) |
◆ STM32_ADC_SHIFT_SHIFT
#define STM32_ADC_SHIFT_SHIFT 8U |