where select and deselect are device specific. If we followed the UART pattern of accessing a single semaphore inside the SPI operations then it would be possible have one thread interfere with another. We have a couple of design options. We could simply make the semaphore for the SPI interface into a global object an require all users of the interface to first request the sempahore. This has the significant disadvantage of requiring application code writers to be too familar with the low-level synchronization assumptions for the interface and runs a significant risk of leading to flawed code. We could add the select GPIO pin as a (pair) of parameters to the SPI interface as in: