Merge branch 'bugfix/bugfix_for_radio_spinel' into 'release/v5.1'

fix(openthread): fix openthread configurations for radio spinle on 5.1

See merge request espressif/esp-idf!28872
This commit is contained in:
Jiang Jiang Jian 2024-02-05 14:15:15 +08:00
commit 7380f96017
3 changed files with 12 additions and 6 deletions

View File

@ -9,6 +9,9 @@ if(CONFIG_OPENTHREAD_ENABLED OR CONFIG_IDF_DOC_BUILD OR CONFIG_OPENTHREAD_SPINEL
set(public_include_dirs
"include"
"openthread/include")
endif()
if(CONFIG_OPENTHREAD_ENABLED)
set(private_include_dirs
"openthread/examples/platforms"

View File

@ -6,15 +6,16 @@
#pragma once
#include <sys/select.h>
#include "esp_err.h"
#include "esp_ieee802154_types.h"
#include "hal/gpio_types.h"
#include "hal/uart_types.h"
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/select.h>
#include "esp_ieee802154_types.h"
#include "driver/uart.h"
#include "soc/gpio_num.h"
#define ESP_SPINEL_LOG_TAG "ESP_RADIO_SPINEL"
#define SPINEL_PROP_VENDOR_ESP_SET_COORDINATOR (SPINEL_PROP_VENDOR_ESP__BEGIN + 1) /* Vendor command for coordinator.*/

View File

@ -11,6 +11,8 @@
#include "esp_openthread_common_macro.h"
#include "openthread/platform/time.h"
#include "hdlc.hpp"
#include "esp_heap_caps.h"
#include "driver/uart.h"
namespace esp {
namespace radio_spinel {
@ -105,7 +107,7 @@ void UartSpinelInterface::Process(const void *aMainloopContext)
int UartSpinelInterface::TryReadAndDecode(void)
{
uint8_t buffer[UART_HW_FIFO_LEN(m_uart_config.port)];
uint8_t buffer[UART_FIFO_LEN];
ssize_t rval;
do {
rval = read(m_uart_fd, buffer, sizeof(buffer));