From a1f0c1c0389fdea7d675d435502c07bca3a2ac5a Mon Sep 17 00:00:00 2001 From: Tom Petz Date: Tue, 8 Sep 2020 13:57:07 -0400 Subject: [PATCH] Add missing microsecondsToClockCycles for 33 BLE --- DHT.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/DHT.h b/DHT.h index c2b51e0..04849af 100644 --- a/DHT.h +++ b/DHT.h @@ -47,6 +47,13 @@ #define DHT21 21 /**< DHT TYPE 21 */ #define AM2301 21 /**< AM2301 */ +#if (TARGET_NAME==ARDUINO_NANO33BLE) +// As of 7 Sep 2020 the Arduino Nano 33 BLE boards do not have microsecondsToClockCycles defined. +#ifndef microsecondsToClockCycles +#define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) ) +#endif +#endif + /*! * @brief Class that stores state and functions for DHT */