Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha
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 ADC 100M 14b 4cha
Commits
7a353647
Commit
7a353647
authored
Jun 21, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fald-simple-acq: stdout gets only data
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
da1ebebd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
fald-simple-acq.c
libtools/fald-simple-acq.c
+3
-7
No files found.
libtools/fald-simple-acq.c
View file @
7a353647
...
...
@@ -121,7 +121,6 @@ int main(int argc, char *argv[])
sscanf
(
argv
[
optind
],
"0x%x"
,
&
dev_id
);
}
printf
(
"Open ADC fmcadc_100MS_4ch_14bit dev_id 0x%04x ...
\n
"
,
dev_id
);
/* Open the ADC */
adc
=
fmcadc_open
(
"fmcadc_100MS_4ch_14bit"
,
dev_id
,
0
);
if
(
!
adc
)
{
...
...
@@ -135,7 +134,6 @@ int main(int argc, char *argv[])
exit
(
1
);
}
printf
(
"Configuring trigger ...
\n
"
);
/* Configure trigger parameter */
err
=
fmcadc_apply_config
(
adc
,
0
,
&
trg
);
if
(
err
&&
errno
!=
FMCADC_ENOMASK
)
{
...
...
@@ -144,7 +142,6 @@ int main(int argc, char *argv[])
exit
(
1
);
}
printf
(
"Configuring acquisition ...
\n
"
);
/* Configure acquisition parameter */
err
=
fmcadc_apply_config
(
adc
,
0
,
&
acq
);
if
(
err
&&
errno
!=
FMCADC_ENOMASK
)
{
...
...
@@ -153,7 +150,6 @@ int main(int argc, char *argv[])
exit
(
1
);
}
printf
(
"Start Acquisition ...
\n
"
);
/* Start acquisition and wait until it completes */
err
=
fmcadc_acq_start
(
adc
,
0
,
NULL
);
if
(
err
)
{
...
...
@@ -177,8 +173,9 @@ int main(int argc, char *argv[])
exit
(
1
);
}
ctrl
=
buf
.
metadata
;
printf
(
"
\n
Read %d samples from shot %i/%i
\n
"
,
ctrl
->
nsamples
,
i
+
1
,
acq
.
value
[
FMCADC_CONF_ACQ_N_SHOTS
]);
fprintf
(
stderr
,
"Read %d samples from shot %i/%i
\n
"
,
ctrl
->
nsamples
,
i
+
1
,
acq
.
value
[
FMCADC_CONF_ACQ_N_SHOTS
]);
/* we lazily know samplesize is 2 bytes and chcount is 4 */
data
=
buf
.
data
;
...
...
@@ -191,7 +188,6 @@ int main(int argc, char *argv[])
fmcadc_release_buffer
(
adc
,
&
buf
);
}
printf
(
"Acquisition completed
\n
"
);
fmcadc_close
(
adc
);
exit
(
0
);
}
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