From 183f9be898c5b97c367564df0a88507dd1c2e3f9 Mon Sep 17 00:00:00 2001 From: linyiyang <393676163@qq.com> Date: Thu, 3 Dec 2020 08:48:07 +0800 Subject: [PATCH] [bsp][gd32450z-eval]fixed spi driver bug --- bsp/gd32450z-eval/drivers/drv_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/gd32450z-eval/drivers/drv_spi.c b/bsp/gd32450z-eval/drivers/drv_spi.c index 4f116d7d68..f4e56e1a8c 100644 --- a/bsp/gd32450z-eval/drivers/drv_spi.c +++ b/bsp/gd32450z-eval/drivers/drv_spi.c @@ -130,7 +130,7 @@ static rt_err_t configure(struct rt_spi_device* device, } } /* baudrate */ - switch(configuration->mode) + switch(configuration->mode & RT_SPI_MODE_3) { case RT_SPI_MODE_0: spi_init_struct.clock_polarity_phase = SPI_CK_PL_LOW_PH_1EDGE;