#ifndef __RTC_BATTERY_H
#define __RTC_BATTERY_H


#include "at32f403a_407.h"


#define MEAS_VBAT_ENABLE        gpio_bits_set(GPIOC, GPIO_PINS_6)

#define MEAS_VBAT_DISABLE       gpio_bits_reset(GPIOC, GPIO_PINS_6)



//
void adc_battery_gpio_init(void);

//
void adc_battery_init(void);

//
void adc_battery_task(void *params);


extern uint16_t bat_voltage;

#endif // __RTC_BATTERY_H
