/*
 * @Author       : ChenJie
 * @Date         : 2022-01-23 13:45:09
 * @Version      : V3.0
 * @LastEditors  : ChenJie
 * @LastEditTime : 2022-01-23 17:58:54
 * @Description  : file content
 * @FilePath     : \PLAT\project\ec616_0h00\apps\qx_app\src\AT_CMD\AppGlobalVar.h
 */
/*
 * AppGlobal.h
 *
 *  Created on: 2022年1月19日
 *      Author: QiXiang_CHENJIE
 */
#ifndef APPGLOBALVAR_H_
#define APPGLOBALVAR_H_

#include "hal_adapter.h"
extern uint8  lockAndUnlockSensor[4];
extern uint8  unlockFlg;
extern uint8  lockFlg;
extern uint8  swapBattDone;
extern uint8  backToDrv ;
extern uint8 lockCmdFlg ;
extern uint8 unlockCmdFlg ;

extern uint8 PackExcSts ;
extern uint8 BattSwappingAllw ;
extern uint8 AllPackPwrDnSts ;
extern uint8 BlueDisconnectFailFlg ;
extern uint8 VehPowerMode;
extern uint8 GearSts ;
extern uint8 EPBWorkingSts;
extern uint8 BrakeSwitchSts ;
extern uint8 DoorSts ;
extern uint16 SteeringWheelAngle;

extern uint8 carBleConnectSts ;//车端蓝牙连接状态
/**/
/*全局变量区*/
extern uint8 packReadySts;
extern uint8 installPackLoc;
extern uint8 installPackNum;
extern uint8 cmdSwapBatt;
extern uint8 connecMacUb;
extern uint8 canTargetMac[6];
//*全局变量*//
extern uint8 BleMacAddr[6];
extern uint8 BleTargetMacAddr[6];
extern uint8 BleCurrentRole;
extern uint8 BleSetRole;          // 0-从机（默认），1-主机
extern uint8 BleSetRoleEnable;    //默认角色不设置
extern uint8 BleConnectEnable;    //主机蓝牙连接使能,0-未使能，1-使能
extern uint8 BleConnectFlg;       //主机蓝牙连接状态，0-未连接，1-连接
extern uint8 BleDisconnectEnable; //主机蓝牙断开使能,0-未使能，1-使能
extern uint8 BleDisconnectFlg;    //主机蓝牙断开连接状态，0-未连接，1-连接
extern uint8 BlePwrControlEnable; //蓝牙开关机使能，默认不使能，自动开机
extern uint8 BlePwrControlFlg;    //蓝牙开关机控制，1-关机，0-开机
extern uint8 BlePwrState;         //蓝牙开关机状态
extern uint32 BleVersion;         // ble的软件版本
extern uint8 AT_MsgFlag;
extern QueueHandle_t McuDataSendHandle;
extern QueueHandle_t McuDataRecvHandle;
extern SemaphoreHandle_t ConnSemaphore;
typedef struct
{
	uint8 RealLen;
    uint8 *DataPtr;
} BleRecvDataFromUart2;
typedef struct
{
	uint8 RealLen;
    uint8 *DataPtr;
} QueueDataTrans_Type;

/*Can*/
extern uint8 CanIf_u8TxConfirmCnt;
extern boolean CanIf_bTxFlag;
extern uint8 CanIf_u8RxIndicationCnt;
extern boolean CanIf_bRxFlag;
extern QueueHandle_t CanRecvQueueHandle;
extern QueueHandle_t Uart2ToCanDataHandle;
extern QueueHandle_t CanToUart2DataHandle;
#endif /* APPGLOBALVAR_H_ */
