Merge branch 'fix/fix_an_ot_compile_issue' into 'master'

fix(openthread): surround the rcp init logic with a macro

See merge request espressif/esp-idf!33835
This commit is contained in:
Shu Chen 2024-09-26 19:02:17 +08:00
commit 9cf892a669
2 changed files with 4 additions and 1 deletions

View File

@ -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,

View File

@ -25,7 +25,6 @@
#include <string.h>
#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"