mirror of
https://github.com/esphome/esphome.git
synced 2024-12-25 17:07:50 +01:00
Dont set esp32 pin drive strength unless pin is set for output (#4075)
This commit is contained in:
parent
8975b4b3f6
commit
d067c8f80b
@ -86,7 +86,9 @@ 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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user