2020-03-30 07:33:25 -04:00
|
|
|
/*
|
2021-10-26 04:24:54 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016 Wind River Systems, Inc.
|
|
|
|
* SPDX-FileContributor: 2020-2021 Espressif Systems (Shanghai) CO LTD
|
2020-03-30 07:33:25 -04:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _BLE_MESH_KERNEL_H_
|
|
|
|
#define _BLE_MESH_KERNEL_H_
|
|
|
|
|
|
|
|
#include "freertos/FreeRTOS.h"
|
|
|
|
#include "freertos/task.h"
|
|
|
|
#include "freertos/queue.h"
|
|
|
|
#include "freertos/semphr.h"
|
|
|
|
|
2023-08-25 02:28:44 -04:00
|
|
|
#include "mesh/config.h"
|
|
|
|
#include "mesh/types.h"
|
2020-03-30 07:33:25 -04:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_BT_BLUEDROID_ENABLED
|
2020-03-31 04:49:36 -04:00
|
|
|
#ifdef CONFIG_BT_BLUEDROID_PINNED_TO_CORE
|
|
|
|
#define BLE_MESH_ADV_TASK_CORE (CONFIG_BT_BLUEDROID_PINNED_TO_CORE < portNUM_PROCESSORS ? CONFIG_BT_BLUEDROID_PINNED_TO_CORE : tskNO_AFFINITY)
|
|
|
|
#else
|
|
|
|
#define BLE_MESH_ADV_TASK_CORE (0)
|
|
|
|
#endif
|
2020-03-30 07:33:25 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_BT_NIMBLE_ENABLED
|
|
|
|
#ifdef CONFIG_BT_NIMBLE_PINNED_TO_CORE
|
|
|
|
#define BLE_MESH_ADV_TASK_CORE (CONFIG_BT_NIMBLE_PINNED_TO_CORE < portNUM_PROCESSORS ? CONFIG_BT_NIMBLE_PINNED_TO_CORE : tskNO_AFFINITY)
|
|
|
|
#else
|
|
|
|
#define BLE_MESH_ADV_TASK_CORE (0)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define BLE_MESH_ADV_TASK_STACK_SIZE 3072
|
2020-07-03 04:56:46 -04:00
|
|
|
#define BLE_MESH_ADV_TASK_NAME "mesh_adv_task"
|
|
|
|
#define BLE_MESH_ADV_TASK_PRIO (configMAX_PRIORITIES - 5)
|
2020-03-30 07:33:25 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Put the current thread to sleep.
|
|
|
|
*
|
|
|
|
* This routine puts the current thread to sleep for @a duration
|
|
|
|
* milliseconds.
|
|
|
|
*
|
|
|
|
* @param duration Number of milliseconds to sleep.
|
|
|
|
*
|
|
|
|
* @return N/A
|
|
|
|
*/
|
2020-12-07 04:03:11 -05:00
|
|
|
void k_sleep(int32_t duration);
|
2020-03-30 07:33:25 -04:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _BLE_MESH_KERNEL_H_ */
|