2024-05-11 00:04:28 +08:00
|
|
|
#ifndef _APP_BAT_H_
|
|
|
|
#define _APP_BAT_H_
|
|
|
|
|
|
|
|
// 充电状态
|
|
|
|
typedef enum {
|
|
|
|
Bat_NotCharge_STA=0x01,
|
|
|
|
Bat_Charge_STA=0x02,
|
|
|
|
Bat_Full_STA=0x04,
|
|
|
|
Bat_Low_STA=0x08,
|
|
|
|
Bat_30_STA=0x10,
|
|
|
|
Bat_60_STA=0x20,
|
|
|
|
Bat_100_STA=0x40,
|
|
|
|
} BAT_STA_t;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
Bat_Percent_Low =420,
|
|
|
|
Bat_Percent_30 =454,
|
|
|
|
Bat_Percent_60 =489,
|
|
|
|
Bat_Percent_100 =535,
|
|
|
|
} BAT_Percent_t;
|
|
|
|
|
|
|
|
// typedef enum {
|
|
|
|
// Bat_Percent_Low =240,
|
|
|
|
// Bat_Percent_30 =260,
|
|
|
|
// Bat_Percent_60 =300,
|
|
|
|
// Bat_Percent_100 =350,
|
|
|
|
// } BAT_Percent_t;
|
|
|
|
|
|
|
|
typedef struct BAT_Message{
|
|
|
|
uint8_t Bat_STA;
|
2024-08-20 11:02:49 +08:00
|
|
|
uint8_t Bat_Remain_Time; // 剩余充电时间
|
2024-05-11 00:04:28 +08:00
|
|
|
uint16_t Bat_Voltage; // 480=48.0V
|
2024-08-20 11:02:49 +08:00
|
|
|
uint16_t Bat_Percent; // 420=42.0%
|
2024-05-11 00:04:28 +08:00
|
|
|
} BAT_Message_t;
|
|
|
|
|
|
|
|
|
|
|
|
void BAT_Message_Init(void);
|
|
|
|
|
|
|
|
#endif
|