From 5646062c616f06f9135f391c2089d2aa3ac17fc5 Mon Sep 17 00:00:00 2001 From: ian Date: Mon, 19 Dec 2005 00:53:14 +0000 Subject: [PATCH] handle slave writes --- detpic/panic.asm | 5 +++++ detpic/panic.fin | 1 + detpic/reverse.fin | 1 + detpic/slave.asm | 17 ++++++++++++++--- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/detpic/panic.asm b/detpic/panic.asm index 7af4d90..8e52885 100644 --- a/detpic/panic.asm +++ b/detpic/panic.asm @@ -391,6 +391,11 @@ panic_crashread_setpointer mov_wf FSR1L return +;---------- +panic_crashread_commanded + bs_f panicst, panicst_acked ; since we were asked to + panic morse_E + ;---------- i2csu_read_begin_panicd mov_lw 0x80 ; M0000000 diff --git a/detpic/panic.fin b/detpic/panic.fin index c732a0c..42d7ca1 100644 --- a/detpic/panic.fin +++ b/detpic/panic.fin @@ -1,6 +1,7 @@ extern panic_routine extern panic_kill_hook extern panic_crashread_setpointer + extern panic_crashread_commanded extern i2csu_write_panicd extern i2csu_read_begin_panicd extern i2csu_read_another_panicd diff --git a/detpic/reverse.fin b/detpic/reverse.fin index 0ad7380..f6ea2d1 100644 --- a/detpic/reverse.fin +++ b/detpic/reverse.fin @@ -1 +1,2 @@ + extern polarity_local_do extern polarity_local_init diff --git a/detpic/slave.asm b/detpic/slave.asm index aa4b106..0927007 100644 --- a/detpic/slave.asm +++ b/detpic/slave.asm @@ -22,7 +22,6 @@ slave call detect_local_init call detect_slave_init - panic morse_TI2 bs_f INTCON, GIEH bs_f INTCON, GIEL @@ -36,8 +35,20 @@ i2csu_write_another bt_f_if1 picno,picno_panicd goto i2csu_write_panicd - panic morse_TI1 - goto led_black + bt_w_if0 7 + bra i2csu_write_if_special + bt_w_if1 6 + bra polarity_local_do + bt_w_if0 5 + bra point_local_do +i2csu_write_if_bad + mov_wf t + panic morse_DX + +i2csu_write_if_special + tst_w_ifnz + bra i2csu_write_if_bad + goto panic_crashread_commanded ;---------- i2csu_read_done -- 2.30.2