From e9cd5a947d981f5a02afe3b4c5abc030f787d064 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 9 Oct 2025 12:20:00 -1000 Subject: [PATCH] fixes --- esphome/components/opentherm/opentherm.cpp | 10 +++++----- esphome/components/opentherm/opentherm.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/esphome/components/opentherm/opentherm.cpp b/esphome/components/opentherm/opentherm.cpp index 912e54d0c8..d59b9584d1 100644 --- a/esphome/components/opentherm/opentherm.cpp +++ b/esphome/components/opentherm/opentherm.cpp @@ -7,7 +7,7 @@ #include "opentherm.h" #include "esphome/core/helpers.h" -#ifdef ESP32 +#ifdef USE_ESP32 #include "driver/timer.h" #include "esp_err.h" #endif @@ -31,7 +31,7 @@ OpenTherm *OpenTherm::instance = nullptr; OpenTherm::OpenTherm(InternalGPIOPin *in_pin, InternalGPIOPin *out_pin, int32_t device_timeout) : in_pin_(in_pin), out_pin_(out_pin), -#ifdef ESP32 +#ifdef USE_ESP32 timer_group_(TIMER_GROUP_0), timer_idx_(TIMER_0), #endif @@ -57,7 +57,7 @@ bool OpenTherm::initialize() { this->out_pin_->setup(); this->out_pin_->digital_write(true); -#ifdef ESP32 +#ifdef USE_ESP32 return this->init_esp32_timer_(); #else return true; @@ -238,7 +238,7 @@ void IRAM_ATTR OpenTherm::write_bit_(uint8_t high, uint8_t clock) { } } -#ifdef ESP32 +#ifdef USE_ESP32 bool OpenTherm::init_esp32_timer_() { // Search for a free timer. Maybe unstable, we'll see. @@ -365,7 +365,7 @@ void IRAM_ATTR OpenTherm::stop_timer_() { } } -#endif // ESP32 +#endif // USE_ESP32 #ifdef ESP8266 // 5 kHz timer_ diff --git a/esphome/components/opentherm/opentherm.h b/esphome/components/opentherm/opentherm.h index 099e67574d..3996481760 100644 --- a/esphome/components/opentherm/opentherm.h +++ b/esphome/components/opentherm/opentherm.h @@ -12,7 +12,7 @@ #include "esphome/core/helpers.h" #include "esphome/core/log.h" -#ifdef ESP32 +#ifdef USE_ESP32 #include "driver/timer.h" #endif @@ -356,7 +356,7 @@ class OpenTherm { ISRInternalGPIOPin isr_in_pin_; ISRInternalGPIOPin isr_out_pin_; -#ifdef ESP32 +#ifdef USE_ESP32 timer_group_t timer_group_; timer_idx_t timer_idx_; #endif @@ -370,7 +370,7 @@ class OpenTherm { int32_t timeout_counter_; // <0 no timeout int32_t device_timeout_; -#ifdef ESP32 +#ifdef USE_ESP32 esp_err_t timer_error_ = ESP_OK; TimerErrorType timer_error_type_ = TimerErrorType::NO_TIMER_ERROR;