bleSDK_expansion_board/projects/blezongkong/src/app_bat.h

40 lines
770 B
C
Raw Normal View History

#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;
uint8_t Bat_Remain_Time; // 剩余充电时间
uint16_t Bat_Voltage; // 480=48.0V
uint16_t Bat_Percent; // 420=42.0%
} BAT_Message_t;
void BAT_Message_Init(void);
#endif