summaryrefslogtreecommitdiff
path: root/device-functions.c
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 00:16:57 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 00:16:57 +0900
commit6ac848ad626c9adb498eba6972f5eb1bbced20b5 (patch)
tree20f59a2be798639f1952f6ed46ccfae4120664ac /device-functions.c
parent44ce8c22c0cc5fdabd8e83e06f51a2fab994521c (diff)
make drive polarity of zout relay configurable for -R50 units and PCB 308AINSTRUMENT_6_4_03b
Diffstat (limited to 'device-functions.c')
-rw-r--r--device-functions.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/device-functions.c b/device-functions.c
index ceab0c7..64feb6d 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -1358,7 +1358,8 @@ int Set_zout(int channel,int setting,int really_for_zout)
/* first channel uses dedicated Zout line */
if (channel==0) {
- if (setting!=globals.Flash.zout_max[channel]) {
+ if ( ((setting==globals.Flash.zout_max[channel]) && globals.Flash.zout_relay_high_for_max[channel]) ||
+ ((setting==globals.Flash.zout_min[channel]) && !globals.Flash.zout_relay_high_for_max[channel])) {
set_shiftreg_bits(SR_3, POS_12, ONE_BIT, BIT_HIGH); /* power zout relay */
} else {
set_shiftreg_bits(SR_3, POS_12, ONE_BIT, BIT_LOW); /* de-power zout relay */
@@ -1367,7 +1368,8 @@ int Set_zout(int channel,int setting,int really_for_zout)
/* second channel uses dedicated xtra-rly2 line */
if (channel==1) {
- if (setting!=globals.Flash.zout_max[channel]) {
+ if ( ((setting==globals.Flash.zout_max[channel]) && globals.Flash.zout_relay_high_for_max[channel]) ||
+ ((setting==globals.Flash.zout_min[channel]) && !globals.Flash.zout_relay_high_for_max[channel])) {
set_shiftreg_bits(SR_2, XTR_POS + 2, ONE_BIT, BIT_HIGH); /* power zout relay */
} else {
set_shiftreg_bits(SR_2, XTR_POS + 2, ONE_BIT, BIT_LOW); /* de-power zout relay */