; M010 0000 we're expecting more detection byte 2
; 1000 0000 we're expecting an extra byte
-;----------------------------------------------------------------------
-slavetable_section udata 0x400
-
-ste_szln2 equ 3
- ; each entry is a number of bytes, at these offsets:
-ste_slave equ 0 ; slave number
-ste_flags equ 1 ; flags (stf_...) cslot normally points here
-ste_detbasel equ 2 ; added to 11111bbb to make 0SSSSSSS; ie first-0xf8
-ste_lastd0 equ 3 ; } [o0]* ie every bit is either 0 (for an
-ste_lastd1 equ 4 ; } irrelevant bit) or o, meaning the
-ste_lastd2 equ 5 ; } previously seen detection data bit
-ste_detmsgh equ 7 ; 1 001 1 000 being 1 001 Y SSS
-ste_size equ (1<<ste_szln2)
-slavetable res maxpics * ste_size
-
-stf_detect equ 7
-
code
;======================================================================
; HANDLING OF I2C EVENTS
;======================================================================
+ include pindata.inc
+
udata_acs
picno res 1 ; from first idlocs byte
picno_panicd equ 7 ; this bit set if we panic
qqLATD equ qqtrislat_start + 0xa
qqLATE equ qqtrislat_start + 0xb
+;----------------------------------------------------------------------
+; NON-ACCESS-BANK SECTIONS (TABLES)
+
outbuf_section udata 0x200
outbuf_szln2 equ 7
outbuf_size equ (1<<outbuf_szln2)
bitnum2bit_section udata 0x0f8
bitnum2bit res 8 ; bitnum2bit[x] = 1<<x
+slavetable_section udata 0x400
+; each board actually present has an entry in this table
+ste_szln2 equ 3
+ste_size equ (1<<ste_szln2)
+slavetable res maxpics * ste_size
+
+; each entry is a number of bytes, at these offsets:
+ste_slave equ 0 ; Gk slave number
+ste_flags equ 1 ; ** flags (stf_...), see below
+ste_detbasel equ 2 ; dk added to 11111bbb to make 0SSSSSSS; ie first-0xf8
+ste_lastd0 equ 3 ; d } [o0]* ie every bit is either 0 (for an
+ste_lastd1 equ 4 ; d } irrelevant bit) or o, meaning the
+ste_lastd2 equ 5 ; d } previously seen detection data bit
+ste_revcmd equ 6 ; r see reverse.asm
+ste_detmsgh equ 7 ; dk 1 001 1 000 being 1 001 Y SSS
+; offset^ ^which module(s) use this data:
+; G global - for use by any code
+; d for master detection, see mascan.asm
+; * varies per bit
+; r for polarity, see reverse.asm
+; .k entry is constant, created during init'n
+; flags in ste_flags:
+stf_detect equ 7 ; Gk this is a detectors board
+
include final.inc
;======================================================================