diff options
Diffstat (limited to 'device-functions.c')
-rw-r--r-- | device-functions.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/device-functions.c b/device-functions.c index 64feb6d..eeddd67 100644 --- a/device-functions.c +++ b/device-functions.c @@ -228,7 +228,7 @@ void Main_Rst (void) void set_dac(int dac, int word) { /* allows dacs to be disabled (using dac=-1, for example) */ - if ((dac >= 0) && (dac < 8)) { + if ((dac >= 0) && (dac < max_dacs)) { globals.Registers.parallel_DAC_reg[dac]=word; } } @@ -4646,7 +4646,7 @@ void Main_update_shift_registers() bus_setpin(out_STROBE_LINE, 1); // latch the data bus_setpin(out_STROBE_LINE, 0); // release latch - for (i=0; i<8; ++i) { + for (i=0; i<std_dacs; ++i) { /* load the upper-nibble latch */ bus_writebyte ((uint8_t) (Octal_DACportCS_high), (uint8_t) (globals.Registers.parallel_DAC_reg[i] >> 8)); |