|
HARMcksL: ARM HAL toolbox (yet STM32 oriented) 1.6
SMFSW collection of HAL hacks for STM32
|
Simple extension for ADCs. More...

Data Structures | |
| struct | ADCex_t |
| ADCex structure. More... | |
Macros | |
| #define | Def_VBatFactor (2.0f) |
| 2x factor | |
| #define | STM32_VREF_CAL (VAL_AT(VREF_CAL_ADDR, uint16_t)) |
| VRef (ADC) calibration address content. | |
| #define | STM32_TS_CAL1 (VAL_AT(TS_CAL1_ADDR, uint16_t)) |
| Temp sensor ADC raw data acquired at Lower temperature address content. | |
| #define | STM32_TS_CAL2 (VAL_AT(TS_CAL2_ADDR, uint16_t)) |
| Temp sensor ADC raw data acquired at Higher temperature address content. | |
| #define | ADC_NB 1UL |
| Number of ADC peripherals used. | |
| #define | ADC_NB_CHAN 2UL |
| Number of ADC channels used (per peripheral). | |
| #define | TOTAL_ADC_CHANS (ADC_NB * ADC_NB_CHAN) |
| Total number of ADC channels. | |
| #define | ADC_SAMP_BUF_SIZE 4UL |
| #define | ADC_REFRESH_PERIOD 20UL |
| ADC conversions results refreshing period (default value). | |
Typedefs | |
| typedef uint32_t | DMA_sz_t |
| Size of DMA buffer cells (1 cell per ADC value). | |
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 acquisitions. | |
| FctERR | ADC_Stop (void) |
| Stop ADC acquisitions. | |
| void | ADC_handler (void) |
| ADC_ex handler. | |
| void | ADC_SetPeriod (const uint32_t period) |
| Set ADC Sampling or Conversion period. | |
| void | HAL_ADC_ConvCpltCallback (ADC_HandleTypeDef *hadc) |
| Conversion complete callback in non blocking mode. | |
Variables | |
| const ADC_Cfg | ADCConfig [Adc_MAX] |
| ADCConfig external declaration. | |
| ADCex_t | ADC_ex |
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_NB 1UL |
Number of ADC peripherals used.
| #define ADC_NB_CHAN 2UL |
Number of ADC channels used (per peripheral).
| #define ADC_REFRESH_PERIOD 20UL |
ADC conversions results refreshing period (default value).
| #define ADC_SAMP_BUF_SIZE 4UL |
Size of the input buffer per analog input
| #define Def_VBatFactor (2.0f) |
2x factor
| #define STM32_TS_CAL1 (VAL_AT(TS_CAL1_ADDR, uint16_t)) |
Temp sensor ADC raw data acquired at Lower temperature address content.
| #define STM32_TS_CAL2 (VAL_AT(TS_CAL2_ADDR, uint16_t)) |
Temp sensor ADC raw data acquired at Higher temperature address content.
| #define STM32_VREF_CAL (VAL_AT(VREF_CAL_ADDR, uint16_t)) |
VRef (ADC) calibration address content.
| #define TOTAL_ADC_CHANS (ADC_NB * ADC_NB_CHAN) |
Total number of ADC channels.
| typedef uint32_t DMA_sz_t |
Size of DMA buffer cells (1 cell per ADC value).
| 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 |
| void ADC_handler | ( | void | ) |
ADC_ex handler.

| void ADC_SetPeriod | ( | const uint32_t | period | ) |
Set ADC Sampling or Conversion period.
| [in] | period | - Sampling or Conversion period (in ms) |
| FctERR ADC_Start | ( | void | ) |
Start ADC acquisitions.

| FctERR ADC_Stop | ( | void | ) |
Stop ADC acquisitions.

| void HAL_ADC_ConvCpltCallback | ( | ADC_HandleTypeDef * | hadc | ) |
Conversion complete callback in non blocking mode.
!
| [in] | hadc | - ADC handle |

| ADCex_t ADC_ex |
|
extern |
ADCConfig external declaration.