Commit 12079b13 authored by 梁百峰's avatar 梁百峰

feat:春风检测台首版无贴图

parent b04bd18c
...@@ -45,5 +45,11 @@ void Can_Set_Buff_75F(uint8_t CopyData []); ...@@ -45,5 +45,11 @@ void Can_Set_Buff_75F(uint8_t CopyData []);
void Can_BusOffRecover(void); void Can_BusOffRecover(void);
uint8_t CrcCheckSum(uint8_t *data, uint8_t len); uint8_t CrcCheckSum(uint8_t *data, uint8_t len);
void can_submit(void);
void Get_ID_0x794_Msg(void);
void send_0x714_fuc(void);
extern uint8_t ruanjianbanbenhao[8];
void Get_PN_msg(void);
void change_UDS_DID(void);
void resetchangeUDSfuc(void);
#endif #endif
...@@ -79,7 +79,16 @@ const st_CANMsgAttribute CAN_MSG_CONST_ARRAY [ CAN_CH0_ID_TOTAL_MAX ] = ...@@ -79,7 +79,16 @@ const st_CANMsgAttribute CAN_MSG_CONST_ARRAY [ CAN_CH0_ID_TOTAL_MAX ] =
(( void * )0), (( void * )0),
(( void * )0), (( void * )0),
}, },
{
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul,
0x794ul,
(( void * )0),
(( void * )0),
(( void * )0),
},
}; };
...@@ -206,7 +215,39 @@ uint8_t Get_CAN_CH0_ID_18FEFC17_Sig_Fuel_level(void) ...@@ -206,7 +215,39 @@ uint8_t Get_CAN_CH0_ID_18FEFC17_Sig_Fuel_level(void)
{ {
return (((uint8_t)((uint8_t)CAN_MSG_Read(CAN_CH0_ID_Send18FEFC17_Msg_Count, 1u) >> 0u) & 0xFFu)); return (((uint8_t)((uint8_t)CAN_MSG_Read(CAN_CH0_ID_Send18FEFC17_Msg_Count, 1u) >> 0u) & 0xFFu));
} }
uint8_t Get_CAN_CH0_ID_794_byte0_Sig(void)
{
return (((uint8_t)((uint8_t)CAN_MSG_Read(CAN_CH0_ID_0x794_Msg_Count, 0u) >> 0u) & 0xFFu));
}
uint8_t Get_CAN_CH0_ID_794_byte1_Sig(void)
{
return (((uint8_t)((uint8_t)CAN_MSG_Read(CAN_CH0_ID_0x794_Msg_Count, 1u) >> 0u) & 0xFFu));
}
uint8_t Get_CAN_CH0_ID_794_byte2_Sig(void)
{
return (((uint8_t)((uint8_t)CAN_MSG_Read(CAN_CH0_ID_0x794_Msg_Count, 2u) >> 0u) & 0xFFu));
}
uint8_t Get_CAN_CH0_ID_794_byte3_Sig(void)
{
return (((uint8_t)((uint8_t)CAN_MSG_Read(CAN_CH0_ID_0x794_Msg_Count, 3u) >> 0u) & 0xFFu));
}
uint8_t Get_CAN_CH0_ID_794_byte4_Sig(void)
{
return (((uint8_t)((uint8_t)CAN_MSG_Read(CAN_CH0_ID_0x794_Msg_Count, 4u) >> 0u) & 0xFFu));
}
uint8_t Get_CAN_CH0_ID_794_byte5_Sig(void)
{
return (((uint8_t)((uint8_t)CAN_MSG_Read(CAN_CH0_ID_0x794_Msg_Count, 5u) >> 0u) & 0xFFu));
}
uint8_t Get_CAN_CH0_ID_794_byte6_Sig(void)
{
return (((uint8_t)((uint8_t)CAN_MSG_Read(CAN_CH0_ID_0x794_Msg_Count, 6u) >> 0u) & 0xFFu));
}
uint8_t Get_CAN_CH0_ID_794_byte7_Sig(void)
{
return (((uint8_t)((uint8_t)CAN_MSG_Read(CAN_CH0_ID_0x794_Msg_Count, 7u) >> 0u) & 0xFFu));
}
...@@ -241,6 +282,9 @@ uint8_t Co_Can_ConvertSubID(uint32_t MsgID) ...@@ -241,6 +282,9 @@ uint8_t Co_Can_ConvertSubID(uint32_t MsgID)
case CAN_CH0_ID_Send18FEFC17_Msg: case CAN_CH0_ID_Send18FEFC17_Msg:
u8Result = CAN_CH0_ID_Send18FEFC17_Msg_Count; u8Result = CAN_CH0_ID_Send18FEFC17_Msg_Count;
break; break;
case CAN_CH0_ID_Send0x794_Msg:
u8Result = CAN_CH0_ID_0x794_Msg_Count;
break;
default : default :
u8Result = CAN_CH0_ID_TOTAL_MAX; u8Result = CAN_CH0_ID_TOTAL_MAX;
break; break;
......
...@@ -12,7 +12,7 @@ typedef enum ...@@ -12,7 +12,7 @@ typedef enum
CAN_CH0_ID_Send18FEC1EE_Msg_Count, CAN_CH0_ID_Send18FEC1EE_Msg_Count,
CAN_CH0_ID_Send0CFE6CEE_Msg_Count, CAN_CH0_ID_Send0CFE6CEE_Msg_Count,
CAN_CH0_ID_Send18FEFC17_Msg_Count, CAN_CH0_ID_Send18FEFC17_Msg_Count,
CAN_CH0_ID_0x794_Msg_Count,
CAN_CH0_ID_TOTAL_MAX, CAN_CH0_ID_TOTAL_MAX,
} CAN_MSG_ID_t; } CAN_MSG_ID_t;
...@@ -33,8 +33,8 @@ extern const st_CAN_SendAttribute st_CANSendAttr[ID_SEND_TOTAL] ; ...@@ -33,8 +33,8 @@ extern const st_CAN_SendAttribute st_CANSendAttr[ID_SEND_TOTAL] ;
#define CAN_CH0_ID_Send18FEC1EE_Msg 0x18FEC1EEul #define CAN_CH0_ID_Send18FEC1EE_Msg 0x18FEC1EEul
#define CAN_CH0_ID_Send0CFE6CEE_Msg 0x0CFE6CEEul #define CAN_CH0_ID_Send0CFE6CEE_Msg 0x0CFE6CEEul
#define CAN_CH0_ID_Send18FEFC17_Msg 0x18FEFC17ul #define CAN_CH0_ID_Send18FEFC17_Msg 0x18FEFC17ul
#define CAN_CH0_ID_Send0x794_Msg 0x794ul
extern uint32_t Get_ID_ODO(void); extern uint32_t Get_ID_ODO(void);
extern uint32_t Get_ID_FUEL(void); extern uint32_t Get_ID_FUEL(void);
extern uint8_t Get_ID_HandBrakeSts(void); extern uint8_t Get_ID_HandBrakeSts(void);
...@@ -58,6 +58,14 @@ extern uint8_t Get_CAN_CH0_ID_10FF1017_Sig_RHParkTailLightSts(void); ...@@ -58,6 +58,14 @@ extern uint8_t Get_CAN_CH0_ID_10FF1017_Sig_RHParkTailLightSts(void);
extern uint32_t Get_CAN_CH0_ID_18FEC1EE_Sig_Total_Vehicle_Distance(void); extern uint32_t Get_CAN_CH0_ID_18FEC1EE_Sig_Total_Vehicle_Distance(void);
extern uint16_t Get_CAN_CH0_ID_0CFE6CEE_Sig_Tachograph_vehicle_speed(void); extern uint16_t Get_CAN_CH0_ID_0CFE6CEE_Sig_Tachograph_vehicle_speed(void);
extern uint8_t Get_CAN_CH0_ID_18FEFC17_Sig_Fuel_level(void); extern uint8_t Get_CAN_CH0_ID_18FEFC17_Sig_Fuel_level(void);
extern uint8_t Get_CAN_CH0_ID_794_byte0_Sig(void);
extern uint8_t Get_CAN_CH0_ID_794_byte1_Sig(void);
extern uint8_t Get_CAN_CH0_ID_794_byte2_Sig(void);
extern uint8_t Get_CAN_CH0_ID_794_byte3_Sig(void);
extern uint8_t Get_CAN_CH0_ID_794_byte4_Sig(void);
extern uint8_t Get_CAN_CH0_ID_794_byte5_Sig(void);
extern uint8_t Get_CAN_CH0_ID_794_byte6_Sig(void);
extern uint8_t Get_CAN_CH0_ID_794_byte7_Sig(void);
......
...@@ -121,7 +121,7 @@ void CanMSg_XMS_Analysis(canlib_uint16_t CbkCycle) ...@@ -121,7 +121,7 @@ void CanMSg_XMS_Analysis(canlib_uint16_t CbkCycle)
} }
} }
} }
canlib_uint8_t test111 = 0;
void Co_Can_Buff_Set(canlib_uint16_t MsgID, canlib_uint8_t m_DLC, canlib_uint8_t Msg []) void Co_Can_Buff_Set(canlib_uint16_t MsgID, canlib_uint8_t m_DLC, canlib_uint8_t Msg [])
{ {
canlib_uint8_t i; canlib_uint8_t i;
...@@ -134,6 +134,7 @@ void Co_Can_Buff_Set(canlib_uint16_t MsgID, canlib_uint8_t m_DLC, canlib_uint8_t ...@@ -134,6 +134,7 @@ void Co_Can_Buff_Set(canlib_uint16_t MsgID, canlib_uint8_t m_DLC, canlib_uint8_t
for ( i = 0u; i < 8u; i++ ) for ( i = 0u; i < 8u; i++ )
{ {
CanRXMsgOp.CAN_MSG_Analysis [ u16ConverIdx ].ReceiveBuf [ i ] = Msg [ i ]; CanRXMsgOp.CAN_MSG_Analysis [ u16ConverIdx ].ReceiveBuf [ i ] = Msg [ i ];
test111 = CanRXMsgOp.CAN_MSG_Analysis [ u16ConverIdx ].ReceiveBuf [ i ];
} }
CanRXMsgOp.CAN_MSG_Analysis [ u16ConverIdx ].CAN_Received = 1u; CanRXMsgOp.CAN_MSG_Analysis [ u16ConverIdx ].CAN_Received = 1u;
if ( CanRXMsgOp.pAttrubute [ u16ConverIdx ].Msg_ReceiveCBK != (( void * )0) ) if ( CanRXMsgOp.pAttrubute [ u16ConverIdx ].Msg_ReceiveCBK != (( void * )0) )
...@@ -143,15 +144,20 @@ void Co_Can_Buff_Set(canlib_uint16_t MsgID, canlib_uint8_t m_DLC, canlib_uint8_t ...@@ -143,15 +144,20 @@ void Co_Can_Buff_Set(canlib_uint16_t MsgID, canlib_uint8_t m_DLC, canlib_uint8_t
} }
} }
} }
canlib_uint8_t testmsg = 0;
canlib_uint8_t CAN_MSG_Read(canlib_uint16_t MsgIdx, canlib_uint8_t BuffIdx) canlib_uint8_t CAN_MSG_Read(canlib_uint16_t MsgIdx, canlib_uint8_t BuffIdx)
{ {
canlib_uint8_t ret = 0u; canlib_uint8_t ret = 0u;
if(MsgIdx == 6)
{
testmsg = 0;
}
if ( MsgIdx < CanRXMsgOp.Total_Msg ) if ( MsgIdx < CanRXMsgOp.Total_Msg )
{ {
if ( BuffIdx < 8u ) if ( BuffIdx < 8u )
{ {
ret = CanRXMsgOp.CAN_MSG_Analysis [ MsgIdx ].AnalyzeMsg [ BuffIdx ]; testmsg = CanRXMsgOp.CAN_MSG_Analysis [ MsgIdx ].AnalyzeMsg [ BuffIdx ];
ret = CanRXMsgOp.CAN_MSG_Analysis [ MsgIdx ].ReceiveBuf [ BuffIdx ];
} }
else else
{ {
......
...@@ -55,17 +55,17 @@ void COM_CAN_Init(void) ...@@ -55,17 +55,17 @@ void COM_CAN_Init(void)
memset(Load_AttrBuff, 0, sizeof(Load_AttrBuff)); memset(Load_AttrBuff, 0, sizeof(Load_AttrBuff));
memset(Load_Attr, 0, sizeof(Load_Attr)); memset(Load_Attr, 0, sizeof(Load_Attr));
g_Verify_Result = 0; g_Verify_Result = 0;
Msg_Load_Init( ); // Msg_Load_Init( );
Can_RX_BuffInit(( uint8_t * )pRXBuff, CAN_MSG_CONST_ARRAY, CAN_CH0_ID_TOTAL_MAX); Can_RX_BuffInit(( uint8_t * )pRXBuff, CAN_MSG_CONST_ARRAY, CAN_CH0_ID_TOTAL_MAX);
if ( g_Verify_Result == 1U ) if ( g_Verify_Result == 1U )
{ {
Can_TX_BuffInit(( uint8_t * )pTXBuff, Load_Attr, PreLoad_Info->total_msg.word, Can_Write_FIFO); // Can_TX_BuffInit(( uint8_t * )pTXBuff, Load_Attr, PreLoad_Info->total_msg.word, Can_Write_FIFO);
} }
CAN_RX_SetEnable(0x00); CAN_RX_SetEnable(0x55);
if ( g_Verify_Result == 1U ) if ( g_Verify_Result == 1U )
{ {
CAN_TX_SetEnable(0x55); // CAN_TX_SetEnable(0x55);
Execute_Specify_Step(0); // Execute_Specify_Step(0);
} }
} }
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#ifndef _DIAG_ID_DEF_H_ #ifndef _DIAG_ID_DEF_H_
#define _DIAG_ID_DEF_H_ #define _DIAG_ID_DEF_H_
#define DIAG_ID_Tx 0x18DA17FAu /*����ID*/ #define DIAG_ID_Tx 0x714u /*����ID*/
#define DIAG_ID_Rx_PHY 0x18DAFA17u /*����ID,����Ѱַ*/ #define DIAG_ID_Rx_PHY 0x794u /*����ID,����Ѱַ*/
#define DIAG_ID_Rx_FUN 0x18DAFA17u /*����ID,����Ѱַ*/ #define DIAG_ID_Rx_FUN 0x794u /*����ID,����Ѱַ*/
#endif #endif
...@@ -75,7 +75,7 @@ void Buzzer_Start(void); ...@@ -75,7 +75,7 @@ void Buzzer_Start(void);
void Buzzer_Stop(void); void Buzzer_Stop(void);
extern void Buzzer_Init(void); extern void Buzzer_Init(void);
extern void Buzzer_Warning(void); extern void Buzzer_Warning(void);
void Display_Send_Vspead(uint8_t menu);
void GUI_General_Digit_Display(uint32_t Digit, const uint8_t *Font[], uint8_t Len, uint8_t Blank, const uint16_t *px, uint16_t y); void GUI_General_Digit_Display(uint32_t Digit, const uint8_t *Font[], uint8_t Len, uint8_t Blank, const uint16_t *px, uint16_t y);
......
...@@ -2,22 +2,13 @@ ...@@ -2,22 +2,13 @@
#include "Key.h" #include "Key.h"
#include "Display_Info.h" #include "Display_Info.h"
#include "Check_Ctrl.h" #include "Check_Ctrl.h"
extern uint8_t resetflag;
void Key_Operation_SW5(Key_Event_en_t enKeyEvent) void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
if ( (LED_Waring == 1) || (UDS_Warning_Voltage ==1)) // Display_Add( );
{ // Display_TFT_Clear( );
;
}
else
{
Display_Add( );
Display_TFT_Clear( );
}
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
...@@ -31,8 +22,8 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent) ...@@ -31,8 +22,8 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
} }
else else
{ {
Display_Add( ); // Display_Add( );
Display_TFT_Clear( ); // Display_TFT_Clear( );
} }
...@@ -51,8 +42,8 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent) ...@@ -51,8 +42,8 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
} }
else else
{ {
Display_Sub( ); // Display_Sub( );
Display_TFT_Clear( ); // Display_TFT_Clear( );
} }
} }
...@@ -67,8 +58,8 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent) ...@@ -67,8 +58,8 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
} }
else else
{ {
Display_Sub( ); // Display_Sub( );
Display_TFT_Clear( ); // Display_TFT_Clear( );
} }
...@@ -120,7 +111,7 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent) ...@@ -120,7 +111,7 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
} }
else else
{ {
MENU_CHECK_STEP_SUB( ); // MENU_CHECK_STEP_SUB( );
} }
} }
...@@ -135,7 +126,7 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent) ...@@ -135,7 +126,7 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
} }
else else
{ {
MENU_CHECK_STEP_SUB( ); // MENU_CHECK_STEP_SUB( );
} }
} }
else else
...@@ -147,14 +138,12 @@ void Key_Operation_SW1(Key_Event_en_t enKeyEvent) ...@@ -147,14 +138,12 @@ void Key_Operation_SW1(Key_Event_en_t enKeyEvent)
/*清零ODO*/ /*清零ODO*/
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
if ( LED_Waring == 1 || (UDS_Warning_Voltage ==1)) if(resetflag == 0)
{
;
}
else
{ {
MENU_CHECK_STEP_ADD( ); MENU_CHECK_STEP_ADD( );
} }
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
......
...@@ -32,14 +32,14 @@ void Can_Init(void) ...@@ -32,14 +32,14 @@ void Can_Init(void)
CAN_Frame_st_t stCANFrame; CAN_Frame_st_t stCANFrame;
RSCAN0_Config_st_t loc_can = {0}; RSCAN0_Config_st_t loc_can = {0};
loc_can.stRSCANCh2.u32RSCANChEn = 0U; loc_can.stRSCANCh2.u32RSCANChEn = 0U;
loc_can.stRSCANCh2.enRSCANChBps = RSCAN_Baud_Rate_250K; loc_can.stRSCANCh2.enRSCANChBps = RSCAN_Baud_Rate_500K;
loc_can.stRSCANCh2.u32RSCANChRuleSize = CANFD0_CH2_RX_RULE_SIZE; loc_can.stRSCANCh2.u32RSCANChRuleSize = CANFD0_CH2_RX_RULE_SIZE;
loc_can.stRSCANCh2.pfnRSCANConfirmCallBack = Can_Confirm; loc_can.stRSCANCh2.pfnRSCANConfirmCallBack = Can_Confirm;
loc_can.stRSCANCh2.pfnRSCANReadMsgCallBack = Can_Read_Msg; loc_can.stRSCANCh2.pfnRSCANReadMsgCallBack = Can_Read_Msg;
loc_can.stRSCANCh2.pfnRSCANAbortConfirmCallBack = 0; loc_can.stRSCANCh2.pfnRSCANAbortConfirmCallBack = 0;
loc_can.stRSCANCh4.u32RSCANChEn = 1U; loc_can.stRSCANCh4.u32RSCANChEn = 1U;
loc_can.stRSCANCh4.enRSCANChBps = RSCAN_Baud_Rate_250K; loc_can.stRSCANCh4.enRSCANChBps = RSCAN_Baud_Rate_500K;
loc_can.stRSCANCh4.u32RSCANChRuleSize = CANFD0_CH4_RX_RULE_SIZE; loc_can.stRSCANCh4.u32RSCANChRuleSize = CANFD0_CH4_RX_RULE_SIZE;
loc_can.stRSCANCh4.pfnRSCANConfirmCallBack = Can_Confirm; loc_can.stRSCANCh4.pfnRSCANConfirmCallBack = Can_Confirm;
loc_can.stRSCANCh4.pfnRSCANReadMsgCallBack = Can_Read_Msg; loc_can.stRSCANCh4.pfnRSCANReadMsgCallBack = Can_Read_Msg;
...@@ -152,8 +152,14 @@ void Can_Abort_All(void) ...@@ -152,8 +152,14 @@ void Can_Abort_All(void)
} }
/*****Lower*******/ /*****Lower*******/
uint8_t testewewe = 0;
void Can_Read_Msg(uint32_t m_id, uint8_t m_dlc, uint8_t m_Msg []) void Can_Read_Msg(uint32_t m_id, uint8_t m_dlc, uint8_t m_Msg [])
{ {
if(m_id == 0x794)
{
testewewe = Co_Can_ConvertSubID(m_id);
}
Co_Can_Buff_Set(Co_Can_ConvertSubID(m_id), m_dlc, m_Msg); Co_Can_Buff_Set(Co_Can_ConvertSubID(m_id), m_dlc, m_Msg);
if ( (m_id == DIAG_ID_Rx_FUN) || (m_id == DIAG_ID_Rx_PHY) ) if ( (m_id == DIAG_ID_Rx_FUN) || (m_id == DIAG_ID_Rx_PHY) )
{ {
...@@ -190,7 +196,7 @@ void Can_Confirm(uint32_t Identifier, uint8_t TransferStatus) ...@@ -190,7 +196,7 @@ void Can_Confirm(uint32_t Identifier, uint8_t TransferStatus)
MSG_ID = 0x69bul; MSG_ID = 0x69bul;
break; break;
case RSCAN_CHANNEL_BUF_8: case RSCAN_CHANNEL_BUF_8:
MSG_ID = 0x28Aul; MSG_ID = 0x794ul;
break; break;
case RSCAN_CHANNEL_BUF_1: case RSCAN_CHANNEL_BUF_1:
MSG_ID = DIAG_ID_Tx; MSG_ID = DIAG_ID_Tx;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define _RTE_CAN_H_ #define _RTE_CAN_H_
#include "TYW_stdint.h" #include "TYW_stdint.h"
#include "string.h"
typedef struct typedef struct
{ {
uint8_t Status; //当前所处Bus Off 状态 uint8_t Status; //当前所处Bus Off 状态
......
...@@ -5,22 +5,22 @@ ...@@ -5,22 +5,22 @@
#include "TYW_stdint.h" #include "TYW_stdint.h"
#include "GPIO.h" #include "GPIO.h"
#define LINE_IN_CHARGE GPIO_IN_PORT11_PIN00 // #define LINE_IN_CHARGE GPIO_IN_PORT11_PIN00
#define LINE_IN_BRAKE_LEVELn GPIO_IN_PORT08_PIN08 // #define LINE_IN_BRAKE_LEVELn GPIO_IN_PORT08_PIN08
#define LINE_IN_OIL_PRESSUREn GPIO_IN_PORT08_PIN09 // #define LINE_IN_OIL_PRESSUREn GPIO_IN_PORT08_PIN09
#define LINE_IN_WASHING_LEVELn GPIO_IN_PORT09_PIN01 // #define LINE_IN_WASHING_LEVELn GPIO_IN_PORT09_PIN01
#define LINE_IN_PARKn GPIO_IN_PORT09_PIN00 // #define LINE_IN_PARKn GPIO_IN_PORT09_PIN00
#define LED1 GPIO_OUT_APORT00_PIN07 // #define LED1 GPIO_OUT_APORT00_PIN07
#define LED2 GPIO_OUT_APORT00_PIN08 // #define LED2 GPIO_OUT_APORT00_PIN08
#define LED3 GPIO_OUT_APORT00_PIN10 // #define LED3 GPIO_OUT_APORT00_PIN10
#define LED4 GPIO_OUT_APORT00_PIN11 // #define LED4 GPIO_OUT_APORT00_PIN11
#define LED5 GPIO_OUT_APORT00_PIN12 // #define LED5 GPIO_OUT_APORT00_PIN12
#define LED6 GPIO_OUT_PORT10_PIN06 // #define LED6 GPIO_OUT_PORT10_PIN06
#define LED7 GPIO_OUT_PORT10_PIN06 // #define LED7 GPIO_OUT_PORT10_PIN06
#define LCDAL GPIO_IN_APORT00_PIN13 // #define LCDAL GPIO_IN_APORT00_PIN13
#define LCDAR GPIO_IN_APORT00_PIN14 // #define LCDAR GPIO_IN_APORT00_PIN14
#define SW1 GPIO_IN_APORT00_PIN00 #define SW1 GPIO_IN_APORT00_PIN00
#define SW2 GPIO_IN_PORT10_PIN05 #define SW2 GPIO_IN_PORT10_PIN05
...@@ -39,18 +39,18 @@ ...@@ -39,18 +39,18 @@
#define FUEL_RES_3 GPIO_OUT_PORT08_PIN10 #define FUEL_RES_3 GPIO_OUT_PORT08_PIN10
#define FUEL_RES_4 GPIO_OUT_PORT08_PIN11 #define FUEL_RES_4 GPIO_OUT_PORT08_PIN11
#define LINE_OUT_CHARGER GPIO_OUT_PORT10_PIN06// // #define LINE_OUT_CHARGER GPIO_OUT_PORT10_PIN06//
#define LINE_OUT_OIL GPIO_OUT_PORT10_PIN06 // #define LINE_OUT_OIL GPIO_OUT_PORT10_PIN06
#define LINE_OUT_BREAK_LEVEL GPIO_OUT_PORT10_PIN06 // #define LINE_OUT_BREAK_LEVEL GPIO_OUT_PORT10_PIN06
#define LINE_OUT_WARSH_LEVEL GPIO_OUT_PORT10_PIN06 // #define LINE_OUT_WARSH_LEVEL GPIO_OUT_PORT10_PIN06
#define LINE_OUT_PARK GPIO_OUT_PORT10_PIN06 // #define LINE_OUT_PARK GPIO_OUT_PORT10_PIN06
#define LINE_OUT_EPS GPIO_OUT_PORT10_PIN06 // #define LINE_OUT_EPS GPIO_OUT_PORT10_PIN06 //远光
#define POWER_CTRL_KL30 GPIO_OUT_PORT10_PIN13 #define POWER_CTRL_KL30 GPIO_OUT_PORT10_PIN13
#define POWER_CTRL_KL15 GPIO_OUT_PORT10_PIN12 #define POWER_CTRL_KL15 GPIO_OUT_PORT10_PIN12
#define POWER_CTRL_KL30_Current GPIO_OUT_PORT10_PIN14 #define POWER_CTRL_KL30_Current GPIO_OUT_PORT10_PIN14
#define LINE_OUT_FANGDAO GPIO_OUT_PORT10_PIN06 // #define LINE_OUT_FANGDAO GPIO_OUT_PORT10_PIN06
#define SD_FMQ GPIO_OUT_PORT10_PIN02 #define SD_FMQ GPIO_OUT_PORT10_PIN02
#define PWM_FMQ GPIO_OUT_PORT10_PIN11 #define PWM_FMQ GPIO_OUT_PORT10_PIN11
...@@ -68,21 +68,25 @@ ...@@ -68,21 +68,25 @@
#define NEG_10_Ctrl GPIO_OUT_PORT00_PIN08 #define NEG_10_Ctrl GPIO_OUT_PORT00_PIN08
#define LINE_SafeBelt_1 NEG_1_Ctrl // #define LINE_SafeBelt_1 NEG_1_Ctrl
#define LINE_SafeBelt_2 NEG_2_Ctrl // #define LINE_SafeBelt_2 NEG_2_Ctrl
#define LINE_SafeBelt_3 NEG_3_Ctrl // #define LINE_SafeBelt_3 NEG_3_Ctrl
#define LINE_SafeBelt_4 NEG_4_Ctrl // #define LINE_SafeBelt_4 NEG_4_Ctrl
#define LINE_SafeBelt_5 NEG_5_Ctrl // #define LINE_SafeBelt_5 NEG_5_Ctrl
#define LINE_SafeBelt_2_press NEG_6_Ctrl // #define LINE_SafeBelt_2_press NEG_6_Ctrl
#define LINE_SafeBelt_3_press NEG_7_Ctrl // #define LINE_SafeBelt_3_press NEG_7_Ctrl
#define LINE_SafeBelt_4_press NEG_8_Ctrl // #define LINE_SafeBelt_4_press NEG_8_Ctrl
#define LINE_SafeBelt_5_press NEG_9_Ctrl // #define LINE_SafeBelt_5_press NEG_9_Ctrl
//ljs
//左转
#define LINE_OUT_POS_01 GPIO_OUT_PORT10_PIN06 #define LINE_OUT_POS_01 GPIO_OUT_PORT10_PIN06
//右转
#define LINE_OUT_POS_02 GPIO_OUT_PORT09_PIN00 #define LINE_OUT_POS_02 GPIO_OUT_PORT09_PIN00
//远光
#define LINE_OUT_POS_03 GPIO_OUT_APORT00_PIN04 #define LINE_OUT_POS_03 GPIO_OUT_APORT00_PIN04
//位置灯
#define LINE_OUT_POS_04 GPIO_OUT_APORT00_PIN05 #define LINE_OUT_POS_04 GPIO_OUT_APORT00_PIN05
#define LINE_OUT_POS_05 GPIO_OUT_APORT00_PIN06 #define LINE_OUT_POS_05 GPIO_OUT_APORT00_PIN06
#define LINE_OUT_POS_06 GPIO_OUT_APORT00_PIN13 #define LINE_OUT_POS_06 GPIO_OUT_APORT00_PIN13
...@@ -91,15 +95,25 @@ ...@@ -91,15 +95,25 @@
#define LINE_OUT_POS_09 GPIO_OUT_PORT08_PIN08 #define LINE_OUT_POS_09 GPIO_OUT_PORT08_PIN08
#define LINE_OUT_POS_10 GPIO_OUT_PORT00_PIN07 #define LINE_OUT_POS_10 GPIO_OUT_PORT00_PIN07
//安全带//R挡
#define LINE_OUT_NEG_01 GPIO_OUT_PORT09_PIN06 #define LINE_OUT_NEG_01 GPIO_OUT_PORT09_PIN06
//机油压力//L挡
#define LINE_OUT_NEG_02 GPIO_OUT_PORT09_PIN05 #define LINE_OUT_NEG_02 GPIO_OUT_PORT09_PIN05
//H挡//发动机故障
#define LINE_OUT_NEG_03 GPIO_OUT_PORT09_PIN04 #define LINE_OUT_NEG_03 GPIO_OUT_PORT09_PIN04
//P挡//驻车指示灯
#define LINE_OUT_NEG_04 GPIO_OUT_PORT09_PIN03 #define LINE_OUT_NEG_04 GPIO_OUT_PORT09_PIN03
//开关后桥状态//制动失效
#define LINE_OUT_NEG_05 GPIO_OUT_PORT09_PIN02 #define LINE_OUT_NEG_05 GPIO_OUT_PORT09_PIN02
//马达2驱信号
#define LINE_OUT_NEG_06 GPIO_OUT_PORT09_PIN01 #define LINE_OUT_NEG_06 GPIO_OUT_PORT09_PIN01
//马达4驱信号//空挡
#define LINE_OUT_NEG_07 GPIO_OUT_PORT10_PIN07 #define LINE_OUT_NEG_07 GPIO_OUT_PORT10_PIN07
//马达4驱锁死信号
#define LINE_OUT_NEG_08 GPIO_OUT_PORT10_PIN03 #define LINE_OUT_NEG_08 GPIO_OUT_PORT10_PIN03
//开关2驱信号
#define LINE_OUT_NEG_09 GPIO_OUT_PORT10_PIN04 #define LINE_OUT_NEG_09 GPIO_OUT_PORT10_PIN04
//B-5开关4驱信号
#define LINE_OUT_NEG_10 GPIO_OUT_PORT00_PIN08 #define LINE_OUT_NEG_10 GPIO_OUT_PORT00_PIN08
#define LINE_FUEL_RES01 GPIO_OUT_PORT00_PIN13 #define LINE_FUEL_RES01 GPIO_OUT_PORT00_PIN13
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "Display_Info.h" #include "Display_Info.h"
#include "Key.h" #include "Key.h"
#include "Check_Ctrl.h" #include "Check_Ctrl.h"
#include "CAN_APP.h"
/******************************************************************************* /*******************************************************************************
* * * *
* ϵͳ��������ģʽ(SYS_MODE_OFF / SYS_MODE_ON / SYS_MODE_STANDBY )�����б� * * ϵͳ��������ģʽ(SYS_MODE_OFF / SYS_MODE_ON / SYS_MODE_STANDBY )�����б� *
...@@ -27,9 +28,10 @@ ...@@ -27,9 +28,10 @@
void Sys_Run_Mode_Pseudo_Real_Time_Tasks(void) void Sys_Run_Mode_Pseudo_Real_Time_Tasks(void)
{ {
SD_FMQ = 1; SD_FMQ = 1;
DoCAN_Communication_Service( ); // DoCAN_Communication_Service( );
UDS_Server_Application_Service( ); // UDS_Server_Application_Service( );
TFT_LCD_Display_Update_Service( ); TFT_LCD_Display_Update_Service( );
Get_PN_msg();
} }
/*============================================================================*/ /*============================================================================*/
...@@ -53,12 +55,77 @@ void Sys_Run_Mode_5ms_Tasks_Group(void) ...@@ -53,12 +55,77 @@ void Sys_Run_Mode_5ms_Tasks_Group(void)
/*============================================================================== /*==============================================================================
10ms����ִ������ ��0�� 10ms����ִ������ ��0��
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
uint32_t fakedelay = 0;
uint32_t send0x714time = 0;
uint8_t cycleflag = 0;
uint8_t getmsgfinish = 0;
extern uint8_t SWtestresult;
extern uint8_t HWtestresult;
extern uint8_t PNtestresult;
extern uint8_t resetflag;
void Sys_Run_Mode_10ms_Tasks_Group(void) void Sys_Run_Mode_10ms_Tasks_Group(void)
{ {
BusOff_Service( ); BusOff_Service( );
Key_Service( ); Key_Service( );
resetchangeUDSfuc();
if(fakedelay < 100)
{
fakedelay++;
}
else
{
change_UDS_DID();
// cycleflag = 1;
}
if(resetflag == 0)
{
if(cycleflag == 1)
{
if(MENU_CHECK_STEP == 0)
{
if(send0x714time < 4)
{
send0x714time++;
}
else
{
send_0x714_fuc();
send0x714time = 0;
}
}
else
{
send0x714time = 0;
}
}
if(MENU_CHECK_STEP != 0)
{
can_submit();
}
}
// if(getmsgfinish == 0)
// {
// if(cycleflag == 0)
// {
// }
// else
// {
// send_0x714_fuc();
// // cycleflag = 0;
// }
// }
//刷数字、刷英文拼写。 //刷数字、刷英文拼写。
//GUI_General_Digit_Display(123456789, Num_09, 10, 0, BackLightDigitNum09PosX, 79); //GUI_General_Digit_Display(123456789, Num_09, 10, 0, BackLightDigitNum09PosX, 79);
...@@ -79,6 +146,7 @@ void Sys_Run_Mode_10ms_Tasks_Group(void) ...@@ -79,6 +146,7 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
void Sys_Run_Mode_20ms_Tasks_Group0(void) void Sys_Run_Mode_20ms_Tasks_Group0(void)
{ {
//Total_Check( ); //Total_Check( );
} }
/*============================================================================== /*==============================================================================
...@@ -90,10 +158,10 @@ void Sys_Run_Mode_50ms_Tasks_Group(void) ...@@ -90,10 +158,10 @@ void Sys_Run_Mode_50ms_Tasks_Group(void)
timer_100ms++; timer_100ms++;
// Buzzer_Init();
if ( timer_100ms == 1 ) if ( timer_100ms == 1 )
{ {
Read_IPK_Session_Type( );//请求仪表发送 软硬件版本号 等数据。 // Read_IPK_Session_Type( );//请求仪表发送 软硬件版本号 等数据。
} }
else if ( timer_100ms == 2 ) else if ( timer_100ms == 2 )
...@@ -106,6 +174,7 @@ void Sys_Run_Mode_50ms_Tasks_Group(void) ...@@ -106,6 +174,7 @@ void Sys_Run_Mode_50ms_Tasks_Group(void)
100ms����ִ������ ��0�� 100ms����ִ������ ��0��
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
uint16_t u16LJSText; uint16_t u16LJSText;
uint8_t time300ms;
void Sys_Run_Mode_100ms_Tasks_Group(void) void Sys_Run_Mode_100ms_Tasks_Group(void)
{ {
static uint32_t loc_timer = 0; static uint32_t loc_timer = 0;
...@@ -113,11 +182,24 @@ void Sys_Run_Mode_100ms_Tasks_Group(void) ...@@ -113,11 +182,24 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
if ( loc_timer >= 15 ) if ( loc_timer >= 15 )
{ {
loc_timer = 0; loc_timer = 0;
HW_CHECK_IPK_EXIST( ); // HW_CHECK_IPK_EXIST( );
} }
// if(time300ms < 20)
Display_PageNum(); // {
// time300ms++;
// }
// else
// {
// time300ms = 0;
// }
// Get_ID_0x794_Msg();
// Display_PageNum();
//硬线车速输出懒得改名了
Buzzer_Start();
Total_Check( ); Total_Check( );
//u16LJSText = TFT_LCD_REQ_FIFO_MAX_DEPTH; //u16LJSText = TFT_LCD_REQ_FIFO_MAX_DEPTH;
} }
......
...@@ -42,23 +42,23 @@ const uint16_t g_u16GPIOConfigArray[56U][2U] = ...@@ -42,23 +42,23 @@ const uint16_t g_u16GPIOConfigArray[56U][2U] =
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0020u, 0x0000u}, {0x5020u, 0x5020u},
{0x0620u, 0x0600u}, {0x0620u, 0x0620u},
{0x0000u, 0x0000u},
{0x0000u, 0x0000u},
{0x5630u, 0x5630u},
{0x0A6Fu, 0x0A6Fu},
{0x29CFu, 0x29CFu},
{0x0000u, 0x0000u},
{0x0000u, 0x0000u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0630u, 0x0600u},
{0x4220u, 0x2207u},
{0x79CFu, 0x79FFu},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0000u, 0x0008u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0000u, 0x0003u}, {0x1FFFu, 0x1FFFu},
{0x0000u, 0x0008u},
{0x0000u, 0x0008u},
{0x1FFFu, 0x1FF7u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
...@@ -72,27 +72,27 @@ const uint16_t g_u16GPIOConfigArray[56U][2U] = ...@@ -72,27 +72,27 @@ const uint16_t g_u16GPIOConfigArray[56U][2U] =
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x8800u, 0x0000u}, {0x8000u, 0x8000u},
{0x8800u, 0x0000u}, {0x8000u, 0x8000u},
{0x0000u, 0x0000u},
{0x0000u, 0x0000u},
{0x0000u, 0x0000u},
{0x8000u, 0x8000u},
{0x0020u, 0x0000u},
{0x7FFFu, 0x7FFFu},
{0x0000u, 0x0000u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0004u, 0x0200u}, {0x0001u, 0x0001u},
{0x8800u, 0x0000u}, {0x0001u, 0x0001u},
{0x8020u, 0x0000u},
{0x77FFu, 0xFFFFu},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0005u, 0x0000u}, {0x0001u, 0x0001u},
{0x0005u, 0x0000u},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x00FEu, 0x00FEu},
{0x0000u, 0x0000u}, {0x0000u, 0x0000u},
{0x0000u, 0x0080u}, {0x000Fu, 0x0200u},
{0x0005u, 0x0000u},
{0x0001u, 0x0005u},
{0x00FAu, 0x00FFu},
{0x8080u, 0x1000u},
{0x000Fu, 0x673Fu},
{0xFFFFu, 0xFFFFu}, {0xFFFFu, 0xFFFFu},
}; };
static void GPIO_PIN_Init(GPIO_Config_Mode_en_t enGPIOConfigMode) static void GPIO_PIN_Init(GPIO_Config_Mode_en_t enGPIOConfigMode)
......
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
#define TIMERB_TIMEROUT_MAX 50U #define TIMERB_TIMEROUT_MAX 50U
/*----target clock----------*/ /*----target clock----------*/
#define TIMERB_0_CK0 5000000UL #define TIMERB_0_CK0 1250000UL
#define TIMERB_0_CK1 5000000UL #define TIMERB_0_CK1 1250000UL
#define TIMERB_0_CK2 5000000UL #define TIMERB_0_CK2 1250000UL
#define TIMERB_0_CK3 5000000UL #define TIMERB_0_CK3 1250000UL
/*-----default clock---------*/ /*-----default clock---------*/
#define TIMERB_PPLLCLK2 40000000UL #define TIMERB_PPLLCLK2 40000000UL
......
...@@ -81,6 +81,8 @@ void Sys_Startup_Init(void) ...@@ -81,6 +81,8 @@ void Sys_Startup_Init(void)
Display_Title_Info( ); Display_Title_Info( );
Key_Init( ); Key_Init( );
Buzzer_Init(); Buzzer_Init();
POWER_CTRL_KL30 = 1u; //B+
POWER_CTRL_KL15 = 1u; //KL15
} }
/*********************************************************************** /***********************************************************************
......
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