From 8535552b9ae2dd4af2f3fe1545da0fe31f065884 Mon Sep 17 00:00:00 2001 From: Ancyker Date: Mon, 10 Jun 2024 11:46:26 -0400 Subject: [PATCH] Fix compilation errors when the FLASH core is enabled without FLASH16 Commit References: * a32c6b3bfff066b04d81faea0e578b80cb4a3108 - Added ATTENTION_3_3V flash string but placed the definition inside a FLASH16 ifdef. * 4d000418a8f4e4a29297f83e30922100da7b21f5 - Added use of writeWord_Flash to FLASH8 without removing the FLASH16 ifdef around it. --- Cart_Reader/FLASH.ino | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Cart_Reader/FLASH.ino b/Cart_Reader/FLASH.ino index 82359b2..3e9113c 100644 --- a/Cart_Reader/FLASH.ino +++ b/Cart_Reader/FLASH.ino @@ -31,6 +31,9 @@ static const char flashMenuItemPrint[] PROGMEM = "Print"; // 8bit Flash menu items static const char* const menuOptionsFLASH8[] PROGMEM = { flashMenuItemBlankcheck, flashMenuItemErase, flashMenuItemRead, flashMenuItemWrite, flashMenuItemID, flashMenuItemPrint, FSTRING_RESET }; +// Misc flash strings +const char PROGMEM ATTENTION_3_3V[] = "ATTENTION 3.3V"; + #ifdef ENABLE_FLASH16 // Flash start menu static const char flashMenuItem1[] PROGMEM = "8bit Flash adapter"; @@ -45,8 +48,6 @@ static const char* const menuOptionsFLASH16[] PROGMEM = { flashMenuItemBlankchec static const char epromMenuItem4[] PROGMEM = "Verify"; static const char* const menuOptionsEprom[] PROGMEM = { flashMenuItemBlankcheck, flashMenuItemRead, flashMenuItemWrite, epromMenuItem4, flashMenuItemPrint, FSTRING_RESET }; -constexpr char PROGMEM ATTENTION_3_3V[] = "ATTENTION 3.3V"; - void flashMenu() { // create menu with title and 3 options to choose from unsigned char flashSlot; @@ -975,7 +976,6 @@ byte readByte_Flash(unsigned long myAddress) { return tempByte; } -#ifdef ENABLE_FLASH16 void writeWord_Flash(unsigned long myAddress, word myData) { PORTF = myAddress & 0xFF; PORTK = (myAddress >> 8) & 0xFF; @@ -1044,7 +1044,6 @@ word readWord_Flash(unsigned long myAddress) { return tempWord; } -#endif /****************************************** write helper functions