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>
This commit is contained in:
parent
975a687447
commit
aab8061dce
|
@ -232,7 +232,7 @@ STATIC void machine_hw_spi_init_internal(
|
||||||
#ifdef FSPI_HOST
|
#ifdef FSPI_HOST
|
||||||
&& self->host != FSPI_HOST
|
&& self->host != FSPI_HOST
|
||||||
#endif
|
#endif
|
||||||
#ifdef SPI3_HOST
|
#if SOC_SPI_PERIPH_NUM > 2
|
||||||
&& self->host != SPI3_HOST
|
&& self->host != SPI3_HOST
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in New Issue