1 /* 2 * SPDX-FileCopyrightText: 2016 Wind River Systems, Inc. 3 * SPDX-FileContributor: 2020-2021 Espressif Systems (Shanghai) CO LTD 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8 #ifndef _BLE_MESH_KERNEL_H_ 9 #define _BLE_MESH_KERNEL_H_ 10 11 #include "freertos/FreeRTOS.h" 12 #include "freertos/task.h" 13 #include "freertos/queue.h" 14 #include "freertos/semphr.h" 15 16 #include "mesh_config.h" 17 #include "mesh_types.h" 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 #ifdef CONFIG_BT_BLUEDROID_ENABLED 24 #ifdef CONFIG_BT_BLUEDROID_PINNED_TO_CORE 25 #define BLE_MESH_ADV_TASK_CORE (CONFIG_BT_BLUEDROID_PINNED_TO_CORE < portNUM_PROCESSORS ? CONFIG_BT_BLUEDROID_PINNED_TO_CORE : tskNO_AFFINITY) 26 #else 27 #define BLE_MESH_ADV_TASK_CORE (0) 28 #endif 29 #endif 30 31 #ifdef CONFIG_BT_NIMBLE_ENABLED 32 #ifdef CONFIG_BT_NIMBLE_PINNED_TO_CORE 33 #define BLE_MESH_ADV_TASK_CORE (CONFIG_BT_NIMBLE_PINNED_TO_CORE < portNUM_PROCESSORS ? CONFIG_BT_NIMBLE_PINNED_TO_CORE : tskNO_AFFINITY) 34 #else 35 #define BLE_MESH_ADV_TASK_CORE (0) 36 #endif 37 #endif 38 39 #define BLE_MESH_ADV_TASK_STACK_SIZE 3072 40 #define BLE_MESH_ADV_TASK_NAME "mesh_adv_task" 41 #define BLE_MESH_ADV_TASK_PRIO (configMAX_PRIORITIES - 5) 42 43 /** 44 * @brief Put the current thread to sleep. 45 * 46 * This routine puts the current thread to sleep for @a duration 47 * milliseconds. 48 * 49 * @param duration Number of milliseconds to sleep. 50 * 51 * @return N/A 52 */ 53 void k_sleep(int32_t duration); 54 55 #ifdef __cplusplus 56 } 57 #endif 58 59 #endif /* _BLE_MESH_KERNEL_H_ */ 60