Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wr2rf-vme
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
wr2rf-vme
Commits
a46bb911
Commit
a46bb911
authored
Jun 15, 2023
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wr2rf.c: write only once for ext-ref
parent
7c825b7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
wr2rf.c
software/libwr2rf/wr2rf.c
+14
-12
No files found.
software/libwr2rf/wr2rf.c
View file @
a46bb911
...
...
@@ -1927,18 +1927,20 @@ ext_ref (struct libwr2rf_dev *dev, int argc, char **argv)
v
=
libwr2rf_read16
(
dev
,
addr
);
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
if
(
strcmp
(
argv
[
i
],
"10m_in"
)
==
0
)
v
=
v
&
~
WR2RF_INIT_REGS_PIN_CTRL_EXT_10M_DIR
;
else
if
(
strcmp
(
argv
[
i
],
"10m_out"
)
==
0
)
v
=
v
|
WR2RF_INIT_REGS_PIN_CTRL_EXT_10M_DIR
;
else
if
(
strcmp
(
argv
[
i
],
"pps_in"
)
==
0
)
v
=
v
&
~
WR2RF_INIT_REGS_PIN_CTRL_EXT_PPS_DIR
;
else
if
(
strcmp
(
argv
[
i
],
"pps_out"
)
==
0
)
v
=
v
|
WR2RF_INIT_REGS_PIN_CTRL_EXT_PPS_DIR
;
else
{
printf
(
"usage: ext-ref {10m_in|10m_out|pps_in|pps_out}
\n
"
);
return
;
if
(
argc
!=
1
)
{
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
if
(
strcmp
(
argv
[
i
],
"10m_in"
)
==
0
)
v
&=
~
WR2RF_INIT_REGS_PIN_CTRL_EXT_10M_DIR
;
else
if
(
strcmp
(
argv
[
i
],
"10m_out"
)
==
0
)
v
|=
WR2RF_INIT_REGS_PIN_CTRL_EXT_10M_DIR
;
else
if
(
strcmp
(
argv
[
i
],
"pps_in"
)
==
0
)
v
&=
~
WR2RF_INIT_REGS_PIN_CTRL_EXT_PPS_DIR
;
else
if
(
strcmp
(
argv
[
i
],
"pps_out"
)
==
0
)
v
|=
WR2RF_INIT_REGS_PIN_CTRL_EXT_PPS_DIR
;
else
{
printf
(
"usage: ext-ref {10m_in|10m_out|pps_in|pps_out}
\n
"
);
return
;
}
}
libwr2rf_write16
(
dev
,
addr
,
v
);
}
...
...
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