set_f scanc
set_f scand
set_f scane
+ set_f last1
+ set_f last2
mov_ff buf0_startval, buf0
return
udata_acs
-sspstat res 1
-sspcon1 res 1
+sspstat res 1 ; master only
+sspcon1 res 1 ; master only
sspcon2 res 1 ; master only
slave res 1 ; master only
slave_next res 1 ; master only
mov_lw slavetable & 0xff
mov_wf cslot
clr_f cbyte
+ bs_f cbyte, cbyte_halted ; serial output of `hello' will start us up
clr_f wslave
mov_lw 2
URM
UCI
UCP
+UPC
USP
# Messages for i2clib, S*
clr_fa fromserial ; for loc'n of write-from-usart ptr in buffers
clr_fa totrack ; for loc'n of send-to-track ptr in buffers
; all in access bank
-
+ clr_f acknmra
debug 'c' ; write 'c' to serial port
;----------------------------------------------------------------------------
return
;======================================================================
+; MASTER
+
+;----------------------------------------------------------------------
+points_master_init
+ clr_f pointslave
+ clr_f pointmsg
+ return
;----------------------------------------------------------------------
command_point
and_lw 0x06 ; W = 0000 0ss0
ior_wff pointslave ; pointslave = 00SS Sss0
+ panic morse_UPC ; should check that this slave exists
rr_fw pointslave ; W = 000S SSss
bra_nz point_needwrite_yes
bs_f RCON, IPEN ; interrupt priorities
call idlocs_init
+ clr_f flags
bt_f_if0 idloc1,idloc1_master
call slave_init
call i2cm_init
call serialtxbuf_init
call polarity_master_init
+ call points_master_init
call common_local_init
call serial_init
call nmra_init
xdebug res 8
cwslave res 1 ; slave we're currently actually writing to
+ ; undefined except in <something>_needwrite
qqtrislat_start equ 0x50
qqtrislat_section udata qqtrislat_start