1 // Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 /* Notes: 16 * 1. Put all task priority and stack size definition in this file 17 * 2. If the task priority is less than 10, use ESP_TASK_PRIO_MIN + X style, 18 * otherwise use ESP_TASK_PRIO_MAX - X style 19 * 3. If this is a daemon task, the macro prefix is ESP_TASKD_, otherwise 20 * it's ESP_TASK_ 21 * 4. If the configMAX_PRIORITIES is modified, please make all priority are 22 * greater than 0 23 * 5. Make sure esp_task.h is consistent between wifi lib and idf 24 * 6. If changing system task priorities, please check the values documented in /api-guides/performance/speed.rst 25 * are up to date 26 */ 27 28 #ifndef _ESP_TASK_H_ 29 #define _ESP_TASK_H_ 30 31 #include "sdkconfig.h" 32 33 #define ESP_TASK_PRIO_MAX (configMAX_PRIORITIES) 34 #define ESP_TASK_PRIO_MIN (0) 35 36 /* Temporary define until system is properly buildable on Linux */ 37 #define CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE 10 38 39 /* Bt contoller Task */ 40 /* controller */ 41 #define ESP_TASK_BT_CONTROLLER_PRIO (ESP_TASK_PRIO_MAX - 2) 42 #ifdef CONFIG_NEWLIB_NANO_FORMAT 43 #define TASK_EXTRA_STACK_SIZE (0) 44 #else 45 #define TASK_EXTRA_STACK_SIZE (512) 46 #endif 47 48 #define BT_TASK_EXTRA_STACK_SIZE TASK_EXTRA_STACK_SIZE 49 #define ESP_TASK_BT_CONTROLLER_STACK (3584 + TASK_EXTRA_STACK_SIZE) 50 51 52 /* idf task */ 53 #define ESP_TASKD_EVENT_PRIO (ESP_TASK_PRIO_MAX - 5) 54 #define ESP_TASKD_EVENT_STACK (2048) 55 56 #endif 57