mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-26 04:06:34 +00:00
Change redesigning ESP8266 GPIO internal numbering
Change redesigning ESP8266 GPIO internal numbering in line with ESP32
This commit is contained in:
parent
c00d7035d9
commit
1ae9adc642
@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
## Unreleased (development)
|
## Unreleased (development)
|
||||||
|
|
||||||
|
### 9.0.0.1 20200930
|
||||||
|
|
||||||
|
- Change redesigning ESP8266 GPIO internal numbering in line with ESP32
|
||||||
|
- Remove auto config update for all Friendlynames and Switchtopic from versions before 8.x
|
||||||
|
Valid migration path is from 7.x to 8.x to 9.x
|
||||||
|
|
||||||
### 8.5.0.1 20200907
|
### 8.5.0.1 20200907
|
||||||
|
|
||||||
- Fix energy total counters (#9263, #9266)
|
- Fix energy total counters (#9263, #9266)
|
||||||
|
@ -1164,6 +1164,44 @@ void ConvertGpios(void) {
|
|||||||
// AddLogBufferSize(LOG_LEVEL_DEBUG, (uint8_t *)&Settings.my_gp.io, sizeof(myio) / 2, 2);
|
// AddLogBufferSize(LOG_LEVEL_DEBUG, (uint8_t *)&Settings.my_gp.io, sizeof(myio) / 2, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
void DumpConvertTable(void) {
|
||||||
|
bool jsflg = false;
|
||||||
|
uint32_t lines = 1;
|
||||||
|
for (uint32_t i = 0; i < ARRAY_SIZE(kGpioConvert); i++) {
|
||||||
|
uint32_t data = pgm_read_word(kGpioConvert + i);
|
||||||
|
if (!jsflg) {
|
||||||
|
Response_P(PSTR("{\"GPIOConversion%d\":{"), lines);
|
||||||
|
} else {
|
||||||
|
ResponseAppend_P(PSTR(","));
|
||||||
|
}
|
||||||
|
jsflg = true;
|
||||||
|
if ((ResponseAppend_P(PSTR("\"%d\":\"%d\""), i, data) > (LOGSZ - TOPSZ)) || (i == ARRAY_SIZE(kGpioConvert) -1)) {
|
||||||
|
ResponseJsonEndEnd();
|
||||||
|
MqttPublishPrefixTopic_P(RESULT_OR_STAT, XdrvMailbox.command);
|
||||||
|
jsflg = false;
|
||||||
|
lines++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (uint32_t i = 0; i < ARRAY_SIZE(kAdcNiceList); i++) {
|
||||||
|
uint32_t data = pgm_read_word(kAdcNiceList + i);
|
||||||
|
if (!jsflg) {
|
||||||
|
Response_P(PSTR("{\"ADC0Conversion%d\":{"), lines);
|
||||||
|
} else {
|
||||||
|
ResponseAppend_P(PSTR(","));
|
||||||
|
}
|
||||||
|
jsflg = true;
|
||||||
|
if ((ResponseAppend_P(PSTR("\"%d\":\"%d\""), i, data) > (LOGSZ - TOPSZ)) || (i == ARRAY_SIZE(kAdcNiceList) -1)) {
|
||||||
|
ResponseJsonEndEnd();
|
||||||
|
MqttPublishPrefixTopic_P(RESULT_OR_STAT, XdrvMailbox.command);
|
||||||
|
jsflg = false;
|
||||||
|
lines++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mqtt_data[0] = '\0';
|
||||||
|
}
|
||||||
|
*/
|
||||||
#endif // ESP8266
|
#endif // ESP8266
|
||||||
|
|
||||||
uint32_t ICACHE_RAM_ATTR Pin(uint32_t gpio, uint32_t index = 0);
|
uint32_t ICACHE_RAM_ATTR Pin(uint32_t gpio, uint32_t index = 0);
|
||||||
|
@ -1202,6 +1202,12 @@ void ShowGpios(const uint16_t *NiceList, uint32_t size, uint32_t offset, uint32_
|
|||||||
|
|
||||||
void CmndGpios(void)
|
void CmndGpios(void)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
if (XdrvMailbox.payload == 17) {
|
||||||
|
DumpConvertTable();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
*/
|
||||||
uint32_t lines = 1;
|
uint32_t lines = 1;
|
||||||
ShowGpios(kGpioNiceList, ARRAY_SIZE(kGpioNiceList), 0, lines);
|
ShowGpios(kGpioNiceList, ARRAY_SIZE(kGpioNiceList), 0, lines);
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
|
@ -378,13 +378,8 @@ const char kWebColors[] PROGMEM =
|
|||||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#ifdef ESP8266
|
|
||||||
//#define AGPIO(x) (x)
|
|
||||||
//#define BGPIO(x) (x)
|
|
||||||
//#else // ESP32
|
|
||||||
#define AGPIO(x) (x<<5)
|
#define AGPIO(x) (x<<5)
|
||||||
#define BGPIO(x) (x>>5)
|
#define BGPIO(x) (x>>5)
|
||||||
//#endif // ESP8266 - ESP32
|
|
||||||
|
|
||||||
#ifdef USE_DEVICE_GROUPS
|
#ifdef USE_DEVICE_GROUPS
|
||||||
#define SendDeviceGroupMessage(DEVICE_INDEX, REQUEST_TYPE, ...) _SendDeviceGroupMessage(DEVICE_INDEX, REQUEST_TYPE, __VA_ARGS__, 0)
|
#define SendDeviceGroupMessage(DEVICE_INDEX, REQUEST_TYPE, ...) _SendDeviceGroupMessage(DEVICE_INDEX, REQUEST_TYPE, __VA_ARGS__, 0)
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#ifndef _TASMOTA_VERSION_H_
|
#ifndef _TASMOTA_VERSION_H_
|
||||||
#define _TASMOTA_VERSION_H_
|
#define _TASMOTA_VERSION_H_
|
||||||
|
|
||||||
const uint32_t VERSION = 0x08050001;
|
const uint32_t VERSION = 0x09000001;
|
||||||
|
|
||||||
// Lowest compatible version
|
// Lowest compatible version
|
||||||
const uint32_t VERSION_COMPATIBLE = 0x07010006;
|
const uint32_t VERSION_COMPATIBLE = 0x07010006;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user