1 ;======================================================================
2 ; MASTER - SCANNING ETC.
8 cslot res 1 ; current slave in slave table, points to flags byte
10 ; one of the following:
11 ; 0000 0000 we're expecting the first byte
13 ; M0BB 0001 we have rec
14 ; M0BB 0001 we have rec
16 ; MM zz B2 B1 zz zz zz II
18 ; main byte from slave
20 ; where X is 1 iff we're expecting an `extra byte'
21 ; otherwise NN is the detection byte we're expecting
24 sc_extra equ 7 ; we're
26 slavetable_section udata 0x280
27 slavetable res maxpics * 2
31 ; 00DD0000 where D is 1 iff a detectors board
34 ;======================================================================
36 ;----------------------------------------
38 ; handles i2c interrupt using i2cm_interrupt[_definite],
39 ; according to the rules for <something>_intrl.
42 call i2cm_interrupt_definite
45 ;----------------------------------------
48 ; State Reading Reading-Wait
51 ; See detect.asm head comment for protocol info, in particular
52 ; the meaning of these bytes.
53 mov_wf t ; remember the byte for a moment
54 mov_lw slavetable >> 8
60 ; this is a first (head) byte:
74 bra_nz read_got_moredet
82 ;----------------------------------------
87 ;======================================================================