summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiuKang <[email protected]>2021-10-11 17:45:37 +0800
committerGitHub <[email protected]>2021-10-11 17:45:37 +0800
commit93792b2c8493c262246de4407ba2ad1c66ef52c3 (patch)
tree90b4fed218663e878faafc07096a5cdf4265b1e9
parent3c32e0168d1ebbac5d6e5749eaf804fc268dd460 (diff)
Update drv_spi.c
-rw-r--r--bsp/stm32/libraries/HAL_Drivers/drv_spi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_spi.c b/bsp/stm32/libraries/HAL_Drivers/drv_spi.c
index 4cbf4cf194..9b5dcc0885 100644
--- a/bsp/stm32/libraries/HAL_Drivers/drv_spi.c
+++ b/bsp/stm32/libraries/HAL_Drivers/drv_spi.c
@@ -293,9 +293,9 @@ static rt_uint32_t spixfer(struct rt_spi_device *device, struct rt_spi_message *
if (message->cs_take && !(device->config.mode & RT_SPI_NO_CS))
{
- if(device->config.mode & RT_SPI_CS_HIGH)
+ if (device->config.mode & RT_SPI_CS_HIGH)
HAL_GPIO_WritePin(cs->GPIOx, cs->GPIO_Pin, GPIO_PIN_SET);
- else
+ else
HAL_GPIO_WritePin(cs->GPIOx, cs->GPIO_Pin, GPIO_PIN_RESET);
}
@@ -390,7 +390,7 @@ static rt_uint32_t spixfer(struct rt_spi_device *device, struct rt_spi_message *
if (message->cs_release && !(device->config.mode & RT_SPI_NO_CS))
{
- if(device->config.mode & RT_SPI_CS_HIGH)
+ if (device->config.mode & RT_SPI_CS_HIGH)
HAL_GPIO_WritePin(cs->GPIOx, cs->GPIO_Pin, GPIO_PIN_RESET);
else
HAL_GPIO_WritePin(cs->GPIOx, cs->GPIO_Pin, GPIO_PIN_SET);