From d51f4583a47bb6c2843b7d1c47e89421c0d8322a Mon Sep 17 00:00:00 2001 From: wanlei Date: Mon, 12 Dec 2022 11:42:50 +0800 Subject: [PATCH] spi: fix micro SPI_HOST_MAX error Closes https://github.com/espressif/esp-idf/issues/10349 --- components/hal/include/hal/spi_types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/hal/include/hal/spi_types.h b/components/hal/include/hal/spi_types.h index 3420468872..05566d7aed 100644 --- a/components/hal/include/hal/spi_types.h +++ b/components/hal/include/hal/spi_types.h @@ -19,7 +19,9 @@ typedef enum { //SPI1 can be used as GPSPI only on ESP32 SPI1_HOST=0, ///< SPI1 SPI2_HOST=1, ///< SPI2 +#if SOC_SPI_PERIPH_NUM > 2 SPI3_HOST=2, ///< SPI3 +#endif SPI_HOST_MAX, ///< invalid host value } spi_host_device_t;