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
642d1957
Commit
642d1957
authored
Jul 03, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: new buffer prototypes, no code yet. No tech change
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
4b8ed63d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
12 deletions
+26
-12
boards.c
lib/boards.c
+4
-2
buffer-zio.c
lib/buffer-zio.c
+13
-0
fmcadc-lib-int.h
lib/fmcadc-lib-int.h
+9
-10
No files found.
lib/boards.c
View file @
642d1957
...
...
@@ -42,8 +42,10 @@ struct fmcadc_operations fa_100ms_4ch_14bit_op = {
.
apply_config
=
fmcadc_zio_apply_config
,
.
retrieve_config
=
fmcadc_zio_retrieve_config
,
.
request_buffer
=
fmcadc_zio_request_buffer
,
.
release_buffer
=
fmcadc_zio_release_buffer
,
.
request_buffer
=
fmcadc_zio_request_buffer
,
.
fill_buffer
=
fmcadc_zio_fill_buffer
,
.
tstamp_buffer
=
fmcadc_zio_tstamp_buffer
,
.
release_buffer
=
fmcadc_zio_release_buffer
,
};
struct
fmcadc_board_type
fmcadc_100ms_4ch_14bit
=
{
.
name
=
"fmcadc_100MS_4ch_14bit"
,
...
...
lib/buffer-zio.c
View file @
642d1957
...
...
@@ -135,6 +135,19 @@ out_ctrl:
return
NULL
;
}
int
fmcadc_zio_fill_buffer
(
struct
fmcadc_dev
*
dev
,
struct
fmcadc_buffer
*
buf
,
unsigned
int
flags
)
{
return
-
1
;
}
struct
fmcadc_timestamp
*
fmcadc_zio_tstamp_buffer
(
struct
fmcadc_buffer
*
buf
,
struct
fmcadc_timestamp
*
ts
)
{
return
NULL
;
}
int
fmcadc_zio_release_buffer
(
struct
fmcadc_dev
*
dev
,
struct
fmcadc_buffer
*
buf
,
void
(
*
free_fn
)(
void
*
))
...
...
lib/fmcadc-lib-int.h
View file @
642d1957
...
...
@@ -37,16 +37,10 @@ struct fmcadc_operations {
typeof
(
fmcadc_apply_config
)
*
apply_config
;
typeof
(
fmcadc_retrieve_config
)
*
retrieve_config
;
/* Handle buffers */
struct
fmcadc_buffer
*
(
*
request_buffer
)(
struct
fmcadc_dev
*
dev
,
int
nsamples
,
void
*
(
*
alloc_fn
)(
size_t
),
unsigned
int
flags
,
struct
timeval
*
timeout
);
int
(
*
release_buffer
)(
struct
fmcadc_dev
*
dev
,
struct
fmcadc_buffer
*
buf
,
void
(
*
free_fn
)(
void
*
));
char
*
(
*
strerror
)(
int
errnum
);
typeof
(
fmcadc_request_buffer
)
*
request_buffer
;
typeof
(
fmcadc_fill_buffer
)
*
fill_buffer
;
typeof
(
fmcadc_tstamp_buffer
)
*
tstamp_buffer
;
typeof
(
fmcadc_release_buffer
)
*
release_buffer
;
};
/*
* This structure describes the board supported by the library
...
...
@@ -108,6 +102,11 @@ struct fmcadc_buffer *fmcadc_zio_request_buffer(struct fmcadc_dev *dev,
void
*
(
*
alloc
)(
size_t
),
unsigned
int
flags
,
struct
timeval
*
timeout
);
int
fmcadc_zio_fill_buffer
(
struct
fmcadc_dev
*
dev
,
struct
fmcadc_buffer
*
buf
,
unsigned
int
flags
);
struct
fmcadc_timestamp
*
fmcadc_zio_tstamp_buffer
(
struct
fmcadc_buffer
*
buf
,
struct
fmcadc_timestamp
*
);
int
fmcadc_zio_release_buffer
(
struct
fmcadc_dev
*
dev
,
struct
fmcadc_buffer
*
buf
,
void
(
*
free_fn
)(
void
*
));
...
...
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