Utility functions for ADC data acquisition and processing for the supercapacitor control board. More...
Functions | |
| uint16_t | moving_average (mov_avrg_filter &filter, uint16_t new_sample) |
| Updates the moving average for a given filter. | |
Variables | |
| uint16_t | adc1_samples [2][16][2] |
| Raw buffer for ADC1. | |
| uint16_t | adc2_samples [2][16][3] |
| Raw buffer for ADC2. | |
| mov_avrg_filter | filters [5] |
| Filter states per channel. | |
| uint16_t | ADC_filtered_data [5] |
| Filtered data per channel. | |
| float | adc_gains [5] |
| Gain correction per channel. | |
| float | adc_offsets [5] |
| Offset correction per channel. | |
Utility functions for ADC data acquisition and processing for the supercapacitor control board.
Handles DMA sampling, moving average filtering, ADC calibration, and compensation via gain/offset. Includes temperature sensing using an NTC thermistor.
Created on: Jul 5, 2024 Author: Yassine Bakkali
| uint16_t moving_average | ( | mov_avrg_filter & | filter, |
| uint16_t | new_sample ) |
Updates the moving average for a given filter.
| filter | Reference to the filter structure. |
| new_sample | Latest ADC sample value. |
| uint16_t adc1_samples[2][16][2] |
Raw buffer for ADC1.
| uint16_t adc2_samples[2][16][3] |
Raw buffer for ADC2.
| uint16_t ADC_filtered_data[5] |
Filtered data per channel.
| float adc_gains[5] |
Gain correction per channel.
| float adc_offsets[5] |
Offset correction per channel.
| mov_avrg_filter filters[5] |
Filter states per channel.