From a96c6f7deff40c20a47278bbdfd8c925a5fddd83 Mon Sep 17 00:00:00 2001 From: Brian Y Date: Sun, 15 Dec 2019 17:49:08 -0500 Subject: [PATCH] use writebytes2 --- RaspberryPi&JetsonNano/python/lib/waveshare_epd/epd2in7.py | 6 +++--- .../python/lib/waveshare_epd/epdconfig.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epd2in7.py b/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epd2in7.py index 6482fb1..a1760b6 100644 --- a/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epd2in7.py +++ b/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epd2in7.py @@ -273,7 +273,7 @@ class EPD: if data: epdconfig.digital_write(self.dc_pin, epdconfig.GPIO.HIGH) # HIGH: write data # [epdconfig.spi_writebyte([byte]) for byte in data] - epdconfig.spi_writebytes2(data) + epdconfig.spi_writebyte2(data) def set_lut(self): look_up_tables = { @@ -284,8 +284,8 @@ class EPD: LUT_BLACK_TO_BLACK: self.lut_bb } - for command, data in look_up_tables.items(): - self.send_command_and_data(command, data) + for command, lut in look_up_tables.items(): + self.send_command_and_data(command, data=lut) # self.send_command(LUT_FOR_VCOM) # vcom # for data in self.lut_vcom_dc: diff --git a/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epdconfig.py b/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epdconfig.py index 9d3be62..511bd2d 100644 --- a/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epdconfig.py +++ b/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epdconfig.py @@ -37,7 +37,7 @@ def spi_writebyte(data): SPI.writebytes(data) GPIO.output(CS_PIN, GPIO.HIGH) -def spi_writebytes2(data): +def spi_writebyte2(data): # manual CS on ROCK64 GPIO.output(CS_PIN, GPIO.LOW) SPI.writebytes2(data)