use writebytes2
This commit is contained in:
parent
25f11d3aed
commit
a96c6f7def
2 changed files with 4 additions and 4 deletions
|
|
@ -273,7 +273,7 @@ class EPD:
|
||||||
if data:
|
if data:
|
||||||
epdconfig.digital_write(self.dc_pin, epdconfig.GPIO.HIGH) # HIGH: write 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)
|
epdconfig.spi_writebyte2(data)
|
||||||
|
|
||||||
def set_lut(self):
|
def set_lut(self):
|
||||||
look_up_tables = {
|
look_up_tables = {
|
||||||
|
|
@ -284,8 +284,8 @@ class EPD:
|
||||||
LUT_BLACK_TO_BLACK: self.lut_bb
|
LUT_BLACK_TO_BLACK: self.lut_bb
|
||||||
}
|
}
|
||||||
|
|
||||||
for command, data in look_up_tables.items():
|
for command, lut in look_up_tables.items():
|
||||||
self.send_command_and_data(command, data)
|
self.send_command_and_data(command, data=lut)
|
||||||
|
|
||||||
# self.send_command(LUT_FOR_VCOM) # vcom
|
# self.send_command(LUT_FOR_VCOM) # vcom
|
||||||
# for data in self.lut_vcom_dc:
|
# for data in self.lut_vcom_dc:
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ def spi_writebyte(data):
|
||||||
SPI.writebytes(data)
|
SPI.writebytes(data)
|
||||||
GPIO.output(CS_PIN, GPIO.HIGH)
|
GPIO.output(CS_PIN, GPIO.HIGH)
|
||||||
|
|
||||||
def spi_writebytes2(data):
|
def spi_writebyte2(data):
|
||||||
# manual CS on ROCK64
|
# manual CS on ROCK64
|
||||||
GPIO.output(CS_PIN, GPIO.LOW)
|
GPIO.output(CS_PIN, GPIO.LOW)
|
||||||
SPI.writebytes2(data)
|
SPI.writebytes2(data)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue