Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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 - Software
Commits
54cc89e9
Commit
54cc89e9
authored
Mar 01, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkpatch fixes
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
01809d13
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
19 deletions
+19
-19
fald-simple-acq.c
libtools/fald-simple-acq.c
+9
-8
fald-simple-get-conf.c
libtools/fald-simple-get-conf.c
+7
-8
fald-test.c
libtools/fald-test.c
+3
-3
No files found.
libtools/fald-simple-acq.c
View file @
54cc89e9
...
...
@@ -23,16 +23,17 @@ static void fald_help()
printf
(
"
\n
fald-simple-acq [OPTIONS] <DEVID>
\n\n
"
);
printf
(
" <DEVID>: hexadecimal identifier (e.g.:
\"
0x200
\"
)
\n
"
);
printf
(
" --before|-b <num> number of pre samples
\n
"
);
printf
(
" --after|-a <num> n
umber
of post samples (default: 16)
\n
"
);
printf
(
" --after|-a <num> n
.
of post samples (default: 16)
\n
"
);
printf
(
" --nshots|-n <num> number of trigger shots
\n
"
);
printf
(
" --delay|-d <num> delay sample after trigger
\n
"
);
printf
(
" --under-sample|-U <num> pick 1 sample every <num>
\n
"
);
printf
(
" --threshold|-t <num> internal trigger threshold
\n
"
);
printf
(
" --channel|-c <num>
internal channel to use
as trigger (0..3)
\n
"
);
printf
(
" --channel|-c <num>
channel used
as trigger (0..3)
\n
"
);
printf
(
" --tiemout|-T <millisec> timeout for acquisition
\n
"
);
printf
(
" --negative-edge internal trigger is falling edge
\n
"
);
printf
(
" --binary|-B <file> save binary to <file>
\n
"
);
printf
(
" --multi-binary|-M <file> save two files per shot: <file>.0000.ctrl etc
\n
"
);
printf
(
" --multi-binary|-M <file> save two files per shot: "
"<file>.0000.ctrl etc
\n
"
);
printf
(
" --dont-read|-N config-only, use with zio-dump
\n
"
);
printf
(
" --help|-h show this help
\n\n
"
);
...
...
@@ -61,7 +62,7 @@ static struct option options[] = {
{
"post"
,
required_argument
,
0
,
'P'
},
{
"decimation"
,
required_argument
,
0
,
'D'
},
{
"help"
,
no_argument
,
0
,
'h'
},
{
"help"
,
no_argument
,
0
,
'h'
},
{
0
,
0
,
0
,
0
}
};
...
...
@@ -96,9 +97,9 @@ int main(int argc, char *argv[])
fmcadc_set_conf
(
&
acq
,
FMCADC_CONF_ACQ_N_SHOTS
,
nshots
);
/* Parse options */
while
(
(
c
=
getopt_long
(
argc
,
argv
,
GETOPT_STRING
,
options
,
&
opt_index
))
>=
0
)
{
switch
(
c
)
{
while
(
(
c
=
getopt_long
(
argc
,
argv
,
GETOPT_STRING
,
options
,
&
opt_index
))
>=
0
)
{
switch
(
c
)
{
case
'b'
:
case
'p'
:
/* before */
presamples
=
atoi
(
optarg
);
fmcadc_set_conf
(
&
acq
,
FMCADC_CONF_ACQ_PRE_SAMP
,
...
...
@@ -154,7 +155,7 @@ int main(int argc, char *argv[])
}
}
if
(
optind
!=
argc
-
1
)
{
if
(
optind
!=
argc
-
1
)
{
fprintf
(
stderr
,
"%s: DEVICE-ID is a mandatory argument
\n
"
,
argv
[
0
]);
fald_help
();
...
...
libtools/fald-simple-get-conf.c
View file @
54cc89e9
...
...
@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
struct
fmcadc_dev
*
adc
;
struct
fmcadc_conf
trg
,
acq
,
brd
,
chn
;
static
struct
option
options
[]
=
{
{
"help"
,
no_argument
,
0
,
'h'
},
{
"help"
,
no_argument
,
0
,
'h'
},
{
0
,
0
,
0
,
0
}
};
int
opt_index
=
0
,
err
=
0
,
i
;
...
...
@@ -47,9 +47,8 @@ int main(int argc, char *argv[])
acq
.
mask
=
0
;
/* Parse options */
while
(
(
c
=
getopt_long
(
argc
,
argv
,
"h"
,
options
,
&
opt_index
))
>=
0
){
switch
(
c
){
while
((
c
=
getopt_long
(
argc
,
argv
,
"h"
,
options
,
&
opt_index
))
>=
0
)
{
switch
(
c
)
{
case
'h'
:
fald_help
();
exit
(
1
);
...
...
@@ -57,7 +56,7 @@ int main(int argc, char *argv[])
}
}
if
(
optind
!=
argc
-
1
)
{
if
(
optind
!=
argc
-
1
)
{
fprintf
(
stderr
,
"%s: DEVICE-ID is a mandatory argument
\n
"
,
argv
[
0
]);
fald_help
();
...
...
@@ -148,9 +147,9 @@ int main(int argc, char *argv[])
fmcadc_set_conf_mask
(
&
chn
,
FMCADC_CONF_CHN_OFFSET
);
err
=
fmcadc_retrieve_config
(
adc
,
&
chn
);
if
(
err
)
{
fprintf
(
stderr
,
"%s: cannot get channel config: %s
\n
"
,
argv
[
0
],
fmcadc_strerror
(
errno
));
exit
(
1
);
fprintf
(
stderr
,
"%s: cannot get channel config: %s
\n
"
,
argv
[
0
],
fmcadc_strerror
(
errno
));
exit
(
1
);
}
printf
(
" range: %d
\n
"
,
chn
.
value
[
FMCADC_CONF_CHN_RANGE
]);
printf
(
" 50Ohm Termination: %s
\n
"
,
...
...
libtools/fald-test.c
View file @
54cc89e9
...
...
@@ -23,7 +23,7 @@ unsigned presamples = 10;
unsigned
postsamples
=
10
;
int
print_data
=
1
;
void
print_buffer_content
(
struct
fmcadc_buffer
*
buf
);
void
print_buffer_content
(
struct
fmcadc_buffer
*
buf
);
int
read_with_one_buffer
(
struct
fmcadc_dev
*
dev
);
int
read_with_n_buffer
(
struct
fmcadc_dev
*
dev
);
...
...
@@ -113,7 +113,7 @@ int main(int argc, char *argv[])
exit
(
1
);
}
switch
(
test
)
{
switch
(
test
)
{
case
0
:
err
=
read_with_one_buffer
(
dev
);
break
;
...
...
@@ -183,7 +183,7 @@ int read_with_n_buffer(struct fmcadc_dev *dev)
}
void
print_buffer_content
(
struct
fmcadc_buffer
*
buf
)
void
print_buffer_content
(
struct
fmcadc_buffer
*
buf
)
{
int16_t
*
data
=
buf
->
data
;
/* get data */
struct
fmcadc_timestamp
*
ts
;
...
...
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