diff options
| author | CYFS <[email protected]> | 2026-08-24 17:52:54 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2026-08-27 09:01:32 +0800 |
| commit | fcc4d6c01a9f98270b99de5d9d29a93cfd98331d (patch) | |
| tree | 675f3c35fa587fd9361e7c13b78f6886f0d7ebcd | |
| parent | 0305faf806f855dc91ec0866fc7f654aafc29a37 (diff) | |
[bsp/renesas][drivers] Skip invalid chip select writes in SCI SPI
| -rw-r--r-- | bsp/renesas/libraries/HAL_Drivers/drivers/drv_sci.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bsp/renesas/libraries/HAL_Drivers/drivers/drv_sci.c b/bsp/renesas/libraries/HAL_Drivers/drivers/drv_sci.c index 7570f83f36..8643603851 100644 --- a/bsp/renesas/libraries/HAL_Drivers/drivers/drv_sci.c +++ b/bsp/renesas/libraries/HAL_Drivers/drivers/drv_sci.c @@ -668,7 +668,17 @@ static rt_err_t ra_hw_spi_configure(struct rt_spi_device *device, #endif /**< Configure Select Line */ - rt_pin_write(device->cs_pin, PIN_HIGH); + if (!(configuration->mode & RT_SPI_NO_CS) && (device->cs_pin != PIN_NONE)) + { + if (configuration->mode & RT_SPI_CS_HIGH) + { + rt_pin_write(device->cs_pin, PIN_LOW); + } + else + { + rt_pin_write(device->cs_pin, PIN_HIGH); + } + } /**< config bitrate */ #ifdef R_SCI_B_SPI_H |
