avr: reorder code (only need to load X if there is still something to do).
This commit is contained in:
@@ -55,14 +55,15 @@ Stats_Run:
|
||||
in r15, SREG
|
||||
push r15
|
||||
cli
|
||||
|
||||
lds r17, statsRemaining
|
||||
tst r17 ; some left?
|
||||
breq Stats_Run_done ; nope, jump to end
|
||||
|
||||
ldi xl, LOW(com2SendBuffer)
|
||||
ldi xh, HIGH(com2SendBuffer)
|
||||
ldi r16, 0xff ; broadcast
|
||||
|
||||
lds r17, statsRemaining
|
||||
tst r17
|
||||
breq Stats_Run_done
|
||||
|
||||
cpi r17, STATS_POS_RECV
|
||||
brne Stats_Run_l1
|
||||
rcall CPRO_WriteComRecvStats
|
||||
|
||||
Reference in New Issue
Block a user