/*
 * msp_JTBATTERY.h
 *
 *  Created on: Oct 26, 2023
 *      Author: shiya
 */

#ifndef INC_MSP_MSP_JTBATTERY_H_
#define INC_MSP_MSP_JTBATTERY_H_

#include "BSP/bsp_include.h"
//

//FLASH (rx)     : ORIGIN = 0x08020000, LENGTH = 896K
//#define VECT_TAB_OFFSET         0x00020000U

//关键全局变量定义：GV、CV、PV
//其他变量定义：X1_X2_X3_X4
//X1：变量类型
//X2：所属层级 GL、MSP、BSP
//X3：所属模块
//X4：名称

//全局变量定义 X1=V
//宏定义 X1=DF
//结构体类型声明 X1=SP
//结构体定义 X1=ST
//指针类型定义 X1=P
//全局函数定义 X1=GF
//内部函数定义 X1为空，不要下划线，X2开头
//函数参数定义、函数局部变量定义  X1为空，下划线开头

typedef struct
 {
	int32_t Battery_SOC_Perc;

	int32_t Charg_Over;
	int32_t Dscharg_Over;
	int32_t Charg_Short_Cir;
	int32_t Dscharg_Short_Cir;
	int32_t High_Temp;
	int32_t Over_load;
	int32_t Over_Voltage;
	int32_t Under_Voltage;

	int32_t BMS_MOS_Temp;
	int32_t Battery_Min_Temp;
	int32_t Battery_Max_Temp;
	int32_t Battery_Tot_Vol;
	int32_t Battery_Cur;

	int32_t Battery_SOC;
	int32_t Battery_Full_SOC;

 }SP_MSP_Battery_parameters;

void GF_Battery_Unscramble_Callback();
uint8_t GF_MSP_Bat_4006_Init(UART_HandleTypeDef* huart,SP_MSP_Battery_parameters *_Bat_4006);
void GF_MSP_Battery_Inquiry();
#endif /* INC_MSP_MSP_JTBATTERY_H_ */
