41 static void _putc(
void *p,
char c)
66 printf(
"%f;\t%f\n", voltage, current);
const ADCHardwareStruct adc_config[ADC_NUM]
A driver for the analog-digital converters available on the microcontroller.
const BatteryMonitorHardwareStruct battery_monitor_config
float read_current() const
Read the current battery current.
float read_voltage() const
Read the current battery voltage.
void put_byte(uint8_t ch) override
void init(const ADCHardwareStruct *adc_def)
Initializes the ADC according to the definition struct provided.
static void _putc(void *p, char c)
A driver for analog battery monitors.
void init(const BatteryMonitorHardwareStruct &def, AnalogDigitalConverter *adc, float voltage_multiplier=0, float current_multiplier=0)
Initialize the battery monitor.
void init_printf(void *putp, void(*putf)(void *, char))