diff --git a/components/openthread/src/esp_openthread_platform.cpp b/components/openthread/src/esp_openthread_platform.cpp index 3e73ef362a..8beb8143dc 100644 --- a/components/openthread/src/esp_openthread_platform.cpp +++ b/components/openthread/src/esp_openthread_platform.cpp @@ -94,14 +94,18 @@ static esp_err_t esp_openthread_host_interface_init(const esp_openthread_platfor { esp_openthread_host_connection_mode_t host_mode = get_host_connection_mode(); switch (host_mode) { +#if CONFIG_OPENTHREAD_RCP_SPI case HOST_CONNECTION_MODE_RCP_SPI: ESP_RETURN_ON_ERROR(esp_openthread_host_rcp_spi_init(config), OT_PLAT_LOG_TAG, "esp_openthread_host_rcp_spi_init failed"); break; +#endif +#if CONFIG_OPENTHREAD_RCP_UART case HOST_CONNECTION_MODE_RCP_UART: ESP_RETURN_ON_ERROR(esp_openthread_host_rcp_uart_init(config), OT_PLAT_LOG_TAG, "esp_openthread_host_rcp_uart_init failed"); break; +#endif #if CONFIG_OPENTHREAD_CONSOLE_TYPE_UART case HOST_CONNECTION_MODE_CLI_UART: ESP_RETURN_ON_ERROR(esp_openthread_host_cli_uart_init(config), OT_PLAT_LOG_TAG, diff --git a/components/openthread/src/port/esp_openthread_spi_slave.c b/components/openthread/src/port/esp_openthread_spi_slave.c index 979e6067e7..754300e5c9 100644 --- a/components/openthread/src/port/esp_openthread_spi_slave.c +++ b/components/openthread/src/port/esp_openthread_spi_slave.c @@ -25,7 +25,6 @@ #include #include "driver/gpio.h" #include "driver/spi_slave.h" -#include "esp_private/cache_utils.h" #include "esp_private/spi_slave_internal.h" #include "ncp/ncp_config.h" #include "openthread/error.h"