Commit 6755d59a authored by Alessandro Rubini's avatar Alessandro Rubini

lib: added FMCADC_F_VERBOSE and documented it shortly

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 7c7398d0
......@@ -294,11 +294,14 @@ This is the meaning of the various arguments:
information may require device-level configuration at open time.
@findex FMCADC_F_FLUSH
@findex FMCADC_F_VERBOSE
@item flags
This argument is used to pass user flags. The library currently
supports @t{FMCADC_F_FLUSH}, that reads and discards any
input samples possibly left over by a previous acquisition.
supports @t{FMCADC_F_FLUSH} (that reads and discards any
input samples possibly left over by a previous acquisition)
and @t{FMCADC_F_VERBOSE} (that enables diagnostic messages to
@i{stderr}).
currently unused, but some driver may need to
have some more information, or flags, at open time.
......
......@@ -102,8 +102,8 @@ struct fmcadc_dev *fmcadc_zio_open(const struct fmcadc_board_type *b,
fa->samplesize = 8; /* FIXME: should read sysfs instead -- where? */
fa->pagesize = getpagesize();
/* Finally, support verbose operation */
if (getenv("LIB_FMCADC_VERBOSE"))
/* Support verbose operation (turn user flag into internal flag)*/
if (flags & FMCADC_F_VERBOSE || getenv("LIB_FMCADC_VERBOSE"))
fa->flags |= FMCADC_FLAG_VERBOSE;
return (void *) &fa->gid;
......
......@@ -133,6 +133,7 @@ static inline int fmcadc_get_conf(struct fmcadc_conf *conf,
/* Flags used in open/acq/config -- note: low-bits are used by lib-int.h */
#define FMCSDC_F_USERMASK 0xffff0000
#define FMCADC_F_FLUSH 0x00010000
#define FMCADC_F_VERBOSE 0x00020000
/*
* Actual functions follow
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment