mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
feat(openthread): update examples for API changes
This commit is contained in:
@@ -103,10 +103,13 @@ void app_main(void)
|
||||
ot_external_coexist_init();
|
||||
#endif
|
||||
|
||||
static esp_openthread_platform_config_t config = {
|
||||
.radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(),
|
||||
.host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(),
|
||||
.port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(),
|
||||
static esp_openthread_config_t config = {
|
||||
.netif_config = ESP_NETIF_DEFAULT_OPENTHREAD(),
|
||||
.platform_config = {
|
||||
.radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(),
|
||||
.host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(),
|
||||
.port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(),
|
||||
},
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(esp_openthread_start(&config));
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "esp_netif_types.h"
|
||||
#include "esp_openthread.h"
|
||||
#include "esp_openthread_lock.h"
|
||||
#include "esp_openthread_netif_glue.h"
|
||||
#include "esp_openthread_types.h"
|
||||
#include "esp_ot_config.h"
|
||||
#include "esp_vfs_eventfd.h"
|
||||
@@ -59,10 +60,13 @@ void app_main(void)
|
||||
ot_console_start();
|
||||
#endif
|
||||
|
||||
esp_openthread_platform_config_t config = {
|
||||
.radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(),
|
||||
.host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(),
|
||||
.port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(),
|
||||
static esp_openthread_config_t config = {
|
||||
.netif_config = ESP_NETIF_DEFAULT_OPENTHREAD(),
|
||||
.platform_config = {
|
||||
.radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(),
|
||||
.host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(),
|
||||
.port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(),
|
||||
},
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(esp_openthread_start(&config));
|
||||
|
||||
@@ -50,10 +50,13 @@ void app_main(void)
|
||||
ot_external_coexist_init();
|
||||
#endif
|
||||
|
||||
static esp_openthread_platform_config_t config = {
|
||||
.radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(),
|
||||
.host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(),
|
||||
.port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(),
|
||||
static esp_openthread_config_t config = {
|
||||
.netif_config = {0},
|
||||
.platform_config = {
|
||||
.radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(),
|
||||
.host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(),
|
||||
.port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(),
|
||||
},
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(esp_openthread_start(&config));
|
||||
|
||||
@@ -166,10 +166,13 @@ void app_main(void)
|
||||
ESP_ERROR_CHECK(esp_vfs_eventfd_register(&eventfd_config));
|
||||
ot_deep_sleep_init();
|
||||
|
||||
esp_openthread_platform_config_t config = {
|
||||
.radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(),
|
||||
.host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(),
|
||||
.port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(),
|
||||
static esp_openthread_config_t config = {
|
||||
.netif_config = ESP_NETIF_DEFAULT_OPENTHREAD(),
|
||||
.platform_config = {
|
||||
.radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(),
|
||||
.host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(),
|
||||
.port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(),
|
||||
},
|
||||
};
|
||||
ESP_ERROR_CHECK(esp_openthread_start(&config));
|
||||
esp_netif_set_default_netif(esp_openthread_get_netif());
|
||||
|
||||
@@ -165,10 +165,13 @@ void app_main(void)
|
||||
ot_console_start();
|
||||
#endif
|
||||
|
||||
static esp_openthread_platform_config_t config = {
|
||||
.radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(),
|
||||
.host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(),
|
||||
.port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(),
|
||||
static esp_openthread_config_t config = {
|
||||
.netif_config = ESP_NETIF_DEFAULT_OPENTHREAD(),
|
||||
.platform_config = {
|
||||
.radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(),
|
||||
.host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(),
|
||||
.port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(),
|
||||
},
|
||||
};
|
||||
ESP_ERROR_CHECK(esp_openthread_start(&config));
|
||||
esp_netif_set_default_netif(esp_openthread_get_netif());
|
||||
|
||||
@@ -70,10 +70,13 @@ void app_main(void)
|
||||
ot_console_start();
|
||||
#endif
|
||||
|
||||
static esp_openthread_platform_config_t config = {
|
||||
.radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(),
|
||||
.host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(),
|
||||
.port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(),
|
||||
static esp_openthread_config_t config = {
|
||||
.netif_config = ESP_NETIF_DEFAULT_OPENTHREAD(),
|
||||
.platform_config = {
|
||||
.radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(),
|
||||
.host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(),
|
||||
.port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(),
|
||||
},
|
||||
};
|
||||
ESP_ERROR_CHECK(esp_openthread_start(&config));
|
||||
esp_netif_set_default_netif(esp_openthread_get_netif());
|
||||
|
||||
Reference in New Issue
Block a user