summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--device-functions.c2
-rw-r--r--flash.c4
-rw-r--r--globals.h2
-rw-r--r--i2c.h4
4 files changed, 8 insertions, 4 deletions
diff --git a/device-functions.c b/device-functions.c
index cb97db8..1e7ac25 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -811,7 +811,7 @@ int Set_Delay(int check_possible_only,int word_override,int range_override,int c
}
if (channel==1) {
- control_pcb107(Second_Dly_Port,globals.Flash.delay_dac[channel],word_out,relay_range);
+ control_pcb107(Flash.I2C_port_for_CH2_delay,globals.Flash.delay_dac[channel],word_out,relay_range);
}
globals.ChannelState[channel].delay=set_delay;
diff --git a/flash.c b/flash.c
index db57bac..3282338 100644
--- a/flash.c
+++ b/flash.c
@@ -818,6 +818,10 @@ static void initFlashValues(FlashStruct *mem)
mem->delay_dac[0]=5; /* channel 1: on OP1B board - not to be changed, as a rule */
mem->delay_dac[1]=6; /* channel 2: varies (for control of PCB107C) */
+
+ /* originally Second_Dly_Port (for obsolete AVX-DD-A3-PS-TC) */
+ mem->I2C_port_for_CH2_delay = Second_PW_Port; // standard address for PCB 205A now
+
mem->flash_end=99;
for (i=0; i<8; i++) {
diff --git a/globals.h b/globals.h
index a49431d..d7b974c 100644
--- a/globals.h
+++ b/globals.h
@@ -718,7 +718,7 @@ typedef struct {
char ignore_ampl_polarity[max_channels]; /* addr 10148, for AVR-D3-B-MS1 CH2 */
- char spare_end;
+ char I2C_port_for_CH2_delay; /* addr 10150, for AVIR-2-B-PN-DP-KMPC-VXI */
char flash_end;
diff --git a/i2c.h b/i2c.h
index aa49abf..9526aca 100644
--- a/i2c.h
+++ b/i2c.h
@@ -1,8 +1,8 @@
#include <glib.h>
#define PCF8574 0x20 /* secondary I2C peripheral device */
-#define Second_PW_Port 0 /* PCF8574 at three-bit address 0 is for dual PW board (1021D) */
-#define Second_Dly_Port 1 /* PCF8574 at three-bit address 1 is for dual delay board (AVX-DD-A3-PS-TC) */
+#define Second_PW_Port 0 /* PCF8574 at three-bit address 0 is for dual PW or Delay board (PCB 205A) */
+#define Second_Dly_Port 1 /* PCF8574 at three-bit address 1 is for dual delay board (obsolete, was for AVX-DD-A3-PS-TC) */
#define To_Self_Cal_Port 2 /* PCF8574 at three-bit address 2 is for self-cal PCB 226A */
#define From_Self_Cal_Port 3 /* PCF8574 at three-bit address 3 is for self-cal PCB 226A */