From 3428abc980f09e59d5d2b48755cc69b8c69ac1b0 Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 3 Jul 2005 21:14:34 +0000 Subject: [PATCH] panic is a macro and doesn't work properly after ifbit0/btfss et al --- cebpic/i2c-test-reply.asm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cebpic/i2c-test-reply.asm b/cebpic/i2c-test-reply.asm index 1d444b4..97f80c8 100644 --- a/cebpic/i2c-test-reply.asm +++ b/cebpic/i2c-test-reply.asm @@ -532,15 +532,21 @@ serial_rx_isr debug 'f' - ifbit1 SSPCON2,ACKSTAT ; check for ack from slave (=0), if no + ifbit0 SSPCON2,ACKSTAT ; check for ack from slave (=0), if no + bra serial_rx_isr_ifnot_noack1 panic morse_SA ; then panic, else +serial_rx_isr_ifnot_noack1 debug 'g' movff RCREG,SSPBUF ; copy byte from serial to i2c buffer call wait_for_i2c_interrupt - btfsc SSPCON2,ACKSTAT,0 ; check for ack from slave (=0), if no + + ifbit0 SSPCON2,ACKSTAT ; check for ack from slave (=0), if no + bra serial_rx_isr_ifnot_noack2 panic morse_SD ; then panic, else +serial_rx_isr_ifnot_noack2 + bsf SSPCON2,PEN,0 ; i2c STOP call wait_for_i2c_interrupt -- 2.30.2