Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317966
b: refs/heads/master
c: feb153f
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jul 16, 2012
1 parent 929d028 commit 3069627
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 92 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 26550b32e1640020c1aea2e5ccd857b0ddd84b82
refs/heads/master: feb153f32688d8f5d79824413dbe3da56986fe6f
154 changes: 63 additions & 91 deletions trunk/drivers/staging/comedi/drivers/rtd520.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,103 +194,75 @@ Configuration options:
======================================================================*/

/*
The board has 3 input modes and the gains of 1,2,4,...32 (, 64, 128)
*/
static const struct comedi_lrange rtd_ai_7520_range = { 18, {
/* +-5V input range gain steps */
BIP_RANGE(5.0),
BIP_RANGE(5.0 / 2),
BIP_RANGE(5.0 / 4),
BIP_RANGE(5.0 / 8),
BIP_RANGE(5.0 /
16),
BIP_RANGE(5.0 /
32),
/* +-10V input range gain steps */
BIP_RANGE(10.0),
BIP_RANGE(10.0 /
2),
BIP_RANGE(10.0 /
4),
BIP_RANGE(10.0 /
8),
BIP_RANGE(10.0 /
16),
BIP_RANGE(10.0 /
32),
/* +10V input range gain steps */
UNI_RANGE(10.0),
UNI_RANGE(10.0 /
2),
UNI_RANGE(10.0 /
4),
UNI_RANGE(10.0 /
8),
UNI_RANGE(10.0 /
16),
UNI_RANGE(10.0 /
32),

}
* The board has 3 input modes and the gains of 1,2,4,...32 (, 64, 128)
*/
static const struct comedi_lrange rtd_ai_7520_range = {
18, {
/* +-5V input range gain steps */
BIP_RANGE(5.0),
BIP_RANGE(5.0 / 2),
BIP_RANGE(5.0 / 4),
BIP_RANGE(5.0 / 8),
BIP_RANGE(5.0 / 16),
BIP_RANGE(5.0 / 32),
/* +-10V input range gain steps */
BIP_RANGE(10.0),
BIP_RANGE(10.0 / 2),
BIP_RANGE(10.0 / 4),
BIP_RANGE(10.0 / 8),
BIP_RANGE(10.0 / 16),
BIP_RANGE(10.0 / 32),
/* +10V input range gain steps */
UNI_RANGE(10.0),
UNI_RANGE(10.0 / 2),
UNI_RANGE(10.0 / 4),
UNI_RANGE(10.0 / 8),
UNI_RANGE(10.0 / 16),
UNI_RANGE(10.0 / 32),
}
};

/* PCI4520 has two more gains (6 more entries) */
static const struct comedi_lrange rtd_ai_4520_range = { 24, {
/* +-5V input range gain steps */
BIP_RANGE(5.0),
BIP_RANGE(5.0 / 2),
BIP_RANGE(5.0 / 4),
BIP_RANGE(5.0 / 8),
BIP_RANGE(5.0 /
16),
BIP_RANGE(5.0 /
32),
BIP_RANGE(5.0 /
64),
BIP_RANGE(5.0 /
128),
/* +-10V input range gain steps */
BIP_RANGE(10.0),
BIP_RANGE(10.0 /
2),
BIP_RANGE(10.0 /
4),
BIP_RANGE(10.0 /
8),
BIP_RANGE(10.0 /
16),
BIP_RANGE(10.0 /
32),
BIP_RANGE(10.0 /
64),
BIP_RANGE(10.0 /
128),
/* +10V input range gain steps */
UNI_RANGE(10.0),
UNI_RANGE(10.0 /
2),
UNI_RANGE(10.0 /
4),
UNI_RANGE(10.0 /
8),
UNI_RANGE(10.0 /
16),
UNI_RANGE(10.0 /
32),
UNI_RANGE(10.0 /
64),
UNI_RANGE(10.0 /
128),
}
static const struct comedi_lrange rtd_ai_4520_range = {
24, {
/* +-5V input range gain steps */
BIP_RANGE(5.0),
BIP_RANGE(5.0 / 2),
BIP_RANGE(5.0 / 4),
BIP_RANGE(5.0 / 8),
BIP_RANGE(5.0 / 16),
BIP_RANGE(5.0 / 32),
BIP_RANGE(5.0 / 64),
BIP_RANGE(5.0 / 128),
/* +-10V input range gain steps */
BIP_RANGE(10.0),
BIP_RANGE(10.0 / 2),
BIP_RANGE(10.0 / 4),
BIP_RANGE(10.0 / 8),
BIP_RANGE(10.0 / 16),
BIP_RANGE(10.0 / 32),
BIP_RANGE(10.0 / 64),
BIP_RANGE(10.0 / 128),
/* +10V input range gain steps */
UNI_RANGE(10.0),
UNI_RANGE(10.0 / 2),
UNI_RANGE(10.0 / 4),
UNI_RANGE(10.0 / 8),
UNI_RANGE(10.0 / 16),
UNI_RANGE(10.0 / 32),
UNI_RANGE(10.0 / 64),
UNI_RANGE(10.0 / 128),
}
};

/* Table order matches range values */
static const struct comedi_lrange rtd_ao_range = { 4, {
RANGE(0, 5),
RANGE(0, 10),
RANGE(-5, 5),
RANGE(-10, 10),
}
static const struct comedi_lrange rtd_ao_range = {
4, {
UNI_RANGE(5),
UNI_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(10),
}
};

/*
Expand Down

0 comments on commit 3069627

Please sign in to comment.