sw: Add delay_usecs to avoid packet loss for slow SPI commands

This commit is contained in:
Markus Koch 2020-08-08 16:51:54 +02:00
parent c3bca0eba6
commit b92eb13f76

View File

@ -133,10 +133,10 @@ class radioserv:
while True: while True:
self.disp_mgr.animate(1) self.disp_mgr.animate(1)
self.disp_mgr.render() self.disp_mgr.render()
rdata = self.spi.xfer([100, 101, 102, 103], 100000, 1) rdata = self.spi.xfer([100, 101, 102], 50000, 1000)
print(rdata) print(rdata)
data = list(self.disp_mgr.get_image()) data = list(self.disp_mgr.get_image())
rdata = self.spi.xfer(data, SPI_SPEED, 1) rdata = self.spi.xfer(data, SPI_SPEED, 10000)
await self.io_event.wait() await self.io_event.wait()
self.io_event.clear() self.io_event.clear()