diff options
| author | robert-hh <robert@hammelrath.com> | 2021-06-19 11:00:55 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-10-25 23:49:28 +1100 |
| commit | e7572776c3ec3a245c831f3f2aaa595a4dec43a8 (patch) | |
| tree | 35e00d9ee0bd21587e7d3b4e23e30de8c7395153 /drivers/dht/dht.py | |
| parent | 99221cd1181288ffb86404e348f25e345e863a7b (diff) | |
mimxrt: Add dht_readinto() to the mimxrt module, and freeze dht.py.
The change affects dht.py from the drivers directory as well to include the
logic for the mimxrt port.
Diffstat (limited to 'drivers/dht/dht.py')
| -rw-r--r-- | drivers/dht/dht.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/dht/dht.py b/drivers/dht/dht.py index 1163b382b..322608990 100644 --- a/drivers/dht/dht.py +++ b/drivers/dht/dht.py @@ -1,9 +1,13 @@ # DHT11/DHT22 driver for MicroPython on ESP8266 # MIT license; Copyright (c) 2016 Damien P. George -try: +import sys + +if sys.platform.startswith("esp"): from esp import dht_readinto -except: +elif sys.platform == "mimxrt": + from mimxrt import dht_readinto +else: from pyb import dht_readinto |
