Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiancetai
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈家乐
jiancetai
Commits
dcd21f87
Commit
dcd21f87
authored
Jun 05, 2025
by
huangguoqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:CAN诊断nfc
parent
1db795da
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
117 additions
and
117 deletions
+117
-117
COM_CAN.c
YueJin_test_bench/source/Appliciation/COM_CAN.c
+2
-2
Check_Ctrl.c
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
+1
-7
DoCAN_ISO15765.h
YueJin_test_bench/source/Appliciation/DoCAN_ISO15765.h
+100
-100
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+14
-8
No files found.
YueJin_test_bench/source/Appliciation/COM_CAN.c
View file @
dcd21f87
...
@@ -37,11 +37,11 @@ uint8_t COM_APP_Process(st_CAN_Msg *Msg)
...
@@ -37,11 +37,11 @@ uint8_t COM_APP_Process(st_CAN_Msg *Msg)
void
COM_TX_Process
(
void
)
void
COM_TX_Process
(
void
)
{
{
Can_Write_Fun
(
&
CAN_CH4_CanMsgTxOp
,
5
0000u
);
Can_Write_Fun
(
&
CAN_CH4_CanMsgTxOp
,
2
0000u
);
}
}
void
COM_RX_Process
(
void
)
void
COM_RX_Process
(
void
)
{
{
CanMSg_XMS_Analysis
(
&
CAN_CH4_CanMsgOp
,
5
u
);
CanMSg_XMS_Analysis
(
&
CAN_CH4_CanMsgOp
,
2
u
);
}
}
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
View file @
dcd21f87
...
@@ -109,12 +109,6 @@ uint8_t Get_DID_Low_Byte(uint16_t Input_DID)
...
@@ -109,12 +109,6 @@ uint8_t Get_DID_Low_Byte(uint16_t Input_DID)
return
(
uint8_t
)(
Res
);
return
(
uint8_t
)(
Res
);
}
}
void
HW_CHECK_IPK_EXIST
(
void
)
void
HW_CHECK_IPK_EXIST
(
void
)
{
{
...
@@ -162,7 +156,7 @@ void CHECK_IPK_COUNT(void)
...
@@ -162,7 +156,7 @@ void CHECK_IPK_COUNT(void)
memset
(
Voltage_UDS
,
0xFF
,
sizeof
(
Voltage_UDS
));
memset
(
Voltage_UDS
,
0xFF
,
sizeof
(
Voltage_UDS
));
Display_Menu_Type
=
0
;
Display_Menu_Type
=
0
;
Display_TFT_Clear
(
);
//Display_TFT_Clear(
);
Send_Init
();
Send_Init
();
// MENU_CHECK_Init( );
// MENU_CHECK_Init( );
Global_Session
=
0
;
//掉线时,认为会话模式归零,重连CAN线后,重新将会话模式切到03扩展会话。
Global_Session
=
0
;
//掉线时,认为会话模式归零,重连CAN线后,重新将会话模式切到03扩展会话。
...
...
YueJin_test_bench/source/Appliciation/DoCAN_ISO15765.h
View file @
dcd21f87
/******************************************************************************
/******************************************************************************
文 件 名:
DoCAN_ISO15765.h
?? ?? ????
DoCAN_ISO15765.h
功能描述:ISO 15765 规范规定的诊断服务函数头文件
??????????ISO 15765 ?淶?涨??????????????
作 者:张暄
?? ???????
版 本:
V1.0
?? ????
V1.0
日 期:
2016.7.18
?? ???
2016.7.18
******************************************************************************/
******************************************************************************/
/******************************************************************************
/******************************************************************************
诊断服务的OSI模型映射
???????OSI??????
===============================================================================
===============================================================================
* NO. OSI Layer Diagnostics services
* NO. OSI Layer Diagnostics services
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
/*-----------------------------------------------------------------------------
/*-----------------------------------------------------------------------------
Transfer_Status
Transfer_Status
-----------------------------------------------------------------------------*/
-----------------------------------------------------------------------------*/
#ifndef DIAG_COMPLETE
#ifndef DIAG_COMPLETE
//诊断操作的完成状态
#define DIAG_COMPLETE 0x00u
#define DIAG_COMPLETE 0x00u
#endif
#endif
...
@@ -40,24 +40,24 @@ Transfer_Status
...
@@ -40,24 +40,24 @@ Transfer_Status
#endif
#endif
/*-----------------------------------------------------------------------------
/*-----------------------------------------------------------------------------
N_PDU
名称
N_PDU
????
-----------------------------------------------------------------------------*/
-----------------------------------------------------------------------------*/
#define SINGLE_FRAME 0x00u
#define SINGLE_FRAME 0x00u
//单帧
#define FIRST_FRAME 0x01u
#define FIRST_FRAME 0x01u
//首帧
#define CONSECUTIVE_FRAME 0x02u
#define CONSECUTIVE_FRAME 0x02u
//连续帧
#define FLOW_CONTROL 0x03u
#define FLOW_CONTROL 0x03u
//流控
/*-----------------------------------------------------------------------------
/*-----------------------------------------------------------------------------
流控帧类型
?????????
-----------------------------------------------------------------------------*/
-----------------------------------------------------------------------------*/
#define FC_FS_CTS 0x00u
#define FC_FS_CTS 0x00u
//发送清除
#define FC_FS_WAIT 0x01u
#define FC_FS_WAIT 0x01u
//等待
#define FC_FS_OVFL 0x02u
#define FC_FS_OVFL 0x02u
//溢出
/*-----------------------------------------------------------------------------
/*-----------------------------------------------------------------------------
时序参数名称
??????????
-----------------------------------------------------------------------------*/
-----------------------------------------------------------------------------*/
#define TIMING_PARA_NONE 0X00u
#define TIMING_PARA_NONE 0X00u
//定时器参数
#define TIMING_PARA_N_As 0X01u
#define TIMING_PARA_N_As 0X01u
#define TIMING_PARA_N_Ar 0X02u
#define TIMING_PARA_N_Ar 0X02u
#define TIMING_PARA_N_Bs 0X03u
#define TIMING_PARA_N_Bs 0X03u
...
@@ -66,68 +66,68 @@ N_PDU
...
@@ -66,68 +66,68 @@ N_PDU
#define TIMING_PARA_N_Cr 0X06u
#define TIMING_PARA_N_Cr 0X06u
/*-----------------------------------------------------------------------------
/*-----------------------------------------------------------------------------
STmin
计时状态
STmin
?????
-----------------------------------------------------------------------------*/
-----------------------------------------------------------------------------*/
#define STmin_TIMER_IDLE 0X00u
/*STmin
定时器空闲
*/
#define STmin_TIMER_IDLE 0X00u
/*STmin
?????????
*/
#define STmin_TIME_UP 0X01u
/*STmin
定时时间到
*/
#define STmin_TIME_UP 0X01u
/*STmin
??????
*/
#define STmin_TIMING 0X02u
/*STmin
定时器计时中
*/
#define STmin_TIMING 0X02u
/*STmin
??????????
*/
/*-----------------------------------------------------------------------------
/*-----------------------------------------------------------------------------
传输层收发控制
????????????
-----------------------------------------------------------------------------*/
-----------------------------------------------------------------------------*/
#define TP_DIR_MASK 0x80u
/*
收发标志位
*/
#define TP_DIR_MASK 0x80u
/*
??????λ
*/
#define TP_RX 0x00u
/*
传输层接收状态
*/
#define TP_RX 0x00u
/*
??????????
*/
#define TP_TX 0x80u
/*
传输层发送状态
*/
#define TP_TX 0x80u
/*
?????????
*/
#define TP_IDLE 0x00u
/*Rx
:空闲状态
*/
#define TP_IDLE 0x00u
/*Rx
????????
*/
/*Tx
:空闲状态
*/
/*Tx
????????
*/
#define TP_ERR 0x01u
/*Rx
:接收系统错误
*/
#define TP_ERR 0x01u
/*Rx
????????????
*/
/*Tx
:发送系统错误
*/
/*Tx
????????????
*/
#define TP_RX_INIT 0x10u
/*Rx
:已接收到首帧,初始化多帧接收
*/
#define TP_RX_INIT 0x10u
/*Rx
???????????,????????????
*/
#define TP_TX_INIT 0x90u
/*Tx
:发送初始化完成,正在发送首帧或单帧(注意单帧也使用此标志
)*/
#define TP_TX_INIT 0x90u
/*Tx
?????????????,?????????????(???????????
)*/
#define TP_RX_CTS 0x11u
/*Rx
:接收机允许发送机发送连续帧
(Clear To Send)*/
#define TP_RX_CTS 0x11u
/*Rx
?????????????????????????
(Clear To Send)*/
#define TP_TX_CTS 0x91u
/*Tx
:发送机被许可发送连续帧
(Clear To Send)*/
#define TP_TX_CTS 0x91u
/*Tx
?????????????????????
(Clear To Send)*/
#define TP_RX_RTS 0x20u
/*Rx
:请求继续发送多帧
(Request To Send)*/
#define TP_RX_RTS 0x20u
/*Rx
???????????????
(Request To Send)*/
#define TP_TX_RTS 0xA0u
/*Tx
:等待接收机许可多帧发送
(Request To Send)*/
#define TP_TX_RTS 0xA0u
/*Tx
????????????????????
(Request To Send)*/
#define TP_RX_WAIT 0x21u
/*Rx
:请求发送机暂停发送
*/
#define TP_RX_WAIT 0x21u
/*Rx
????????????????
*/
#define TP_TX_WAIT 0xA1u
/*Tx
:接收机请求等待
*/
#define TP_TX_WAIT 0xA1u
/*Tx
?????????????
*/
#define TP_RX_OVFL 0x22u
/*Rx
:接收机接收溢出
*/
#define TP_RX_OVFL 0x22u
/*Rx
??????????????
*/
#define TP_TX_OVFL 0xA2u
/*Tx
:接收机接收溢出
*/
#define TP_TX_OVFL 0xA2u
/*Tx
??????????????
*/
/******************************************************************************
/******************************************************************************
结构体声明
????????
******************************************************************************/
******************************************************************************/
/***
链路层数据帧结构
***/
/***
??·?????????
***/
typedef
struct
typedef
struct
{
{
uint32_t
Identifier
;
/*
帧
ID*/
uint32_t
Identifier
;
/*
?
ID*/
uint8_t
Data
[
8
];
/*
帧数据
*/
uint8_t
Data
[
8
];
/*
?????
*/
uint8_t
DLC
;
/*
帧长度
*/
uint8_t
DLC
;
/*
?????
*/
}
LinkDataStruct
;
}
LinkDataStruct
;
/***
链路层接收FIFO结构
***/
/***
??·?????FIFO??
***/
typedef
struct
typedef
struct
{
{
LinkDataStruct
LinkData
[
LINK_RX_FIFO_MAX_DEPTH
];
LinkDataStruct
LinkData
[
LINK_RX_FIFO_MAX_DEPTH
];
uint8_t
Depth
;
/*FIFO
深度
*/
uint8_t
Depth
;
/*FIFO
???
*/
uint8_t
IPtr
;
/*
输入指针
*/
uint8_t
IPtr
;
/*
???????
*/
uint8_t
OPtr
;
/*
输出指针
*/
uint8_t
OPtr
;
/*
??????
*/
}
LinkRxFIFOStruct
;
}
LinkRxFIFOStruct
;
/***
链路层发送控制结构
***/
/***
??·????????
***/
typedef
struct
typedef
struct
{
{
uint32_t
Identifier
;
/*
帧
ID*/
uint32_t
Identifier
;
/*
?
ID*/
uint8_t
Data
[
8
];
/*
帧数据
*/
uint8_t
Data
[
8
];
/*
?????
*/
uint8_t
Busy
;
/*
发送器忙标志
*/
uint8_t
Busy
;
/*
??????????
*/
}
LinkTxCtrlStruct
;
}
LinkTxCtrlStruct
;
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/***
传输层数据帧结构
***/
/***
????????????
***/
typedef
struct
typedef
struct
{
{
uint32_t
Identifier
;
uint32_t
Identifier
;
...
@@ -137,14 +137,14 @@ typedef struct
...
@@ -137,14 +137,14 @@ typedef struct
}
TP_Data_Struct
;
}
TP_Data_Struct
;
/***
通用N_PCI解析结构
***/
/***
???N_PCI??????
***/
typedef
struct
typedef
struct
{
{
uint8_t
Rsvd
:
4
;
uint8_t
Rsvd
:
4
;
uint8_t
Type
:
4
;
uint8_t
Type
:
4
;
}
TP_N_PCI_Struct
;
}
TP_N_PCI_Struct
;
/***
通用N_PDU解析结构
***/
/***
???N_PDU??????
***/
typedef
struct
typedef
struct
{
{
uint32_t
N_TAtype
;
uint32_t
N_TAtype
;
...
@@ -155,14 +155,14 @@ typedef struct
...
@@ -155,14 +155,14 @@ typedef struct
}
TP_N_PDU_Struct
;
}
TP_N_PDU_Struct
;
/***
单帧N_PCI解析结构
***/
/***
???N_PCI??????
***/
typedef
struct
typedef
struct
{
{
uint8_t
SF_DL
:
4
;
uint8_t
SF_DL
:
4
;
uint8_t
Type
:
4
;
uint8_t
Type
:
4
;
}
TP_SF_N_PCI_Struct
;
}
TP_SF_N_PCI_Struct
;
/***
单帧N_PDU解析结构
***/
/***
???N_PDU??????
***/
typedef
struct
typedef
struct
{
{
uint32_t
N_TAtype
;
uint32_t
N_TAtype
;
...
@@ -173,7 +173,7 @@ typedef struct
...
@@ -173,7 +173,7 @@ typedef struct
}
TP_N_PDU_SF_Struct
;
}
TP_N_PDU_SF_Struct
;
/***
首帧N_PCI解析结构
***/
/***
???N_PCI??????
***/
typedef
struct
typedef
struct
{
{
uint8_t
FF_DL_H
:
4
;
uint8_t
FF_DL_H
:
4
;
...
@@ -181,7 +181,7 @@ typedef struct
...
@@ -181,7 +181,7 @@ typedef struct
uint16_t
FF_DL_L
:
8
;
uint16_t
FF_DL_L
:
8
;
}
TP_FF_N_PCI_Struct
;
}
TP_FF_N_PCI_Struct
;
/***
首帧N_PDU解析结构
***/
/***
???N_PDU??????
***/
typedef
struct
typedef
struct
{
{
uint32_t
N_TAtype
;
uint32_t
N_TAtype
;
...
@@ -192,14 +192,14 @@ typedef struct
...
@@ -192,14 +192,14 @@ typedef struct
}
TP_N_PDU_FF_Struct
;
}
TP_N_PDU_FF_Struct
;
/***
连续帧N_PCI解析结构
***/
/***
?????N_PCI??????
***/
typedef
struct
typedef
struct
{
{
uint8_t
SN
:
4
;
uint8_t
SN
:
4
;
uint8_t
Type
:
4
;
uint8_t
Type
:
4
;
}
TP_CF_N_PCI_Struct
;
}
TP_CF_N_PCI_Struct
;
/***
连续帧N_PDU解析结构
***/
/***
?????N_PDU??????
***/
typedef
struct
typedef
struct
{
{
uint32_t
N_TAtype
;
uint32_t
N_TAtype
;
...
@@ -210,7 +210,7 @@ typedef struct
...
@@ -210,7 +210,7 @@ typedef struct
}
TP_N_PDU_CF_Struct
;
}
TP_N_PDU_CF_Struct
;
/***
流控帧N_PCI解析结构
***/
/***
?????N_PCI??????
***/
typedef
struct
typedef
struct
{
{
uint8_t
FS
:
4
;
uint8_t
FS
:
4
;
...
@@ -219,7 +219,7 @@ typedef struct
...
@@ -219,7 +219,7 @@ typedef struct
uint8_t
STmin
:
8
;
uint8_t
STmin
:
8
;
}
TP_FC_N_PCI_Struct
;
}
TP_FC_N_PCI_Struct
;
/***
流控帧N_PDU解析结构
***/
/***
?????N_PDU??????
***/
typedef
struct
typedef
struct
{
{
uint32_t
N_TAtype
;
uint32_t
N_TAtype
;
...
@@ -230,7 +230,7 @@ typedef struct
...
@@ -230,7 +230,7 @@ typedef struct
}
TP_N_PDU_FC_Struct
;
}
TP_N_PDU_FC_Struct
;
/***
传输层数据解析联合体
***/
/***
??????????????????
***/
typedef
union
typedef
union
{
{
TP_Data_Struct
Frame
;
TP_Data_Struct
Frame
;
...
@@ -242,35 +242,35 @@ typedef union
...
@@ -242,35 +242,35 @@ typedef union
}
TransportDataUnion
;
}
TransportDataUnion
;
/***
传输层收发控制结构
***/
/***
?????????????
***/
typedef
struct
typedef
struct
{
{
uint8_t
Process
;
/*
当前收发进程
*/
uint8_t
Process
;
/*
??????????
*/
uint8_t
NonStopMode
;
/*
不间断收发模式(不再理会后续的FC帧
)*/
uint8_t
NonStopMode
;
/*
??????????(?????????????FC?
)*/
uint16_t
Len
;
/*
已接收到或已发送出的数据长度
*/
uint16_t
Len
;
/*
???????????????????????
*/
uint16_t
TotalLen
;
/*
数据总长
*/
uint16_t
TotalLen
;
/*
???????
*/
uint16_t
BlockSize
;
/*Block
总数
*/
uint16_t
BlockSize
;
/*Block
????
*/
uint16_t
BlockCnt
;
/*
已接收到或已发送出的Block数
*/
uint16_t
BlockCnt
;
/*
????????????????Block??
*/
uint8_t
BSMax
;
/*
当前接收机剩余的最大Block数
*/
uint8_t
BSMax
;
/*
???????????????Block??
*/
uint8_t
WFTCnt
;
/*[
仅接收用]等待次数计数
*/
uint8_t
WFTCnt
;
/*[
????????]???????????
*/
uint8_t
STmin
;
/*[
仅发送用]当前接收机要求的最小间隔时间
*/
uint8_t
STmin
;
/*[
????????]??????????????С??????
*/
uint8_t
TxReq
;
/*[
仅发送用]发送请求
*/
uint8_t
TxReq
;
/*[
????????]????????
*/
}
TransportControlStruct
;
}
TransportControlStruct
;
/***
时序控制结构
***/
/***
???????
***/
typedef
struct
typedef
struct
{
{
uint16_t
Cnt
;
/*
滚动计数器
*/
uint16_t
Cnt
;
/*
??????????
*/
uint16_t
LastCnt
;
/*
上次更新时的滚动计数器
*/
uint16_t
LastCnt
;
/*
??θ???????????????
*/
uint32_t
NTimer
;
/*
时序定时器,单位:
us*/
uint32_t
NTimer
;
/*
??????,??λ??
us*/
uint32_t
STimer
;
/*
最小间隔时间(STmin)定时器,单位:
us*/
uint32_t
STimer
;
/*
??С??????(STmin)?????,??λ??
us*/
uint8_t
Type
;
/*
当前定时器计时参数名称
*/
uint8_t
Type
;
/*
???????????????????
*/
uint8_t
STminStatus
;
/*STmin
计时状态
*/
uint8_t
STminStatus
;
/*STmin
?????
*/
}
TransportTimingControlStruct
;
}
TransportTimingControlStruct
;
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/***
数据收发结果N_Result枚举
***/
/***
??????????N_Result???
***/
typedef
enum
typedef
enum
{
{
N_OK
=
0
,
N_OK
=
0
,
...
@@ -285,7 +285,7 @@ typedef enum
...
@@ -285,7 +285,7 @@ typedef enum
N_ERROR
,
N_ERROR
,
}
N_ResultEnum
;
}
N_ResultEnum
;
/***
接收用N_USData数据结构
***/
/***
??????N_USData?????
***/
typedef
struct
typedef
struct
{
{
uint32_t
N_TAtype
;
uint32_t
N_TAtype
;
...
@@ -293,7 +293,7 @@ typedef struct
...
@@ -293,7 +293,7 @@ typedef struct
uint8_t
MsgData
[
N_USDATA_RX_BUFFER_SIZE
];
uint8_t
MsgData
[
N_USDATA_RX_BUFFER_SIZE
];
}
N_USDataRxStruct
;
}
N_USDataRxStruct
;
/***
发送用N_USData数据结构
***/
/***
??????N_USData?????
***/
typedef
struct
typedef
struct
{
{
uint32_t
N_TAtype
;
uint32_t
N_TAtype
;
...
@@ -304,32 +304,32 @@ typedef struct
...
@@ -304,32 +304,32 @@ typedef struct
extern
TransportTimingControlStruct
TpTimingCtrl
;
extern
TransportTimingControlStruct
TpTimingCtrl
;
/******************************************************************************
/******************************************************************************
函数声明
????????
******************************************************************************/
******************************************************************************/
/*--
外部接口函数
-----------------------------------------------------------*/
/*--
????????
-----------------------------------------------------------*/
/***
后台服务函数
***/
/***
?????????
***/
void
DoCAN_Communication_Service
(
void
);
void
DoCAN_Communication_Service
(
void
);
extern
void
DoCAN_Timer_Update
(
uint16_t
Interval
);
extern
void
DoCAN_Timer_Update
(
uint16_t
Interval
);
/***
网络层上层接口函数
***/
/***
?????????????
***/
void
DoCAN_N_USData_Request
(
uint32_t
N_TAtype
,
uint8_t
MessageData
[],
uint16_t
Length
);
void
DoCAN_N_USData_Request
(
uint32_t
N_TAtype
,
uint8_t
MessageData
[],
uint16_t
Length
);
void
DoCAN_N_USData_Confirm
(
uint32_t
N_TAtype
,
N_ResultEnum
N_Result
);
void
DoCAN_N_USData_Confirm
(
uint32_t
N_TAtype
,
N_ResultEnum
N_Result
);
void
DoCAN_N_USData_FF_Indication
(
uint32_t
N_TAtype
,
uint16_t
Length
);
void
DoCAN_N_USData_FF_Indication
(
uint32_t
N_TAtype
,
uint16_t
Length
);
void
DoCAN_N_USData_Indication
(
uint32_t
N_TAtype
,
uint8_t
*
MessageData
,
uint16_t
Length
,
N_ResultEnum
N_Result
);
void
DoCAN_N_USData_Indication
(
uint32_t
N_TAtype
,
uint8_t
*
MessageData
,
uint16_t
Length
,
N_ResultEnum
N_Result
);
/***
链路层下层接口函数
***/
/***
??·??????????
***/
void
DoCAN_L_Data_Request
(
uint32_t
Identifier
,
uint8_t
dlc
,
uint8_t
Data
[]
);
void
DoCAN_L_Data_Request
(
uint32_t
Identifier
,
uint8_t
dlc
,
uint8_t
Data
[]
);
void
DoCAN_L_Data_Confirm
(
uint32_t
Identifier
,
uint8_t
TransferStatus
);
void
DoCAN_L_Data_Confirm
(
uint32_t
Identifier
,
uint8_t
TransferStatus
);
extern
void
DoCAN_L_Data_Indication
(
uint32_t
Identifier
,
uint8_t
dlc
,
uint8_t
pData
[]
);
extern
void
DoCAN_L_Data_Indication
(
uint32_t
Identifier
,
uint8_t
dlc
,
uint8_t
pData
[]
);
extern
void
CAN_LLC_Ch5_Data_Request
(
uint32_t
Identifier
,
uint8_t
DLC
,
uint8_t
*
Data
);
extern
void
CAN_LLC_Ch5_Data_Request
(
uint32_t
Identifier
,
uint8_t
DLC
,
uint8_t
*
Data
);
/*--
内部函数
---------------------------------------------------------------*/
/*--
???????
---------------------------------------------------------------*/
/***
传输层协议解析
***/
/***
?????Э?????
***/
void
DoCAN_Receive_And_Assemble_N_USData
(
void
);
/*
接收主函数
*/
void
DoCAN_Receive_And_Assemble_N_USData
(
void
);
/*
??????????
*/
void
DoCAN_Get_N_PDU
(
void
);
void
DoCAN_Get_N_PDU
(
void
);
void
DoCAN_Receive_Single_Frame_N_Data
(
void
);
void
DoCAN_Receive_Single_Frame_N_Data
(
void
);
void
DoCAN_Receive_First_Frame_N_Data
(
void
);
void
DoCAN_Receive_First_Frame_N_Data
(
void
);
...
@@ -337,9 +337,9 @@ void DoCAN_Receive_Consecutive_Frame_N_Data ( void );
...
@@ -337,9 +337,9 @@ void DoCAN_Receive_Consecutive_Frame_N_Data ( void );
void
DoCAN_Receive_Flow_Control
(
void
);
void
DoCAN_Receive_Flow_Control
(
void
);
void
DoCAN_Transmit_Flow_Control
(
void
);
void
DoCAN_Transmit_Flow_Control
(
void
);
void
DoCAN_Handle_Unknown_N_PDU
(
void
);
void
DoCAN_Handle_Unknown_N_PDU
(
void
);
void
DoCAN_Disassemble_And_Transmit_N_USData
(
void
);
/*
发送主函数
*/
void
DoCAN_Disassemble_And_Transmit_N_USData
(
void
);
/*
??????????
*/
/***
时序管理
***/
/***
??????
***/
void
DoCAN_Update_Timer
(
void
);
void
DoCAN_Update_Timer
(
void
);
void
DoCAN_Handle_Time_Out
(
void
);
void
DoCAN_Handle_Time_Out
(
void
);
void
DoCAN_Start_Timer
(
uint8_t
TimingParameter
);
void
DoCAN_Start_Timer
(
uint8_t
TimingParameter
);
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
dcd21f87
...
@@ -50,7 +50,6 @@ void Key_Operation_SW1(Key_Event_en_t enKeyEvent)
...
@@ -50,7 +50,6 @@ void Key_Operation_SW1(Key_Event_en_t enKeyEvent)
{
{
POWER_CTRL_KL15
=
1
;
POWER_CTRL_KL15
=
1
;
}
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
...
@@ -166,7 +165,6 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
...
@@ -166,7 +165,6 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
{
{
}
}
}
}
void
Key_Operation_SW8
(
Key_Event_en_t
enKeyEvent
)
void
Key_Operation_SW8
(
Key_Event_en_t
enKeyEvent
)
{
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
...
@@ -215,6 +213,7 @@ void Key_Operation_SW9(Key_Event_en_t enKeyEvent)
...
@@ -215,6 +213,7 @@ void Key_Operation_SW9(Key_Event_en_t enKeyEvent)
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
{
{
...
@@ -378,6 +377,9 @@ Key_Real_Status_en_t Key_Real_sw10(void)
...
@@ -378,6 +377,9 @@ Key_Real_Status_en_t Key_Real_sw10(void)
return
enKeyRealStatus
;
return
enKeyRealStatus
;
}
}
void
User_CheckMode_Service
(
uint8_t
CbkCycle
)
void
User_CheckMode_Service
(
uint8_t
CbkCycle
)
{
{
if
(
Check_Control_Mode
==
1
)
if
(
Check_Control_Mode
==
1
)
...
@@ -416,6 +418,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
...
@@ -416,6 +418,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led
=
0
;
Left_Led
=
0
;
Right_Led
=
0
;
Right_Led
=
0
;
Headlights_Led
=
0
;
Headlights_Led
=
0
;
NFC_C_card
=
0
;
break
;
break
;
case
1
:
case
1
:
...
@@ -435,6 +438,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
...
@@ -435,6 +438,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led
=
1
;
Left_Led
=
1
;
Right_Led
=
1
;
Right_Led
=
1
;
Headlights_Led
=
0
;
Headlights_Led
=
0
;
NFC_C_card
=
1
;
break
;
break
;
case
2
:
case
2
:
Vspeed
=
19
;
Vspeed
=
19
;
...
@@ -453,6 +457,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
...
@@ -453,6 +457,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led
=
0
;
Left_Led
=
0
;
Right_Led
=
0
;
Right_Led
=
0
;
Headlights_Led
=
1
;
Headlights_Led
=
1
;
NFC_C_card
=
2
;
break
;
break
;
case
3
:
case
3
:
Vspeed
=
29
;
Vspeed
=
29
;
...
@@ -471,6 +476,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
...
@@ -471,6 +476,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led
=
0
;
Left_Led
=
0
;
Right_Led
=
0
;
Right_Led
=
0
;
Headlights_Led
=
0
;
Headlights_Led
=
0
;
NFC_C_card
=
0
;
break
;
break
;
case
4
:
case
4
:
Vspeed
=
38
;
Vspeed
=
38
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment