summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/modules/ds18x20.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-11-03 12:41:11 +1100
committerDamien George <damien.p.george@gmail.com>2016-11-03 12:41:11 +1100
commit7bb0f7b0f6218e813ca1ea9a21d5d549c7b36ab9 (patch)
tree4adf5c1a592d003b84aa9706aa0fced9f41442ed /esp8266/modules/ds18x20.py
parent561844f3ba2dc81ce37c58468099042e27cd422b (diff)
downloadmicropython-7bb0f7b0f6218e813ca1ea9a21d5d549c7b36ab9.tar.gz
micropython-7bb0f7b0f6218e813ca1ea9a21d5d549c7b36ab9.zip
drivers: Add "from micropython import const" when const is used.
Following best-practice use of the const feature, to make it compatible with Python.
Diffstat (limited to 'esp8266/modules/ds18x20.py')
-rw-r--r--esp8266/modules/ds18x20.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/esp8266/modules/ds18x20.py b/esp8266/modules/ds18x20.py
index fc53048f8e..bf06094835 100644
--- a/esp8266/modules/ds18x20.py
+++ b/esp8266/modules/ds18x20.py
@@ -1,6 +1,8 @@
# DS18x20 temperature sensor driver for MicroPython.
# MIT license; Copyright (c) 2016 Damien P. George
+from micropython import const
+
_CONVERT = const(0x44)
_RD_SCRATCH = const(0xbe)
_WR_SCRATCH = const(0x4e)