;----------------------------------------
; MASTER - Access bank variables and other sections
-polarities_commanded_buffer_section udata 0x5f
-polarities_commanded_buffer res maxpics+1
+polarity_cmds equ 0x5f
+polarity_cmds_section udata polarity_cmds
+ res maxpics+1
; Each byte is:
; 11RRRRRR reverse command for slave, waiting to write
; 00000001 this is not a reversers pic
; and so on until f for bit 5. (See polarity_do_here, below.)
;
; we accumulate (`gather') the `g' bits in t.
- mov_lfsr polarities_commanded_buffer, 1
+ mov_lfsr polarity_cmds, 1
mov_fw POSTINC0 ; W = 10010RRR
mov_wf t ; t = 10010ggg
xor_lw b'10001000' ; t = 00011ggg
call power_polarising
- mov_fw polarities_commanded_buffer ; there's always a board 0, us
+ mov_fw polarity_cmds ; there's always a board 0, us
call polarity_local_do
rcall needwrite_polarity ; does `return' because it will find one
return ; ... or maybe not if only 1 rev board
; if we _do_, it will store the slave no. in needwrite_slave
; and then pop and return
; nb register usage may need to be adjusted for wiring into mascan i2cm_...
- mov_lfsr polarities_commanded_buffer, 0
+ mov_lfsr polarity_cmds, 0
polarity_needwrite_loop
rlc_fw PREINC1 ; W = 1RRRRRR? C=1 reverse command
; W = 0000001? C=0 not a reversers pic
; we found a pic to tell to polarise:
mov_fw FSR1L
- add_lw -polarities_commanded_buffer
+ add_lw -polarity_cmds
mov_wf needwrite_slave
pop
return
;----------------------------------------------------------------------
polarity_master_init
- panic morse_RIM
- ; need to set up polarities_commanded_buffer
+ panic morse_URM
+ ; need to set up polarity_cmds
;======================================================================
include final.inc