|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
#include <stdbool.h>#include <stdint.h>Go to the source code of this file.
Classes | |
| struct | board_adc_snapshot_t |
Enumerations | |
| enum | board_adc_input_t { BOARD_ADC_VBAT = 0 , BOARD_ADC_EXT_SENSE_1 , BOARD_ADC_PYRO_1_CONT , BOARD_ADC_PYRO_2_CONT , BOARD_ADC_EXT_SENSE_2 , BOARD_ADC_ALT_CURR , BOARD_ADC_CURR , BOARD_ADC_COUNT } |
Functions | |
| bool | board_adc_init (void) |
| bool | board_adc_read (board_adc_input_t input, uint16_t *counts, uint32_t timeout_ms) |
| void | board_adc_snapshot (board_adc_snapshot_t *snapshot, uint32_t timeout_ms) |
| enum board_adc_input_t |
| Enumerator | |
|---|---|
| BOARD_ADC_VBAT | |
| BOARD_ADC_EXT_SENSE_1 | |
| BOARD_ADC_PYRO_1_CONT | |
| BOARD_ADC_PYRO_2_CONT | |
| BOARD_ADC_EXT_SENSE_2 | |
| BOARD_ADC_ALT_CURR | |
| BOARD_ADC_CURR | |
| BOARD_ADC_COUNT | |
Definition at line 18 of file board_adc.h.
| bool board_adc_init | ( | void | ) |
Definition at line 19 of file board_adc.c.
References ADC_CALIB_OFFSET_LINEARITY, ADC_SINGLE_ENDED, calibrated, hadc1, HAL_ADCEx_Calibration_Start(), and HAL_OK.
Referenced by board_bringup_power_up().
| bool board_adc_read | ( | board_adc_input_t | input, |
| uint16_t * | counts, | ||
| uint32_t | timeout_ms ) |
Definition at line 28 of file board_adc.c.
References ADC_OFFSET_NONE, ADC_REGULAR_RANK_1, ADC_SAMPLETIME_387CYCLES_5, ADC_SINGLE_ENDED, BOARD_ADC_COUNT, channels, config, DISABLE, hadc1, HAL_ADC_ConfigChannel(), HAL_ADC_GetValue(), HAL_ADC_PollForConversion(), HAL_ADC_Start(), HAL_ADC_Stop(), HAL_OK, and ok.
Referenced by board_adc_snapshot(), and board_bringup_read_battery().
| void board_adc_snapshot | ( | board_adc_snapshot_t * | snapshot, |
| uint32_t | timeout_ms ) |
Definition at line 54 of file board_adc.c.
References BOARD_ADC_COUNT, and board_adc_read().
Referenced by bringup_task().