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
32e5b310
Commit
32e5b310
authored
Mar 05, 2015
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: flush local buffer when acquisition stop
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
86716090
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
ft-core.c
kernel/ft-core.c
+20
-0
No files found.
kernel/ft-core.c
View file @
32e5b310
...
...
@@ -94,6 +94,24 @@ int ft_enable_termination(struct fmctdc_dev *ft, int channel, int enable)
return
0
;
}
/**
* NOTE: this function must be invoked with st->lock taken
*/
static
void
ft_flush_sw_fifo
(
struct
fmctdc_dev
*
ft
)
{
struct
ft_channel_state
*
st
;
struct
ft_wr_timestamp
ts
;
int
i
;
for
(
i
=
FT_CH_1
;
i
<=
FT_NUM_CHANNELS
;
i
++
)
{
st
=
&
ft
->
channels
[
i
-
1
];
while
(
!
kfifo_is_empty
(
&
st
->
fifo
))
kfifo_out
(
&
st
->
fifo
,
&
ts
,
sizeof
(
struct
ft_wr_timestamp
));
}
}
void
ft_enable_acquisition
(
struct
fmctdc_dev
*
ft
,
int
enable
)
{
uint32_t
ien
,
cmd
;
...
...
@@ -129,6 +147,8 @@ void ft_enable_acquisition(struct fmctdc_dev *ft, int enable)
ft_reset_channel
(
ft
,
i
);
ft
->
prev_wr_ptr
=
ft
->
cur_wr_ptr
=
0
;
ft_flush_sw_fifo
(
ft
);
}
spin_unlock
(
&
ft
->
lock
);
...
...
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