C validating filename
This adds more flexibility to the communication channel between the master and slave.
To begin communication, the bus master configures the clock, using a frequency supported by the slave device, typically up to a few MHz.Sometimes SPI is called a four-wire serial bus, contrasting with three-, two-, and one-wire serial buses.The SPI may be accurately described as a synchronous serial interface, but it is different from the Synchronous Serial Interface (SSI) protocol, which is also a four-wire synchronous serial communication protocol.A pull-up resistor between power source and chip select line is highly recommended for each independent device to reduce cross-talk between devices.Some products that implement SPI may be connected in a daisy chain configuration, the first slave output being connected to the second slave input, etc.Every slave on the bus that has not been activated using its chip select line must disregard the input clock and MOSI signals, and must not drive MISO.
names these two options as CPOL and CPHA respectively, and most vendors have adopted that convention. The timing is further described below and applies to both the master and the slave device.
The master then selects the slave device with a logic level 0 on the select line.
If a waiting period is required, such as for an analog-to-digital conversion, the master must wait for at least that period of time before issuing clock cycles.
Data is usually shifted out with the most-significant bit first, while shifting a new least-significant bit into the same register.
At the same time, Data from the counterpart is shifted into the least-significant bit register.
After the register bits have been shifted out and in, the master and slave have exchanged register values.