fix(openthread): add macro for rcp init

This commit is contained in:
Xu Si Yu 2024-09-26 14:29:51 +08:00
parent 82b1d5ed0d
commit ce022c42df
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"