[bsp/renesas][drivers] Skip invalid chip select writes in SCI SPI

This commit is contained in:
CYFS
2026-08-27 09:01:32 +08:00
committed by Rbb666
parent 0305faf806
commit fcc4d6c01a
@@ -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