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
7c825b7c
Commit
7c825b7c
authored
Jun 15, 2023
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wr2rf.c: add a timeout option for wr-wait
parent
8b54cd82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
wr2rf.c
software/libwr2rf/wr2rf.c
+20
-2
No files found.
software/libwr2rf/wr2rf.c
View file @
7c825b7c
...
...
@@ -1132,12 +1132,30 @@ wrc_read_print_status (struct libwr2rf_dev *dev)
static
void
wrc_wait
(
struct
libwr2rf_dev
*
dev
,
int
argc
,
char
**
argv
)
{
while
(
1
)
{
unsigned
count
;
count
=
~
0
;
if
(
argc
>
1
)
{
if
(
strcmp
(
argv
[
1
],
"help"
)
==
0
)
{
printf
(
"usage: %s [timeout]
\n
"
,
argv
[
0
]);
return
;
}
else
if
(
isdigit
(
argv
[
1
][
0
]))
count
=
atoi
(
argv
[
1
]);
else
{
fprintf
(
stderr
,
"unknown option %s
\n
"
,
argv
[
1
]);
return
;
}
}
for
(;
count
;
count
--
)
{
wrc_read_print_status
(
dev
);
if
(
libwr2rf_wrc_time_valid
(
dev
)
==
0
)
break
;
return
;
sleep
(
1
);
}
printf
(
"wr-wait: timeout
\n
"
);
}
static
void
...
...
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