summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/dht/dht.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/dht/dht.c b/drivers/dht/dht.c
index 73afdee58..7e9b89782 100644
--- a/drivers/dht/dht.c
+++ b/drivers/dht/dht.c
@@ -29,6 +29,9 @@
#include "py/runtime.h"
#include "py/mperrno.h"
#include "py/mphal.h"
+
+#if MICROPY_PY_MACHINE_PULSE
+
#include "extmod/modmachine.h"
#include "drivers/dht/dht.h"
@@ -92,3 +95,5 @@ timeout:
mp_raise_OSError(MP_ETIMEDOUT);
}
MP_DEFINE_CONST_FUN_OBJ_2(dht_readinto_obj, dht_readinto);
+
+#endif // MICROPY_PY_MACHINE_PULSE