From fbec88f6c8469bb455f931ae84efd306c3043f1d Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Mon, 25 Apr 2022 16:56:35 +0200 Subject: [PATCH] OneWire check arduino version --- lib/OneWire/OneWire_direct_gpio.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/OneWire/OneWire_direct_gpio.h b/lib/OneWire/OneWire_direct_gpio.h index 2c233cefb..56389bffb 100644 --- a/lib/OneWire/OneWire_direct_gpio.h +++ b/lib/OneWire/OneWire_direct_gpio.h @@ -123,6 +123,12 @@ #define IO_REG_TYPE uint32_t #define IO_REG_BASE_ATTR #define IO_REG_MASK_ATTR +#if __has_include("esp_arduino_version.h") +#include "esp_arduino_version.h" +#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) +#define rtc_gpio_desc rtc_io_desc +#endif +#endif static inline __attribute__((always_inline)) IO_REG_TYPE directRead(IO_REG_TYPE pin) { if (pin < 32)