Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Trigger Distribution
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
White Rabbit Trigger Distribution
Commits
80a9874b
Commit
80a9874b
authored
Dec 13, 2018
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwrtd-devices: add ADC device.
parent
f14f85f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
libwrtd-devices.c
software/lib/libwrtd-devices.c
+46
-0
No files found.
software/lib/libwrtd-devices.c
View file @
80a9874b
...
...
@@ -48,6 +48,16 @@ static const char * const fd_channels[] =
"FD1"
,
"FD2"
,
"FD3"
,
"FD4"
};
static
const
char
*
const
adcin_channels
[]
=
{
"ADCI1"
,
"ADCI2"
,
"ADCI3"
,
"ADCI4"
,
"ADCI5"
,
};
static
const
char
*
const
adcout_channels
[]
=
{
"ADCO1"
,
};
static
const
struct
wrtd_mt_device
tdc_device
=
{
...
...
@@ -67,6 +77,24 @@ static const struct wrtd_mt_device fd_device =
.
configure
=
wrtd_none_configure
};
static
const
struct
wrtd_mt_device
adcin_device
=
{
.
name
=
"FMC ADCin 5CH"
,
.
dir
=
wrtd_input
,
.
nbr_chs
=
5
,
.
channels
=
adcin_channels
,
.
configure
=
wrtd_none_configure
};
static
const
struct
wrtd_mt_device
adcout_device
=
{
.
name
=
"FMC ADCout"
,
.
dir
=
wrtd_output
,
.
nbr_chs
=
1
,
.
channels
=
adcout_channels
,
.
configure
=
wrtd_none_configure
};
static
const
struct
wrtd_mt_config
configs
[]
=
{
...
...
@@ -92,7 +120,25 @@ static const struct wrtd_mt_config configs[] =
}
}
}
},
{
.
mt_app_id
=
0x115790d1
,
.
nbr_cpus
=
1
,
.
tx_cpu
=
0
,
.
rx_cpu
=
0
,
.
cpus
=
{
{
WRTD_APP_ADCIO_5CH
,
2
,
{
&
adcin_device
,
&
adcout_device
}
}
}
}
};
enum
wrtd_status
wrtd_find_config
(
struct
wrtd_dev
*
dev
,
...
...
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