diff --git a/EEPROMex.cpp b/EEPROMex.cpp index 0fdc5e9..880a502 100644 --- a/EEPROMex.cpp +++ b/EEPROMex.cpp @@ -99,7 +99,11 @@ int EEPROMClassEx::getAddress(int noOfBytes){ * Check if EEPROM memory is ready to be accessed */ bool EEPROMClassEx::isReady() { +#if defined(ARDUINO_ARCH_MEGAAVR) //work around a bug in + return bit_is_clear(NVMCTRL.STATUS,NVMCTRL_EEBUSY_bp); +#else return eeprom_is_ready(); +#endif } /**