Add missing microsecondsToClockCycles for 33 BLE

This commit is contained in:
Tom Petz 2020-09-08 13:57:07 -04:00
parent 13d25e6b9a
commit a1f0c1c038

7
DHT.h
View File

@ -47,6 +47,13 @@
#define DHT21 21 /**< DHT TYPE 21 */ #define DHT21 21 /**< DHT TYPE 21 */
#define AM2301 21 /**< AM2301 */ #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 * @brief Class that stores state and functions for DHT
*/ */