Skip to content

Commit df5ad1d

Browse files
committed
Update for I2C BusDevice read/write rename.
1 parent fa655e6 commit df5ad1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_pcf8523.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ def __init__(self, i2c):
103103
buf = bytearray(2)
104104
buf[0] = 0x12
105105
with self.i2c_device as i2c:
106-
i2c.writeto(buf, end=1, stop=False)
107-
i2c.readfrom_into(buf, start=1)
106+
i2c.write(buf, end=1, stop=False)
107+
i2c.read_into(buf, start=1)
108108

109109
if (buf[1] & 0b00000111) != 0b00000111:
110110
raise ValueError("Unable to find PCF8523 at i2c address 0x68.")

0 commit comments

Comments
 (0)