SPI CPU specific definitions for the STM32 family. More...
SPI CPU specific definitions for the STM32 family.
Definition in file cpu_spi.h.
#include <stdint.h>#include "cpu.h"#include "macros/units.h"#include "periph/cpu_dma.h"#include "periph/cpu_gpio.h" Include dependency graph for cpu_spi.h:
 Include dependency graph for cpu_spi.h: This graph shows which files directly or indirectly include this file:
 This graph shows which files directly or indirectly include this file:Go to the source code of this file.
| Data Structures | |
| struct | spi_conf_t | 
| SPI device configuration.  More... | |
| #define | SPI_HWCS_MASK (0xffffff00) | 
| Define a magic number that tells us to use hardware chip select. | |
| #define | SPI_HWCS(x) | 
| Override the default SPI hardware chip select access macro. | |
| #define | SPI_CS_UNDEF (GPIO_UNDEF) | 
| Define value for unused CS line. | |
| #define | PERIPH_SPI_NEEDS_TRANSFER_BYTE | 
| Use the shared SPI functions. | |
| #define | PERIPH_SPI_NEEDS_TRANSFER_REG | 
| Use transfer reg function from periph common. | |
| #define | PERIPH_SPI_NEEDS_TRANSFER_REGS | 
| Use transfer regs function from periph common. | |
| #define | HAVE_SPI_CLK_T | 
| Override SPI clock speed values. | |
| enum | { SPI_CLK_100KHZ = KHZ(100) , SPI_CLK_400KHZ = KHZ(400) , SPI_CLK_1MHZ = MHZ(1) , SPI_CLK_5MHZ = MHZ(5) , SPI_CLK_10MHZ = MHZ(10) } | 
| #define PERIPH_SPI_NEEDS_TRANSFER_BYTE | 
| #define PERIPH_SPI_NEEDS_TRANSFER_REG | 
| #define PERIPH_SPI_NEEDS_TRANSFER_REGS | 
| #define SPI_CS_UNDEF (GPIO_UNDEF) | 
| #define SPI_HWCS | ( | x | ) | 
Override the default SPI hardware chip select access macro.
Since the CPU does only support one single hardware chip select line, we can detect the usage of non-valid lines by comparing to SPI_HWCS_VALID.
| #define SPI_HWCS_MASK (0xffffff00) | 
Define a magic number that tells us to use hardware chip select.
We use a random value here, that does clearly differentiate from any possible GPIO_PIN(x) value.