From e7c4a868309f00656e28d1b2d3cda03913695073 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 23 Jan 2023 01:10:16 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Fix=20D5=20?= =?UTF-8?q?warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/gcode_d.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Marlin/src/gcode/gcode_d.cpp b/Marlin/src/gcode/gcode_d.cpp index aabc6e9d44..be431eed0d 100644 --- a/Marlin/src/gcode/gcode_d.cpp +++ b/Marlin/src/gcode/gcode_d.cpp @@ -156,11 +156,8 @@ void GcodeSuite::D(const int16_t dcode) { } break; case 5: { // D5 Read / Write onboard Flash - #ifdef MARLIN_EEPROM_SIZE - #define ONBOARD_FLASH_SIZE MARLIN_EEPROM_SIZE - #else - #define ONBOARD_FLASH_SIZE 1024 // 0x400 - #endif + // This will overwrite program and data, so don't use it. + #define ONBOARD_FLASH_SIZE 1024 // 0x400 uint8_t *pointer = parser.hex_adr_val('A'); uint16_t len = parser.ushortval('C', 1); uintptr_t addr = (uintptr_t)pointer; @@ -172,8 +169,8 @@ void GcodeSuite::D(const int16_t dcode) { } else { //while (len--) { - //// TODO: Read bytes from EEPROM - // print_hex_byte(eeprom_read_byte(adr++)); + //// TODO: Read bytes from FLASH + // print_hex_byte(flash_read_byte(adr++)); //} SERIAL_EOL(); }