CubeMon-Vue-Demo-STM32F407VGT6U
|
analog inputs library for multi-channel DMA running in interrupt mode, averaging and custom linearization functions More...
Data Structures | |
struct | analogInput |
Typedefs | |
typedef struct analogInput | analogInput |
Functions | |
retStatus | analog_input_get (uint16_t analog_input, uint16_t data, int32_t *value) |
Standardized getter function for digital input library. More... | |
retStatus | analog_input_init (anaInputs an_input_name, int32_t sample_from, liner_fce linearization_function) |
Analog input initialization function. More... | |
void | analog_input_handle (void) |
Handler for analog inputs. More... | |
__weak HAL_StatusTypeDef | analog_input_start (ADC_HandleTypeDef adc) |
Starts the ADC with DMA in interrupt mode using STM32 HAL. More... | |
uint32_t | lin_adc_no_scaling_no_corrections (uint32_t adc_value) |
Convert ADC reading to voltage for a simple 0-3.3V input. | |
Variables | |
uint32_t | ADC_data_buffer [(AI_NONE *2)+1] |
analog inputs library for multi-channel DMA running in interrupt mode, averaging and custom linearization functions
retStatus analog_input_get | ( | uint16_t | analog_input, |
uint16_t | data, | ||
int32_t * | value | ||
) |
Standardized getter function for digital input library.
[in] | analog_input | analog input identification, defined by anaInputs |
[in] | data | data for /p analog_input that can be read out of the module, available data aioData |
[out] | value | getter output |
uint32_t
and uint16_t
to keep the standard function prototypevoid analog_input_handle | ( | void | ) |
Handler for analog inputs.
HAL_ADC_ConvCpltCallback()
(from the HAL library) retStatus analog_input_init | ( | anaInputs | an_input_name, |
int32_t | sample_from, | ||
liner_fce | linearization_function | ||
) |
Analog input initialization function.
[in] | an_input_name | analog input identification, defined by anaInputs |
[in] | sample_from | how many samples should be averaged (0-0x7fff) |
[in] | linearization_function | in case there is an voltage divider or any other input that needs to be converted |
__weak HAL_StatusTypeDef analog_input_start | ( | ADC_HandleTypeDef | adc | ) |
Starts the ADC with DMA in interrupt mode using STM32 HAL.
[in] | adc | active ADC |