uMIDI
The swiss army knife for quick and easy developement of MIDI applications.
|
SPI emulation module. More...
Go to the source code of this file.
Data Structures | |
struct | spi_config |
Configuration structure for the SPI emulation module. More... | |
Functions | |
void | init_spi_module (const struct spi_config *config) |
Configures the SPI module. More... | |
uint16_t | spi_transceive (uint16_t output) |
Sends and receives a word (full duplex) More... | |
void | spi_select (bool select) |
Controls the chip select line. More... | |
SPI emulation module.
Note: At the moment only a single instance is supported! Also, the clock frequency is hard-coded to 500kHz.
void init_spi_module | ( | const struct spi_config * | config | ) |
Configures the SPI module.
Initializes all specified GPIO ports and the clock line
config | the SPI configuration |
void spi_select | ( | bool | select | ) |
Controls the chip select line.
select | if true , the line is pulled down |
uint16_t spi_transceive | ( | uint16_t | output | ) |
Sends and receives a word (full duplex)
output | the output word |