IoT_SCV_CH584M/bsp/inc/bsp_adc.h

25 lines
448 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* 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_ */