Skip to content

Commit

Permalink
Merge pull request #167 from tjpetz/missing-nanoble-support
Browse files Browse the repository at this point in the history
Add missing microsecondsToClockCycles for 33 BLE
  • Loading branch information
ladyada authored Sep 8, 2020
2 parents 13d25e6 + f0a66b0 commit 7062b12
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions DHT.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 7062b12

Please sign in to comment.