|
HARMcksL: ARM HAL toolbox (yet STM32 oriented) 1.6
SMFSW collection of HAL hacks for STM32
|
Simple extension for ADCs. More...
#include "sarmfsw.h"#include "ADC_cfg.h"

Data Structures | |
| struct | ADC_Cfg |
| ADC channel declaration config structure. More... | |
Macros | |
| #define | Def_VAlim VDD_VALUE |
| < Alias for legacy code using TEMP_CALC_V25 or TEMP_CALC_V30 | |
| #define | ADC_RESOLUTION 12U |
| ADC resolution in bits (defaults to 12 if not set) | |
| #define | DefRangeADC (LSHIFT(1U, ADC_RESOLUTION) - 1U) |
| ADC digital range. | |
| #define | Def_ADCStep(mv) |
Step value (in mV) following given mv. | |
Enumerations | |
| enum | eADCidx { ADC_MAX } |
| ADC peripheral instance indexes. More... | |
Functions | |
| uint16_t | ADC_GetRawVal (const eAnalogInput input) |
| Get ADC channel raw value. | |
| float | ADC_GetConvertedVal (const eAnalogInput input) |
| Get ADC channel converted value. | |
| FctERR | ADC_Start (void) |
| Start ADC conversions. | |
| FctERR | ADC_Stop (void) |
| Stop ADC conversions. | |
Simple extension for ADCs.
ADC_ex is meant to automate ADC conversions using DMA.
USE_ADC_EX symbol at project level to use ADC_ex functionalities | #define ADC_RESOLUTION 12U |
ADC resolution in bits (defaults to 12 if not set)
| #define Def_ADCStep | ( | mv | ) |
Step value (in mV) following given mv.
| #define Def_VAlim VDD_VALUE |
< Alias for legacy code using TEMP_CALC_V25 or TEMP_CALC_V30
Def_VAlim needs to be defined (in mV) if special power supply voltage used (eg. U5 variable power supply range)
| #define DefRangeADC (LSHIFT(1U, ADC_RESOLUTION) - 1U) |
ADC digital range.
| enum eADCidx |
| float ADC_GetConvertedVal | ( | const eAnalogInput | input | ) |
Get ADC channel converted value.
| [in] | input | - Input index |

| uint16_t ADC_GetRawVal | ( | const eAnalogInput | input | ) |
Get ADC channel raw value.
| [in] | input | - Input index |

| FctERR ADC_Start | ( | void | ) |
Start ADC conversions.
| FctERR ADC_Stop | ( | void | ) |
Stop ADC conversions.