Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
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
TY
TianYing_ty100
Commits
005887e9
Commit
005887e9
authored
Aug 14, 2024
by
张明扬
🇨🇳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:项目需求:修改零件号长度
parent
dbc36701
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
UDS_ISO14229_Services.c
Firmware/Source/UDS/UDS_ISO14229_Services.c
+7
-5
UDS_ISO14229_Services.h
Firmware/Source/UDS/UDS_ISO14229_Services.h
+3
-2
No files found.
Firmware/Source/UDS/UDS_ISO14229_Services.c
View file @
005887e9
...
...
@@ -119,20 +119,21 @@ uint8_t MCU_HWversion[6] = {'H', 'V', (uint8_t)((HWV >> 8u) & 0x0Fu) + 0x30u, '.
uint8_t
MCU_FBLversion
[
6
]
=
{
'B'
,
'V'
,
(
uint8_t
)((
BTV
>>
8u
)
&
0x0Fu
)
+
0x30u
,
'.'
,
(
uint8_t
)((
BTV
>>
4u
)
&
0x0Fu
)
+
0x30u
,
(
uint8_t
)(
BTV
&
0x0Fu
)
+
0x30u
};
//零件号信息 F187
uint8_t
MCU_PartNumber
[
1
7
]
=
{
'T'
,
'Y'
,
'2'
,
'0'
,
'0'
,
'.'
,
'0'
,
'8
'
,
'0'
,
'0'
,
'0'
,
'0'
,
'b'
,
'('
,
't'
,
'y'
,
')'
};
uint8_t
MCU_PartNumber
[
1
8
]
=
{
'T'
,
'Y'
,
'2'
,
'0'
,
'0'
,
'.'
,
'0'
,
'8'
,
'0
'
,
'0'
,
'0'
,
'0'
,
'0'
,
'b'
,
'('
,
't'
,
'y'
,
')'
};
#endif
void
Data_Set_DiagPara
(
void
)
{
uint8_t
i
;
uint8_t
length
=
0
;
uint8_t
Filldata_length
=
0
;
//获取DID的值,等待写入DFlash
for
(
i
=
0
;
i
<
6
;
i
++
)
{
DiagDataForDFlash
.
DID_F180
[
i
]
=
MCU_FBLversion
[
i
];
}
length
=
(
IC_Current
==
TY200_080000b
)
?
13
:
1
7
;
length
=
(
IC_Current
==
TY200_080000b
)
?
13
:
1
8
;
for
(
i
=
0
;
i
<
length
;
i
++
)
{
DiagDataForDFlash
.
DID_F187
[
i
]
=
MCU_PartNumber
[
i
];
...
...
@@ -145,7 +146,8 @@ void Data_Set_DiagPara(void)
{
DiagDataForDFlash
.
DID_F195
[
i
]
=
MCU_SWversion
[
i
];
}
for
(
i
=
0
;
i
<
1
;
i
++
)
Filldata_length
=
(
IC_Current
==
TY200_080000b
)
?
1
:
4
;
for
(
i
=
0
;
i
<
Filldata_length
;
i
++
)
{
DiagDataForDFlash
.
Filldata
[
i
]
=
0u
;
}
...
...
@@ -809,7 +811,7 @@ void UDS_Service_22_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A
}
UDS_Service_Response
(
si
,
POSITIVE_RSP
,
DIAG_ID_Tx
,
2
+
6
,
UDS_ISO14229_Transfer
);
break
;
case
0xF180
:
//
读硬件版本号
case
0xF180
:
//
引导版本信息
for
(
i
=
0
;
i
<
6
;
i
++
)
{
UDS_ISO14229_Transfer
[
i
+
2
]
=
MCU_FBLversion
[
i
];
...
...
@@ -818,7 +820,7 @@ void UDS_Service_22_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A
break
;
case
0xF187
:
// 读零件号
length
=
(
IC_Current
==
TY200_080000b
)
?
13
:
1
7
;
length
=
(
IC_Current
==
TY200_080000b
)
?
13
:
1
8
;
for
(
uint8_t
i
=
0
;
i
<
length
;
i
++
)
{
UDS_ISO14229_Transfer
[
i
+
2
]
=
MCU_PartNumber
[
i
];
...
...
Firmware/Source/UDS/UDS_ISO14229_Services.h
View file @
005887e9
...
...
@@ -338,7 +338,8 @@ typedef struct
uint8_t
RequestSeedIICnt
;
}
Ser27_FlowCtrlCntUnion
;
#define DID_F187_SIZE ((IC_Current == TY200_080000b) ? 13 : 17)
#define DID_F187_SIZE ((IC_Current == TY200_080000b) ? 13 : 18)
#define Filldata_SIZE ((IC_Current == TY200_080000b) ? 1 : 4)
typedef
struct
{
uint32_t
Flag
;
...
...
@@ -346,7 +347,7 @@ typedef struct
uint8_t
DID_F187
[
DID_F187_SIZE
];
uint8_t
DID_F193
[
6
];
uint8_t
DID_F195
[
6
];
uint8_t
Filldata
[
1
];
uint8_t
Filldata
[
Filldata_SIZE
];
}
DiagDFlashData
;
extern
DiagDFlashData
DiagDataForDFlash
;
...
...
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