feat(openthread): update examples for API changes

This commit is contained in:
Xu Si Yu
2025-10-27 11:59:10 +08:00
parent 9f65e580ea
commit 96fc6f15d9
6 changed files with 43 additions and 24 deletions
@@ -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());
@@ -163,10 +163,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());