1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 14:43:51 +00:00

[esp32_rmt] Set pull-up and open-drain modes based on pin schema (#8178)

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
This commit is contained in:
Jonathan Swoboda
2025-02-06 23:09:24 -05:00
committed by GitHub
parent 4eb551864d
commit 7e626b04f2
8 changed files with 25 additions and 18 deletions

View File

@@ -2,6 +2,7 @@
#include "esphome/core/log.h"
#ifdef USE_ESP32
#include <driver/gpio.h>
namespace esphome {
namespace remote_receiver {
@@ -62,6 +63,11 @@ void RemoteReceiverComponent::setup() {
this->mark_failed();
return;
}
if (this->pin_->get_flags() & gpio::FLAG_PULLUP) {
gpio_pullup_en(gpio_num_t(this->pin_->get_pin()));
} else {
gpio_pullup_dis(gpio_num_t(this->pin_->get_pin()));
}
error = rmt_enable(this->channel_);
if (error != ESP_OK) {
this->error_code_ = error;