21#ifndef PERIPH_CPU_SPI_H
22#define PERIPH_CPU_SPI_H
38typedef uint_fast8_t spi_t;
47#define SPI_HWCS_MASK (0xffffff00)
55#define SPI_HWCS(x) (SPI_HWCS_MASK | x)
60#define SPI_CS_UNDEF (GPIO_UNDEF)
77#define PERIPH_SPI_NEEDS_TRANSFER_BYTE
79#define PERIPH_SPI_NEEDS_TRANSFER_REG
81#define PERIPH_SPI_NEEDS_TRANSFER_REGS
112#ifndef CPU_FAM_STM32F1
120#ifdef MODULE_PERIPH_DMA
DMA CPU specific definitions for the STM32 family.
GPIO CPU definitions for the STM32 family.
uint32_t spi_clk_t
SPI clock type.
@ 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
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.
uint32_t rccmask
bit in the RCC peripheral enable register
gpio_af_t miso_af
MISO pin alternate function.
SPI_TypeDef * dev
SPI device base register address.
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.