The foxBMS secondary mcu API documentation
adc.h
Go to the documentation of this file.
1 
56 #ifndef ADC_H_
57 #define ADC_H_
58 
59 /*================== Includes =============================================*/
60 #include "adc_cfg.h"
61 
62 /*================== Macros and Definitions ===============================*/
63 
64 /*================== Constant and Variable Definitions ====================*/
65 
66 /*================== Function Prototypes ==================================*/
73 extern void ADC_Init(ADC_HandleTypeDef *AdcHandle);
74 
80 extern void ADC_Convert(ADC_HandleTypeDef *AdcHandle);
81 
90 extern void ADC_Ctrl(void);
91 
102 extern void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* AdcHandle);
103 
107 extern float ADC_GetVBAT_mV(void);
108 
112 extern float ADC_GetMCUTemp_C(void);
113 
117 extern uint16_t ADC_GetValue(uint32_t value);
118 
119 /*================== Function Implementations =============================*/
120 
121 #endif /* ADC_H_ */
void ADC_Convert(ADC_HandleTypeDef *AdcHandle)
Definition: adc.c:113
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *AdcHandle)
callback function to the ADC conversion.
Definition: adc.c:146
float ADC_GetVBAT_mV(void)
get coin cell battery voltage
Definition: adc.c:172
Headers for the configuration for the analog to digital converter.
void ADC_Ctrl(void)
determines which kind of measurements are made by the ADCs and stores result in database.
Definition: adc.c:119
uint16_t ADC_GetValue(uint32_t value)
get voltage in mV
Definition: adc.c:188
float ADC_GetMCUTemp_C(void)
get MCU temperature
Definition: adc.c:180
void ADC_Init(ADC_HandleTypeDef *AdcHandle)
initializes the different ADC devices by enabling their corresponding clocks. It is called during sta...
Definition: adc.c:93