Skip to content

Commit

Permalink
add constant for otcli transmit task
Browse files Browse the repository at this point in the history
  • Loading branch information
DejinChen committed Oct 9, 2023
1 parent 23b31a7 commit f9b1e2a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/lighting-app/esp32/sdkconfig.defaults.esp32h2
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CONFIG_OPENTHREAD_ENABLED=y
CONFIG_OPENTHREAD_SRP_CLIENT=y
CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC=n
CONFIG_OPENTHREAD_LOG_LEVEL_NOTE=y
# CONFIG_OPENTHREAD_CLI=n
CONFIG_OPENTHREAD_CLI=n
CONFIG_OPENTHREAD_DNS_CLIENT=y

# Disable lwip ipv6 autoconfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace chip {

static CHIP_ERROR OtcliHandler(int argc, char * argv[])
{
/* the beginning of command "matter esp ot cli" has already been removed */
/* the beginning of command "matter otcli" has already been removed */
std::unique_ptr<char[]> cli_str(new char[CLI_INPUT_BUFF_LENGTH]);
memset(cli_str.get(), 0, CLI_INPUT_BUFF_LENGTH);
uint8_t len = 0;
Expand Down
5 changes: 4 additions & 1 deletion src/platform/ESP32/OpenthreadLauncher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ static esp_netif_t * openthread_netif = NULL;
static esp_openthread_platform_config_t * s_platform_config = NULL;
static TaskHandle_t cli_transmit_task = NULL;
static QueueHandle_t cli_transmit_task_queue = NULL;
static constexpr uint16_t OTCLI_TRANSMIT_TASK_STACK_SIZE = 1024;
static constexpr UBaseType_t OTCLI_TRANSMIT_TASK_PRIORITY = 5;

CHIP_ERROR cli_transmit_task_post(std::unique_ptr<char[]> && cli_str)
{
Expand Down Expand Up @@ -103,7 +105,8 @@ static void cli_transmit_worker(void * context)

static esp_err_t cli_command_transmit_task(void)
{
xTaskCreate(cli_transmit_worker, "ocli_trans", 3072, xTaskGetCurrentTaskHandle(), 5, &cli_transmit_task);
xTaskCreate(cli_transmit_worker, "otcli_trans", OTCLI_TRANSMIT_TASK_STACK_SIZE, xTaskGetCurrentTaskHandle(),
OTCLI_TRANSMIT_TASK_PRIORITY, &cli_transmit_task);
return ESP_OK;
}

Expand Down

0 comments on commit f9b1e2a

Please sign in to comment.