I am using the RPI 3 B+ as a master and communicating to a slave through SPI.
The message sequence from the slave has a couple rules:
1. The Raspberry Pi needs to ensure that there is a delay of 2 SPI clocks between CS going low and start of SPI clock.
2. Raspberry PI (Host) needs to make sure that the CS is toggled every 16 bits of transfer
3. SPI word length should be 16 bits
Using the BCM2835 library given by https://www.airspayce.com/mikem/bcm2835/ and/or WiringPI I have realized that the SPI protocol does not actually toggle the CS until all the bits are delivered (sometimes I have to transfer more than 16 bits). Also, each SPI CLK cycle is only 8 bits long instead of 16.
Besides writing my own driver to accommodate for those bottlenecks or hacking my way using the current bcm2835 library. Are there any other drivers I can use that are open source?