Skip to content

Commit 8416a2c

Browse files
iMartyncmaglie
authored andcommitted
Fixed EEPE flag check.
Here, using the flag itself makes the bootloader build where it currently does not for the 328 amongst others
1 parent 25e6420 commit 8416a2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bootloaders/atmega/ATmegaBOOT_168.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ int main(void)
578578
/* if ((length.byte[0] & 0x01) == 0x01) length.word++; //Even up an odd number of bytes */
579579
if ((length.byte[0] & 0x01)) length.word++; //Even up an odd number of bytes
580580
cli(); //Disable interrupts, just to be sure
581-
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__)
581+
#if defined(EEPE)
582582
while(bit_is_set(EECR,EEPE)); //Wait for previous EEPROM writes to complete
583583
#else
584584
while(bit_is_set(EECR,EEWE)); //Wait for previous EEPROM writes to complete

0 commit comments

Comments
 (0)