Skip to content

Commit 9e797c1

Browse files
committed
Update for I2C BusDevice read/write rename.
1 parent 53f0666 commit 9e797c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_ds1307.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ def __init__(self, i2c):
7474
buf = bytearray(2)
7575
buf[0] = 0x07
7676
with self.i2c_device as i2c:
77-
i2c.writeto(buf, end=1, stop=False)
78-
i2c.readfrom_into(buf, start=1)
77+
i2c.write(buf, end=1, stop=False)
78+
i2c.read_into(buf, start=1)
7979

8080
if (buf[1] & 0b00000011) != 0b00000011:
8181
raise ValueError("Unable to find DS1307 at i2c address 0x68.")

0 commit comments

Comments
 (0)