Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
DIOT Igloo2-based radiation-tolerant System Board
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
DIOT Igloo2-based radiation-tolerant System Board
Commits
eeb980c7
Commit
eeb980c7
authored
Sep 18, 2023
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fip_urv.c: always increment cmd offset
parent
ee2db136
Pipeline
#4872
failed
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
fip_urv.c
sw/fip_urv/fip_urv.c
+4
-5
No files found.
sw/fip_urv/fip_urv.c
View file @
eeb980c7
...
...
@@ -419,11 +419,13 @@ static void do_i2c_run (struct i2c_cmd *i2c)
/* Read the command to be executed */
unsigned
char
cmd_i2c
=
i2c
->
cmds
[
i2c
->
coff
];
/* And skip it */
i2c
->
coff
++
;
if
((
cmd_i2c
&
0x0f
)
==
I2C_CMD_SET_TARG
)
{
/* Set target */
i2c
->
bus
=
cmd_i2c
>>
4
;
REGS
->
i2c
[
OC_I2C_CFG
]
=
i2c
->
bus
;
i2c
->
coff
++
;
/* This is a prefix command. The next byte contains the address */
cmd_i2c
=
I2C_CMD_SET_ADDR
;
...
...
@@ -500,12 +502,10 @@ static void do_i2c_run (struct i2c_cmd *i2c)
/* Set bit0 if the command is a read. */
REGS
->
i2c
[
OC_I2C_RXTX
]
=
i2c
->
addr
|
(
cmd_i2c
==
I2C_CMD_START_R
);
REGS
->
i2c
[
OC_I2C_CR
]
=
0x90
;
/* START + WRITE */
i2c
->
coff
++
;
}
else
if
(
cmd_i2c
==
I2C_CMD_WRITE
||
cmd_i2c
==
I2C_CMD_WRITE_STOP
)
{
/* Write Operation */
i2c
->
coff
++
;
i2c
->
len
=
i2c
->
cmds
[
i2c
->
coff
];
i2c
->
coff
++
;
do_i2c_write
(
i2c
);
...
...
@@ -516,10 +516,9 @@ static void do_i2c_run (struct i2c_cmd *i2c)
/* Read Operation */
if
(
cmd_i2c
!=
I2C_CMD_READLEN_STOP
)
{
i2c
->
coff
++
;
i2c
->
len
=
i2c
->
cmds
[
i2c
->
coff
];
i2c
->
coff
++
;
}
i2c
->
coff
++
;
do_i2c_read
(
i2c
);
}
else
{
...
...
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