X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka.git/blobdiff_plain/411ec4275644674c4e8a00865e29ae3ddf53590a..51d92753cba10d1af82b81d641ff067378d6eb12:/src/busio.py?ds=sidebyside diff --git a/src/busio.py b/src/busio.py index 069e9be..ad96061 100755 --- a/src/busio.py +++ b/src/busio.py @@ -62,6 +62,8 @@ class I2C(Lockable): return self._i2c.writeto(address, memoryview(buffer)[start:end], stop) return self._i2c.writeto(address, buffer, stop) + def writeto_then_readfrom(self, address, buffer_out, buffer_in, out_start=0, out_end=None, in_start=0, in_end=None, stop=False): + return self._i2c.write_readinto(address, buffer_out, buffer_in, out_start, out_end, in_start, in_end, stop) class SPI(Lockable): def __init__(self, clock, MOSI=None, MISO=None):