From d906bf5b18332cc2ea689158f758afe74d8bfa18 Mon Sep 17 00:00:00 2001 From: Yifeng Zhao Date: Mon, 11 Nov 2019 16:58:45 +0800 Subject: [PATCH] spi: support slave mode and master mode runtime config support slave mode and master mode runtime config. Change-Id: Iabadbade8997bb8e3adef8ce95f6c45f6bb35329 Signed-off-by: Yifeng Zhao --- components/drivers/include/drivers/spi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/drivers/include/drivers/spi.h b/components/drivers/include/drivers/spi.h index 04a65421a5..301726fda8 100644 --- a/components/drivers/include/drivers/spi.h +++ b/components/drivers/include/drivers/spi.h @@ -43,7 +43,7 @@ extern "C"{ #define RT_SPI_MODE_2 (RT_SPI_CPOL | 0) /* CPOL = 1, CPHA = 0 */ #define RT_SPI_MODE_3 (RT_SPI_CPOL | RT_SPI_CPHA) /* CPOL = 1, CPHA = 1 */ -#define RT_SPI_MODE_MASK (RT_SPI_CPHA | RT_SPI_CPOL | RT_SPI_MSB) +#define RT_SPI_MODE_MASK (RT_SPI_CPHA | RT_SPI_CPOL | RT_SPI_MSB | RT_SPI_SLAVE) #define RT_SPI_BUS_MODE_SPI (1<<0) #define RT_SPI_BUS_MODE_QSPI (1<<1)