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"
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) (SPI_HWCS_MASK | 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) } |
typedef uint32_t | spi_clk_t |
SPI clock type. | |
#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 | ) | (SPI_HWCS_MASK | x) |
#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.