Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
FMC DEL 1ns 4cha - Software
Commits
12cfcd21
Commit
12cfcd21
authored
Mar 21, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: prepare reporting time in three modes (no change now)
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
703e1325
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
9 deletions
+15
-9
fmc-fdelay-pulse.c
tools/fmc-fdelay-pulse.c
+1
-1
fmc-fdelay-status.c
tools/fmc-fdelay-status.c
+2
-1
tools-common.h
tools/tools-common.h
+7
-2
tools-util.c
tools/tools-util.c
+5
-5
No files found.
tools/fmc-fdelay-pulse.c
View file @
12cfcd21
...
...
@@ -353,7 +353,7 @@ int main(int argc, char **argv)
/* Done. Report verbosely and activate the information we parsed */
channel
=
FDELAY_OUTPUT_USER_TO_HW
(
channel
);
if
(
verbose
)
tools_report_action
(
channel
,
&
p
);
tools_report_action
(
channel
,
&
p
,
TOOLS_UMODE_RAW
);
if
(
fdelay_config_pulse
(
b
,
channel
,
&
p
)
<
0
)
{
fprintf
(
stderr
,
"%s: fdelay_config_pulse(): %s
\n
"
,
argv
[
0
],
strerror
(
errno
));
...
...
tools/fmc-fdelay-status.c
View file @
12cfcd21
...
...
@@ -68,7 +68,8 @@ int main(int argc, char **argv)
argv
[
0
],
ch
,
strerror
(
errno
));
}
/* pass hw number again, as the function is low-level */
tools_report_action
(
FDELAY_OUTPUT_USER_TO_HW
(
ch
),
&
p
);
tools_report_action
(
FDELAY_OUTPUT_USER_TO_HW
(
ch
),
&
p
,
TOOLS_UMODE_RAW
);
}
fdelay_close
(
b
);
fdelay_exit
();
...
...
tools/tools-common.h
View file @
12cfcd21
...
...
@@ -5,7 +5,12 @@
extern
void
tools_getopt_d_i
(
int
argc
,
char
**
argv
,
int
*
dev
,
int
*
index
);
extern
int
tools_need_help
(
int
argc
,
char
**
argv
);
extern
void
report_time
(
char
*
name
,
struct
fdelay_time
*
t
);
extern
void
tools_report_action
(
int
channel
,
struct
fdelay_pulse
*
p
);
#define TOOLS_UMODE_USER 0
#define TOOLS_UMODE_RAW 1
#define TOOLS_UMODE_FLOAT 2
extern
void
tools_report_time
(
char
*
name
,
struct
fdelay_time
*
t
,
int
umode
);
extern
void
tools_report_action
(
int
channel
,
struct
fdelay_pulse
*
p
,
int
umode
);
extern
void
help
(
char
*
name
);
/* This is mandatory in all tools */
tools/tools-util.c
View file @
12cfcd21
...
...
@@ -48,13 +48,13 @@ int tools_need_help(int argc, char **argv)
return
0
;
}
void
report_time
(
char
*
name
,
struct
fdelay_time
*
t
)
void
tools_report_time
(
char
*
name
,
struct
fdelay_time
*
t
,
int
umode
)
{
printf
(
" %s utc %10lli, coarse %9li, frac %9li
\n
"
,
name
,
(
long
long
)
t
->
utc
,
(
long
)
t
->
coarse
,
(
long
)
t
->
frac
);
}
void
tools_report_action
(
int
channel
,
struct
fdelay_pulse
*
p
)
void
tools_report_action
(
int
channel
,
struct
fdelay_pulse
*
p
,
int
umode
)
{
char
*
mode
;
char
s
[
80
];
...
...
@@ -71,7 +71,7 @@ void tools_report_action(int channel, struct fdelay_pulse *p)
printf
(
"Channel %i, mode %s, repeat %i %s
\n
"
,
FDELAY_OUTPUT_HW_TO_USER
(
channel
),
mode
,
p
->
rep
,
p
->
rep
==
-
1
?
"(infinite)"
:
""
);
report_time
(
"start"
,
&
p
->
start
);
report_time
(
"end "
,
&
p
->
end
);
report_time
(
"loop "
,
&
p
->
loop
);
tools_report_time
(
"start"
,
&
p
->
start
,
umode
);
tools_report_time
(
"end "
,
&
p
->
end
,
umode
);
tools_report_time
(
"loop "
,
&
p
->
loop
,
umode
);
}
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