Skip to content

Commit d908c69

Browse files
committed
lint examples
1 parent ad5b467 commit d908c69

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

examples/epd_bitmap.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ class BMPError(Exception):
7878
for col in range(bmpWidth):
7979
b, g, r = bytearray(f.read(3)) # BMP files store RGB in BGR
8080
if r < 0x80 and g < 0x80 and b < 0x80:
81-
display.draw_pixel(row, col, Adafruit_EPD.BLACK)
81+
display.pixel(row, col, Adafruit_EPD.BLACK)
8282
elif r >= 0x80 and g >= 0x80 and b >= 0x80:
83-
display.draw_pixel(row, col, Adafruit_EPD.WHITE)
83+
display.pixel(row, col, Adafruit_EPD.WHITE)
8484
elif r >= 0x80:
85-
display.draw_pixel(row, col, Adafruit_EPD.RED)
85+
display.pixel(row, col, Adafruit_EPD.RED)
8686

8787
except OSError as e:
8888
if e.args[0] == 28:

examples/epd_blinka.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,21 @@
99

1010
# create the spi device and pins we will need
1111
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
12-
while not spi.try_lock():
13-
pass
14-
spi.configure(baudrate=16000000)
15-
spi.unlock()
1612

1713
ecs = digitalio.DigitalInOut(board.D22)
1814
dc = digitalio.DigitalInOut(board.D13)
1915
srcs = digitalio.DigitalInOut(board.D6)
2016
rst = digitalio.DigitalInOut(board.D19)
2117
busy = digitalio.DigitalInOut(board.D26)
2218

19+
2320
# give them all to our driver
24-
display = Adafruit_IL0373(152, 152, rst, dc, busy, srcs, ecs, spi)
21+
print("Creating display")
22+
display = Adafruit_IL0373(104, 212, spi,
23+
cs_pin=ecs, dc_pin=dc, sramcs_pin=srcs,
24+
rst_pin=rst, busy_pin=busy)
25+
26+
2527
# Create blank image for drawing.
2628
# Make sure to create image with mode '1' for 1-bit color.
2729
width = display.width

0 commit comments

Comments
 (0)