How to include chip select in SPI device drivers?

Jan Sommer soja-lists at aries.uberspace.de
Sat Jun 4 22:29:49 UTC 2016


Hello,

I was wondering if there is a "standard" way for setting/clearing the chip select pin when writing an SPI device driver.
I checked the example drivers in the libchip directory and the example of André Marques, but didn't really find anything.
So far, I had the idea to pass 2 functions (CS_enable, CS_disable) to the device driver to have it BSP-agnostic because setting GPIOs is handled differently for different BSPs, but any suggestions are welcome.

Best regards,

   Jan


More information about the users mailing list