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
7071329e
Commit
7071329e
authored
Sep 06, 2012
by
Samuel Iglesias Gonsálvez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tdc: add metadata masks
Signed-off-by:
Samuel Iglesias Gonsálvez
<
siglesias@igalia.com
>
parent
63e85777
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
tdc_regs.h
hw/tdc_regs.h
+7
-4
tdc-fmc.c
tdc-fmc.c
+1
-2
No files found.
hw/tdc_regs.h
View file @
7071329e
...
...
@@ -103,10 +103,13 @@
#define TDC_MEZZANINE_1WIRE 0x80000
/* Constants */
#define TDC_CHAN_NUMBER 5
#define TDC_CHAN_NUMBER
5
#define TDC_EVENT_BUFFER_SIZE 256
#define TDC_EVENT_CHANNEL_MASK 0x3
#define TDC_EVENT_DACAPO_FLAG BIT(0)
#define TDC_EVENT_BUFFER_SIZE 256
#define TDC_EVENT_CHANNEL_MASK 0xF
#define TDC_EVENT_SLOPE_MASK 0xF0
#define TDC_EVENT_FIFO_LF_MASK 0xF00
#define TDC_EVENT_FIFO_EF_MASK 0xF000
#define TDC_EVENT_DACAPO_FLAG BIT(0)
#endif
/* __TDC_REGISTERS_H */
tdc-fmc.c
View file @
7071329e
...
...
@@ -137,10 +137,9 @@ static void tdc_fmc_irq_work(struct work_struct *work)
for
(
;
count
>
0
;
count
--
)
{
tmp_data
=
&
events
[
rd_ptr
];
/* Check which channel to deliver the data */
chan
=
tmp_data
->
metadata
&
TDC_EVENT_CHANNEL_MASK
;
/* FIXME: mask to know the channel number */
chan
=
tmp_data
->
metadata
&
TDC_EVENT_CHANNEL_MASK
;
/* Add the DaCapo flag to notify the user */
tdc
->
event
[
chan
].
dacapo_flag
=
dacapo_flag
;
/* Copy the data and notify the readers (ZIO trigger) */
tdc
->
event
[
chan
].
data
=
*
tmp_data
;
/* XXX: Flag to avoid the ZIO trigger to read always the same element
...
...
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