Skip to content

Commit

Permalink
OneWire check arduino version
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Apr 25, 2022
1 parent adc88d5 commit fbec88f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/OneWire/OneWire_direct_gpio.h
Expand Up @@ -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)
Expand Down

0 comments on commit fbec88f

Please sign in to comment.