Merge pull request #167 from tjpetz/missing-nanoble-support

Add missing microsecondsToClockCycles for 33 BLE
This commit is contained in:
Limor "Ladyada" Fried 2020-09-08 16:34:27 -04:00 committed by GitHub
commit 7062b127f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

10
DHT.h
View File

@ -47,6 +47,16 @@
#define DHT21 21 /**< DHT TYPE 21 */
#define AM2301 21 /**< AM2301 */
#if (TARGET_NAME == ARDUINO_NANO33BLE)
#ifndef microsecondsToClockCycles
/*!
* As of 7 Sep 2020 the Arduino Nano 33 BLE boards do not have
* microsecondsToClockCycles defined.
*/
#define microsecondsToClockCycles(a) ((a) * (SystemCoreClock / 1000000L))
#endif
#endif
/*!
* @brief Class that stores state and functions for DHT
*/