File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,10 @@ def reset_bus(i2c_bus):
55
55
# This is a workaround to get the SCL and SDA pins from a given bus object.
56
56
# Unfortunately the I2C class does not expose those attributes directly.
57
57
interface , scl_pin_number , sda_pin_number = I2CHelper .extract_i2c_info (i2c_bus )
58
+
59
+ scl_pin = Pin (scl_pin_number , Pin .IN ) # Detach pin from I2C
60
+ sda_pin = Pin (sda_pin_number , Pin .IN ) # Detach pin from I2C
61
+
58
62
scl_pin = Pin (scl_pin_number , Pin .OUT )
59
63
sda_pin = Pin (sda_pin_number , Pin .OUT )
60
64
@@ -243,7 +247,10 @@ def has_default_address(self):
243
247
@staticmethod
244
248
def available_devices ():
245
249
"""
246
- Finds all devices on the i2c bus and returns a list of Modulino objects.
250
+ Finds all devices on the i2c bus and returns them as a list of Modulino objects.
251
+
252
+ Returns:
253
+ list: A list of Modulino objects.
247
254
"""
248
255
bus = I2CHelper .get_interface ()
249
256
device_addresses = bus .scan ()
@@ -260,8 +267,7 @@ def reset_bus(i2c_bus):
260
267
The modulinos that are equipped with a micro controller use DMA operations.
261
268
If the host board does a reset during such operation it can make the bus get stuck.
262
269
263
- Returns
264
- ----
270
+ Returns:
265
271
I2C: A new i2c bus object after resetting the bus.
266
272
"""
267
273
return I2CHelper .reset_bus (i2c_bus )
You can’t perform that action at this time.
0 commit comments