components: esp32/lwip

Add esp_task.h for placing all task priority/stack size macro definition
This commit is contained in:
liuzhifu 2016-09-01 14:09:21 +08:00 committed by Wu Jian Gang
parent 56a684d9eb
commit 9cf997a6fc
3 changed files with 7 additions and 4 deletions

View file

@ -19,6 +19,7 @@
#include "esp_err.h"
#include "esp_wifi.h"
#include "esp_event.h"
#include "esp_task.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
@ -359,7 +360,7 @@ esp_err_t esp_event_init(system_event_cb_t cb, void *ctx)
g_event_handler = xQueueCreate(CONFIG_WIFI_ENENT_QUEUE_SIZE, sizeof(system_event_t));
xTaskCreatePinnedToCore(esp_system_event_task, "eventTask", CONFIG_WIFI_EVENT_TASK_STACK_SIZE, NULL, configMAX_PRIORITIES-4, NULL, 0);
xTaskCreatePinnedToCore(esp_system_event_task, "eventTask", ESP_TASKD_EVENT_STACK, NULL, ESP_TASKD_EVENT_PRIO, NULL, 0);
return ESP_OK;
}

View file

@ -19,6 +19,7 @@
#include "esp_err.h"
#include "esp_wifi.h"
#include "esp_event.h"
#include "esp_task.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
@ -107,7 +108,7 @@ esp_err_t esp_wifi_startup(wifi_startup_cb_t cb, void *ctx)
startup_cb = cb;
startup_ctx = ctx;
xTaskCreatePinnedToCore(esp_wifi_task, "wifiTask", 4096, NULL, configMAX_PRIORITIES-7, NULL, 0);
xTaskCreatePinnedToCore(esp_wifi_task, "wifiTask", ESP_TASK_WIFI_STARTUP_STACK, NULL, ESP_TASK_WIFI_STARTUP_PRIO, NULL, 0);
return ESP_OK;
}

View file

@ -33,6 +33,7 @@
#define __LWIPOPTS_H__
#include <stdlib.h>
#include "esp_task.h"
/* Enable all Espressif-only options */
#define LWIP_ESP8266
@ -323,14 +324,14 @@ extern unsigned char misc_prof_get_tcp_snd_buf(void);
* The stack size value itself is platform-dependent, but is passed to
* sys_thread_new() when the thread is created.
*/
#define TCPIP_THREAD_STACKSIZE 2048 //not ok:384
#define TCPIP_THREAD_STACKSIZE ESP_TASKD_LWIP_STACK
/**
* TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread.
* The priority value itself is platform-dependent, but is passed to
* sys_thread_new() when the thread is created.
*/
#define TCPIP_THREAD_PRIO (configMAX_PRIORITIES-7)
#define TCPIP_THREAD_PRIO ESP_TASKD_LWIP_PRIO
/**
* TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages