From 076cd6753024b402c4ae9d18110860073fc954c2 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Tue, 23 Oct 2018 21:18:54 +0000 Subject: [PATCH] stm32: spi-v2: Frame format is available for all. All spi v2 peripherals include the Motorola/TI Frame formatting options introduced with F2. --- include/libopencm3/stm32/common/spi_common_v2.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/libopencm3/stm32/common/spi_common_v2.h b/include/libopencm3/stm32/common/spi_common_v2.h index 2f2e204b..dd81b6cb 100644 --- a/include/libopencm3/stm32/common/spi_common_v2.h +++ b/include/libopencm3/stm32/common/spi_common_v2.h @@ -59,6 +59,12 @@ specific memorymap.h header before including this header file.*/ /* FRXTH: FIFO reception threshold */ #define SPI_CR2_FRXTH (1 << 12) +/* FRF: Frame format */ +/* Note: Not used in I2S mode. */ +#define SPI_CR2_FRF (1 << 4) +#define SPI_CR2_FRF_MOTOROLA_MODE (0 << 4) +#define SPI_CR2_FRF_TI_MODE (1 << 4) + /* DS: Data size */ /****************************************************************************/ /** @defgroup spi_ds SPI data size @@ -98,6 +104,9 @@ specific memorymap.h header before including this header file.*/ #define SPI_SR_FRLVL_HALF_FIFO (0x2 << 9) #define SPI_SR_FRLVL_FIFO_FULL (0x3 << 9) +/* FRE : TI frame format error */ +#define SPI_SR_FRE (1 << 8) + /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS