mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-02 13:24:12 +01:00
Fixed EEPE flag check.
Here, using the flag itself makes the bootloader build where it currently does not for the 328 amongst others
This commit is contained in:
parent
da243c9e09
commit
8f5ca0a943
@ -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) == 0x01) length.word++; //Even up an odd number of bytes */
|
||||||
if ((length.byte[0] & 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
|
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
|
while(bit_is_set(EECR,EEPE)); //Wait for previous EEPROM writes to complete
|
||||||
#else
|
#else
|
||||||
while(bit_is_set(EECR,EEWE)); //Wait for previous EEPROM writes to complete
|
while(bit_is_set(EECR,EEWE)); //Wait for previous EEPROM writes to complete
|
||||||
|
Loading…
Reference in New Issue
Block a user