Skip to content

Commit 7e18ccb

Browse files
committed
Fix for new I2CDevice API.
1 parent ad3164c commit 7e18ccb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_ssd1306/ssd1306.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ def write_cmd(self, cmd):
121121
self.temp[0] = 0x80 # Co=1, D/C#=0
122122
self.temp[1] = cmd
123123
with self.i2c_device:
124-
self.i2c_device.writeto(self.temp)
124+
self.i2c_device.write(self.temp)
125125

126126
def write_framebuf(self):
127127
# Blast out the frame buffer using a single I2C transaction to support
128128
# hardware I2C interfaces.
129129
with self.i2c_device:
130-
self.i2c_device.writeto(self.buffer)
130+
self.i2c_device.write(self.buffer)
131131

132132
def poweron(self):
133133
pass

0 commit comments

Comments
 (0)