Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC TDC 1ns 5cha - 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 TDC 1ns 5cha - Software
Commits
a869ec6b
Commit
a869ec6b
authored
Aug 17, 2018
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: convert all aquired timestamps in a dedicated func
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
013a37f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
fmctdc-lib.c
lib/fmctdc-lib.c
+12
-3
No files found.
lib/fmctdc-lib.c
View file @
a869ec6b
...
...
@@ -610,6 +610,16 @@ static void fmctdc_ts_convert(struct fmctdc_time *t, struct ft_hw_timestamp *o)
t
->
seq_id
=
FT_HW_TS_META_SEQ
(
o
->
metadata
);
}
static
void
fmctdc_ts_convert_n
(
struct
fmctdc_time
*
t
,
struct
ft_hw_timestamp
*
o
,
unsigned
int
n
)
{
int
i
;
for
(
i
=
0
;
i
<
n
;
++
i
)
fmctdc_ts_convert
(
&
t
[
i
],
&
o
[
i
]);
}
/**
* It reads a given number of time-stamps from the driver. It will wait at
* most once and return the number of samples that it received from a given
...
...
@@ -668,9 +678,8 @@ int fmctdc_read(struct fmctdc_board *userb, unsigned int channel,
if
(
n_ts
%
sizeof
(
*
data
)
==
0
)
{
/* Good samples here */
n_ts
/=
sizeof
(
*
data
);
n_ts
+=
i
;
for
(;
i
<
n_ts
&&
i
<
n
;
i
++
)
fmctdc_ts_convert
(
&
t
[
i
],
&
data
[
i
]);
fmctdc_ts_convert_n
(
&
t
[
i
],
&
data
[
i
],
n_ts
);
i
+=
n_ts
;
continue
;
/* the while loop */
}
...
...
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