From fb96e0a264765378b22f8678d08229fe543e699e Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 21 Aug 2019 16:06:38 -0700 Subject: [PATCH] Remove stop kwarg and use write_then_readinto. See https://github.com/adafruit/circuitpython/issues/2082 for details. --- adafruit_ds1307.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/adafruit_ds1307.py b/adafruit_ds1307.py index 13ed3ba..764bf3f 100644 --- a/adafruit_ds1307.py +++ b/adafruit_ds1307.py @@ -78,8 +78,7 @@ def __init__(self, i2c_bus): buf = bytearray(2) buf[0] = 0x07 with self.i2c_device as i2c: - i2c.write(buf, end=1, stop=False) - i2c.readinto(buf, start=1) + i2c.write_then_readinto(buf, buf, out_end=1, in_start=1) if (buf[1] & 0b00000011) != 0b00000011: raise ValueError("Unable to find DS1307 at i2c address 0x68.")