Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Encrypted CAN
daredevil-small
Commits
c9289b1b
Commit
c9289b1b
authored
6 years ago
by
Tmplt
Browse files
Options
Download
Patches
Plain Diff
refactor(csec): take ownership of FTFC and CSE_PRAM
This simplifies usage with RTFM.
parent
f6ac7154
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/csec.rs
+6
-6
src/csec.rs
with
6 additions
and
6 deletions
+6
-6
src/csec.rs
+
6
−
6
View file @
c9289b1b
...
...
@@ -208,9 +208,9 @@ fn u8_be_array_from_u32(x: u32) -> [u8; 4] {
]
}
pub
struct
CSEc
<
'a
>
{
ftfc
:
&
'a
s32k144
::
FTFC
,
cse_pram
:
&
'a
s32k144
::
CSE_PRAM
,
pub
struct
CSEc
{
ftfc
:
s32k144
::
FTFC
,
cse_pram
:
s32k144
::
CSE_PRAM
,
}
const
PAGE_1_OFFSET
:
usize
=
16
;
...
...
@@ -225,10 +225,10 @@ const UPPER_HALF_SHIFT: u32 = 0x10;
const
BYTES_TO_PAGES_SHIFT
:
u32
=
4
;
const
MAX_PAGES
:
usize
=
7
;
impl
<
'a
>
CSEc
<
'a
>
{
impl
CSEc
{
pub
fn
init
(
ftfc
:
&
'a
s32k144
::
FTFC
,
cse_pram
:
&
'a
s32k144
::
CSE_PRAM
,
ftfc
:
s32k144
::
FTFC
,
cse_pram
:
s32k144
::
CSE_PRAM
,
)
->
Self
{
CSEc
{
ftfc
:
ftfc
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets