AVR: More work on address assignment procedure.

This commit is contained in:
Martin Preuss
2023-02-06 21:09:38 +01:00
parent 012e33aea1
commit df70342ff3
3 changed files with 118 additions and 40 deletions

View File

@@ -132,14 +132,8 @@ Com_Init:
ldi r17, (comDataEnd-comDataBegin)
rcall Utils_FillSram
; read address from EEPROM
ldi xl, LOW(EEPROM_OFFS_COMADDR)
ldi xh, HIGH(EEPROM_OFFS_COMADDR)
rcall Utils_ReadEeprom ; (R16)
cpi r16, 0xff
brne Com_Init_l1
; set address to 0 (will be updated later)
clr r16
Com_Init_l1:
sts comAddress, r16
; setup pins and interrupts