Skip to content

Commit 6f98633

Browse files
committed
Update for I2C BusDevice read/write rename.
1 parent d78cb4b commit 6f98633

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_ds3231.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
4040
**Software and Dependencies:**
4141
42-
* Adafruit CircuitPython firmware for the ESP8622 and M0-based boards: https://github.com/adafruit/micropython/releases
42+
* Adafruit CircuitPython firmware for the ESP8622 and M0-based boards: https://github.com/adafruit/circuitpython/releases
4343
* Adafruit's Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
4444
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
4545
@@ -92,8 +92,8 @@ def __init__(self, i2c):
9292
buf = bytearray(2)
9393
buf[0] = 0x0e
9494
with self.i2c_device as i2c:
95-
i2c.writeto(buf, end=1, stop=False)
96-
i2c.readfrom_into(buf, start=1)
95+
i2c.write(buf, end=1, stop=False)
96+
i2c.read_into(buf, start=1)
9797

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

0 commit comments

Comments
 (0)