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 xh
push xl push xl
rcall COM2_BeginMsgWithVariablePayload ; (R3, R4, R16, R17, R18, R19, R20, R21, X) rcall COM2_BeginMsgWithVariablePayload ; (R3, R4, R16, R17, R18, R19, R20, R21, X)
lds r16, com2StatsPacketsOut ; packets out push yh
st X+, r16 push yl
lds r16, com2StatsPacketsOut+1 ldi yh, HIGH(com2SendStatsBegin)
st X+, r16 ldi yl, LOW(com2SendStatsBegin)
lds r16, com2StatsCollisions ; collisions ldi r18, 6
st X+, r16 rcall Utils_Copy_SDRAM ; (R17, R18, X, Y)
lds r16, com2StatsCollisions+1 pop yl
st X+, r16 pop yh
lds r16, com2StatsBusyError ; busy
st X+, r16
lds r16, com2StatsBusyError+1
st X+, r16
pop xl pop xl
pop xh pop xh
rcall com2CalcAndAddChecksumByte ; (R16, R17, R18, R19, X) rcall com2CalcAndAddChecksumByte ; (R16, R17, R18, R19, X)