25 lines
448 B
C
25 lines
448 B
C
/*
|
||
* bsp_adc.h
|
||
*
|
||
* Created on: 2024年11月29日
|
||
* Author: 123
|
||
*/
|
||
|
||
#ifndef INCLUDE_BSP_ADC_H_
|
||
#define INCLUDE_BSP_ADC_H_
|
||
|
||
#include "CH58x_common.h"
|
||
#define VBAT_EVT_START (0x0001 << 2)
|
||
|
||
#define VBAT_LOW_THRESHOLD 2.0f // 电池电压低阈值,单位V
|
||
|
||
void VBAT_ADC_Init(void);
|
||
void BSP_VBAT_Init(void);
|
||
|
||
|
||
void Send_Low_Battery_Message(float vbat);
|
||
void Handle_Low_Battery(float vbat);
|
||
|
||
uint8_t BSP_ReadVbat(void);
|
||
#endif /* INCLUDE_BSP_ADC_H_ */
|