diff --git a/avr/att84_base.asm b/avr/att84_base.asm index 52b5995..65a3950 100644 --- a/avr/att84_base.asm +++ b/avr/att84_base.asm @@ -80,14 +80,6 @@ -; --------------------------------------------------------------------------- -; EEPROM positions - - -.equ EEPROM_OFFS_UUID = 0 ; 4 bytes (occupy total of 8 bytes for extensibility) -.equ EEPROM_OFFS_COMADDR = 8 ; 1 byte - - ; --------------------------------------------------------------------------- ; COM module diff --git a/avr/att84_temp1.asm b/avr/att84_temp1.asm index 3f189b4..dc964a5 100644 --- a/avr/att84_temp1.asm +++ b/avr/att84_temp1.asm @@ -101,14 +101,6 @@ -; --------------------------------------------------------------------------- -; EEPROM positions - - -.equ EEPROM_OFFS_UUID = 0 ; 4 bytes (occupy total of 8 bytes for extensibility) -.equ EEPROM_OFFS_COMADDR = 8 ; 1 byte - - ; --------------------------------------------------------------------------- ; COM module @@ -239,7 +231,7 @@ ;.include "comproto_debug.asm" ;.include "comproto_twi.asm" .include "twimaster.asm" -.include "lcd.asm" +;.include "lcd.asm" .include "si7021.asm" @@ -249,8 +241,6 @@ .dseg -ledA3Sram: .byte LED_SRAM_SIZE - diff --git a/avr/com.asm b/avr/com.asm index 0706d97..29ec960 100644 --- a/avr/com.asm +++ b/avr/com.asm @@ -12,7 +12,7 @@ ; *************************************************************************** ; defines -.equ COM_MAXWAIT = 200 ; maximum loop count when waiting for rising/falling clock (TODO: Make frequency-dependant) +.equ COM_MAXWAIT_US = 100 ; maximum wait time in microseconds when waiting for rising/falling clock .equ COM_MAINTENANCE_ADDR = 0xf1 @@ -94,6 +94,8 @@ comDataEnd: .cseg +COM_BEGIN: + comIsrPcint0: push r15 @@ -213,33 +215,6 @@ COM_EnqueuePacket: -; --------------------------------------------------------------------------- -; COM_AllocBufferAndGetXY -; -; IN: -; - nothing -; OUT: -; - CFLAG: set if okay, clear otherwise -; - Y: pointer to buffer -; - X: pointer to data portion of the buffer -; MODIFIED REGS: R16, R17 (R21) - -COM_AllocBufferAndGetXY: - rcall COM_BufferAlloc ; (r16, r17, r21) - brcc COM_AllocBufferAndGetXY_error - mov xl, yl - mov xh, yh - adiw xh:xl, COM_BUFFER_OFFS_DATA - sec - ret -COM_AllocBufferAndGetXY_error: - ldi xl, LOW(comStatsSendNoBuffer) - ldi xh, HIGH(comStatsSendNoBuffer) - clc - ret - - - ; --------------------------------------------------------------------------- ; comHandleNextPacketInQueue ; @@ -325,3 +300,6 @@ comHandleReceivedPacket_l2: +COM_END: +.equ MODULE_SIZE_COM = COM_END-COM_BEGIN + diff --git a/avr/com_buffer.asm b/avr/com_buffer.asm index ef40ab9..7d1d496 100644 --- a/avr/com_buffer.asm +++ b/avr/com_buffer.asm @@ -15,6 +15,35 @@ .cseg +COM_BUFFER_BEGIN: + + +; --------------------------------------------------------------------------- +; COM_AllocBufferAndGetXY +; +; IN: +; - nothing +; OUT: +; - CFLAG: set if okay, clear otherwise +; - Y: pointer to buffer +; - X: pointer to data portion of the buffer +; MODIFIED REGS: R16, R17 (R21) + +COM_AllocBufferAndGetXY: + rcall COM_BufferAlloc ; (r16, r17, r21) + brcc COM_AllocBufferAndGetXY_error + mov xl, yl + mov xh, yh + adiw xh:xl, COM_BUFFER_OFFS_DATA + sec + ret +COM_AllocBufferAndGetXY_error: + ldi xl, LOW(comStatsSendNoBuffer) + ldi xh, HIGH(comStatsSendNoBuffer) + clc + ret + + ; --------------------------------------------------------------------------- ; COM_BufferAlloc @@ -170,5 +199,8 @@ COM_BufferPosToY: ret +COM_BUFFER_END: +.equ MODULE_SIZE_COM_BUFFER = COM_BUFFER_END-COM_BUFFER_BEGIN + diff --git a/avr/com_crc.asm b/avr/com_crc.asm index 3eac6a4..97d3355 100644 --- a/avr/com_crc.asm +++ b/avr/com_crc.asm @@ -22,6 +22,8 @@ .cseg +COM_CRC_BEGIN: + ; --------------------------------------------------------------------------- @@ -135,3 +137,7 @@ cproCalcCrc8_l1: ret +COM_CRC_END: +.equ MODULE_SIZE_COM_CRC = COM_CRC_END-COM_CRC_BEGIN + + diff --git a/avr/com_lowlevel.asm b/avr/com_lowlevel.asm index f471e9a..a06a140 100644 --- a/avr/com_lowlevel.asm +++ b/avr/com_lowlevel.asm @@ -16,6 +16,8 @@ .cseg +COM_LOWLEVEL_BEGIN: + ; --------------------------------------------------------------------------- ; comSendByte @@ -114,19 +116,19 @@ comReceiveByte_error: ; --------------------------------------------------------------------------- ; comWaitForDataLow ; -; Waits up to COM_MAXWAIT loops for low data line +; Waits up to COM_MAXWAIT_US loops for low data line ; IN: ; OUT: ; - CFLAG: set if okay, clear otherwise ; MODIFIED REGISTERS: r17, r22 comWaitForDataLow: - ldi r17, COM_MAXWAIT + ldi r17, COM_MAXWAIT_US comWaitForDataLow_loop: sbis COM_PIN_DATA, COM_PINNUM_DATA rjmp comWaitForDataLow_done - Utils_WaitNanoSecs 100, 0, r22 ; wait for 100 nanosecs + rcall comWaitFor1000ns dec r17 brne comWaitForDataLow_loop clc ; timeout @@ -141,19 +143,19 @@ comWaitForDataLow_done: ; --------------------------------------------------------------------------- ; comWaitForDataHigh ; -; Waits up to COM_MAXWAIT loops for high data line +; Waits up to COM_MAXWAIT_US loops for high data line ; IN: ; OUT: ; - CFLAG: set if okay, clear otherwise ; MODIFIED REGISTERS: r17, r22, X comWaitForDataHigh: - ldi r17, COM_MAXWAIT + ldi r17, COM_MAXWAIT_US comWaitForDataHigh_loop: sbic COM_PIN_DATA, COM_PINNUM_DATA rjmp comWaitForDataHigh_done - Utils_WaitNanoSecs 100, 0, r22 ; wait for 100 nanosecs + rcall comWaitFor1000ns dec r17 brne comWaitForDataHigh_loop clc ; timeout @@ -168,19 +170,19 @@ comWaitForDataHigh_done: ; --------------------------------------------------------------------------- ; comWaitForAttnHigh ; -; Waits up to COM_MAXWAIT loops for high ATTN line +; Waits up to COM_MAXWAIT_US loops for high ATTN line ; IN: ; OUT: ; - CFLAG: set if okay, clear otherwise ; MODIFIED REGISTERS: r17, r22, X comWaitForAttnHigh: - ldi r17, COM_MAXWAIT + ldi r17, COM_MAXWAIT_US comWaitForAttnHigh_loop: sbic COM_PIN_ATTN, COM_PINNUM_ATTN rjmp comWaitForAttnHigh_done - Utils_WaitNanoSecs 100, 0, r22 ; wait for 100 nanosecs + rcall comWaitFor1000ns dec r17 brne comWaitForAttnHigh_loop clc ; timeout @@ -192,3 +194,22 @@ comWaitForAttnHigh_done: +; --------------------------------------------------------------------------- +; comWaitFor100ns +; +; Waits for 100 nanoseconds. +; IN: +; OUT: +; - CFLAG: set if okay, clear otherwise +; MODIFIED REGISTERS: r17, r22, X + +comWaitFor1000ns: + Utils_WaitNanoSecs 1000, 7, r22 ; wait for 100 nanosecs (minus 3 cycles for rcall, 4 for ret) + ret + + +COM_LOWLEVEL_END: +.equ MODULE_SIZE_COM_LOWLEVEL = COM_LOWLEVEL_END-COM_LOWLEVEL_BEGIN + + + diff --git a/avr/com_recv.asm b/avr/com_recv.asm index 59ceee5..0843537 100644 --- a/avr/com_recv.asm +++ b/avr/com_recv.asm @@ -15,6 +15,7 @@ .cseg +COM_RECV_BEGIN: ; --------------------------------------------------------------------------- @@ -154,5 +155,7 @@ comReceivePacketToSram_error: ret +COM_RECV_END: +.equ MODULE_SIZE_COM_RECV = COM_RECV_END-COM_RECV_BEGIN diff --git a/avr/com_send.asm b/avr/com_send.asm index bb5323d..b153ea4 100644 --- a/avr/com_send.asm +++ b/avr/com_send.asm @@ -15,6 +15,9 @@ .cseg +COM_SEND_BEGIN: + + ; --------------------------------------------------------------------------- ; comSendPacketHandleRepeat @@ -205,4 +208,7 @@ comDeallocReadBufAndIncrCounter: +COM_SEND_END: +.equ MODULE_SIZE_COM_SEND = COM_SEND_END-COM_SEND_BEGIN + diff --git a/avr/comproto.asm b/avr/comproto.asm index 57ed758..4509e51 100644 --- a/avr/comproto.asm +++ b/avr/comproto.asm @@ -95,6 +95,8 @@ cproDataEnd: .cseg +CPRO_BEGIN: + CPRO_Init: ; preset SRAM data area @@ -347,6 +349,8 @@ cproCalcPayloadSize_l2: ret +CPRO_END: +.equ MODULE_SIZE_CPRO = CPRO_END-CPRO_BEGIN diff --git a/avr/comproto_addr.asm b/avr/comproto_addr.asm index c155e3b..eaedea2 100644 --- a/avr/comproto_addr.asm +++ b/avr/comproto_addr.asm @@ -67,7 +67,7 @@ CPRO_StartReclaimAddrProcedure: ldi xh, HIGH(EEPROM_OFFS_COMADDR) in r15, SREG cli - rcall Utils_ReadEeprom ; (R16) + rcall Utils_ReadEepromIncr ; (R16) tst r16 breq CPRO_StartReclaimAddrProcedure_l1 cpi r16, 0xff @@ -179,7 +179,7 @@ cproHandle1sClaimingAddr3: sts comAddress, r16 ; write address into eeprom ldi xl, LOW(EEPROM_OFFS_COMADDR) ldi xh, HIGH(EEPROM_OFFS_COMADDR) - rcall Utils_WriteEeprom ; write address to EEPROM + rcall Utils_WriteEepromIncr ; write address to EEPROM ldi r16, CPRO_MODE_NORMAL ; set mode to "normal" sts cproMode, r16 rcall CPRO_EnqueueHaveAddress @@ -374,7 +374,7 @@ cproFindFreeAddr: ldi xh, HIGH(cproUsedAddresses) lds r16, cproAddrRangeBegin dec r16 - rcall Utils_GetPosAndMaskInBitField ; r1=bit pos, r2=mask (r1, r2, r17, Z) + rcall CPRO_GetPosAndMaskInBitField ; r1=bit pos, r2=mask (r1, r2, r17, Z) clr r17 add xl, r1 adc xh, r17 ; X: pointer to byte @@ -427,7 +427,7 @@ cproFindFreeAddr_allFull: cproSetBitInBitfield: ; set bit corresponding to given address in bitfield of used addresses - rcall Utils_GetPosAndMaskInBitField ; get offset into R1, mask into R2 (r1, r2, r17, Z) + rcall CPRO_GetPosAndMaskInBitField ; get offset into R1, mask into R2 (r1, r2, r17, Z) ldi xl, LOW(cproUsedAddresses) ldi xh, HIGH(cproUsedAddresses) clr r17 @@ -539,4 +539,34 @@ cproEnqueueAddressPacket_error: +; --------------------------------------------------------------------------- +; Get offset and mask for a given bit in a bitfield +; IN: +; - R16: bit to request position for +; OUT: +; - R1: offset into the bitfield to the byte containing the given bit +; - R2: mask for given id (apply to r1) +; USED REGISTERS: r1, r2, r17, Z + +CPRO_GetPosAndMaskInBitField: + mov r1, r16 ; divide by 8 to get the offset to the byte containing the given module id + lsr r1 + lsr r1 + lsr r1 ; r1=offset of the byte holding the given bit + mov r2, r16 ; get bit mask for bit position in table byte + ldi r17, 7 ; keep lower 3 bits + and r2, r17 + ldi zh, HIGH(cproModuleBitNumToMaskMap*2) + ldi zl, LOW(cproModuleBitNumToMaskMap*2) + add zl, r2 + brcc CPRO_GetPosAndMaskInBitField_noOverflow + inc zh +CPRO_GetPosAndMaskInBitField_noOverflow: + lpm r2, z ; r2=mask for bit in byte from bitfield + ret + + +cproModuleBitNumToMaskMap: + .db 1, 2, 4, 8, 16, 32, 64, 128 + diff --git a/avr/com_twi.asm b/avr/comproto_twi.asm similarity index 100% rename from avr/com_twi.asm rename to avr/comproto_twi.asm diff --git a/avr/defs.asm b/avr/defs.asm index b754be0..e337175 100644 --- a/avr/defs.asm +++ b/avr/defs.asm @@ -29,3 +29,12 @@ .equ AQHOME_FW_START_ADDRESS_MAIN = 0x0500 +; --------------------------------------------------------------------------- +; EEPROM positions + + +.equ EEPROM_OFFS_UUID = 0 ; 4 bytes (occupy total of 8 bytes for extensibility) +.equ EEPROM_OFFS_COMADDR = 8 ; 1 byte +.equ EEPROM_OFFS_SEED = 10 ; 2 bytes + + diff --git a/avr/flash.asm b/avr/flash.asm index 01f12e7..cac5699 100644 --- a/avr/flash.asm +++ b/avr/flash.asm @@ -18,6 +18,9 @@ .cseg +FLASH_BEGIN: + + ; --------------------------------------------------------------------------- ; start flashing a page ; @@ -169,3 +172,10 @@ wait: ; wait for possibly previous SPM to complete out SPMCSR, r20 spm ret + + +FLASH_END: +.equ MODULE_SIZE_FLASH = FLASH_END-FLASH_BEGIN + + + diff --git a/avr/lcd.asm b/avr/lcd.asm index 13a47b8..671d53a 100644 --- a/avr/lcd.asm +++ b/avr/lcd.asm @@ -57,6 +57,8 @@ lcdDataEnd: .cseg +LCD_BEGIN: + ; --------------------------------------------------------------------------- @@ -812,4 +814,6 @@ lcdFont6x8: #endif +LCD_END: +.equ MODULE_SIZE_LCD = LCD_END-LCD_BEGIN diff --git a/avr/led.asm b/avr/led.asm index 26e648a..3195aa4 100644 --- a/avr/led.asm +++ b/avr/led.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + ; *************************************************************************** ; defs @@ -23,6 +34,8 @@ .cseg +LED_BEGIN: + ; --------------------------------------------------------------------------- ; Led_Init @@ -304,4 +317,8 @@ ledOn_end: +LED_END: +.equ MODULE_SIZE_LED = LED_END-LED_BEGIN + + diff --git a/avr/main.asm b/avr/main.asm index b1bfe32..63e6aea 100644 --- a/avr/main.asm +++ b/avr/main.asm @@ -8,10 +8,30 @@ ; *************************************************************************** +; *************************************************************************** +; data in SRAM + +.dseg + + +#ifdef MODULES_LED + ledA3Sram: .byte LED_SRAM_SIZE +#endif + + + +; *************************************************************************** +; code + .cseg + +; --------------------------------------------------------------------------- +; main +; + main: ; setup stack .ifdef SPH ; if SPH is defined diff --git a/avr/ringbuffer.asm b/avr/ringbuffer.asm index 7b953cd..2695309 100644 --- a/avr/ringbuffer.asm +++ b/avr/ringbuffer.asm @@ -22,6 +22,8 @@ .cseg +RINGBUFFER_BEGIN: + ; *************************************************************************** @@ -247,5 +249,7 @@ RingBuffer_Read_end: +RINGBUFFER_END: +.equ MODULE_SIZE_RINGBUFFER = RINGBUFFER_END-RINGBUFFER_BEGIN diff --git a/avr/si7021.asm b/avr/si7021.asm index d2dc863..81121b1 100644 --- a/avr/si7021.asm +++ b/avr/si7021.asm @@ -39,6 +39,8 @@ si7021DataEnd: .cseg +SI7021_BEGIN: + ; --------------------------------------------------------------------------- @@ -439,6 +441,7 @@ si7021Muls16x16_32_done: ; ret - +SI7021_END: +.equ MODULE_SIZE_SI7021 = SI7021_END-SI7021_BEGIN diff --git a/avr/timer.asm b/avr/timer.asm index 3608dff..f1d4454 100644 --- a/avr/timer.asm +++ b/avr/timer.asm @@ -42,6 +42,8 @@ timerModuleData_end: .cseg +TIMER_BEGIN: + ; number of entries here must be equal to bytes in timerModuleDerivedCounters! timerTable: @@ -319,6 +321,8 @@ timerIrq2_l2: +TIMER_END: +.equ MODULE_SIZE_TIMER = TIMER_END-TIMER_BEGIN diff --git a/avr/twimaster.asm b/avr/twimaster.asm index 72c5a9d..9a8f8d3 100644 --- a/avr/twimaster.asm +++ b/avr/twimaster.asm @@ -34,6 +34,7 @@ twiMasterDataEnd: .cseg +TWIMASTER_BEGIN: ; --------------------------------------------------------------------------- @@ -435,4 +436,6 @@ TWI_Master_ScanNext_end: +TWIMASTER_END: +.equ MODULE_SIZE_TWIMASTER = TWIMASTER_END-TWIMASTER_BEGIN diff --git a/avr/utils.asm b/avr/utils.asm index e087c22..9bb1df8 100644 --- a/avr/utils.asm +++ b/avr/utils.asm @@ -75,6 +75,9 @@ utilsDataEnd: .cseg +UTILS_BEGIN: + + utilsDateString: .db "%YEAR%-%MONTH%-%DAY%-%HOUR%:%MINUTE%", 0, 0 @@ -86,50 +89,17 @@ utilsDateString: .db "%YEAR%-%MONTH%-%DAY%-%HOUR%:%MINUTE%", 0, 0 ; IN: ; OUT: ; - CFLAG: set if okay, clear on error -; USED: R16, R17, R18, R24, R25, X, Y +; USED: R16, R17, R18, R19, X, (R20, R21, R24, R25, X, Z) Utils_Init: - ; preset initial seed from compile date string - ldi zl, LOW(utilsDateString*2) - ldi zh, HIGH(utilsDateString*2) - ldi r18, 0xe1 - ldi r19, 0xac -Utils_Init_l1: - lpm r16, Z+ - tst r16 - breq Utils_Init_l2 - eor r18, r16 - - clc - sbrc r19, 7 - sec ; only executed if bit 7 is set in r19 - rol r18 - rol r19 - rjmp Utils_Init_l1 -Utils_Init_l2: - - ; build initial SRAM content into intial seed - ldi xl, LOW(SRAM_START) - ldi xh, HIGH(SRAM_START) - ldi r24, LOW(RAMEND-SRAM_START) - ldi r25, HIGH(RAMEND-SRAM_START) -Utils_Init_l3: - ld r16, X+ - eor r18, r16 - clc - sbrc r19, 7 - sec ; only executed if bit 7 is set in r19 - rol r18 - rol r19 - sbiw r25:r24, 1 - brne Utils_Init_l3 + rcall utilsSetupSeed ; (R16, R18, R19, R20, R21, R24, R25, X, Z) ; preset SRAM data area ldi xh, HIGH(utilsDataBegin) ldi xl, LOW(utilsDataBegin) clr r16 ldi r17, (utilsDataEnd-utilsDataBegin) - rcall Utils_FillSram + rcall Utils_FillSram ; (r17, x) sts utilsSeed, r18 sts utilsSeed+1, r19 @@ -139,6 +109,112 @@ Utils_Init_l3: +; --------------------------------------------------------------------------- +; setup seed +; +; IN: +; OUT: +; REGS: R16, R18, R19, R20, R21, R24, R25, X, Z + +utilsSetupSeed: + rcall Utils_ReadSeed + mov r20, r18 + mov r21, r19 + + ; default initial seed + ldi r18, 0xe1 + ldi r19, 0xac + + ; work stored seed into it + mov r16, r20 + rcall utilsWorkByteIntoSeed + mov r16, r21 + rcall utilsWorkByteIntoSeed + + ; work date string into seed + ldi zl, LOW(utilsDateString*2) + ldi zh, HIGH(utilsDateString*2) + rcall utilsWorkProgStringIntoSeed ; (R16, Z) + + ; work sram content into seed + rcall utilsWorkSramContentIntoSeed ; (R16, R24, R25, X) + + ; store seed in EEPROM + rcall Utils_WriteSeed ; (R16, R17, X) + ret + + + +; --------------------------------------------------------------------------- +; utilsWorkProgStringIntoSeed +; +; IN: +; - Z : pointer to string to work into seed +; - R18: low byte of current seed +; - R19: high byte of current seed +; OUT: +; - R18: low byte of updated seed +; - R19: high byte of updated seed +; USED: R16, Z + +utilsWorkProgStringIntoSeed: + lpm r16, Z+ + tst r16 + breq utilsWorkProgStringIntoSeed_done + rcall utilsWorkByteIntoSeed + rjmp utilsWorkProgStringIntoSeed +utilsWorkProgStringIntoSeed_done: + ret + + + +; --------------------------------------------------------------------------- +; utilsWorkSramContentIntoSeed +; IN: +; - Z : pointer to string to work into seed +; - R18: low byte of current seed +; - R19: high byte of current seed +; OUT: +; - R18: low byte of updated seed +; - R19: high byte of updated seed +; USED: R16, R24, R25, X + +utilsWorkSramContentIntoSeed: + ldi xl, LOW(SRAM_START) + ldi xh, HIGH(SRAM_START) + ldi r24, LOW(RAMEND-SRAM_START) + ldi r25, HIGH(RAMEND-SRAM_START) +utilsWorkSramContentIntoSeed_loop: + ld r16, X+ + rcall utilsWorkByteIntoSeed + sbiw r25:r24, 1 + brne utilsWorkSramContentIntoSeed_loop + ret + + + +; --------------------------------------------------------------------------- +; utilsWorkByteIntoSeed +; +; IN: +; - R16: byte to work into the seed +; - R18: low byte of current seed +; - R19: high byte of current seed +; OUT: +; - R18: low byte of updated seed +; - R19: high byte of updated seed +; USED: + +utilsWorkByteIntoSeed: + eor r18, r16 + clc + sbrc r19, 7 + sec ; only executed if bit 7 is set in r19 + rol r18 + rol r19 + ret + + ; --------------------------------------------------------------------------- ; Utils_Fini ; @@ -230,7 +306,7 @@ Utils_IncrementCounter16: ; --------------------------------------------------------------------------- -; Utils_ReadEeprom +; Utils_ReadEepromIncr ; ; Read a byte from EEPROM (see example in ATtiny24/44/84 manual p.19). ; @@ -238,34 +314,36 @@ Utils_IncrementCounter16: ; - X: EEPROM Address to read from ; OUT: ; - R16: byte read +; - X: EEPROM Address incremented ; MODIFIED REGISTERS: R16 -Utils_ReadEeprom: +Utils_ReadEepromIncr: sbic EECR, EEPE ; wait for previous write to complete (if any) - rjmp Utils_ReadEeprom + rjmp Utils_ReadEepromIncr out EEARH, xh ; set EEPROM address out EEARL, xl sbi EECR, EERE ; start EEPROM read by writing EERE in r16, EEDR ; read data from data register + adiw xh:xl, 1 ret ; --------------------------------------------------------------------------- -; Utils_WriteEeprom +; Utils_WriteEepromIncr ; ; Write a byte to EEPROM (see example in ATtiny24/44/84 manual p.18). ; ; IN: ; - R16: byte to write -; - X: EEPROM Address to read from +; - X: EEPROM Address to write to ; OUT: -; - nothing +; - X: EEPROM Address incremented ; MODIFIED REGISTERS: R17 -Utils_WriteEeprom: +Utils_WriteEepromIncr: sbic EECR, EEPE ; wait for previous write to complete (if any) - rjmp Utils_WriteEeprom + rjmp Utils_WriteEepromIncr ldi r17, (0<