forked from espressif/esp-idf
fix(openthread): fix openthread configurations for radio spinle on 5.1
This commit is contained in:
@@ -9,6 +9,9 @@ if(CONFIG_OPENTHREAD_ENABLED OR CONFIG_IDF_DOC_BUILD OR CONFIG_OPENTHREAD_SPINEL
|
|||||||
set(public_include_dirs
|
set(public_include_dirs
|
||||||
"include"
|
"include"
|
||||||
"openthread/include")
|
"openthread/include")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_OPENTHREAD_ENABLED)
|
||||||
|
|
||||||
set(private_include_dirs
|
set(private_include_dirs
|
||||||
"openthread/examples/platforms"
|
"openthread/examples/platforms"
|
||||||
|
@@ -6,15 +6,16 @@
|
|||||||
|
|
||||||
#pragma once
|
#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
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#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 ESP_SPINEL_LOG_TAG "ESP_RADIO_SPINEL"
|
||||||
|
|
||||||
#define SPINEL_PROP_VENDOR_ESP_SET_COORDINATOR (SPINEL_PROP_VENDOR_ESP__BEGIN + 1) /* Vendor command for coordinator.*/
|
#define SPINEL_PROP_VENDOR_ESP_SET_COORDINATOR (SPINEL_PROP_VENDOR_ESP__BEGIN + 1) /* Vendor command for coordinator.*/
|
||||||
|
@@ -11,6 +11,8 @@
|
|||||||
#include "esp_openthread_common_macro.h"
|
#include "esp_openthread_common_macro.h"
|
||||||
#include "openthread/platform/time.h"
|
#include "openthread/platform/time.h"
|
||||||
#include "hdlc.hpp"
|
#include "hdlc.hpp"
|
||||||
|
#include "esp_heap_caps.h"
|
||||||
|
#include "driver/uart.h"
|
||||||
|
|
||||||
namespace esp {
|
namespace esp {
|
||||||
namespace radio_spinel {
|
namespace radio_spinel {
|
||||||
@@ -105,7 +107,7 @@ void UartSpinelInterface::Process(const void *aMainloopContext)
|
|||||||
|
|
||||||
int UartSpinelInterface::TryReadAndDecode(void)
|
int UartSpinelInterface::TryReadAndDecode(void)
|
||||||
{
|
{
|
||||||
uint8_t buffer[UART_HW_FIFO_LEN(m_uart_config.port)];
|
uint8_t buffer[UART_FIFO_LEN];
|
||||||
ssize_t rval;
|
ssize_t rval;
|
||||||
do {
|
do {
|
||||||
rval = read(m_uart_fd, buffer, sizeof(buffer));
|
rval = read(m_uart_fd, buffer, sizeof(buffer));
|
||||||
|
Reference in New Issue
Block a user