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
868026ab
Commit
868026ab
authored
Jul 25, 2025
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:修改解锁函数
parent
296942f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
RSCAN.c
YueJin_test_bench/source/Driver/CAN/RSCAN.c
+10
-10
No files found.
YueJin_test_bench/source/Driver/CAN/RSCAN.c
View file @
868026ab
...
...
@@ -950,10 +950,10 @@ void RSCAN0_CH4_Receive(CAN_Frame_st_t *pstCANFrame)
{
memcpy
(
seednum
,
&
u8get786msg
[
3
],
4
);
key_value
=
CalculateKey
(
seednum
);
seedresult
[
0
]
=
(
uint8_t
)
(
key_value
>>
24
)
;
seedresult
[
1
]
=
(
uint8_t
)(
key_value
>>
16
);
seedresult
[
2
]
=
(
uint8_t
)(
key_value
>>
8
);
seedresult
[
3
]
=
(
uint8_t
)
key_value
;
seedresult
[
0
]
=
(
uint8_t
)
key_value
;
seedresult
[
1
]
=
(
uint8_t
)(
key_value
>>
8
);
seedresult
[
2
]
=
(
uint8_t
)(
key_value
>>
16
);
seedresult
[
3
]
=
(
uint8_t
)
(
key_value
>>
24
);
UIDGetstep
=
1
;
}
}
...
...
@@ -987,7 +987,7 @@ void RSCAN0_CH4_Receive(CAN_Frame_st_t *pstCANFrame)
uint32_t
CalculateKey
(
uint8_t
seed
[])
{
uint32_t
key_value
=
0U
;
//
uint32_t key_value = 0U;
uint32_t
u32seedP
=
0U
;
uint32_t
ConstVaule
=
0x3BE7FAD5u
;
uint32_t
key
=
0U
;
...
...
@@ -1002,12 +1002,12 @@ uint32_t CalculateKey(uint8_t seed[])
key
^=
ConstVaule
;
key
=
(
key
<<
12
)
|
(
key
>>
15
);
key_value
=
((
uint32_t
)
key
<<
24U
);
key_value
=
key_value
|
((
uint32_t
)
key
<<
16U
);
key_value
=
key_value
|
((
uint32_t
)
key
<<
8U
);
key_value
=
key_value
|
(
uint32_t
)
key
;
//
key_value = ((uint32_t)key << 24U);
//
key_value = key_value | ((uint32_t)key << 16U);
//
key_value = key_value | ((uint32_t)key << 8U);
//
key_value = key_value | (uint32_t)key;
return
(
key
_value
);
return
(
key
);
}
void
RSCAN0_CH5_Receive
(
CAN_Frame_st_t
*
pstCANFrame
)
...
...
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