Commit 69806d87 authored by 时昊's avatar 时昊

🎉 init:删除无用代码-串口协议模块

parent 59d3ac7a
This diff is collapsed.
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
".\objects\system_monitor_user.o" ".\objects\system_monitor_user.o"
".\objects\rte_adc.o" ".\objects\rte_adc.o"
".\objects\common_interface.o" ".\objects\common_interface.o"
".\objects\mcu_core_protocol.o"
".\objects\telltales_user.o" ".\objects\telltales_user.o"
".\objects\flash_synchronizer.o" ".\objects\flash_synchronizer.o"
".\objects\fuel.o" ".\objects\fuel.o"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "Fuel.h" #include "Fuel.h"
#include "Telltales_user.h" #include "Telltales_user.h"
#include "MCU_Core_Protocol.h"
#include "Services_Mileage_User.h" #include "Services_Mileage_User.h"
#include "U2_app_Service.h" #include "U2_app_Service.h"
#include "System_Monitor.h" #include "System_Monitor.h"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "Analog_Signals.h" #include "Analog_Signals.h"
#include "Common_Interface.h" #include "Common_Interface.h"
#include "Flash_synchronizer.h" #include "Flash_synchronizer.h"
#include "MCU_Core_Protocol.h"
#define FUEL_DATA_TIME 25u /*这里填写多长时间采集一个数据,单位ms*/ #define FUEL_DATA_TIME 25u /*这里填写多长时间采集一个数据,单位ms*/
#define FUEL_DATA_NUM 20u /*燃油电阻采集数据总数 最大255*/ #define FUEL_DATA_NUM 20u /*燃油电阻采集数据总数 最大255*/
...@@ -238,7 +238,7 @@ void Fuel_Gauges_Cal(uint8_t deltaTime) ...@@ -238,7 +238,7 @@ void Fuel_Gauges_Cal(uint8_t deltaTime)
} }
/*IGN ON 1秒/故障恢复后,开始走格 立即指向当前格 20220704*/ /*IGN ON 1秒/故障恢复后,开始走格 立即指向当前格 20220704*/
if(Common_GetIgnOnTime() >= IGON_SelfcheckingTimer){ if(Common_GetIgnOnTime() >= 3000ul){
time += deltaTime; time += deltaTime;
if(FuelInitFlag){ if(FuelInitFlag){
FuelInitFlag = 0; FuelInitFlag = 0;
......
#ifndef _MCU_CORE_PROTOCOL_H_
#define _MCU_CORE_PROTOCOL_H_
#include "common.h"
/*多媒体主机?讯端口*/
#define COM_CH (0x04u)
/*串口通信基础协议 1.0*/
#define PL_CORE_VERSION (0x00u)
#define PL_CORE_MARK (0x00u)
/*LENGHT标识?*/
#define LENGTH_ID_MASK (0x0FFFu)
#define LENGTH_CHKSUM_MASK (0xF000u)
#define LENGTH_CHKSUM_SHIFT (12u)
#define Uart_RX_MSG_FIFO_MAX_DEPTH (255u)
#define SEND_Key_Count 200u
#define EVENT_MSG_MAX_LENGTH (54u)
#define EVENT_MSG_MAX_QUEUE_NUM (6u)
#define PROTOCOL_ID_01 0x01u
#define PROTOCOL_ID_02 0x02u
#define PROTOCOL_ID_06 0x06u
#define IGON_SelfcheckingTimer 3200U //自检时间
typedef struct
{
uint8_t CID; /*命令标识?*/
uint8_t DLC; /*命令的长?*/
uint8_t Addr; /*存放在缓存的地址*/
} ArmMsgIndexStruct;
typedef struct
{
uint8_t Iptr; /*插入位置*/
uint8_t Optr; /*读取位置*/
uint8_t Depth; /*使用的深?*/
uint8_t Full; /*缓存存满*/
/*Buf*/
uint8_t Msg [ Uart_RX_MSG_FIFO_MAX_DEPTH ]; /*数据缓存?*/
ArmMsgIndexStruct MsgIndex [ Uart_RX_MSG_FIFO_MAX_DEPTH / 9u ]; /*定义?个数据结构用于提取和使用数据(/9按照?小单位数据长?)*/
} UartRxMsgFIFOStruct;
/*?有硬线输入的索引*/
typedef enum
{
CycMsg_01 = 0u,
CycMsg_02,
CycMsgNumber,
} CycMsg_t;
/*****************************************************************/
/*-------------ID:0x10 核心板初始化完毕 ----------*/
/*****************************************************************/
typedef union
{
uint8_t Msg [ 1u ];
struct
{
/*Byte4*/
uint8_t MessageID : 6;
uint8_t : 2;
} Sig;
} Receive_ID_10_Struct;
/*****************************************************************/
/*-------------ID:0x12-核心板向主板发?,周期100ms----------*/
/*****************************************************************/
typedef union
{
uint8_t Msg [ 7u ];
struct
{ /*Byte4*/
uint8_t MessageID : 6;
uint8_t PowerMode : 2;
/*Byte5*/
uint8_t blueToothConReq;
/*Byte6*/
uint8_t PhoneConnectSts;
/*Byte7*/
uint8_t PhoneType;
/*Byte8*/
uint8_t APP_Sts;
/*Byte9*/
uint8_t BlueToothConSts;
/*Byte10*/
uint8_t DisplaySts;
} Sig;
} Receive_ID_12_Struct;
/*****************************************************************/
/*-------------ID:0x01-00 不显? ----------*/
/*****************************************************************/
typedef union
{
uint8_t Msg [ 2u ];
struct
{
/*Byte4*/
uint8_t MessageID : 6;
uint8_t PowerMode : 2;
/*Byte5*/
uint8_t DispMode : 4;
uint8_t Language : 2;
uint8_t Theme : 1;
uint8_t ConnectPhone : 1;
} Sig;
} Send_ID_01_00_Struct;
/*****************************************************************/
/*-------------ID:0x01-01 ?机动? ----------*/
/*****************************************************************/
typedef union
{
uint8_t Msg [ 3u ];
struct
{
/*Byte4*/
uint8_t MessageID : 6;
uint8_t PowerMode : 2;
/*Byte5*/
uint8_t DispMode : 4;
uint8_t Language : 2;
uint8_t Theme : 1;
uint8_t ConnectPhone : 1;
/*Byte6*/
uint8_t Animation;
} Sig;
} Send_ID_01_01_Struct;
/*****************************************************************/
/*-------------ID:0x01-02 行车信息 ----------*/
/*****************************************************************/
typedef union
{
uint8_t Msg [ 22u ];
struct
{
/*Byte4*/
uint8_t MessageID : 6;
uint8_t PowerMode : 2;
/*Byte5*/
uint8_t DispMode : 4;
uint8_t SelfTest : 1;
uint8_t Language : 1;
uint8_t Theme : 1;
uint8_t ConnectPhone : 1;
/*Byte6*/
uint8_t LED_Coolant : 2;
uint8_t LED_ENGINE_OIL_LOW : 1;
uint8_t LED_ABS : 1;
uint8_t LED_HI_BEAM : 1;
uint8_t LED_MIL : 1;
uint8_t LED_RIGHT : 1;
uint8_t LED_LEFT : 1;
/*Byte7*/
uint8_t LED_Fuel : 2;
uint8_t LED_TPMS : 1;
uint8_t LED_Bluetooth : 1;
uint8_t LED_WIFI : 1;
uint8_t : 3;
/*Byte8*/
uint8_t Vspeed_H : 1;
uint8_t Espeed : 7;
/*Byte9*/
uint8_t Vspeed_L;
/*Byte10*/
uint8_t Vspeed_Bars;
/*Byte11*/
uint8_t Espeed_Bars;
/*Byte12*/
uint8_t Time_hour : 7;
uint8_t Time_colon : 1;
/*Byte13*/
uint8_t Time_minute;
/*Byte14*/
uint8_t Coolant_Temp_Bars;
/*Byte15*/
uint8_t Fuel_Bars;
/*Byte16*/
uint8_t Gear;
/*Byte17*/
uint8_t TOTAL_H4 : 4;
uint8_t Mileage_Unit : 2;
uint8_t Disp_Mileage_Mode : 2;
/*Byte18*/
uint8_t TOTAL_M8;
/*Byte19*/
uint8_t TOTAL_L8;
/*Byte20*/
uint8_t TRIPA_H8;
/*Byte21*/
uint8_t TRIPA_L8;
/*Byte22*/
uint8_t TRIPB_H8;
/*Byte23*/
uint8_t TRIPB_L8;
/*Byte24*/
uint8_t : 2;
uint8_t ICON_Apple : 2;
uint8_t ICON_Android : 2;
uint8_t ICON_Big_Wifi : 2;
/*Byte25*/
uint8_t Android_Or_Apple : 4;
uint8_t Connect_Phone_Sts : 4;
/*Byte26*/
uint8_t EasyNavigation;
} Sig;
} Send_ID_01_02_Struct;
/*****************************************************************/
/*-------------ID:0x01-03 菜单 ----------*/
/*****************************************************************/
typedef union
{
uint8_t Msg [ 6u ];
struct
{
/*Byte4*/
uint8_t MessageID : 6;
uint8_t PowerMode : 2;
/*Byte5*/
uint8_t DispMode : 4;
uint8_t Language : 2;
uint8_t Theme : 1;
uint8_t ConnectPhone : 1;
/*Byte6*/
uint8_t Data6;
/*Byte7*/
uint8_t Data7;
/*Byte8*/
uint8_t Data8;
/*Byte9*/
uint8_t Data9;
} Sig;
} Send_ID_01_03_Struct;
/*****************************************************************/
/*-------------ID:0x02-胎压和报警数?----------*/
/*****************************************************************/
typedef union
{
uint8_t Msg [ 11u ];
struct
{ /*Byte4*/
uint8_t MessageID : 6;
uint8_t PowerMode : 2;
/*Byte5*/
uint8_t DispMode;
/*Byte6*/
uint8_t TPMS_Unit;
/*Byte7*/
uint8_t TireH_Pressure_H8;
/*Byte8*/
uint8_t TireH_Pressure_L8;
/*Byte9*/
uint8_t TireR_Pressure_H8;
/*Byte10*/
uint8_t TireR_Pressure_L8;
/*Byte11*/
uint8_t TireH_Temp;
/*Byte12*/
uint8_t TireR_Temp;
/*Byte13*/
uint8_t Alarm_ID_H8;
/*Byte14*/
uint8_t Alarm_ID_L8;
} Sig;
} Send_ID_02_Struct;
typedef enum
{
DispNone = 0, //0:无显示
DisplayingAnimation, //1:显示开机动?
DisplayAnimationDone, //2:开机动画完?
DoingSelfTest, //3:自?扫表
SelfTestDone, //4:自?完成
DispDriveInfo, //5:行车显示信?
DispMenu, //6:菜单界?
}SocDispSts_E;
enum
{
Startup = 0u,
Run,
Timeout,
};
enum
{
SendEventMsgOk = 0u,
SendEventMsgError,
};
typedef struct
{
uint8_t SOC_St; /*系统启动状?? 0启动? 1启动成功 2启动超时*/
uint8_t AnimStatus;
uint32_t Time_out;
uint8_t Restart;
} Core_MonitorStructure;
extern uint8_t Uart2_tx_buf [ ];
extern uint8_t Uart2_rx_buf [ ];
extern Core_MonitorStructure Core_Monitor;
#define CORE_Timeout_CNT 2500u
extern void Protocol_KL15_ON_Init(void);
extern void MCU_Send_Service(uint8_t deltaTime);
extern void Enable_Cyc_Msg(CycMsg_t msgIndex);
extern void Disable_Cyc_Msg(CycMsg_t msgIndex);
extern uint8_t Send_Event_Msg(uint8_t type, uint8_t* data);
extern uint8_t Get_Event_Msg_Queue_Length(void);
extern void SetUartRxMsg_0x12(uint8_t * data);
extern SocDispSts_E GetSocDispSts(void);
void Drive_Info_Display_Update_Service(void);
void Selfcheck_Display_Update_Service(void);
#endif
This diff is collapsed.
#include "stdint.h"
#include "Key.h"
#ifndef MEU_PROCESS_H_
#define MEU_PROCESS_H_
#define _MN_IDX_NULL 0xff
#define _MN_IDX_NULL0 0x00
#define _MN_OPR_NULL (void *)0
#define NoKeyPressReturnThreshold 10000 //无按键操作返回阈�?
#define ANIMATION_TIME 3200 //�?机动画超时时间,单位ms
#define SELF_TEST_TIME 3200 //自检扫表超时时间,单位ms
#define EventMsgType_CurFault 0x21
#define EventMsgType_HisFault 0x22
#define EventMsgType_VersionNum 0x23
#define EventMsgType_MCUVersion 0x24
#define PART_NUM "70000TAJ0003" // part number QJ125T-6J
//#define PART_NUM "70000M310001" // part number 零件�?
#define MCU_version "1.0.003" //Must be 1.a.bbb format�??!!! 韫囧懘銆忛弰?1.a.bcd閺嶇厧绱¢敍? a<=9, bcd<=255
#define MCU_CompileData "231127" //The data format must be 6 Byte length!!! 閺冨爼妫块弽鐓庣�?韫囧懘銆忔稉?6娑擃亜鐡ч懞鍌炴毐�??
//#define MCU_version "1.0.000" //Must be 1.a.bbb format�??!!! 韫囧懘銆忛弰?1.a.bcd閺嶇厧绱¢敍? a<=9, bcd<=255
//#define MCU_CompileData "231124" //The data format must be 6 Byte length!!! 閺冨爼妫块弽鐓庣�?韫囧懘銆忔稉?6娑擃亜鐡ч懞鍌炴毐�??
//#define MCU_version "0.0.002" //Must be 1.a.bbb format�??!!! 韫囧懘銆忛弰?1.a.bcd閺嶇厧绱¢敍? a<=9, bcd<=255
//#define MCU_CompileData "231013" //The data format must be 6 Byte length!!! 閺冨爼妫块弽鐓庣�?韫囧懘銆忔稉?6娑擃亜鐡ч懞鍌炴毐�??
//1) 閺€璺哄�? xx 50 02 xx xx xx xx xx閸氬函绱濋崣顏勪粻鐠囧﹥鏌囨径鏍у絺閿涘奔绗夐崑婊冪安閻劌顦婚崣?
//2) 閸樼粯甯€妤傛ê甯囬幁顖氱潌閸旂喕鍏橀敍灞肩秵閻㈤潧甯囧銈嗗皾閺冨爼妫挎晶鐐插�??5�??
//#define MCU_version "1.0.006" //Must be 1.a.bbb format�?!!! 必须�?1.a.bcd格式�? a<=9, bcd<=255
//#define MCU_CompileData "230817" //The data format must be 6 Byte length!!! 时间格式必须�?6个字节长�?
//1) 增加F187读零件号
//2) �?15电马上关闭背光(之前延时10ms�?
//3) 增加清大计后扫表
//4) 修改R档变其它档位先显示白�?"R"问题
//5) 增加0x55C TRIPA/TRIPB同时清零
//#define PART_NUM "70000XB00000" // 零件�?
//#define MCU_version "V01.00.05" //20230731
//1) 修改燃油参数
//2) 燃油外发�?�?320�?
//#define MCU_version "V01.00.04" //20230612
//1)修改剩余清除�?�计次数外发错误问题
typedef enum _tagMenuName
{
_MN_DSP_ANIMATION = 0, //�?机动�?
_MN_DSP_DRIVE_INFO, //行车信息
_MN_DSP_PHONE_CONNECT, //手机互联
_MN_DSP_LEVEL1MENU_1, //界面切换
_MN_DSP_LEVEL1MENU_2, //时钟设置
_MN_DSP_LEVEL1MENU_3, //背光设置
_MN_DSP_LEVEL1MENU_4, //单位设置
_MN_DSP_LEVEL1MENU_5, //语言设置
_MN_DSP_LEVEL1MENU_6, //车辆设置
_MN_DSP_LEVEL1MENU_7, //手机蓝牙
_MN_DSP_LEVEL1MENU_8, //胎压设置
_MN_DSP_LEVEL1MENU_9, //�?�?
_MN_DSP_LEVEL2MENU_1, //界面切换-黑夜/白天/自动
_MN_DSP_LEVEL2MENU_2, //时钟设置
_MN_DSP_LEVEL2MENU_3, //背光设置
_MN_DSP_LEVEL2MENU_6, //车辆设置
_MN_DSP_LEVEL2MENU_7_1, //手机蓝牙-蓝牙连接
_MN_DSP_LEVEL2MENU_7_2, //手机蓝牙-同步联系�?
_MN_DSP_LEVEL2MENU_7_3, //手机蓝牙-蓝牙名称
_MN_DSP_LEVEL2MENU_7_4, //手机蓝牙-�?�?
_MN_DSP_LEVEL2MENU_8_1, //车辆设置-压力单位设置
_MN_DSP_LEVEL2MENU_8_2, //车辆设置-前轮传感器学�?
_MN_DSP_LEVEL2MENU_8_3, //车辆设置-后轮传感器学�?
_MN_DSP_LEVEL2MENU_8_4, //车辆设置-�?�?
}MenuName_E;
typedef enum _dayOrNightControl
{
DayOrNight_Automatic,
Manual_Day,
Manual_Night,
}dayOrNightControl_E;
typedef enum _unitSetting
{
Metric,
Imperial,
}unitSetting_E;
typedef enum {
BL_Automatic,
BL_Manual,
}BG_MODE;
typedef enum {
BL_USER_SET_LV_1,
BL_USER_SET_LV_2,
BL_USER_SET_LV_3,
BL_USER_SET_LV_4,
BL_USER_SET_LV_5,
BL_USER_SET_LV_AUTO,
BL_REAL_LV_TOTAL,
}BL_USER_SET_LV_E;
typedef enum {
Mileage_Mode_Total = 0,
Mileage_Mode_TripA,
Mileage_Mode_TripB,
Mileage_Mode_FaultCode,
Mileage_Mode_TempErr,
}Disp_Mileage_Mode_E;
typedef uint8_t _MENU_IDX;
typedef struct
{
_MENU_IDX VK_IDX_MODE;
_MENU_IDX VK_IDX_SET;
void (*Enter)(void);
void (*Do)(void);
void (*Exit)(void);
} _MenuOptTab;
extern void MenuKL30Init(void);
extern void MenuIgnOnInit(void);
extern void MenuManage(void);
extern uint8_t Get_Menu_Byte6(void);
extern uint8_t Get_Menu_Byte7(void);
extern uint8_t Get_Menu_Byte8(void);
extern uint8_t Get_Menu_Byte9(void);
extern BL_USER_SET_LV_E Get_BL_User_Set_Level(void);
extern Disp_Mileage_Mode_E Get_Disp_Mileage_Mode(void);
extern uint8_t Get_Self_Test_Sts(void);
extern uint8_t Get_Unit_Setting(void);
extern PHONE_CONNECT_t Common_Get_ConnectPhoneSts(void);
extern void MenuStatusSwitchODO(KeyStatusEnum set_button);
extern void MenuStatusSwitchUnit(KeyStatusEnum set_button);
extern dayOrNightControl_E Get_Day_Or_Night_Control(void);
extern uint8_t get_SEG_Check_Contrl(void);
extern uint8_t Get_TCS_Status(void);
#endif
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "sci.h" #include "sci.h"
#include "Telltales_Lib.h" #include "Telltales_Lib.h"
#include "Telltales_user.h" #include "Telltales_user.h"
#include "MCU_Core_Protocol.h"
#include "tim4.h" #include "tim4.h"
#include "Fuel.h" #include "Fuel.h"
...@@ -230,8 +230,7 @@ void Power_IG_ON_Init(void) ...@@ -230,8 +230,7 @@ void Power_IG_ON_Init(void)
Telltales_KL15_Init(); Telltales_KL15_Init();
bsp_CAN_SleepRelease(); bsp_CAN_SleepRelease();
bsp_CAN_Init(); bsp_CAN_Init();
Enable_Cyc_Msg(CycMsg_01);
Enable_Cyc_Msg(CycMsg_02);
Common_DataInit(); Common_DataInit();
Fuel_KL15_Init(); Fuel_KL15_Init();
...@@ -241,8 +240,6 @@ void Power_IG_ON_Init(void) ...@@ -241,8 +240,6 @@ void Power_IG_ON_Init(void)
DiagnosisInit_main(); DiagnosisInit_main();
U2_DiagnosisInit_main(); U2_DiagnosisInit_main();
Key_Status_Init(); Key_Status_Init();
Protocol_KL15_ON_Init();
uart2_User_KL15_Init(); uart2_User_KL15_Init();
APP_CAN_Init(); APP_CAN_Init();
CalcODOKL15Init(); CalcODOKL15Init();
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "Fuel.h" #include "Fuel.h"
#include "CAN_Communication_Matrix.h" #include "CAN_Communication_Matrix.h"
#include "MCU_Core_Protocol.h"
#include "Data_Gear.h" #include "Data_Gear.h"
#include "app_Telltales.h" #include "app_Telltales.h"
...@@ -35,21 +35,21 @@ void Telltales_Init(void) ...@@ -35,21 +35,21 @@ void Telltales_Init(void)
const LED_Attribute_st LED_Attribute[LED_Max] = const LED_Attribute_st LED_Attribute[LED_Max] =
{ {
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */ /* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
{ m_LED_RIGHT , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, IGON_SelfcheckingTimer, LED_RIGHT_Judgement , LED_RIGHT_Execution },//右转向 { m_LED_RIGHT , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, 3000ul, LED_RIGHT_Judgement , LED_RIGHT_Execution },//右转向
{ m_LED_LEFT , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, IGON_SelfcheckingTimer, LED_LEFT_Judgement , LED_LEFT_Execution },//左转向 { m_LED_LEFT , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, 3000ul, LED_LEFT_Judgement , LED_LEFT_Execution },//左转向
{ m_LED_HI_BEAM , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, IGON_SelfcheckingTimer, LED_HI_BEAM_Judgement , LED_HI_BEAM_Execution },//远光灯 { m_LED_HI_BEAM , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, 3000ul, LED_HI_BEAM_Judgement , LED_HI_BEAM_Execution },//远光灯
{ m_LED_MIL , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, IGON_SelfcheckingTimer, LED_MIL_Judgement , LED_MIL_Execution },//发动机报警灯 { m_LED_MIL , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, 3000ul, LED_MIL_Judgement , LED_MIL_Execution },//发动机报警灯
{ m_LED_ABS , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, IGON_SelfcheckingTimer, LED_ABS_Judgement , LED_ABS_Execution },//ABS_低有效 { m_LED_ABS , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, 3000ul, LED_ABS_Judgement , LED_ABS_Execution },//ABS_低有效
{ m_LED_TSC , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, IGON_SelfcheckingTimer, LED_TSC_Judgement , LED_TSC_Execution },//TSC { m_LED_TSC , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, 3000ul, LED_TSC_Judgement , LED_TSC_Execution },//TSC
{ m_LED_AutoStarStop , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, IGON_SelfcheckingTimer, LED_AutoStarStop_Judgement , LED_AutoStarStop_Execution },//自动启停 { m_LED_AutoStarStop , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, 3000ul, LED_AutoStarStop_Judgement , LED_AutoStarStop_Execution },//自动启停
{ m_LED_Batterylow , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, IGON_SelfcheckingTimer, LED_Batterylow_Judgement , LED_Batterylow_Execution },//蓄电池电压报警 { m_LED_Batterylow , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, 3000ul, LED_Batterylow_Judgement , LED_Batterylow_Execution },//蓄电池电压报警
{ m_LED_Auto_HI_BEAM , NoSelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, IGON_SelfcheckingTimer, LED_Auto_HI_BEAM_Judgement , LED_Auto_HI_BEAM_Execution },//自动远光灯(预留) { m_LED_Auto_HI_BEAM , NoSelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, 3000ul, LED_Auto_HI_BEAM_Judgement , LED_Auto_HI_BEAM_Execution },//自动远光灯(预留)
{ m_LED_Shore , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, IGON_SelfcheckingTimer, LED_Shore_Judgement , LED_Shore_Execution },//边撑状态 { m_LED_Shore , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, 3000ul, LED_Shore_Judgement , LED_Shore_Execution },//边撑状态
{ m_LED_ENGINE_OIL_LOW , NoSelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, IGON_SelfcheckingTimer, LED_ENGINE_OIL_LOW_Judgement , LED_ENGINE_OIL_LOW_Execution },//机油压力报警灯(预留) { m_LED_ENGINE_OIL_LOW , NoSelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, 3000ul, LED_ENGINE_OIL_LOW_Judgement , LED_ENGINE_OIL_LOW_Execution },//机油压力报警灯(预留)
{ m_LED_TPMS , NoSelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, IGON_SelfcheckingTimer, LED_TPMS_Judgement , LED_TPMS_Execution },//胎压功能(预留) { m_LED_TPMS , NoSelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, 3000ul, LED_TPMS_Judgement , LED_TPMS_Execution },//胎压功能(预留)
{ m_LED_READY , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, IGON_SelfcheckingTimer, LED_READY_Judgement , LED_READY_Execution },//READY { m_LED_READY , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, 3000ul, LED_READY_Judgement , LED_READY_Execution },//READY
{ m_LED_Fuel , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, IGON_SelfcheckingTimer, LED_Fuel_Judgement , LED_Fuel_Execution },//燃油 { m_LED_Fuel , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, 3000ul, LED_Fuel_Judgement , LED_Fuel_Execution },//燃油
{ m_LED_Temp , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, IGON_SelfcheckingTimer, LED_Temp_Judgement , LED_Temp_Execution },//水温 { m_LED_Temp , SelfCheck , NoExterNalCheck , LED_IGN_ON , 0u, 3000ul, LED_Temp_Judgement , LED_Temp_Execution },//水温
}; };
/****************************************************************************** /******************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#include "SEG_LCD.h" #include "SEG_LCD.h"
#include "Flash_synchronizer.h" #include "Flash_synchronizer.h"
#include "Data_Gear.h" #include "Data_Gear.h"
#include "MCU_Core_Protocol.h"
#include "Common_Interface.h" #include "Common_Interface.h"
#include "BU98R10.h" #include "BU98R10.h"
#include "app_Telltales.h" #include "app_Telltales.h"
...@@ -2172,7 +2172,7 @@ void SEG_LCD_ODO_Trip_FaultCode_Selftest(uint8_t Mileage) ...@@ -2172,7 +2172,7 @@ void SEG_LCD_ODO_Trip_FaultCode_Selftest(uint8_t Mileage)
} }
} }
} }
extern uint8_t BatteryErrFlg;
void SEG_LCD_BatteryErr_Display(uint8_t m_Flag, uint32_t ModeTime) void SEG_LCD_BatteryErr_Display(uint8_t m_Flag, uint32_t ModeTime)
{ {
uint8_t Mode; uint8_t Mode;
...@@ -2194,7 +2194,7 @@ void SEG_LCD_BatteryErr_Display(uint8_t m_Flag, uint32_t ModeTime) ...@@ -2194,7 +2194,7 @@ void SEG_LCD_BatteryErr_Display(uint8_t m_Flag, uint32_t ModeTime)
else else
{ {
Mode = 0; Mode = 0;
BatteryErrFlg = 0;
} }
if (SEGLCDBackup.ODOMode != Mode) if (SEGLCDBackup.ODOMode != Mode)
......
...@@ -15,7 +15,7 @@ Includes ...@@ -15,7 +15,7 @@ Includes
#include "userdefine.h" #include "userdefine.h"
#include "BAT32A239.h" #include "BAT32A239.h"
#include "sci.h" #include "sci.h"
#include "MCU_Core_Protocol.h"
#include "gpio.h" #include "gpio.h"
/*********************************************************************************************************************** /***********************************************************************************************************************
Pragma directive Pragma directive
...@@ -108,17 +108,7 @@ volatile uint8_t g_iic31_rx_end; /* iic31 receive data end */ ...@@ -108,17 +108,7 @@ volatile uint8_t g_iic31_rx_end; /* iic31 receive data end */
volatile uart_state_t g_uart2_tx_state; volatile uart_state_t g_uart2_tx_state;
void UART_Ch2_Send_Multiple_Byte( uint8_t* buf, uint8_t len ) void UART_Ch2_Send_Multiple_Byte( uint8_t* buf, uint8_t len )
{ {
uint32_t i;
for(i=0; i<len; i++){
Uart2_tx_buf[i] = *(buf+i);
}
gp_uart2_tx_address = Uart2_tx_buf;
g_uart2_tx_count = len;
SCI1->TXD2 = *gp_uart2_tx_address;
gp_uart2_tx_address++;
g_uart2_tx_count--;
g_uart2_tx_state = UART_TX_BUSY;
} }
uart_state_t Get_Uart2_State(void) uart_state_t Get_Uart2_State(void)
...@@ -1171,15 +1161,7 @@ static void uart2_interrupt_send(void) ...@@ -1171,15 +1161,7 @@ static void uart2_interrupt_send(void)
***********************************************************************************************************************/ ***********************************************************************************************************************/
static void uart2_callback_receiveend(void) static void uart2_callback_receiveend(void)
{ {
/* Start user code. Do not edit comment generated here */
//g_uart2_rx_count = 0xffff;
//if(Uart2_rx_buf[1] == 0x10){
// uart_0x10_Rev_Flag = 1;
//}
//else if(Uart2_rx_buf[1] == 0x12){
// SetUartRxMsg_0x12(Uart2_rx_buf);
//}
/* End user code. Do not edit comment generated here */
} }
/*********************************************************************************************************************** /***********************************************************************************************************************
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "Line_In.h" #include "Line_In.h"
#include "adc.h" #include "adc.h"
#include "Analog_Signals.h" #include "Analog_Signals.h"
#include "MCU_Core_Protocol.h"
#include "PowerManagement.h" #include "PowerManagement.h"
#include "System_Monitor.h" #include "System_Monitor.h"
#include "Common_Interface.h" #include "Common_Interface.h"
...@@ -81,15 +81,7 @@ void Sys_Run_Mode_2ms_Tasks(void) ...@@ -81,15 +81,7 @@ void Sys_Run_Mode_2ms_Tasks(void)
{ {
Analog_Signal_Conv_Real_Time_Run(); Analog_Signal_Conv_Real_Time_Run();
Power_Management_Service(); Power_Management_Service();
//UDS_KL15_init();
//Diagno_Tick(2);
//U2_Diagno_Tick(2);
//CAN_TX_Tick();
//MCU_Send_Service(2);
Sys_Status_Update_Service(); Sys_Status_Update_Service();
//Common_Input_Para();
//Gauges_Time_Xms_Count(2);
//UDS_10ms_Service();
BU98R10_Update_Service(); BU98R10_Update_Service();
} }
/*============================================================================*/ /*============================================================================*/
...@@ -119,7 +111,7 @@ void Sys_Run_Mode_10ms_Tasks(void) ...@@ -119,7 +111,7 @@ void Sys_Run_Mode_10ms_Tasks(void)
Line_In_Debounce_Service(); Line_In_Debounce_Service();
Telltales_Management(); Telltales_Management();
Can_BusOff_Fun(10u); Can_BusOff_Fun(10u);
Selfcheck_Display_Update_Service();
Key_Status_Detect_Service(); Key_Status_Detect_Service();
//Test(); //Test();
...@@ -260,18 +252,15 @@ void Sys_Run_Mode_100ms_Tasks_Group4(void) ...@@ -260,18 +252,15 @@ void Sys_Run_Mode_100ms_Tasks_Group4(void)
} }
void Sys_Run_Mode_100ms_Tasks_Group5(void) void Sys_Run_Mode_100ms_Tasks_Group5(void)
{ {
/*挡位�?�?*/
//Data_Service_Gear_Processing();
} }
void Sys_Run_Mode_100ms_Tasks_Group6(void) void Sys_Run_Mode_100ms_Tasks_Group6(void)
{ {
/*环境光线亮度读取*/
// Light_Detect_Serivce();
/*LCD显示服务*/
Drive_Info_Display_Update_Service();
} }
void Sys_Run_Mode_100ms_Tasks_Group7(void) void Sys_Run_Mode_100ms_Tasks_Group7(void)
......
This diff is collapsed.
...@@ -678,16 +678,6 @@ ...@@ -678,16 +678,6 @@
<FileType>1</FileType> <FileType>1</FileType>
<FilePath>.\source\Application\RTE\Common_Interface.c</FilePath> <FilePath>.\source\Application\RTE\Common_Interface.c</FilePath>
</File> </File>
<File>
<FileName>MCU_Core_Protocol.h</FileName>
<FileType>5</FileType>
<FilePath>.\source\Application\MCU_Core_Protocol\MCU_Core_Protocol.h</FilePath>
</File>
<File>
<FileName>MCU_Core_Protocol.c</FileName>
<FileType>1</FileType>
<FilePath>.\source\Application\MCU_Core_Protocol\MCU_Core_Protocol.c</FilePath>
</File>
<File> <File>
<FileName>Telltales_user.h</FileName> <FileName>Telltales_user.h</FileName>
<FileType>5</FileType> <FileType>5</FileType>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#include "SEG_LCD.h" #include "SEG_LCD.h"
#include "Flash_synchronizer.h" #include "Flash_synchronizer.h"
#include "Data_Gear.h" #include "Data_Gear.h"
#include "MCU_Core_Protocol.h"
#include "Common_Interface.h" #include "Common_Interface.h"
#include "BU98R10.h" #include "BU98R10.h"
#include "app_Telltales.h" #include "app_Telltales.h"
......
...@@ -15,7 +15,7 @@ Includes ...@@ -15,7 +15,7 @@ Includes
#include "userdefine.h" #include "userdefine.h"
#include "BAT32A239.h" #include "BAT32A239.h"
#include "sci.h" #include "sci.h"
#include "MCU_Core_Protocol.h"
#include "gpio.h" #include "gpio.h"
/*********************************************************************************************************************** /***********************************************************************************************************************
Pragma directive Pragma directive
...@@ -108,17 +108,7 @@ volatile uint8_t g_iic31_rx_end; /* iic31 receive data end */ ...@@ -108,17 +108,7 @@ volatile uint8_t g_iic31_rx_end; /* iic31 receive data end */
volatile uart_state_t g_uart2_tx_state; volatile uart_state_t g_uart2_tx_state;
void UART_Ch2_Send_Multiple_Byte( uint8_t* buf, uint8_t len ) void UART_Ch2_Send_Multiple_Byte( uint8_t* buf, uint8_t len )
{ {
uint32_t i;
for(i=0; i<len; i++){
Uart2_tx_buf[i] = *(buf+i);
}
gp_uart2_tx_address = Uart2_tx_buf;
g_uart2_tx_count = len;
SCI1->TXD2 = *gp_uart2_tx_address;
gp_uart2_tx_address++;
g_uart2_tx_count--;
g_uart2_tx_state = UART_TX_BUSY;
} }
uart_state_t Get_Uart2_State(void) uart_state_t Get_Uart2_State(void)
...@@ -1171,15 +1161,7 @@ static void uart2_interrupt_send(void) ...@@ -1171,15 +1161,7 @@ static void uart2_interrupt_send(void)
***********************************************************************************************************************/ ***********************************************************************************************************************/
static void uart2_callback_receiveend(void) static void uart2_callback_receiveend(void)
{ {
/* Start user code. Do not edit comment generated here */
//g_uart2_rx_count = 0xffff;
//if(Uart2_rx_buf[1] == 0x10){
// uart_0x10_Rev_Flag = 1;
//}
//else if(Uart2_rx_buf[1] == 0x12){
// SetUartRxMsg_0x12(Uart2_rx_buf);
//}
/* End user code. Do not edit comment generated here */
} }
/*********************************************************************************************************************** /***********************************************************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment