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
3b8cfa20
Commit
3b8cfa20
authored
Jun 05, 2025
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:初步完成读写UID检测台
parent
3e3e9aad
Changes
13
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
2004 additions
and
1320 deletions
+2004
-1320
settings.json
.vscode/settings.json
+5
-1
CAN_APP.c
YueJin_test_bench/source/Appliciation/CAN_APP.c
+1219
-736
CAN_APP.h
YueJin_test_bench/source/Appliciation/CAN_APP.h
+16
-0
CAN_Communication_Matrix.c
...test_bench/source/Appliciation/CAN_Communication_Matrix.c
+19
-16
CAN_Communication_Matrix.h
...test_bench/source/Appliciation/CAN_Communication_Matrix.h
+11
-9
Check_Ctrl.c
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
+202
-314
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+451
-180
Display_Info.h
YueJin_test_bench/source/Appliciation/Display_Info.h
+5
-3
Key.c
YueJin_test_bench/source/Appliciation/Key.c
+1
-1
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+48
-42
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+18
-16
RSCAN.c
YueJin_test_bench/source/Driver/CAN/RSCAN.c
+2
-1
init.c
YueJin_test_bench/source/System/init.c
+7
-1
No files found.
.vscode/settings.json
View file @
3b8cfa20
...
...
@@ -58,6 +58,10 @@
"C_Cpp_Runner.msvcSecureNoWarnings"
:
false
,
"files.associations"
:
{
"api_rs485.h"
:
"c"
,
"tyw_stdint.h"
:
"c"
"tyw_stdint.h"
:
"c"
,
"display_info.h"
:
"c"
,
"can_communication_matrix.h"
:
"c"
,
"analog_signals.h"
:
"c"
,
"key.h"
:
"c"
}
}
\ No newline at end of file
YueJin_test_bench/source/Appliciation/CAN_APP.c
View file @
3b8cfa20
This diff is collapsed.
Click to expand it.
YueJin_test_bench/source/Appliciation/CAN_APP.h
View file @
3b8cfa20
...
...
@@ -50,7 +50,23 @@ void Get_ID_0x794_Msg(void);
void
send_0x714_fuc
(
void
);
extern
uint8_t
ruanjianbanbenhao
[
8
];
void
Get_PN_msg
(
void
);
extern
void
Get_UID_msg
(
void
);
void
change_UDS_DID
(
void
);
void
resetchangeUDSfuc
(
void
);
void
resetpowerfuel
(
void
);
void
UIDWrite
(
void
);
extern
uint8_t
UIDcode1
[
33
];
extern
uint8_t
UIDcode2
[
33
];
extern
uint8_t
UIDNumber
[
19
];
extern
uint8_t
change
;
extern
uint8_t
localNum
;
extern
uint8_t
zhenduanstep
;
extern
uint8_t
UIDStep
;
extern
uint8_t
readstopflag
;
extern
uint8_t
UIDStep
;
extern
uint8_t
begin714
;
extern
uint8_t
UIDresult
;
extern
uint8_t
writebeing
;
extern
uint8_t
u8get714msg
[
8
];
extern
uint8_t
UIDdelay
;
#endif
YueJin_test_bench/source/Appliciation/CAN_Communication_Matrix.c
View file @
3b8cfa20
...
...
@@ -215,38 +215,38 @@ 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
));
}
uint8_t
Get_CAN_CH0_ID_7
94
_byte0_Sig
(
void
)
uint8_t
Get_CAN_CH0_ID_7
A9
_byte0_Sig
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0_ID_0x7
94
_Msg_Count
,
0u
)
>>
0u
)
&
0xFFu
));
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0_ID_0x7
A9
_Msg_Count
,
0u
)
>>
0u
)
&
0xFFu
));
}
uint8_t
Get_CAN_CH0_ID_7
94
_byte1_Sig
(
void
)
uint8_t
Get_CAN_CH0_ID_7
A9
_byte1_Sig
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0_ID_0x7
94
_Msg_Count
,
1u
)
>>
0u
)
&
0xFFu
));
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0_ID_0x7
A9
_Msg_Count
,
1u
)
>>
0u
)
&
0xFFu
));
}
uint8_t
Get_CAN_CH0_ID_7
94
_byte2_Sig
(
void
)
uint8_t
Get_CAN_CH0_ID_7
A9
_byte2_Sig
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0_ID_0x7
94
_Msg_Count
,
2u
)
>>
0u
)
&
0xFFu
));
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0_ID_0x7
A9
_Msg_Count
,
2u
)
>>
0u
)
&
0xFFu
));
}
uint8_t
Get_CAN_CH0_ID_7
94
_byte3_Sig
(
void
)
uint8_t
Get_CAN_CH0_ID_7
A9
_byte3_Sig
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0_ID_0x7
94
_Msg_Count
,
3u
)
>>
0u
)
&
0xFFu
));
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0_ID_0x7
A9
_Msg_Count
,
3u
)
>>
0u
)
&
0xFFu
));
}
uint8_t
Get_CAN_CH0_ID_7
94
_byte4_Sig
(
void
)
uint8_t
Get_CAN_CH0_ID_7
A9
_byte4_Sig
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0_ID_0x7
94
_Msg_Count
,
4u
)
>>
0u
)
&
0xFFu
));
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0_ID_0x7
A9
_Msg_Count
,
4u
)
>>
0u
)
&
0xFFu
));
}
uint8_t
Get_CAN_CH0_ID_7
94
_byte5_Sig
(
void
)
uint8_t
Get_CAN_CH0_ID_7
A9
_byte5_Sig
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0_ID_0x7
94
_Msg_Count
,
5u
)
>>
0u
)
&
0xFFu
));
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0_ID_0x7
A9
_Msg_Count
,
5u
)
>>
0u
)
&
0xFFu
));
}
uint8_t
Get_CAN_CH0_ID_7
94
_byte6_Sig
(
void
)
uint8_t
Get_CAN_CH0_ID_7
A9
_byte6_Sig
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0_ID_0x7
94
_Msg_Count
,
6u
)
>>
0u
)
&
0xFFu
));
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0_ID_0x7
A9
_Msg_Count
,
6u
)
>>
0u
)
&
0xFFu
));
}
uint8_t
Get_CAN_CH0_ID_7
94
_byte7_Sig
(
void
)
uint8_t
Get_CAN_CH0_ID_7
A9
_byte7_Sig
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0_ID_0x7
94
_Msg_Count
,
7u
)
>>
0u
)
&
0xFFu
));
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0_ID_0x7
A9
_Msg_Count
,
7u
)
>>
0u
)
&
0xFFu
));
}
...
...
@@ -285,6 +285,9 @@ uint8_t Co_Can_ConvertSubID(uint32_t MsgID)
case
CAN_CH0_ID_Send0x794_Msg
:
u8Result
=
CAN_CH0_ID_0x794_Msg_Count
;
break
;
case
CAN_CH0_ID_Send0x7A9_Msg
:
u8Result
=
CAN_CH0_ID_0x7A9_Msg_Count
;
break
;
default
:
u8Result
=
CAN_CH0_ID_TOTAL_MAX
;
break
;
...
...
YueJin_test_bench/source/Appliciation/CAN_Communication_Matrix.h
View file @
3b8cfa20
...
...
@@ -13,6 +13,7 @@ typedef enum
CAN_CH0_ID_Send0CFE6CEE_Msg_Count
,
CAN_CH0_ID_Send18FEFC17_Msg_Count
,
CAN_CH0_ID_0x794_Msg_Count
,
CAN_CH0_ID_0x7A9_Msg_Count
,
CAN_CH0_ID_TOTAL_MAX
,
}
CAN_MSG_ID_t
;
...
...
@@ -34,6 +35,7 @@ extern const st_CAN_SendAttribute st_CANSendAttr[ID_SEND_TOTAL] ;
#define CAN_CH0_ID_Send0CFE6CEE_Msg 0x0CFE6CEEul
#define CAN_CH0_ID_Send18FEFC17_Msg 0x18FEFC17ul
#define CAN_CH0_ID_Send0x794_Msg 0x794ul
#define CAN_CH0_ID_Send0x7A9_Msg 0x7A9ul
extern
uint32_t
Get_ID_ODO
(
void
);
extern
uint32_t
Get_ID_FUEL
(
void
);
...
...
@@ -58,14 +60,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
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_7
94
_byte0_Sig
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_7
94
_byte1_Sig
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_7
94
_byte2_Sig
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_7
94
_byte3_Sig
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_7
94
_byte4_Sig
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_7
94
_byte5_Sig
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_7
94
_byte6_Sig
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_7
94
_byte7_Sig
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_7
A9
_byte0_Sig
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_7
A9
_byte1_Sig
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_7
A9
_byte2_Sig
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_7
A9
_byte3_Sig
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_7
A9
_byte4_Sig
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_7
A9
_byte5_Sig
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_7
A9
_byte6_Sig
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_7
A9
_byte7_Sig
(
void
);
...
...
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
View file @
3b8cfa20
This diff is collapsed.
Click to expand it.
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
3b8cfa20
This diff is collapsed.
Click to expand it.
YueJin_test_bench/source/Appliciation/Display_Info.h
View file @
3b8cfa20
...
...
@@ -55,6 +55,8 @@ void Display_Version_Info(uint32_t ON_OFF);
extern
void
HW_Static_Current_Check
(
uint32_t
cmd
);
void
HW_Voltage_Check
(
uint32_t
cmd
);
void
Display_TFT_Clear
(
void
);
void
Display_TFT_Clear_UID
(
void
);
void
Display_TFT_Clear_UID2
(
void
);
void
Display_Add
(
void
);
unsigned
int
Get_Display_Type
(
void
);
void
General_Number_Disp
(
unsigned
char
*
p
,
unsigned
short
x
,
unsigned
short
y
);
...
...
@@ -88,9 +90,9 @@ extern const uint8_t *Num_09[];
extern
const
uint8_t
*
Num_10_03
[];
extern
const
uint8_t
*
Num_13
[];
extern
const
uint8_t
*
Num_30
[];
extern
uint8_t
UIDNumber2
[
15
];
extern
const
uint8_t
*
Letter_Num_11
[];
extern
uint8_t
UUIDX
;
extern
uint8_t
writeflag
;
#define PCodeText_Space_size 2//故障文字 英文空格的像素数
#endif
YueJin_test_bench/source/Appliciation/Key.c
View file @
3b8cfa20
...
...
@@ -176,7 +176,7 @@ void Key_Init(void)
}
stKeyParameter
.
u16KeyLoosenTime
=
0U
;
stKeyParameter
.
u16KeyShortPressTime
=
20U
;
stKeyParameter
.
u16KeyLongPressTime
=
3
000U
;
stKeyParameter
.
u16KeyLongPressTime
=
5
000U
;
stKeyParameter
.
u32KeySuperLongPressTime
=
90000U
;
}
/*����Ӳ�߰������ԣ��ж϶̰���ʱ�����*/
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
3b8cfa20
...
...
@@ -2,6 +2,7 @@
#include "Key.h"
#include "Display_Info.h"
#include "Check_Ctrl.h"
#include "CAN_APP.h"
extern
uint8_t
resetflag
;
void
Key_Operation_SW5
(
Key_Event_en_t
enKeyEvent
)
{
...
...
@@ -9,7 +10,18 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
{
// Display_Add( );
// Display_TFT_Clear( );
Display_TFT_Clear_UID
();
if
(
change
>
0
)
{
change
--
;
UUIDX
-=
10
;
}
else
{
change
=
13
;
UUIDX
=
197
;
}
// Display_TFT_Clear();
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
...
...
@@ -36,15 +48,24 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
if
(
(
LED_Waring
==
1
)
||
(
UDS_Warning_Voltage
==
1
))
if
(
UIDNumber2
[
change
]
<
9
)
{
;
UIDNumber2
[
change
]
++
;
}
else
{
// Display_Sub( );
// Display_TFT_Clear( );
}
UIDNumber2
[
change
]
=
0
;
}
// if ( (LED_Waring == 1) || (UDS_Warning_Voltage ==1))
// {
// ;
// }
// else
// {
// // Display_Sub( );
// // Display_TFT_Clear( );
// }
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
...
...
@@ -103,17 +124,10 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
}
void
Key_Operation_SW2
(
Key_Event_en_t
enKeyEvent
)
{
/*清零ODO*/
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
if
(
(
LED_Waring
==
1
)
||
(
UDS_Warning_Voltage
==
1
))
{
;
}
else
{
// MENU_CHECK_STEP_SUB( );
}
MENU_CHECK_STEP_ADD
(
);
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
...
...
@@ -126,7 +140,7 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
}
else
{
// MENU_CHECK_STEP_SUB
( );
MENU_CHECK_STEP_ADD
(
);
}
}
else
...
...
@@ -135,33 +149,25 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
}
void
Key_Operation_SW1
(
Key_Event_en_t
enKeyEvent
)
{
/*清零ODO*/
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
if
(
resetflag
==
0
)
{
MENU_CHECK_STEP_ADD
(
);
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
}
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
{
if
(
LED_Waring
==
1
||
(
UDS_Warning_Voltage
==
1
))
{
;
}
else
{
MENU_CHECK_STEP_ADD
(
);
}
}
else
{
writeflag
=
1
;
zhenduanstep
=
11
;
UIDStep
=
0
;
writebeing
=
1
;
// if(UIDNumber2[change] < 9)
// {
// UIDNumber2[change]++;
// }
// else
// {
// UIDNumber2[change] = 0;
// }
Display_TFT_Clear_UID2
();
}
else
if
((
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
&&
(
MENU_CHECK_STEP
==
10
))
{
LINE_OUT_NEG_02
=
1
;
}
}
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
3b8cfa20
...
...
@@ -32,6 +32,7 @@ void Sys_Run_Mode_Pseudo_Real_Time_Tasks(void)
// UDS_Server_Application_Service( );
TFT_LCD_Display_Update_Service
(
);
Get_PN_msg
();
// Get_UID_msg();
}
/*============================================================================*/
...
...
@@ -111,8 +112,6 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
// cycleflag = 1;
}
if
(
resetflag
==
0
)
{
if
(
cycleflag
==
1
)
{
if
(
MENU_CHECK_STEP
==
0
)
{
...
...
@@ -121,25 +120,27 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
send0x714time
++
;
}
else
{
if
(
begin714
==
0
)
{
send_0x714_fuc
();
send0x714time
=
0
;
}
}
}
else
{
send0x714time
=
0
;
}
}
if
(
MENU_CHECK_STEP
!=
0
)
{
can_submit
();
}
}
if
(
writeflag
==
1
)
{
UIDWrite
();
}
// if(getmsgfinish == 0)
// {
// if(cycleflag == 0)
...
...
@@ -200,6 +201,7 @@ void Sys_Run_Mode_50ms_Tasks_Group(void)
{
timer_100ms
=
0
;
}
// Get_UID_msg();
}
/*==============================================================================
...
...
YueJin_test_bench/source/Driver/CAN/RSCAN.c
View file @
3b8cfa20
...
...
@@ -7,7 +7,7 @@
#include "rh850_macros.h"
#include "RSCAN.h"
#include "RSCAN_Table.h"
#include "CAN_APP.h"
#define RSCAN_CKSCLK_IPERI2_CLKC 40000000UL
/*PPLLCLK2*/
#define RSCAN_CKSCLK_ICANOSC_CLK_XIN_CAN 8000000UL
/*MainOSC*/
#define RSCAN_F_CAN RSCAN_CKSCLK_IPERI2_CLKC
...
...
@@ -2057,6 +2057,7 @@ void RSCAN0_CH4_RX_ISR(void)
RSCAN0_CH4_Receive
(
&
stCANFrameReceive
.
stReceiveContent
);
}
}
Get_UID_msg
();
}
void
RSCAN0_CH5_RX_ISR
(
void
)
...
...
YueJin_test_bench/source/System/init.c
View file @
3b8cfa20
...
...
@@ -37,6 +37,7 @@
#include "Check_Ctrl.h"
#include "Key.h"
#include "Display_Info.h"
#include "CAN_APP.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
...
...
@@ -81,10 +82,15 @@ void Sys_Startup_Init(void)
Display_Title_Info
(
);
Key_Init
(
);
Buzzer_Init
();
UIDdelay
=
0
;
POWER_CTRL_KL30
=
1u
;
//B+
POWER_CTRL_KL15
=
1u
;
//KL15
LINE_OUT_NEG_02
=
0
;
for
(
int
i
=
0
;
i
<
33
;
i
++
)
{
UIDcode1
[
i
]
=
0
;
}
}
/***********************************************************************
* \brief Initializations during work state switch to system sleep
* \attention
...
...
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