38 lines
680 B
C
38 lines
680 B
C
|
#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;
|
||
|
uint16_t Bat_Voltage; // 480=48.0V
|
||
|
} BAT_Message_t;
|
||
|
|
||
|
|
||
|
void BAT_Message_Init(void);
|
||
|
|
||
|
#endif
|