use Eeprom_WriteByteIfChanged

This commit is contained in:
Martin Preuss
2025-07-07 21:43:28 +02:00
parent f3020562bf
commit e32e8e7c13

View File

@@ -271,14 +271,9 @@ appNetworkHandleStateHaveAddress2:
std Y+NET_IFACE_OFFS_STATETIMER, r16
; store new address in IFACE and in EEPROM
ldd r16, Y+NET_IFACE_OFFS_ADDRESS
push r15
in r15, SREG
cli
ldi xl, LOW(EEPROM_OFFS_COMADDR)
ldi xh, HIGH(EEPROM_OFFS_COMADDR)
bigcall Utils_WriteEepromIncr ; write address to EEPROM
out SREG, r15
pop r15
ldi xl, LOW(EEPROM_OFFS_COMADDR)
ldi xh, HIGH(EEPROM_OFFS_COMADDR)
bigcall Eeprom_WriteByteIfChanged ; write address to EEPROM (R17)
appNetworkHandleStateHaveAddress2_end:
ret