@@ -153,18 +153,20 @@ def write_then_readinto(self, out_buffer, in_buffer, *,
153
153
out_start = out_start , out_end = out_end ,
154
154
in_start = in_start , in_end = in_end , stop = stop )
155
155
if self ._debug :
156
- print ("i2c_device.writeto_then_readfrom.out_buffer:" , [hex (i ) for i in out_buffer ])
157
- print ("i2c_device.writeto_then_readfrom.in_buffer:" , [hex (i ) for i in in_buffer ])
156
+ print ("i2c_device.writeto_then_readfrom.out_buffer:" ,
157
+ [hex (i ) for i in out_buffer [out_start :out_end ]])
158
+ print ("i2c_device.writeto_then_readfrom.in_buffer:" ,
159
+ [hex (i ) for i in in_buffer [in_start :in_end ]])
158
160
else :
159
161
# If we don't have a special implementation, we can fake it with two calls
160
162
self .write (out_buffer , start = out_start , end = out_end , stop = stop )
161
163
if self ._debug :
162
164
print ("i2c_device.write_then_readinto.write.out_buffer:" ,
163
- [hex (i ) for i in out_buffer ])
165
+ [hex (i ) for i in out_buffer [ out_start : out_end ] ])
164
166
self .readinto (in_buffer , start = in_start , end = in_end )
165
167
if self ._debug :
166
168
print ("i2c_device.write_then_readinto.readinto.in_buffer:" ,
167
- [hex (i ) for i in in_buffer ])
169
+ [hex (i ) for i in in_buffer [ in_start : in_end ] ])
168
170
169
171
#pylint: enable-msg=too-many-arguments
170
172
0 commit comments