diff --git a/Marlin/src/gcode/eeprom/M500-M504.cpp b/Marlin/src/gcode/eeprom/M500-M504.cpp index 31da2c5adf840..c3962117e51f1 100644 --- a/Marlin/src/gcode/eeprom/M500-M504.cpp +++ b/Marlin/src/gcode/eeprom/M500-M504.cpp @@ -73,7 +73,7 @@ void GcodeSuite::M502() { bool success = true; for (uint16_t i = 0; success && i < sizeof(mc_zip); ++i) { const uint8_t c = pgm_read_byte(&mc_zip[i]); - file.write(c); + success = (file.write(c) == 1); } success = file.close() && success; diff --git a/Marlin/src/sd/SdBaseFile.cpp b/Marlin/src/sd/SdBaseFile.cpp index 4f4a8e9fa992e..5ee0db2b9e863 100644 --- a/Marlin/src/sd/SdBaseFile.cpp +++ b/Marlin/src/sd/SdBaseFile.cpp @@ -2169,7 +2169,7 @@ bool SdBaseFile::truncate(uint32_t length) { * include write() is called before a file has been opened, write is called * for a read-only file, device is full, a corrupt file system or an I/O error. */ -int16_t SdBaseFile::write(const void *buf, uint16_t nbyte) { +int16_t SdBaseFile::write(const void *buf, const uint16_t nbyte) { #if ENABLED(SDCARD_READONLY) writeError = true; return -1; #endif diff --git a/Marlin/src/sd/SdBaseFile.h b/Marlin/src/sd/SdBaseFile.h index 046c2447cb7a6..3ac23138b154b 100644 --- a/Marlin/src/sd/SdBaseFile.h +++ b/Marlin/src/sd/SdBaseFile.h @@ -345,7 +345,7 @@ class SdBaseFile { * \return SdVolume that contains this file. */ SdVolume* volume() const { return vol_; } - int16_t write(const void *buf, uint16_t nbyte); + int16_t write(const void *buf, const uint16_t nbyte); private: friend class SdFat; // allow SdFat to set cwd_ diff --git a/Marlin/src/sd/SdFile.cpp b/Marlin/src/sd/SdFile.cpp index ac5f6f923414d..a1dd793727479 100644 --- a/Marlin/src/sd/SdFile.cpp +++ b/Marlin/src/sd/SdFile.cpp @@ -67,11 +67,7 @@ int16_t SdFile::write(const void * const buf, const uint16_t nbyte) { return SdB * \param[in] b the byte to be written. * Use writeError to check for errors. */ -#if ARDUINO >= 100 - size_t SdFile::write(const uint8_t b) { return SdBaseFile::write(&b, 1); } -#else - void SdFile::write(const uint8_t b) { SdBaseFile::write(&b, 1); } -#endif +size_t SdFile::write(const uint8_t b) { return SdBaseFile::write(&b, 1); } /** * Write a string to a file. Used by the Arduino Print class. diff --git a/Marlin/src/sd/SdFile.h b/Marlin/src/sd/SdFile.h index b075239ebba79..cdce1ffe12e3c 100644 --- a/Marlin/src/sd/SdFile.h +++ b/Marlin/src/sd/SdFile.h @@ -42,12 +42,7 @@ class SdFile : public SdBaseFile { public: SdFile() {} SdFile(const char * const name, const uint8_t oflag); - #if ARDUINO >= 100 - size_t write(const uint8_t b); - #else - void write(const uint8_t b); - #endif - + size_t write(const uint8_t b); int16_t write(const void * const buf, const uint16_t nbyte); void write(const char * const str); void write_P(PGM_P str); diff --git a/buildroot/tests/STM32F103RE_creality b/buildroot/tests/STM32F103RE_creality index 66775597209a6..d407dc4301533 100755 --- a/buildroot/tests/STM32F103RE_creality +++ b/buildroot/tests/STM32F103RE_creality @@ -19,7 +19,7 @@ opt_enable DWIN_CREALITY_LCD_JYERSUI AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY exec_test $1 $2 "Ender-3 v2 with JyersUI" "$3" use_example_configs "Creality/Ender-3 S1/STM32F1" -opt_disable DWIN_CREALITY_LCD Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN AUTO_BED_LEVELING_BILINEAR CONFIGURATION_EMBEDDING CANCEL_OBJECTS FWRETRACT +opt_disable DWIN_CREALITY_LCD Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN AUTO_BED_LEVELING_BILINEAR CANCEL_OBJECTS FWRETRACT opt_enable DWIN_LCD_PROUI INDIVIDUAL_AXIS_HOMING_SUBMENU SET_PROGRESS_MANUALLY SET_PROGRESS_PERCENT STATUS_MESSAGE_SCROLLING \ SOUND_MENU_ITEM PRINTCOUNTER NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE FILAMENT_RUNOUT_SENSOR \ BLTOUCH Z_SAFE_HOMING AUTO_BED_LEVELING_UBL MESH_EDIT_MENU \