diff --git a/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epd2in7.py b/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epd2in7.py index 5ca0739..6482fb1 100644 --- a/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epd2in7.py +++ b/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epd2in7.py @@ -272,7 +272,8 @@ class EPD: epdconfig.spi_writebyte([command]) if data: epdconfig.digital_write(self.dc_pin, epdconfig.GPIO.HIGH) # HIGH: write data - [epdconfig.spi_writebyte([byte]) for byte in data] + # [epdconfig.spi_writebyte([byte]) for byte in data] + epdconfig.spi_writebytes2(data) def set_lut(self): look_up_tables = { diff --git a/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epdconfig.py b/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epdconfig.py index 3dc4f62..9d3be62 100644 --- a/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epdconfig.py +++ b/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epdconfig.py @@ -37,6 +37,12 @@ def spi_writebyte(data): SPI.writebytes(data) GPIO.output(CS_PIN, GPIO.HIGH) +def spi_writebytes2(data): + # manual CS on ROCK64 + GPIO.output(CS_PIN, GPIO.LOW) + SPI.writebytes2(data) + GPIO.output(CS_PIN, GPIO.HIGH) + def module_init(): GPIO.setmode(GPIO.BOARD) GPIO.setwarnings(False)