Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
adc-lib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
misc
adc-lib
Commits
cf84af6e
Commit
cf84af6e
authored
Oct 12, 2018
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*: add voltage ranges for ADC100M14b4CHA
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
a20673aa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
+18
-3
library-user.rst
doc/library-user.rst
+4
-0
adc-lib-100m14b4cha.h
lib/adc-lib-100m14b4cha.h
+10
-0
adc-acq.c
tools/adc-acq.c
+4
-3
No files found.
doc/library-user.rst
View file @
cf84af6e
...
...
@@ -255,6 +255,10 @@ since the specifc parameters for this card are global, so there is no need for
any routing mechanism.
Following some special values defined for this board.
.. doxygenenum:: adc_configuration_100m14b4cha_channel_range
Acquisition
-----------
...
...
lib/adc-lib-100m14b4cha.h
View file @
cf84af6e
...
...
@@ -23,6 +23,16 @@ extern "C" {
#include "adc-lib.h"
/**
* List of known voltage ranges to be used with the configuration option
* ADC_CONF_CHN_RANGE
*/
enum
adc_configuration_100m14b4cha_channel_range
{
ADC_CONF_100M14B4CHA_CHN_RANGE_OPEN_DRAIN
=
0
,
ADC_CONF_100M14B4CHA_CHN_RANGE_100mV
=
0x23
,
ADC_CONF_100M14B4CHA_CHN_RANGE_1V
=
0x11
,
ADC_CONF_100M14B4CHA_CHN_RANGE_10V
=
0x45
,
};
/**
* List of possible buffer types (options for ADC_CONF_100M14B4CHA_BUF_TYPE)
...
...
tools/adc-acq.c
View file @
cf84af6e
...
...
@@ -22,6 +22,7 @@
#include <unistd.h>
#include <inttypes.h>
#include <adc-lib.h>
#include <adc-lib-100m14b4cha.h>
static
int
arg_show_config
=
0
;
static
int
arg_no_read
=
0
;
...
...
@@ -448,15 +449,15 @@ static int fald_acq_channel_configuration(struct adc_dev *adc, char *param)
*/
switch
(
range
)
{
case
100
:
range
=
0x23
;
range
=
ADC_CONF_100M14B4CHA_CHN_RANGE_100mV
;
bit_scale
=
0
.
05
/
(
1
<<
15
);
break
;
case
1
:
range
=
0x11
;
range
=
ADC_CONF_100M14B4CHA_CHN_RANGE_1V
;
bit_scale
=
0
.
5
/
(
1
<<
15
);
break
;
case
10
:
range
=
0x45
;
range
=
ADC_CONF_100M14B4CHA_CHN_RANGE_10V
;
bit_scale
=
5
.
0
/
(
1
<<
15
);
break
;
}
...
...
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