|
@ -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 |
|
|
} |
|
|
} |
|
|