Browse Source

esp32/machine_hw_spi: Fix access of SPI(2).

SPI3_HOST is not a macro but rather an enum, so use SOC_SPI_PERIPH_NUM to
detect if it's defined.

Fixes issue #11919.

Signed-off-by: Damien George <damien@micropython.org>
pull/12086/head
Damien George 1 year ago
parent
commit
aab8061dce
  1. 2
      ports/esp32/machine_hw_spi.c

2
ports/esp32/machine_hw_spi.c

@ -232,7 +232,7 @@ STATIC void machine_hw_spi_init_internal(
#ifdef FSPI_HOST
&& self->host != FSPI_HOST
#endif
#ifdef SPI3_HOST
#if SOC_SPI_PERIPH_NUM > 2
&& self->host != SPI3_HOST
#endif
) {

Loading…
Cancel
Save