esp-nimble: Make changes to NimBLE tasks

This commit is contained in:
Sagar Bijwe
2019-03-07 18:25:13 +05:30
committed by Hrishikesh Dhayagude
parent 209e550949
commit dea2f7f3aa
3 changed files with 7 additions and 4 deletions
+3 -2
View File
@@ -17,6 +17,7 @@
#include "host/ble_gap.h"
#include "nimble/hci_common.h"
#include "mesh/porting.h"
#include "nimble/nimble_port.h"
#include "adv.h"
#include "net.h"
@@ -325,8 +326,8 @@ void bt_mesh_adv_init(void)
MYNEWT_VAL(BLE_MESH_ADV_TASK_PRIO), OS_WAIT_FOREVER,
g_blemesh_stack, ADV_STACK_SIZE);
#else
xTaskCreate(mesh_adv_thread, "mesh_adv", 2768,
NULL, (configMAX_PRIORITIES - 4), &adv_task_h);
xTaskCreatePinnedToCore(mesh_adv_thread, "mesh_adv", 2768,
NULL, (configMAX_PRIORITIES - 5), &adv_task_h, NIMBLE_CORE);
#endif
/* For BT5 controllers we can have fast advertising interval */
@@ -22,6 +22,8 @@
#include "nimble/nimble_npl.h"
#define NIMBLE_CORE (CONFIG_NIMBLE_PINNED_TO_CORE < portNUM_PROCESSORS ? CONFIG_NIMBLE_PINNED_TO_CORE : tskNO_AFFINITY)
#ifdef __cplusplus
extern "C" {
#endif
@@ -46,6 +46,6 @@ nimble_port_freertos_init(TaskFunction_t host_task_fn)
* have separate task for NimBLE host, but since something needs to handle
* default queue it is just easier to make separate task which does this.
*/
xTaskCreate(host_task_fn, "ble", 2048+400,
NULL, (configMAX_PRIORITIES - 3), &host_task_h);
xTaskCreatePinnedToCore(host_task_fn, "ble", 4096,
NULL, (configMAX_PRIORITIES - 4), &host_task_h, NIMBLE_CORE);
}