SPI MASTER (APB)
The Serial Pheripheral Interface (SPI) is a synchronous serial communication interface specification used for short-distance communication.
To use: set the DATA_WIDTH parameter at instatiation. Then, put the input data in 'datai' register, and set the 'Go' signal. The bits of 'datai' will get serially shifted out to the device and the bits coming back from the device will get serially shifted into the 'datao' register.
The NUM_PORTS parameter can be used when the 'csb' and 'sclk' lines are shared with multiple devices and the 'din' and 'dout' lines are unique. 'din' and 'dout' become of width NUM_PORTS ports, and 'datai' and 'datao' become DATA_WIDTH*NUM_PORTS wide.
- configures clock polarity and clock phase
- configures the clock, using a frequency supported by the slave device.
- APB compatible