mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 12:46:34 +00:00
Merge pull request #13702 from s-hadinger/gpio_rest
ESP32 fix leftover GPIO configuration after restart
This commit is contained in:
commit
3b9f3c621f
@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
## [10.0.0.3]
|
## [10.0.0.3]
|
||||||
### Added
|
### Added
|
||||||
- Autoconfiguration for ESP32 and variants
|
- Autoconfiguration for ESP32 and variants
|
||||||
|
- ESP32 fix leftover GPIO configuration after restart
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- ESP8266 Gratuitous ARP enabled and set to 60 seconds (#13623)
|
- ESP8266 Gratuitous ARP enabled and set to 60 seconds (#13623)
|
||||||
|
@ -1651,6 +1651,22 @@ void ResetPwm(void)
|
|||||||
|
|
||||||
/********************************************************************************************/
|
/********************************************************************************************/
|
||||||
|
|
||||||
|
#ifdef ESP32
|
||||||
|
// Since ESP-IDF 4.4, GPIO matrix or I/O is not reset during a restart
|
||||||
|
// and GPIO configuration can get stuck because of leftovers
|
||||||
|
//
|
||||||
|
// This patched version of pinMode forces a full GPIO reset before setting new mode
|
||||||
|
//
|
||||||
|
extern "C" void ARDUINO_ISR_ATTR __pinMode(uint8_t pin, uint8_t mode);
|
||||||
|
|
||||||
|
extern "C" void ARDUINO_ISR_ATTR pinMode(uint8_t pin, uint8_t mode) {
|
||||||
|
gpio_reset_pin((gpio_num_t)pin);
|
||||||
|
__pinMode(pin, mode);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/********************************************************************************************/
|
||||||
|
|
||||||
void GpioInit(void)
|
void GpioInit(void)
|
||||||
{
|
{
|
||||||
if (!ValidModule(Settings->module)) {
|
if (!ValidModule(Settings->module)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user