Jason Smith
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
13 additions and
26 deletions
-
Marlin/src/lcd/dwin/e3v2/dwin.cpp
-
Marlin/src/pins/stm32f1/pins_CREALITY_V4.h
-
buildroot/tests/STM32F103RET6_creality-tests
|
|
@ -216,7 +216,7 @@ void HMI_SetLanguageCache() { |
|
|
|
} |
|
|
|
|
|
|
|
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)); |
|
|
|
#endif |
|
|
|
HMI_SetLanguageCache(); |
|
|
@ -225,7 +225,7 @@ void HMI_SetLanguage() { |
|
|
|
void HMI_ToggleLanguage() { |
|
|
|
HMI_flag.language = HMI_IsChinese() ? DWIN_ENGLISH : DWIN_CHINESE; |
|
|
|
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)); |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
@ -43,30 +43,16 @@ |
|
|
|
// EEPROM
|
|
|
|
//
|
|
|
|
#if NO_EEPROM_SELECTED |
|
|
|
// FLASH
|
|
|
|
//#define FLASH_EEPROM_EMULATION
|
|
|
|
|
|
|
|
// I2C
|
|
|
|
#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_SCL PA12 |
|
|
|
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb (24C16)
|
|
|
|
#else |
|
|
|
#define SDCARD_EEPROM_EMULATION // SD EEPROM until all EEPROM is BL24CXX
|
|
|
|
#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 ?
|
|
|
|
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
|
|
|
|
//#define SDCARD_EEPROM_EMULATION
|
|
|
|
#endif |
|
|
|
|
|
|
|
// 32Mb FLASH
|
|
|
|
//#define SPI_FLASH_CS ?
|
|
|
|
#if ENABLED(IIC_BL24CXX_EEPROM) |
|
|
|
#define IIC_EEPROM_SDA PA11 |
|
|
|
#define IIC_EEPROM_SCL PA12 |
|
|
|
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb (24C16)
|
|
|
|
#elif ENABLED(SDCARD_EEPROM_EMULATION) |
|
|
|
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb
|
|
|
|
#endif |
|
|
|
|
|
|
|
//
|
|
|
|
|
|
@ -15,6 +15,7 @@ exec_test $1 $2 "Ender 3 v2" "$3" |
|
|
|
|
|
|
|
use_example_configs "Creality/Ender-3 V2" |
|
|
|
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 |
|
|
|