avr: shorten CPRO_WriteComSendStats

This commit is contained in:
Martin Preuss
2024-09-05 18:49:19 +02:00
parent 026d4a57fb
commit cb6e21715a

View File

@@ -32,18 +32,14 @@ CPRO_WriteComSendStats:
push xh
push xl
rcall COM2_BeginMsgWithVariablePayload ; (R3, R4, R16, R17, R18, R19, R20, R21, X)
lds r16, com2StatsPacketsOut ; packets out
st X+, r16
lds r16, com2StatsPacketsOut+1
st X+, r16
lds r16, com2StatsCollisions ; collisions
st X+, r16
lds r16, com2StatsCollisions+1
st X+, r16
lds r16, com2StatsBusyError ; busy
st X+, r16
lds r16, com2StatsBusyError+1
st X+, r16
push yh
push yl
ldi yh, HIGH(com2SendStatsBegin)
ldi yl, LOW(com2SendStatsBegin)
ldi r18, 6
rcall Utils_Copy_SDRAM ; (R17, R18, X, Y)
pop yl
pop yh
pop xl
pop xh
rcall com2CalcAndAddChecksumByte ; (R16, R17, R18, R19, X)