mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
Fix lost functionality of GPIO9 and GPIO10
- Remove inconsistent hardware detection introduced in version 7.0.0.5 - Fix lost functionality of GPIO9 and GPIO10 on some devices (#7080)
This commit is contained in:
parent
d9e20497da
commit
1692241b25
@ -2,6 +2,8 @@
|
||||
|
||||
### 7.1.1.1 20191201
|
||||
|
||||
- Remove inconsistent hardware detection introduced in version 7.0.0.5
|
||||
- Fix lost functionality of GPIO9 and GPIO10 on some devices (#7080)
|
||||
- Change light color schemes 2, 3 and 4 from color wheel to Hue driven
|
||||
|
||||
## Released
|
||||
|
@ -521,32 +521,6 @@ char* GetPowerDevice(char* dest, uint32_t idx, size_t size)
|
||||
return GetPowerDevice(dest, idx, size, 0);
|
||||
}
|
||||
|
||||
bool IsEsp8285(void)
|
||||
{
|
||||
// esptool.py get_efuses
|
||||
uint32_t efuse1 = *(uint32_t*)(0x3FF00050);
|
||||
uint32_t efuse2 = *(uint32_t*)(0x3FF00054);
|
||||
// uint32_t efuse3 = *(uint32_t*)(0x3FF00058);
|
||||
// uint32_t efuse4 = *(uint32_t*)(0x3FF0005C);
|
||||
|
||||
bool is_8285 = ( (efuse1 & (1 << 4)) || (efuse2 & (1 << 16)) );
|
||||
if (is_8285 && (ESP.getFlashChipRealSize() > 1048576)) {
|
||||
is_8285 = false; // ESP8285 can only have 1M flash
|
||||
}
|
||||
return is_8285;
|
||||
}
|
||||
|
||||
String GetDeviceHardware(void)
|
||||
{
|
||||
char buff[10];
|
||||
if (IsEsp8285()) {
|
||||
strcpy_P(buff, PSTR("ESP8285"));
|
||||
} else {
|
||||
strcpy_P(buff, PSTR("ESP8266EX"));
|
||||
}
|
||||
return String(buff);
|
||||
}
|
||||
|
||||
float ConvertTemp(float c)
|
||||
{
|
||||
float result = c;
|
||||
@ -1039,7 +1013,7 @@ uint8_t ValidPin(uint32_t pin, uint32_t gpio)
|
||||
if (FlashPin(pin)) {
|
||||
result = GPIO_NONE; // Disable flash pins GPIO6, GPIO7, GPIO8 and GPIO11
|
||||
}
|
||||
if (!IsEsp8285() && !Settings.flag3.user_esp8285_enable) { // SetOption51 - Enable ESP8285 user GPIO's
|
||||
if ((WEMOS == Settings.module) && !Settings.flag3.user_esp8285_enable) { // SetOption51 - Enable ESP8285 user GPIO's
|
||||
if ((pin == 9) || (pin == 10)) {
|
||||
result = GPIO_NONE; // Disable possible flash GPIO9 and GPIO10
|
||||
}
|
||||
|
@ -376,10 +376,9 @@ void CmndStatus(void)
|
||||
|
||||
if ((0 == payload) || (2 == payload)) {
|
||||
Response_P(PSTR("{\"" D_CMND_STATUS D_STATUS2_FIRMWARE "\":{\"" D_JSON_VERSION "\":\"%s%s\",\"" D_JSON_BUILDDATETIME "\":\"%s\",\""
|
||||
D_JSON_BOOTVERSION "\":%d,\"" D_JSON_COREVERSION "\":\"" ARDUINO_ESP8266_RELEASE "\",\"" D_JSON_SDKVERSION "\":\"%s\","
|
||||
"\"Hardware\":\"%s\"}}"),
|
||||
D_JSON_BOOTVERSION "\":%d,\"" D_JSON_COREVERSION "\":\"" ARDUINO_ESP8266_RELEASE "\",\"" D_JSON_SDKVERSION "\":\"%s\"}}"),
|
||||
my_version, my_image, GetBuildDateAndTime().c_str(),
|
||||
ESP.getBootVersion(), ESP.getSdkVersion(), GetDeviceHardware().c_str());
|
||||
ESP.getBootVersion(), ESP.getSdkVersion());
|
||||
MqttPublishPrefixTopic_P(option, PSTR(D_CMND_STATUS "2"));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user