@@ -87,12 +87,17 @@ def writeto_then_readfrom(self, address, buffer_out, buffer_in, **kwargs):
87
87
#In linux, at least, this is a special kernel function call
88
88
if address == self .tca .address :
89
89
raise ValueError ("Device address must be different than TCA9548A address." )
90
-
90
+
91
91
if hasattr (self .tca .i2c , 'writeto_then_readfrom' ):
92
92
self .tca .i2c .writeto_then_readfrom (address , buffer_out , buffer_in , ** kwargs )
93
93
else :
94
- self .tca .i2c .writeto (address , buffer_out , start = kwargs .get ("out_start" , 0 ), end = kwargs .get ("out_end" , None ), stop = False )
95
- self .tca .i2c .readfrom_into (address , buffer_in , start = kwargs .get ("in_start" , 0 ), end = kwargs .get ("in_end" , None ))
94
+ self .tca .i2c .writeto (address , buffer_out ,
95
+ start = kwargs .get ("out_start" , 0 ),
96
+ end = kwargs .get ("out_end" , None ),
97
+ stop = False )
98
+ self .tca .i2c .readfrom_into (address , buffer_in ,
99
+ start = kwargs .get ("in_start" , 0 ),
100
+ end = kwargs .get ("in_end" , None ))
96
101
97
102
class TCA9548A ():
98
103
"""Class which provides interface to TCA9548A I2C multiplexer."""
0 commit comments