#include <stdio.h>

#include "cmsis_os.h"
#include "ImC/imc_api.h"

extern ADC_HandleTypeDef ADC_HANDLER_SBC;

void adc_demo()
{
    while(1) {
        int volt = measure_voltage(ADC_HANDLER_SBC, EPS_CAP_ID_SBC);
        printf("capacitor voltage: %d.%03d\r\n", volt/1000, volt%1000);
        osDelay(200);
    }
}