Zephyr API Documentation
3.7.0
A Scalable Open Source RTOS
|
#include <zephyr/dt-bindings/adc/adc.h>
Go to the source code of this file.
Macros | |
#define | STM32_ADC_REG_MASK BIT_MASK(8) |
#define | STM32_ADC_REG_SHIFT 0U |
#define | STM32_ADC_SHIFT_MASK BIT_MASK(5) |
#define | STM32_ADC_SHIFT_SHIFT 8U |
#define | STM32_ADC_MASK_MASK BIT_MASK(3) |
#define | STM32_ADC_MASK_SHIFT 13U |
#define | STM32_ADC_REG_VAL_MASK BIT_MASK(3) |
#define | STM32_ADC_REG_VAL_SHIFT 16U |
#define | STM32_ADC_REAL_VAL_MASK BIT_MASK(13) |
#define | STM32_ADC_REAL_VAL_SHIFT 19U |
#define | STM32_ADC(real_val, reg_val, mask, shift, reg) |
STM32 ADC configuration bit field. | |
#define | STM32_ADC_GET_REAL_VAL(val) (((val) >> STM32_ADC_REAL_VAL_SHIFT) & STM32_ADC_REAL_VAL_MASK) |
#define | STM32_ADC_GET_REG_VAL(val) (((val) >> STM32_ADC_REG_VAL_SHIFT) & STM32_ADC_REG_VAL_MASK) |
#define | STM32_ADC_GET_MASK(val) (((val) >> STM32_ADC_MASK_SHIFT) & STM32_ADC_MASK_MASK) |
#define | STM32_ADC_GET_SHIFT(val) (((val) >> STM32_ADC_SHIFT_SHIFT) & STM32_ADC_SHIFT_MASK) |
#define | STM32_ADC_GET_REG(val) (((val) >> STM32_ADC_REG_SHIFT) & STM32_ADC_REG_MASK) |
#define | STM32_ADC_RES(resolution, reg_val) |
STM32 ADC clock source | |
This value is to set <st,adc-clock-source> One or both values may not apply to all series. Refer to the RefMan | |
#define | SYNC 1 |
#define | ASYNC 2 |
STM32 ADC sequencer type | |
This value is to set <st,adc-sequencer> One or both values may not apply to all series. Refer to the RefMan | |
#define | NOT_FULLY_CONFIGURABLE 0 |
#define | FULLY_CONFIGURABLE 1 |
#define ASYNC 2 |
#define FULLY_CONFIGURABLE 1 |
#define NOT_FULLY_CONFIGURABLE 0 |
#define STM32_ADC | ( | real_val, | |
reg_val, | |||
mask, | |||
shift, | |||
reg | |||
) |
STM32 ADC configuration bit field.
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). |
#define STM32_ADC_GET_MASK | ( | val | ) | (((val) >> STM32_ADC_MASK_SHIFT) & STM32_ADC_MASK_MASK) |
#define STM32_ADC_GET_REAL_VAL | ( | val | ) | (((val) >> STM32_ADC_REAL_VAL_SHIFT) & STM32_ADC_REAL_VAL_MASK) |
#define STM32_ADC_GET_REG | ( | val | ) | (((val) >> STM32_ADC_REG_SHIFT) & STM32_ADC_REG_MASK) |
#define STM32_ADC_GET_REG_VAL | ( | val | ) | (((val) >> STM32_ADC_REG_VAL_SHIFT) & STM32_ADC_REG_VAL_MASK) |
#define STM32_ADC_GET_SHIFT | ( | val | ) | (((val) >> STM32_ADC_SHIFT_SHIFT) & STM32_ADC_SHIFT_MASK) |
#define STM32_ADC_MASK_MASK BIT_MASK(3) |
#define STM32_ADC_MASK_SHIFT 13U |
#define STM32_ADC_REAL_VAL_MASK BIT_MASK(13) |
#define STM32_ADC_REAL_VAL_SHIFT 19U |
#define STM32_ADC_REG_MASK BIT_MASK(8) |
#define STM32_ADC_REG_SHIFT 0U |
#define STM32_ADC_REG_VAL_MASK BIT_MASK(3) |
#define STM32_ADC_REG_VAL_SHIFT 16U |
#define STM32_ADC_RES | ( | resolution, | |
reg_val | |||
) |
#define STM32_ADC_SHIFT_MASK BIT_MASK(5) |
#define STM32_ADC_SHIFT_SHIFT 8U |
#define SYNC 1 |