![]() |
PS_Fgen_FW
4da88f4073c1cc65ea45c3a652a2751e495e50db
Firmware for an Power Supply and Function Generator build from an ATX power supply
|
Containing defines and functions for basic SPI initialization and handling. More...
Go to the source code of this file.
Macros | |
| #define | SPI_DEFAULT_SETTINGS SPISettings(8000000, MSBFIRST, SPI_MODE0) |
| Default settings for the SPI. | |
Typedefs | |
| typedef enum SpiDevices | SpiDevices_t |
| Enumeration with all SPI devices. | |
Enumerations | |
| enum | SpiDevices { SPI_DEV_NONE , SPI_DEV_TOUCH , SPI_DEV_TFT , SPI_DEV_PS , SPI_DEV_DDS , SPI_DEV_IO_EXP } |
| Enumeration with all SPI devices. More... | |
Functions | |
| void | SPI_SelectDevice (SpiDevices_t spiDevice) |
| Deselect all SPI devices (pull the CS lines high) and select the given one (pull the CS line low). | |
| void | SPI_DeselectAll () |
| Deselect all SPI devices (pull the CS lines high). | |
| void | SPI_Init () |
| Initialize the SPI subsystem as master. | |
| uint8_t | SPI_SendByte (uint8_t data) |
| Transfer a byte of data to the slave. | |
| uint8_t | SPI_ReadByte () |
| Read a byte of data from the slave by sending a dummy byte (0xFF). | |
Containing defines and functions for basic SPI initialization and handling.
| enum SpiDevices |
|
inline |
Read a byte of data from the slave by sending a dummy byte (0xFF).
| void SPI_SelectDevice | ( | SpiDevices_t | spiDevice | ) |
Deselect all SPI devices (pull the CS lines high) and select the given one (pull the CS line low).
| spiDevice | Requested SPI device which CS line is pulled low. |
|
inline |
Transfer a byte of data to the slave.
| data | Data byte to transfer via SPI. |