We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e45db0 commit ad36328Copy full SHA for ad36328
qwiic_i2c/__init__.py
@@ -84,8 +84,6 @@
84
except:
85
pass
86
87
-_theDriver = None
88
-
89
#-------------------------------------------------
90
# Exported method to get the I2C driver for the execution plaform.
91
#
@@ -107,21 +105,13 @@ def getI2CDriver(*args, **argk):
107
105
>>> myData = i2cDriver.readByte(0x73, 0x34)
108
106
"""
109
110
- global _theDriver
111
112
- if _theDriver != None:
113
- return _theDriver
114
115
116
117
for driverClass in _drivers:
118
119
# Does this class/driverd support this platform?
120
if driverClass.isPlatform():
121
122
- _theDriver = driverClass(*args, **argk)
123
# Yes - return the driver object
124
+ return driverClass(*args, **argk)
125
126
return None
127
0 commit comments