mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-28 05:06:32 +00:00
Redesign GPIO to 16-bit
This commit is contained in:
parent
805f93cfab
commit
895ed2d041
@ -1259,7 +1259,7 @@ void SettingsDelta(void)
|
|||||||
Settings.ledmask = APP_LEDMASK;
|
Settings.ledmask = APP_LEDMASK;
|
||||||
}
|
}
|
||||||
if (Settings.version < 0x0605000A) {
|
if (Settings.version < 0x0605000A) {
|
||||||
// Settings.my_adc0 = ADC0_NONE;
|
Settings.my_adc0 = GPIO_NONE;
|
||||||
}
|
}
|
||||||
if (Settings.version < 0x0605000D) {
|
if (Settings.version < 0x0605000D) {
|
||||||
Settings.param[P_IR_UNKNOW_THRESHOLD] = IR_RCV_MIN_UNKNOWN_SIZE;
|
Settings.param[P_IR_UNKNOW_THRESHOLD] = IR_RCV_MIN_UNKNOWN_SIZE;
|
||||||
|
@ -1390,7 +1390,7 @@ bool ValidGPIO(uint32_t pin, uint32_t gpio)
|
|||||||
{
|
{
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
#ifdef USE_ADC_VCC
|
#ifdef USE_ADC_VCC
|
||||||
if (17 == pin) { return false; } // ADC0 = GPIO17
|
if (ADC0_PIN == pin) { return false; } // ADC0 = GPIO17
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
return (GPIO_USER == ValidPin(pin, BGPIO(gpio))); // Only allow GPIO_USER pins
|
return (GPIO_USER == ValidPin(pin, BGPIO(gpio))); // Only allow GPIO_USER pins
|
||||||
|
@ -1804,7 +1804,7 @@ void HandleTemplateConfiguration(void)
|
|||||||
//#ifdef ESP8266
|
//#ifdef ESP8266
|
||||||
// WSContentSend_P(PSTR("<tr><td><b><font color='#%06x'>%s%d</font></b></td><td%s><select id='g%d' onchange='ot(%d,this.value)'></select></td>"),
|
// WSContentSend_P(PSTR("<tr><td><b><font color='#%06x'>%s%d</font></b></td><td%s><select id='g%d' onchange='ot(%d,this.value)'></select></td>"),
|
||||||
// ((9==i)||(10==i)) ? WebColor(COL_TEXT_WARNING) : WebColor(COL_TEXT),
|
// ((9==i)||(10==i)) ? WebColor(COL_TEXT_WARNING) : WebColor(COL_TEXT),
|
||||||
// (17==i) ? PSTR(D_ADC) : PSTR(D_GPIO), (17==i) ? 0 : i,
|
// (ADC0_PIN==i) ? PSTR(D_ADC) : PSTR(D_GPIO), (ADC0_PIN==i) ? 0 : i,
|
||||||
// (0==i) ? " style='width:150px'" : "", i, i);
|
// (0==i) ? " style='width:150px'" : "", i, i);
|
||||||
//#else // ESP32
|
//#else // ESP32
|
||||||
WSContentSend_P(PSTR("<tr><td><b><font color='#%06x'>" D_GPIO "%d</font></b></td><td%s><select id='g%d' onchange='ot(%d,this.value)'></select></td>"),
|
WSContentSend_P(PSTR("<tr><td><b><font color='#%06x'>" D_GPIO "%d</font></b></td><td%s><select id='g%d' onchange='ot(%d,this.value)'></select></td>"),
|
||||||
@ -1989,7 +1989,7 @@ void HandleModuleConfiguration(void)
|
|||||||
//#ifdef ESP8266
|
//#ifdef ESP8266
|
||||||
// WSContentSend_P(PSTR("<tr><td style='width:116px'>%s <b>%s%d</b></td><td style='width:150px'><select id='g%d' onchange='ot(%d,this.value)'></select></td>"),
|
// WSContentSend_P(PSTR("<tr><td style='width:116px'>%s <b>%s%d</b></td><td style='width:150px'><select id='g%d' onchange='ot(%d,this.value)'></select></td>"),
|
||||||
// (WEMOS==my_module_type)?stemp:"",
|
// (WEMOS==my_module_type)?stemp:"",
|
||||||
// (17==i) ? PSTR(D_ADC) : PSTR(D_GPIO), (17==i) ? 0 : i,
|
// (ADC0_PIN==i) ? PSTR(D_ADC) : PSTR(D_GPIO), (ADC0_PIN==i) ? 0 : i,
|
||||||
// i, i);
|
// i, i);
|
||||||
//#else // ESP32
|
//#else // ESP32
|
||||||
WSContentSend_P(PSTR("<tr><td style='width:116px'>%s <b>" D_GPIO "%d</b></td><td style='width:150px'><select id='g%d' onchange='ot(%d,this.value)'></select></td>"),
|
WSContentSend_P(PSTR("<tr><td style='width:116px'>%s <b>" D_GPIO "%d</b></td><td style='width:150px'><select id='g%d' onchange='ot(%d,this.value)'></select></td>"),
|
||||||
|
@ -95,11 +95,9 @@ struct {
|
|||||||
} Adc[MAX_ADCS];
|
} Adc[MAX_ADCS];
|
||||||
|
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
|
|
||||||
bool adcAttachPin(uint8_t pin) {
|
bool adcAttachPin(uint8_t pin) {
|
||||||
return true;
|
return (ADC0_PIN == pin);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void AdcSaveSettings(uint32_t idx) {
|
void AdcSaveSettings(uint32_t idx) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user