electro-smith / libDaisy

Hardware Library for the Daisy Audio Platform
https://www.electro-smith.com/daisy
MIT License
312 stars 131 forks source link

SPI / OLED Transport - Add Software CS capabilities #514

Open stephenhensley opened 2 years ago

stephenhensley commented 2 years ago

This could be added directly to the SPI handle. However, with the recent change in callback structures for DMA transactions it is possible to self-manage software CS in pretty much all use cases (blocking/polling and non-blocking/DMA).

So I think this should be added to the Transport class, and it should just manage the CS pin before/after transmissions.

This would make it pretty easy to set up a few OLEDs on the same SPI bus if desired as well.