Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
Beam Positoning Monitor - 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
Beam Positoning Monitor - Software
Commits
4c96dd29
Commit
4c96dd29
authored
Oct 16, 2014
by
Lucas Russo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples/acq.c: remove local acquisition channel defs
Now, the libclient itself defines this structure.
parent
44941157
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
13 deletions
+2
-13
acq.c
examples/acq.c
+2
-13
No files found.
examples/acq.c
View file @
4c96dd29
...
...
@@ -14,22 +14,11 @@
#define DEFAULT_NUM_SAMPLES 4096
#define DEFAULT_CHAN_NUM 0
/* Arbitrary hard limits */
#define MAX_NUM_SAMPLES (1 << 28)
#define MAX_NUM_CHANS (1 << 8)
typedef
struct
_acq_chan_t
{
uint32_t
chan
;
uint32_t
sample_size
;
}
acq_chan_t
;
/* Global structure merging all of the channel's sample sizes */
acq_chan_t
__acq_chan
[
END_CHAN_ID
]
=
{
[
0
]
=
{.
chan
=
ADC_CHAN_ID
,
.
sample_size
=
ADC_SAMPLE_SIZE
},
[
1
]
=
{.
chan
=
TBTAMP_CHAN_ID
,
.
sample_size
=
TBTAMP_SAMPLE_SIZE
},
[
2
]
=
{.
chan
=
TBTPOS_CHAN_ID
,
.
sample_size
=
TBTPOS_SAMPLE_SIZE
},
[
3
]
=
{.
chan
=
FOFBAMP_CHAN_ID
,
.
sample_size
=
FOFBAMP_SAMPLE_SIZE
},
[
4
]
=
{.
chan
=
FOFBPOS_CHAN_ID
,
.
sample_size
=
FOFBPOS_SAMPLE_SIZE
}
};
void
print_data
(
uint32_t
chan
,
uint32_t
*
data
,
uint32_t
size
)
{
/* FIXME: Make it more generic */
...
...
@@ -158,7 +147,7 @@ int main (int argc, char *argv [])
}
fprintf
(
stdout
,
"[client:acq]: chan = %u
\n
"
,
chan
);
uint32_t
data_size
=
num_samples
*
__
acq_chan
[
chan
].
sample_size
;
uint32_t
data_size
=
num_samples
*
acq_chan
[
chan
].
sample_size
;
uint32_t
*
data
=
(
uint32_t
*
)
zmalloc
(
data_size
*
sizeof
(
uint8_t
));
acq_trans_t
acq_trans
=
{.
req
=
{
.
num_samples
=
num_samples
,
...
...
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