Explorar el Código

[bsp][gd32450z-eval]fixed spi driver bug

linyiyang hace 5 años
padre
commit
183f9be898
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      bsp/gd32450z-eval/drivers/drv_spi.c

+ 1 - 1
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;