From 2d516679886b5607b38938e71ed429ddf97f2e5d Mon Sep 17 00:00:00 2001 From: Bartlomiej Zimon Date: Fri, 10 Apr 2020 10:19:46 +0000 Subject: [PATCH] P004_dallas: esp32 optimisation - move bit read/write to IRAM --- src/_P004_Dallas.ino | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/_P004_Dallas.ino b/src/_P004_Dallas.ino index 87091ce074..ebfc2f6404 100644 --- a/src/_P004_Dallas.ino +++ b/src/_P004_Dallas.ino @@ -9,6 +9,11 @@ #if defined(ESP32) # define ESP32noInterrupts() { portMUX_TYPE mux = portMUX_INITIALIZER_UNLOCKED; portENTER_CRITICAL(&mux) # define ESP32interrupts() portEXIT_CRITICAL(&mux); } + +// https://github.com/espressif/arduino-esp32/issues/1335 +uint8_t Plugin_004_DS_read_bit(int8_t Plugin_004_DallasPin) ICACHE_RAM_ATTR; +void Plugin_004_DS_write_bit(uint8_t v, int8_t Plugin_004_DallasPin) ICACHE_RAM_ATTR; + #endif // if defined(ESP32) #include "_Plugin_Helper.h"