|
36 | 36 |
|
37 | 37 | import time
|
38 | 38 | import struct
|
39 |
| -import busio |
40 | 39 | from adafruit_bus_device.i2c_device import I2CDevice
|
41 | 40 | from adafruit_register.i2c_bit import RWBit, ROBit
|
42 | 41 | from micropython import const
|
43 | 42 |
|
44 |
| - |
45 |
| -__version__ = "0.0.0-auto.0" |
46 |
| -__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_ADT7410.git" |
47 |
| - |
48 |
| - |
49 |
| -_ADT7410_TEMPMSB = const(0x0) |
50 |
| -_ADT7410_TEMPLSB = const(0x1) |
51 |
| -_ADT7410_STATUS = const(0x2) |
52 |
| -_ADT7410_CONFIG = const(0x3) |
53 |
| -_ADT7410_THIGHMSB = const(0x4) |
54 |
| -_ADT7410_THIGHLSB = const(0x5) |
55 |
| -_ADT7410_TLOWMSB = const(0x6) |
56 |
| -_ADT7410_TLOWLSB = const(0x7) |
57 |
| -_ADT7410_TCRITMSB = const(0x8) |
58 |
| -_ADT7410_TCRITLSB = const(0x9) |
59 |
| -_ADT7410_THYST = const(0x0A) |
60 |
| -_ADT7410_ID = const(0xB) |
61 |
| -_ADT7410_SWRST = const(0x2F) |
| 43 | +try: |
| 44 | + # Used only for typing |
| 45 | + import busio # pylint: disable=unused-import |
| 46 | +except ImportError: |
| 47 | + pass |
| 48 | + |
| 49 | +__version__: str = "0.0.0-auto.0" |
| 50 | +__repo__: str = "https://github.com/adafruit/Adafruit_CircuitPython_ADT7410.git" |
| 51 | + |
| 52 | + |
| 53 | +_ADT7410_TEMPMSB: int = const(0x0) |
| 54 | +_ADT7410_TEMPLSB: int = const(0x1) |
| 55 | +_ADT7410_STATUS: int = const(0x2) |
| 56 | +_ADT7410_CONFIG: int = const(0x3) |
| 57 | +_ADT7410_THIGHMSB: int = const(0x4) |
| 58 | +_ADT7410_THIGHLSB: int = const(0x5) |
| 59 | +_ADT7410_TLOWMSB: int = const(0x6) |
| 60 | +_ADT7410_TLOWLSB: int = const(0x7) |
| 61 | +_ADT7410_TCRITMSB: int = const(0x8) |
| 62 | +_ADT7410_TCRITLSB: int = const(0x9) |
| 63 | +_ADT7410_THYST: int = const(0x0A) |
| 64 | +_ADT7410_ID: int = const(0xB) |
| 65 | +_ADT7410_SWRST: int = const(0x2F) |
62 | 66 |
|
63 | 67 |
|
64 | 68 | class ADT7410:
|
|
0 commit comments