@@ -670,10 +670,10 @@ bool SettingsUpdateText(uint32_t index, const char* replace_me) {
670670
671671 if (diff != 0 ) {
672672 // Shift Settings->text up or down
673- memmove_P (Settings->text_pool + start_pos + replace_len, Settings->text_pool + end_pos, char_len - end_pos);
673+ memmove (Settings->text_pool + start_pos + replace_len, Settings->text_pool + end_pos, char_len - end_pos);
674674 }
675675 // Replace text
676- memmove_P (Settings->text_pool + start_pos, replace, replace_len);
676+ memmove (Settings->text_pool + start_pos, replace, replace_len);
677677 // Fill for future use
678678 memset (Settings->text_pool + char_len + diff, 0x00 , settings_text_size - char_len - diff);
679679
@@ -1696,8 +1696,8 @@ void SettingsDelta(void) {
16961696 if (Settings->version < 0x09050002 ) {
16971697 if (Settings->cfg_size != sizeof (TSettings)) {
16981698 // Fix onetime Settings layout due to changed ESP32-C3 myio and mytmplt types sizes
1699- memmove_P ((uint8_t *)&Settings->user_template , (uint8_t *)&Settings->free_esp32c3_3D8 , sizeof (TSettings) - 0x3FC );
1700- memmove_P ((uint8_t *)&Settings->eth_type , (uint8_t *)&Settings->free_esp32c3_42A , sizeof (TSettings) - 0x446 );
1699+ memmove ((uint8_t *)&Settings->user_template , (uint8_t *)&Settings->free_esp32c3_3D8 , sizeof (TSettings) - 0x3FC );
1700+ memmove ((uint8_t *)&Settings->eth_type , (uint8_t *)&Settings->free_esp32c3_42A , sizeof (TSettings) - 0x446 );
17011701 // Reset for future use
17021702 memset (&Settings->free_esp32c3_3D8 , 0x00 , sizeof (Settings->free_esp32c3_3D8 ));
17031703 memset (&Settings->free_esp32c3_42A , 0x00 , sizeof (Settings->free_esp32c3_42A ));
@@ -1876,22 +1876,32 @@ void SettingsDelta(void) {
18761876 }
18771877 if (Settings->version < 0x0E030007 ) { // 14.3.0.7
18781878 // move up uint8_t knx_CB_registered from 4A8 to 533
1879- memmove_P ((uint8_t *)&Settings->knx_CB_registered , (uint8_t *)&Settings->switchmode , 1 );
1879+ memmove ((uint8_t *)&Settings->knx_CB_registered , (uint8_t *)&Settings->switchmode , 1 );
18801880 // move up uint8_t global_sensor_index[3] from 4C5 to 53C
1881- memmove_P ((uint8_t *)&Settings->global_sensor_index , (uint8_t *)&Settings->switchmode +29 , 3 );
1881+ memmove ((uint8_t *)&Settings->global_sensor_index , (uint8_t *)&Settings->switchmode +29 , 3 );
18821882 // move dn uint8_t switchmode[MAX_SWITCHES_SET] from 4A9 to 4A8
1883- memmove_P ((uint8_t *)&Settings->switchmode , (uint8_t *)&Settings->switchmode +1 , 28 );
1883+ memmove ((uint8_t *)&Settings->switchmode , (uint8_t *)&Settings->switchmode +1 , 28 );
18841884 for (uint32_t i = 28 ; i < MAX_SWITCHES_SET; i++) {
18851885 Settings->switchmode [i] = SWITCH_MODE;
18861886 }
18871887 // move up int8_t shutter_tilt_pos[MAX_SHUTTERS], uint16_t influxdb_period and uint16_t rf_duplicate_timefrom 51C to 534
1888- memmove_P ((uint8_t *)&Settings->shutter_tilt_pos , (uint8_t *)&Settings->shutter_tilt_config +12 , 8 );
1888+ memmove ((uint8_t *)&Settings->shutter_tilt_pos , (uint8_t *)&Settings->shutter_tilt_config +12 , 8 );
18891889 // move up int8_t shutter_tilt_config[5][MAX_SHUTTERS] from 508 to 510
1890- memmove_P ((uint8_t *)&Settings->shutter_tilt_config , (uint8_t *)&Settings->shutter_tilt_config -8 , 20 );
1890+ memmove ((uint8_t *)&Settings->shutter_tilt_config , (uint8_t *)&Settings->shutter_tilt_config -8 , 20 );
18911891 for (uint32_t i = 14 ; i < MAX_INTERLOCKS_SET; i++) {
18921892 Settings->interlock [i] = 0 ;
18931893 }
18941894 }
1895+ #ifdef USE_DINGTIAN_RELAY // Support the Dingian board using 74'595 and 74'165 shift registers
1896+ if (Settings->version < 0x0F020004 ) { // 15.2.0.4
1897+ Settings->flag5 .shift595_invert_outputs = 0 ; // SetOption133 - Do not invert 74HC595 shift register outputs
1898+ #ifdef DINGTIAN_INPUTS_INVERTED
1899+ Settings->flag3 .pcf8574_ports_inverted = 1 ; // SetOption81 - Invert inputs (74HC165)
1900+ #else
1901+ Settings->flag3 .pcf8574_ports_inverted = 0 ; // SetOption81 - Do not invert inputs (74HC165)
1902+ #endif // DINGTIAN_INPUTS_INVERTED
1903+ }
1904+ #endif // USE_DINGTIAN_RELAY
18951905
18961906 Settings->version = TASMOTA_VERSION;
18971907 SettingsSave (1 );
0 commit comments