mirror of
				https://github.com/esphome/esphome.git
				synced 2025-11-04 00:51:49 +00:00 
			
		
		
		
	[opentherm][ci][tests] Remove redundant ESP32 Arduino tests and simplify conditionals
This commit is contained in:
		@@ -7,7 +7,7 @@
 | 
			
		||||
 | 
			
		||||
#include "opentherm.h"
 | 
			
		||||
#include "esphome/core/helpers.h"
 | 
			
		||||
#if defined(ESP32) || defined(USE_ESP_IDF)
 | 
			
		||||
#ifdef 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),
 | 
			
		||||
#if defined(ESP32) || defined(USE_ESP_IDF)
 | 
			
		||||
#ifdef 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);
 | 
			
		||||
 | 
			
		||||
#if defined(ESP32) || defined(USE_ESP_IDF)
 | 
			
		||||
#ifdef 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) {
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if defined(ESP32) || defined(USE_ESP_IDF)
 | 
			
		||||
#ifdef 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  // END ESP32
 | 
			
		||||
#endif  // ESP32
 | 
			
		||||
 | 
			
		||||
#ifdef ESP8266
 | 
			
		||||
// 5 kHz timer_
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@
 | 
			
		||||
#include "esphome/core/helpers.h"
 | 
			
		||||
#include "esphome/core/log.h"
 | 
			
		||||
 | 
			
		||||
#if defined(ESP32) || defined(USE_ESP_IDF)
 | 
			
		||||
#ifdef ESP32
 | 
			
		||||
#include "driver/timer.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -356,7 +356,7 @@ class OpenTherm {
 | 
			
		||||
  ISRInternalGPIOPin isr_in_pin_;
 | 
			
		||||
  ISRInternalGPIOPin isr_out_pin_;
 | 
			
		||||
 | 
			
		||||
#if defined(ESP32) || defined(USE_ESP_IDF)
 | 
			
		||||
#ifdef 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_;
 | 
			
		||||
 | 
			
		||||
#if defined(ESP32) || defined(USE_ESP_IDF)
 | 
			
		||||
#ifdef ESP32
 | 
			
		||||
  esp_err_t timer_error_ = ESP_OK;
 | 
			
		||||
  TimerErrorType timer_error_type_ = TimerErrorType::NO_TIMER_ERROR;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
<<: !include common.yaml
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
<<: !include common.yaml
 | 
			
		||||
		Reference in New Issue
	
	Block a user