37typedef uint_fast8_t spi_t;
46#define SPI_HWCS_MASK (0xffffff00)
54#define SPI_HWCS(x) (SPI_HWCS_MASK | x)
59#define SPI_CS_UNDEF (GPIO_UNDEF)
76#define PERIPH_SPI_NEEDS_TRANSFER_BYTE
78#define PERIPH_SPI_NEEDS_TRANSFER_REG
80#define PERIPH_SPI_NEEDS_TRANSFER_REGS
111#ifndef CPU_FAM_STM32F1
119#ifdef MODULE_PERIPH_DMA
@ SPI_CLK_10MHZ
drive the SPI bus with 10MHz
@ SPI_CLK_5MHZ
drive the SPI bus with 5MHz
@ SPI_CLK_400KHZ
drive the SPI bus with 400KHz
@ SPI_CLK_1MHZ
drive the SPI bus with 1MHz
@ SPI_CLK_100KHZ
drive the SPI bus with 100KHz
DMA CPU specific definitions for the STM32 family.
GPIO CPU definitions for the STM32 family.
gpio_af_t
Override alternative GPIO mode options.
gpio_t spi_pin_miso(spi_t dev)
Get the MISO pin of the given SPI bus.
gpio_t spi_pin_mosi(spi_t dev)
Get the MOSI pin of the given SPI bus.
gpio_t spi_pin_clk(spi_t dev)
Get the CLK pin of the given SPI bus.
gpio_t spi_cs_t
Chip select pin type overlaps with gpio_t so it can be casted to this.
unsigned dma_t
DMA channel type.
SPI device configuration.
gpio_t miso_pin
pin used for MISO
uint32_t rccmask
bit in the RCC peripheral enable register
gpio_af_t miso_af
MISO pin alternate function.
gpio_t mosi_pin
pin used for MOSI
SPI_t * dev
pointer to the used SPI device
spi_cs_t cs_pin
pin used for CS
uint8_t apbbus
APBx bus the device is connected to.
gpio_af_t sclk_af
SCLK pin alternate function.
gpio_af_t cs_af
HWCS pin alternate function.
gpio_af_t mosi_af
MOSI pin alternate function.
#define MHZ(x)
A macro to return the Hz in x MHz.
#define KHZ(x)
A macro to return the Hz in x kHz.