chiark / gitweb /
fix swapping of B1 and B2 test/send bits!
authorian <ian>
Fri, 30 Dec 2005 17:56:17 +0000 (17:56 +0000)
committerian <ian>
Fri, 30 Dec 2005 17:56:17 +0000 (17:56 +0000)
detpic/detect.asm

index f2c557ff782695f98f1a008837ad14ed5afee160..eeed37391f400524ff04abf48048214acbfdc3aa 100644 (file)
@@ -252,7 +252,7 @@ backgroundloop_detectors @
 
 ;----------            ; buf0  MM zz zz zz  zz zz zz zz
 i2csu_read_begin_detectors
- ; detection byte 1
 ; detection byte 1
        mov_lw  0xf8    ; W     yy yy yy yy  yy zz zz zz
        and_wff scana   ; scana 19 09 12 15  18 zz zz zz
 
@@ -264,7 +264,7 @@ i2csu_read_begin_detectors
        cmp_fw_ifne last1
        bs_f    buf0,4  ; buf0  MM zz zz B1  zz zz zz zz
 
- ; detection byte 2
 ; detection byte 2
        mov_lw  0x83    ; W     yy zz zz zz  zz zz yy yy
        and_wff scane   ; scane 06 zz zz zz  zz zz 03 00
 
@@ -276,7 +276,7 @@ i2csu_read_begin_detectors
        cmp_fw_ifne last2
        bs_f    buf0,5  ; buf0  MM zz B2 B1  zz zz zz zz
 
-; detection and lead byte, 0
+  ; detection and lead byte, 0
        rlc_fw  scanc   ; W     xx 05 xx xx  10 13 16 08
        and_lw  0x4f    ; W     zz 05 zz zz  10 13 16 08
        ior_wfw buf0    ; W     MM 05 B2 B1  10 13 16 08
@@ -286,12 +286,12 @@ i2csu_read_begin_detectors
        rcall   new_i2c_outmsg
 
        mov_fw  scana
-       bt_f_if1 buf0,5
+       bt_f_if1 buf0,4
        mov_wf  POSTINC2
        mov_wf  last1
 
        mov_fw  scane
-       bt_f_if1 buf0,4
+       bt_f_if1 buf0,5
        mov_wf  POSTINC2
        mov_wf  last2