Skip to content

Commit 2886c2b

Browse files
committed
RP2040: SPI: check SS correctness only if declared
1 parent 735055b commit 2886c2b

File tree

1 file changed

+3
-2
lines changed
  • targets/TARGET_RASPBERRYPI/TARGET_RP2040

1 file changed

+3
-2
lines changed

targets/TARGET_RASPBERRYPI/TARGET_RP2040/spi_api.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel
2828

2929
MBED_ASSERT(spi_mosi == spi_miso);
3030
MBED_ASSERT(spi_miso == spi_sclk);
31-
MBED_ASSERT(spi_sclk == spi_ssel);
32-
MBED_ASSERT(spi_ssel != (SPIName)NC);
31+
if (spi_ssel != (SPIName)NC) {
32+
MBED_ASSERT(spi_sclk == spi_ssel);
33+
}
3334

3435
/* Obtain pointer to the SPI module. */
3536
obj->dev = (spi_inst_t *)pinmap_function(mosi, PinMap_SPI_MOSI);

0 commit comments

Comments
 (0)