mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-10-02 14:23:19 +08:00
[bsp/renesas][drivers] Skip invalid chip select writes in SCI SPI
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user