Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SMILE FEE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Armin Luntzer
SMILE FEE
Commits
bbeb6144
Commit
bbeb6144
authored
4 years ago
by
Armin Luntzer
Browse files
Options
Downloads
Patches
Plain Diff
if available, extract data crc from packet
parent
a307da06
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
FEE/rmap.c
+5
-0
5 additions, 0 deletions
FEE/rmap.c
FEE/rmap.h
+2
-0
2 additions, 0 deletions
FEE/rmap.h
with
7 additions
and
0 deletions
FEE/rmap.c
+
5
−
0
View file @
bbeb6144
...
...
@@ -560,6 +560,8 @@ struct rmap_pkt *rmap_pkt_from_buffer(uint8_t *buf)
(
uint32_t
)
buf
[
RMAP_DATALEN_BYTE2
+
n
];
}
pkt
->
hdr_crc
=
buf
[
RMAP_HEADER_CRC
];
if
(
pkt
->
data_len
)
{
pkt
->
data
=
(
uint8_t
*
)
malloc
(
pkt
->
data_len
);
if
(
!
pkt
->
data
)
...
...
@@ -567,6 +569,9 @@ struct rmap_pkt *rmap_pkt_from_buffer(uint8_t *buf)
for
(
i
=
0
;
i
<
pkt
->
data_len
;
i
++
)
pkt
->
data
[
i
]
=
buf
[
RMAP_DATA_START
+
n
+
i
];
/* final byte is data crc */
pkt
->
data_crc
=
buf
[
RMAP_DATA_START
+
n
+
i
];
}
...
...
This diff is collapsed.
Click to expand it.
FEE/rmap.h
+
2
−
0
View file @
bbeb6144
...
...
@@ -183,6 +183,8 @@ struct rmap_pkt {
uint32_t
addr
;
/* (first) data address */
uint8_t
*
data
;
uint32_t
data_len
;
/* lenght of data in bytes */
uint8_t
hdr_crc
;
uint8_t
data_crc
;
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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