Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PLATO RDCU
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
PLATO RDCU
Commits
6b4ed5da
Commit
6b4ed5da
authored
5 years ago
by
Armin Luntzer
Browse files
Options
Downloads
Patches
Plain Diff
rdcu_package(): do not add a data crc byte at the end of the packet for
read commands
parent
cd569cf2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/rdcu_rmap.c
+23
-2
23 additions, 2 deletions
lib/rdcu_rmap.c
with
23 additions
and
2 deletions
lib/rdcu_rmap.c
+
23
−
2
View file @
6b4ed5da
...
...
@@ -524,6 +524,9 @@ int rdcu_package(uint8_t *blob,
const
uint8_t
*
data
,
int
data_size
)
{
int
n
;
int
has_data_crc
=
0
;
struct
rmap_instruction
*
ri
;
if
(
!
cmd_size
)
{
...
...
@@ -533,7 +536,24 @@ int rdcu_package(uint8_t *blob,
/* allocate space for header, header crc, data, data crc */
n
=
cmd_size
+
2
;
n
=
cmd_size
+
1
;
ri
=
(
struct
rmap_instruction
*
)
&
cmd
[
non_crc_bytes
+
RMAP_INSTRUCTION
];
/* see if the type of command needs a data crc field at the end */
switch
(
ri
->
cmd
)
{
case
RMAP_READ_MODIFY_WRITE_ADDR_INC
:
case
RMAP_WRITE_ADDR_SINGLE
:
case
RMAP_WRITE_ADDR_INC
:
case
RMAP_WRITE_ADDR_SINGLE_VERIFY
:
case
RMAP_WRITE_ADDR_INC_VERIFY
:
has_data_crc
=
1
;
n
+=
1
;
break
;
default:
break
;
}
if
(
data
)
n
+=
data_size
;
...
...
@@ -552,7 +572,8 @@ int rdcu_package(uint8_t *blob,
blob
[
cmd_size
+
1
+
data_size
]
=
rmap_crc8
(
data
,
data_size
);
}
else
{
/* if no data is present, data crc is 0x0 */
blob
[
cmd_size
+
1
]
=
0x0
;
if
(
has_data_crc
)
blob
[
cmd_size
+
1
]
=
0x0
;
}
...
...
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