Skip to content

Commit df2037b

Browse files
authored
Correct to i2c_device
1 parent 5e953fc commit df2037b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_ds3231.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def __init__(self, i2c):
101101
buf = bytearray(2)
102102
buf[0] = 0x0e
103103
with self.i2c_device as i2c_device:
104-
i2c.write_then_readinto(buf, buf, out_end=1, in_start=1)
104+
i2c_device.write_then_readinto(buf, buf, out_end=1, in_start=1)
105105

106106
if (buf[1] & 0b00011000) != 0b00011000:
107107
raise ValueError("Unable to find DS3231 at i2c address 0x68.")

0 commit comments

Comments
 (0)