Skip to content

Commit 8f5ca0a

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 da243c9 commit 8f5ca0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hardware/arduino/avr/bootloaders/atmega/ATmegaBOOT_168.c

Lines changed: 1 addition & 1 deletion
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)