Skip to content

Commit a1f0c1c

Browse files
committed
Add missing microsecondsToClockCycles for 33 BLE
1 parent 13d25e6 commit a1f0c1c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

DHT.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@
4747
#define DHT21 21 /**< DHT TYPE 21 */
4848
#define AM2301 21 /**< AM2301 */
4949

50+
#if (TARGET_NAME==ARDUINO_NANO33BLE)
51+
// As of 7 Sep 2020 the Arduino Nano 33 BLE boards do not have microsecondsToClockCycles defined.
52+
#ifndef microsecondsToClockCycles
53+
#define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) )
54+
#endif
55+
#endif
56+
5057
/*!
5158
* @brief Class that stores state and functions for DHT
5259
*/

0 commit comments

Comments
 (0)