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
b7969cf3
Commit
b7969cf3
authored
Jun 05, 2025
by
huangguoqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:诊断获取软件版本号
parent
dcd21f87
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
34 deletions
+52
-34
RTE_CAN.c
YueJin_test_bench/source/Appliciation/RTE_CAN.c
+9
-1
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+24
-14
UDS_ISO14229_Server.c
YueJin_test_bench/source/Appliciation/UDS_ISO14229_Server.c
+19
-19
No files found.
YueJin_test_bench/source/Appliciation/RTE_CAN.c
View file @
b7969cf3
...
...
@@ -156,13 +156,21 @@ void Can_Abort_All(void)
}
/*****Lower*******/
/**
* @brief 从CAN通道读取消息
*
* 该函数用于从指定的CAN通道读取消息,并根据消息ID进行相应的处理。
*
* @param m_id 消息ID
* @param m_dlc 数据长度码(DLC)
* @param m_Msg 消息数据数组
*/
void
Can_Read_Msg
(
uint32_t
m_id
,
uint8_t
m_dlc
,
uint8_t
m_Msg
[])
{
Co_Can_Buff_Set
(
&
CAN_CH4_CanMsgOp
,
Co_Can_ConvertSubID_CAN_CH4
(
m_id
),
m_dlc
,
m_Msg
);
//UDS_ReceivedMsg(m_id, m_dlc);
if
(
(
m_id
==
DIAG_ID_Rx_FUN
)
||
(
m_id
==
DIAG_ID_Rx_PHY
)
)
{
DoCAN_L_Data_Indication
(
m_id
,
m_dlc
,
m_Msg
);
}
}
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
b7969cf3
...
...
@@ -65,6 +65,8 @@ void Sys_Run_Mode_2ms_Tasks_Group(void)
{
RTE_ADC_Services
(
);
Get_static_Current
();
COM_RX_Process
(
);
COM_TX_Process
();
}
/*==============================================================================
...
...
@@ -72,8 +74,7 @@ void Sys_Run_Mode_2ms_Tasks_Group(void)
------------------------------------------------------------------------------*/
void
Sys_Run_Mode_5ms_Tasks_Group
(
void
)
{
COM_RX_Process
(
);
COM_TX_Process
();
}
/*==============================================================================
...
...
@@ -128,32 +129,41 @@ uint8_t *pcan_data = &can_flag;
uint8_t
test
[
10
]
=
{
0x56
,
0x0B
,
0x0C
,
0x0D
,
0x1
,
0x2
,
0x3
,
0x4
,
0x05
,
0xFF
};
void
Sys_Run_Mode_100ms_Tasks_Group
(
void
)
{
Display_PageNum
();
User_CheckMode_Service
(
100u
);
//TFT_LCD_Draw_Bmp(3, 40, ( uint8_t * )gImage_Dsy_words_1X6_Y16);
POWER_CTRL_KL30
=
1
;
POWER_CTRL_KL30_B
=
1
;
testtime
++
;
//POWER_CTRL_KL15 = 1;
// testtime++;
// if((testtime > 0)&&(testtime < 20))
// if((testtime > 50)&&(testtime < 70))
// {
// can_flag=1;
// }
// else if((testtime > 80)&&(testtime < 100))
// {
// Left_Led = 1;
// Right_Led = 1;
// Headlights_Led = 1;
// can_flag=2;
// }
// else
// else
if((testtime > 120)&&(testtime < 140))
// {
// Left_Led = 0;
// Right_Led = 0;
// Headlights_Led = 0;
// can_flag=3;
// }
// else if((testtime > 160)&&(testtime < 180))
// {
// can_flag=4;
// }
// if(testtime >
4
0)
// if(testtime >
20
0)
// {
// testtime = 0;
// }
// General_Number_Disp(test, 100 , 100 );
}
/*=================================================================*/
...
...
YueJin_test_bench/source/Appliciation/UDS_ISO14229_Server.c
View file @
b7969cf3
...
...
@@ -19,7 +19,7 @@ extern uint8_t CAN_Current_state;
******************************************************************************/
/******************************************************************************
锟斤拷锟斤拷锟斤拷锟斤拷UDS_Server_Application_Service
�� �ܣ�UDS������Ӧ�ò���Ʒ���
锟斤拷 锟杰o拷UDS锟斤拷锟斤拷锟斤拷应锟矫诧拷锟斤拷品锟斤拷锟
?
锟斤拷 锟斤拷锟斤拷锟斤拷
锟斤拷锟斤拷值锟斤拷锟斤拷
*******************************************************************************
...
...
@@ -31,7 +31,7 @@ void UDS_Server_Application_Service(void)
}
/******************************************************************************
�Ự���²�ӿڼ���ʱ����ʵ��
锟结话锟斤拷锟铰诧拷涌诩锟斤拷锟绞憋拷锟斤拷锟绞碉拷锟
?
******************************************************************************/
/******************************************************************************
...
...
@@ -39,8 +39,8 @@ void UDS_Server_Application_Service(void)
锟斤拷 锟杰o拷锟矫凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
This service is used to request the transfer of data. If necessary, the
network layer segments the data.
�� ����N_TAtype ��Ŀ���ַ����,����������ʹ�� DIAG_ID_Tx
MessageData �������������
锟斤拷 锟斤拷锟斤拷N_TAtype 锟斤拷目锟斤拷锟街凤拷锟斤拷锟
?
,锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷使锟斤拷 DIAG_ID_Tx
MessageData 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟
?
Length 锟斤拷锟斤拷锟捷筹拷锟斤拷
锟斤拷锟斤拷值锟斤拷锟斤拷
******************************************************************************/
...
...
@@ -53,13 +53,13 @@ void UDS_N_USData_Request(uint32_t N_TAtype, uint8_t *MessageData, uint16_t Leng
/******************************************************************************
锟斤拷锟斤拷锟斤拷锟斤拷UDS_N_USData_Confirm
�� �ܣ��÷�����������㷢��,����ȷ
��ǰ
һ��ʹ��N_USData.request������
N_TAtype��ַ���͵������Ƿ������
锟斤拷 锟杰o拷锟矫凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷惴
?拷锟?
,锟斤拷锟斤拷确锟斤拷前一锟斤拷使锟斤拷N_USData.request锟斤拷锟斤拷锟斤拷
N_TAtype锟斤拷址锟斤拷锟酵碉拷锟斤拷锟斤拷锟角凤拷锟斤拷锟斤拷锟
?
The N_USData.confirm service is issued by the network layer. The service
primitive confirms the completion of an N_USData.request service
identified by the address information in N_TAtype.
�� ����N_TAtype ��N_USData.confirm��������ķ��͵�ַ
N_Result ��N_USData.request����Ĵ���״̬
锟斤拷 锟斤拷锟斤拷N_TAtype 锟斤拷N_USData.confirm锟斤拷锟斤拷锟斤拷锟斤拷姆锟斤拷偷锟街
?
N_Result 锟斤拷N_USData.request锟斤拷锟斤拷拇锟斤拷锟阶刺
?
锟斤拷锟斤拷值锟斤拷锟斤拷
******************************************************************************/
extern
void
UDS_N_USData_Confirm
(
uint32_t
N_TAtype
,
N_ResultEnum
N_Result
)
...
...
@@ -78,7 +78,7 @@ extern void UDS_N_USData_Confirm(uint32_t N_TAtype, N_ResultEnum N_Result)
/******************************************************************************
锟斤拷锟斤拷锟斤拷锟斤拷UDS_N_USData_FF_Indication
�� �ܣ��÷�����������㷢��,�����
��ϲ�ָʾ��ַΪN_TAtype��һ���֡���ݵ���֡
锟斤拷 锟杰o拷锟矫凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷惴
?拷锟?,锟斤拷锟斤拷锟斤拷锟较诧拷指示锟斤拷址为N_TAtype锟斤拷一锟斤拷锟街★拷锟斤拷莸锟斤拷锟街?
锟侥碉拷锟斤拷
The N_USData_FF.indication service is issued by the network layer. The
service primitive indicates to the adjacent upper layer the arrival of
...
...
@@ -96,7 +96,7 @@ extern void UDS_N_USData_FF_Indication(uint32_t N_TAtype, uint16_t Length)
/******************************************************************************
锟斤拷锟斤拷锟斤拷锟斤拷UDS_N_USData_Indication
�� �ܣ��÷�����������㷢��,�����
��ϲ
�ָ����N_TAtype��ַ�������ij���ΪLength
锟斤拷 锟杰o拷锟矫凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷惴
?拷锟?
,锟斤拷锟斤拷锟斤拷锟较诧拷指锟斤拷锟斤拷N_TAtype锟斤拷址锟斤拷锟斤拷锟斤拷锟侥筹拷锟斤拷为Length
锟斤拷MessageData锟斤拷锟捷的达拷锟酵斤拷锟絅_Result,锟斤拷同时锟斤拷锟斤拷锟斤拷一锟斤拷锟斤拷
The N_USData.indication service is issued by the network layer. The
service primitive indicates <N_Result> events and delivers
...
...
@@ -106,7 +106,7 @@ extern void UDS_N_USData_FF_Indication(uint32_t N_TAtype, uint16_t Length)
锟斤拷 锟斤拷锟斤拷N_TAtype 锟斤拷锟斤拷锟秸碉拷锟斤拷锟斤拷锟捷碉拷址锟斤拷息
MessageData 锟斤拷锟斤拷锟秸碉拷锟斤拷锟斤拷锟斤拷 (锟斤拷锟斤拷N_Result为N_OK时锟斤拷效)
Length 锟斤拷锟斤拷锟秸碉拷锟斤拷锟斤拷锟捷筹拷锟斤拷 (锟斤拷锟斤拷N_Result为N_OK时锟斤拷效)
N_Result �����ݵĽ��ս��
N_Result 锟斤拷锟斤拷锟捷的斤拷锟秸斤拷锟
?
锟斤拷锟斤拷值锟斤拷锟斤拷
******************************************************************************/
void
UDS_N_USData_Indication
(
uint32_t
N_TAtype
,
uint8_t
*
MessageData
,
uint16_t
Length
,
N_ResultEnum
N_Result
)
...
...
@@ -124,7 +124,7 @@ void UDS_N_USData_Indication(uint32_t N_TAtype, uint8_t *MessageData, uint16_t L
}
/******************************************************************************
�Ự���ϲ�ӿ�
锟结话锟斤拷锟较诧拷涌锟
?
******************************************************************************/
/******************************************************************************
...
...
@@ -133,7 +133,7 @@ void UDS_N_USData_Indication(uint32_t N_TAtype, uint8_t *MessageData, uint16_t L
The service primitive requests transmission of S_Data with S_Length
number of bytes from the sender to the receiver peer entities
identified by the address information in S_TAtype.
�� ����S_TAtype ���������ݵ�Ŀ���ַ
锟斤拷 锟斤拷锟斤拷S_TAtype 锟斤拷锟斤拷锟斤拷锟斤拷锟捷碉拷目锟斤拷锟街
?
S_Data 锟斤拷锟斤拷锟酵碉拷锟斤拷锟斤拷
S_Length 锟斤拷锟斤拷锟捷的筹拷锟斤拷
锟斤拷锟斤拷值锟斤拷锟斤拷
...
...
@@ -146,12 +146,12 @@ void UDS_S_Data_Request(uint32_t S_TAtype, uint8_t *S_Data, uint16_t S_Length)
/******************************************************************************
锟斤拷锟斤拷锟斤拷锟斤拷UDS_S_Data_Request
锟斤拷 锟杰o拷锟矫凤拷锟斤拷锟缴会话锟姐发锟斤拷,锟斤拷锟斤拷指锟斤拷锟斤拷S_TAtype为目锟斤拷锟街凤拷锟絊_Data.request锟斤拷锟斤拷锟斤拷锟斤拷
�Ƿ����
锟角凤拷锟斤拷锟
?
The S_Data.confirm service is issued by the session layer. The service
primitive confirms the completion of an S_Data.request service
identified by the address information in S_TAtype.
�� ����S_TAtype ���������ݵ�Ŀ���ַ
S_Result �����ݵķ��ͽ��
锟斤拷 锟斤拷锟斤拷S_TAtype 锟斤拷锟斤拷锟斤拷锟斤拷锟捷碉拷目锟斤拷锟街
?
S_Result 锟斤拷锟斤拷锟捷的凤拷锟酵斤拷锟
?
锟斤拷锟斤拷值锟斤拷锟斤拷
******************************************************************************/
void
UDS_S_Data_Confirm
(
uint32_t
S_TAtype
,
S_Result_Enum
S_Result
)
...
...
@@ -177,7 +177,7 @@ void UDS_S_Data_Confirm(uint32_t S_TAtype, S_Result_Enum S_Result)
锟斤拷 锟斤拷锟斤拷S_TAtype 锟斤拷锟斤拷锟秸碉拷锟斤拷锟斤拷锟捷碉拷址锟斤拷息
S_Data 锟斤拷锟斤拷锟秸碉拷锟斤拷锟斤拷锟斤拷 (锟斤拷锟斤拷S_Result为S_OK时锟斤拷效)
S_Length 锟斤拷锟斤拷锟秸碉拷锟斤拷锟斤拷锟捷筹拷锟斤拷 (锟斤拷锟斤拷S_Result为S_OK时锟斤拷效)
S_Result �����ݵĽ��ս��
S_Result 锟斤拷锟斤拷锟捷的斤拷锟秸斤拷锟
?
锟斤拷锟斤拷值锟斤拷锟斤拷
******************************************************************************/
void
UDS_S_Data_Indication
(
uint32_t
S_TAtype
,
uint8_t
S_Data
[],
uint16_t
S_Length
,
S_Result_Enum
S_Result
)
...
...
@@ -269,11 +269,11 @@ void UDS_Process_Service_Request(void)
/******************************************************************************
锟斤拷锟斤拷锟斤拷锟斤拷UDS_Service_Response
�� �ܣ��ú������ݷ�������������Ӧ�ķ������ݴ��ݸ��ͻ���,ͨ���ڸ�������ķ���
锟斤拷 锟杰o拷锟矫猴拷锟斤拷锟斤拷锟捷凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷应锟侥凤拷锟斤拷锟斤拷锟捷达拷锟捷革拷锟酵伙拷锟斤拷,通锟斤拷锟节革拷锟斤拷锟斤拷锟斤拷姆锟斤拷锟
?
锟斤拷 锟斤拷锟斤拷si 锟斤拷锟斤拷锟斤拷ID
RspType 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 POSITIVE_RSP 锟斤拷锟斤拷锟斤拷
NEGATIVE_RSP 锟斤拷锟斤拷锟斤拷
A_TA_type ��Ŀ���ַ����
A_TA_type 锟斤拷目锟斤拷锟街凤拷锟斤拷锟
?
A_Length 锟斤拷锟芥反锟斤拷携锟斤拷锟斤拷锟斤拷锟捷的筹拷锟斤拷(锟斤拷锟斤拷锟斤拷锟斤拷A_Data锟侥筹拷锟斤拷)
A_Data 锟斤拷锟芥反锟斤拷携锟斤拷锟斤拷锟斤拷锟斤拷
锟斤拷锟斤拷值锟斤拷锟斤拷
...
...
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