avr: decreased verbosity. minor fixes.

- address claiming modes now work
This commit is contained in:
Martin Preuss
2023-04-12 23:32:08 +02:00
parent ded08b8c47
commit 86b45a58e5
8 changed files with 70 additions and 131 deletions

View File

@@ -11,7 +11,8 @@
; ***************************************************************************
; defines
.equ STATS_POS_MAX = 3
.equ STATS_POS_MAX = 4
.equ STATS_POS_SEND = 4
.equ STATS_POS_RECV = 3
.equ STATS_POS_SYS = 2
.equ STATS_POS_MEM = 1
@@ -77,11 +78,16 @@ Stats_Run_l2:
rcall CPRO_WriteMemStats
rjmp Stats_Run_SendPacket
Stats_Run_l3:
cpi r17, STATS_POS_SEND
brne Stats_Run_l4
rcall CPRO_WriteComSendStats
rjmp Stats_Run_SendPacket
Stats_Run_l4:
; add more stats here
rjmp Stats_Run_done
Stats_Run_SendPacket:
rcall COM2_SendPacket
brcc Stats_Run_done ; only decreemnt counter if message successfully sent
brcc Stats_Run_done ; only decrement counter if message successfully sent
lds r16, statsRemaining
dec r16
sts statsRemaining, r16