mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 05:34:32 +02:00
openthread: fix compile errors when disabling openthread cli
This commit is contained in:
@@ -117,7 +117,9 @@ esp_err_t esp_openthread_uart_process(otInstance *instance, const esp_openthread
|
|||||||
int rval = read(s_uart_fd, s_uart_buffer, sizeof(s_uart_buffer));
|
int rval = read(s_uart_fd, s_uart_buffer, sizeof(s_uart_buffer));
|
||||||
|
|
||||||
if (rval > 0) {
|
if (rval > 0) {
|
||||||
|
#if CONFIG_OPENTHREAD_CLI || CONFIG_OPENTHREAD_RADIO
|
||||||
otPlatUartReceived(s_uart_buffer, (uint16_t)rval);
|
otPlatUartReceived(s_uart_buffer, (uint16_t)rval);
|
||||||
|
#endif
|
||||||
} else if (rval < 0) {
|
} else if (rval < 0) {
|
||||||
if (errno != EAGAIN) {
|
if (errno != EAGAIN) {
|
||||||
ESP_LOGW(OT_PLAT_LOG_TAG, "read uart failed: %d", errno);
|
ESP_LOGW(OT_PLAT_LOG_TAG, "read uart failed: %d", errno);
|
||||||
|
@@ -70,7 +70,9 @@ static void ot_task_worker(void *aContext)
|
|||||||
(void)otLoggingSetLevel(CONFIG_LOG_DEFAULT_LEVEL);
|
(void)otLoggingSetLevel(CONFIG_LOG_DEFAULT_LEVEL);
|
||||||
#endif
|
#endif
|
||||||
// Initialize the OpenThread cli
|
// Initialize the OpenThread cli
|
||||||
|
#if CONFIG_OPENTHREAD_CLI
|
||||||
esp_openthread_cli_init();
|
esp_openthread_cli_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
esp_netif_t *openthread_netif;
|
esp_netif_t *openthread_netif;
|
||||||
// Initialize the esp_netif bindings
|
// Initialize the esp_netif bindings
|
||||||
@@ -81,7 +83,9 @@ static void ot_task_worker(void *aContext)
|
|||||||
#endif // CONFIG_OPENTHREAD_CLI_ESP_EXTENSION
|
#endif // CONFIG_OPENTHREAD_CLI_ESP_EXTENSION
|
||||||
|
|
||||||
// Run the main loop
|
// Run the main loop
|
||||||
|
#if CONFIG_OPENTHREAD_CLI
|
||||||
esp_openthread_cli_create_task();
|
esp_openthread_cli_create_task();
|
||||||
|
#endif
|
||||||
esp_openthread_launch_mainloop();
|
esp_openthread_launch_mainloop();
|
||||||
|
|
||||||
// Clean up
|
// Clean up
|
||||||
|
5
examples/openthread/ot_cli/sdkconfig.ci.disable_cli
Normal file
5
examples/openthread/ot_cli/sdkconfig.ci.disable_cli
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
CONFIG_IDF_TARGET="esp32h4"
|
||||||
|
CONFIG_IDF_TARGET_ESP32H4=y
|
||||||
|
CONFIG_IDF_TARGET_ESP32H4_BETA_VERSION_2=y
|
||||||
|
CONFIG_OPENTHREAD_CLI=n
|
||||||
|
CONFIG_OPENTHREAD_CLI_ESP_EXTENSION=n
|
@@ -35,6 +35,8 @@ CONFIG_OPENTHREAD_DIAG=y
|
|||||||
CONFIG_OPENTHREAD_COMMISSIONER=n
|
CONFIG_OPENTHREAD_COMMISSIONER=n
|
||||||
CONFIG_OPENTHREAD_JOINER=n
|
CONFIG_OPENTHREAD_JOINER=n
|
||||||
CONFIG_OPENTHREAD_BORDER_ROUTER=n
|
CONFIG_OPENTHREAD_BORDER_ROUTER=n
|
||||||
|
CONFIG_OPENTHREAD_CLI=n
|
||||||
|
CONFIG_OPENTHREAD_SRP_CLIENT=n
|
||||||
# end of OpenThread
|
# end of OpenThread
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user