From: ian Date: Fri, 30 Dec 2005 01:48:04 +0000 (+0000) Subject: make sure we do not answer Z to i2cmu_write_start when it's not ours, in case main... X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=6483de41cba82447f16bc02a2187b0f7fa7e8aef;p=trains.git make sure we do not answer Z to i2cmu_write_start when it's not ours, in case main program has just selected --- diff --git a/detpic/panic.asm b/detpic/panic.asm index 1be0db6..550aa4c 100644 --- a/detpic/panic.asm +++ b/detpic/panic.asm @@ -20,6 +20,7 @@ panicst_restart_i2c equ 7 panicst_acked equ 5 panicst_ferroerr equ 4 panicst_writeslave equ 3 +panicst_onlyourwrite equ 2 panic_valcount res 1 @@ -463,6 +464,7 @@ write_if_setbytetowrite bc_w 7 mov_wf panic_valcount bs_f panicst, panicst_writeslave + bs_f panicst, panicst_onlyourwrite return ;---------- @@ -500,9 +502,11 @@ pan_i2cmu_read_got_byte ;---------- pan_i2cmu_write_next_byte mov_fw panic_valcount - bs_f STATUS, Z - bt_f_if1 panicst, panicst_writeslave bc_f STATUS, Z + bt_f_if0 panicst, panicst_onlyourwrite + retlw 0x00 + bt_f_if0 panicst, panicst_writeslave + bs_f STATUS, Z bc_f panicst, panicst_writeslave return