added wrapper for spi_writebytes2
This commit is contained in:
parent
6c23879c9b
commit
25f11d3aed
2 changed files with 8 additions and 1 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue