Browse Source

Permit SD EEPROM emulation on E3V2 (#20353)

vanilla_fb_2.0.x
Jason Smith 4 years ago
committed by Scott Lahteine
parent
commit
07954edadc
  1. 4
      Marlin/src/lcd/dwin/e3v2/dwin.cpp
  2. 24
      Marlin/src/pins/stm32f1/pins_CREALITY_V4.h
  3. 3
      buildroot/tests/STM32F103RET6_creality-tests

4
Marlin/src/lcd/dwin/e3v2/dwin.cpp

@ -216,7 +216,7 @@ void HMI_SetLanguageCache() {
} }
void HMI_SetLanguage() { void HMI_SetLanguage() {
#if ENABLED(EEPROM_SETTINGS) #if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM)
BL24CXX::read(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language)); BL24CXX::read(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language));
#endif #endif
HMI_SetLanguageCache(); HMI_SetLanguageCache();
@ -225,7 +225,7 @@ void HMI_SetLanguage() {
void HMI_ToggleLanguage() { void HMI_ToggleLanguage() {
HMI_flag.language = HMI_IsChinese() ? DWIN_ENGLISH : DWIN_CHINESE; HMI_flag.language = HMI_IsChinese() ? DWIN_ENGLISH : DWIN_CHINESE;
HMI_SetLanguageCache(); HMI_SetLanguageCache();
#if ENABLED(EEPROM_SETTINGS) #if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM)
BL24CXX::write(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language)); BL24CXX::write(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language));
#endif #endif
} }

24
Marlin/src/pins/stm32f1/pins_CREALITY_V4.h

@ -43,30 +43,16 @@
// EEPROM // EEPROM
// //
#if NO_EEPROM_SELECTED #if NO_EEPROM_SELECTED
// FLASH #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
//#define FLASH_EEPROM_EMULATION //#define SDCARD_EEPROM_EMULATION
#endif
// I2C #if ENABLED(IIC_BL24CXX_EEPROM)
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 used only for display settings
#if ENABLED(IIC_BL24CXX_EEPROM)
#define IIC_EEPROM_SDA PA11 #define IIC_EEPROM_SDA PA11
#define IIC_EEPROM_SCL PA12 #define IIC_EEPROM_SCL PA12
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb (24C16) #define MARLIN_EEPROM_SIZE 0x800 // 2Kb (24C16)
#else #elif ENABLED(SDCARD_EEPROM_EMULATION)
#define SDCARD_EEPROM_EMULATION // SD EEPROM until all EEPROM is BL24CXX
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb #define MARLIN_EEPROM_SIZE 0x800 // 2Kb
#endif
// SPI
//#define SPI_EEPROM // EEPROM on SPI-0
//#define SPI_CHAN_EEPROM1 ?
//#define SPI_EEPROM1_CS ?
// 2K EEPROM
//#define SPI_EEPROM2_CS ?
// 32Mb FLASH
//#define SPI_FLASH_CS ?
#endif #endif
// //

3
buildroot/tests/STM32F103RET6_creality-tests

@ -15,6 +15,7 @@ exec_test $1 $2 "Ender 3 v2" "$3"
use_example_configs "Creality/Ender-3 V2" use_example_configs "Creality/Ender-3 V2"
opt_disable CLASSIC_JERK opt_disable CLASSIC_JERK
exec_test $1 $2 "Ender 3 v2 w/o CLASSIC_JERK" "$3" opt_add SDCARD_EEPROM_EMULATION
exec_test $1 $2 "Ender 3 v2, SD EEPROM, w/o CLASSIC_JERK" "$3"
restore_configs restore_configs

Loading…
Cancel
Save