Use binary semaphore to lock SPI.