Add SPI chip select code
Disable interrupts while writing to SPI. Wait for SPIBUSY to clear before deselecting a SPI slave. Wait for FIFO to clear before writing new data.