mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
Dont set esp32 pin drive strength unless pin is set for output (#4075)
This commit is contained in:
parent
8975b4b3f6
commit
d067c8f80b
1 changed files with 3 additions and 1 deletions
|
@ -86,8 +86,10 @@ void ESP32InternalGPIOPin::setup() {
|
||||||
conf.pull_down_en = flags_ & gpio::FLAG_PULLDOWN ? GPIO_PULLDOWN_ENABLE : GPIO_PULLDOWN_DISABLE;
|
conf.pull_down_en = flags_ & gpio::FLAG_PULLDOWN ? GPIO_PULLDOWN_ENABLE : GPIO_PULLDOWN_DISABLE;
|
||||||
conf.intr_type = GPIO_INTR_DISABLE;
|
conf.intr_type = GPIO_INTR_DISABLE;
|
||||||
gpio_config(&conf);
|
gpio_config(&conf);
|
||||||
|
if (flags_ & gpio::FLAG_OUTPUT) {
|
||||||
gpio_set_drive_capability(pin_, drive_strength_);
|
gpio_set_drive_capability(pin_, drive_strength_);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ESP32InternalGPIOPin::pin_mode(gpio::Flags flags) {
|
void ESP32InternalGPIOPin::pin_mode(gpio::Flags flags) {
|
||||||
// can't call gpio_config here because that logs in esp-idf which may cause issues
|
// can't call gpio_config here because that logs in esp-idf which may cause issues
|
||||||
|
|
Loading…
Reference in a new issue