diff options
-rw-r--r-- | device-functions.c | 2 | ||||
-rw-r--r-- | flash.c | 4 | ||||
-rw-r--r-- | globals.h | 2 | ||||
-rw-r--r-- | i2c.h | 4 |
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; @@ -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++) { @@ -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; @@ -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 */ |