diff options
author | Martyn Ranyard <ranyardm@gmail.com> | 2012-11-02 19:16:54 +0000 |
---|---|---|
committer | Cristian Maglie <c.maglie@arduino.cc> | 2015-07-14 12:28:13 +0200 |
commit | 8416a2c0ca83af0be3db3d9c9dfe14f33a4830db (patch) | |
tree | 6c29543e73ae4d2841b5d4a1f7a98c909aa82549 /bootloaders/atmega/ATmegaBOOT_168.c | |
parent | 25e642084aebfd2e0b242ec45c6bd6fb95b3240b (diff) |
Fixed EEPE flag check.
Here, using the flag itself makes the bootloader build where it currently does not for the 328 amongst others
Diffstat (limited to 'bootloaders/atmega/ATmegaBOOT_168.c')
-rw-r--r-- | bootloaders/atmega/ATmegaBOOT_168.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bootloaders/atmega/ATmegaBOOT_168.c b/bootloaders/atmega/ATmegaBOOT_168.c index ff21903..90899a2 100644 --- a/bootloaders/atmega/ATmegaBOOT_168.c +++ b/bootloaders/atmega/ATmegaBOOT_168.c @@ -578,7 +578,7 @@ int main(void) /* if ((length.byte[0] & 0x01) == 0x01) length.word++; //Even up an odd number of bytes */
if ((length.byte[0] & 0x01)) length.word++; //Even up an odd number of bytes
cli(); //Disable interrupts, just to be sure
-#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__)
+#if defined(EEPE)
while(bit_is_set(EECR,EEPE)); //Wait for previous EEPROM writes to complete
#else
while(bit_is_set(EECR,EEWE)); //Wait for previous EEPROM writes to complete
|