How Does SPI Work? | SPI Communication Basics
How can two devices exchange a bit in both directions on the same SPI clock edge?
One SPI clock shifts a bit out of each device while another bit shifts in. The four clock modes, individual chip-select lines and a daisy-chain example show how several devices can use the same bus.