summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2022-03-17 20:22:59 (GMT)
committerJF <JF002@users.noreply.github.com>2022-03-21 19:53:46 (GMT)
commita8b7fbe48b4a86238f38ed0f084b277b44c428fb (patch)
tree070b088fdff4942266a2946dcbd6e13a71b25d9d
parentcd1f218dd8710f61238307a9fa5b0d11e229bffa (diff)
New changes according to the review : Priority 0 for display, 1 for system, timer and ble host, and 2 for ble LL
-rw-r--r--src/FreeRTOSConfig.h2
-rw-r--r--src/components/ble/NimbleController.cpp1
-rw-r--r--src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c4
3 files changed, 4 insertions, 3 deletions
diff --git a/src/FreeRTOSConfig.h b/src/FreeRTOSConfig.h
index 5462b93..263d803 100644
--- a/src/FreeRTOSConfig.h
+++ b/src/FreeRTOSConfig.h
@@ -60,7 +60,7 @@
#define configUSE_TICKLESS_IDLE_SIMPLE_DEBUG 0 /* See into vPortSuppressTicksAndSleep source code for explanation */
#define configCPU_CLOCK_HZ (SystemCoreClock)
#define configTICK_RATE_HZ 1024
-#define configMAX_PRIORITIES (4)
+#define configMAX_PRIORITIES (3)
#define configMINIMAL_STACK_SIZE (120)
#define configTOTAL_HEAP_SIZE (1024 * 17)
#define configMAX_TASK_NAME_LEN (4)
diff --git a/src/components/ble/NimbleController.cpp b/src/components/ble/NimbleController.cpp
index 0be7c0f..10eb429 100644
--- a/src/components/ble/NimbleController.cpp
+++ b/src/components/ble/NimbleController.cpp
@@ -77,6 +77,7 @@ int GAPEventCallback(struct ble_gap_event* event, void* arg) {
void NimbleController::Init() {
while (!ble_hs_synced()) {
+ vTaskDelay(10);
}
nptr = this;
diff --git a/src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c b/src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c
index 205831a..49834db 100644
--- a/src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c
+++ b/src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c
@@ -38,7 +38,7 @@ nimble_port_freertos_init(TaskFunction_t host_task_fn)
* since it has compatible prototype.
*/
xTaskCreate(nimble_port_ll_task_func, "ll", configMINIMAL_STACK_SIZE + 200,
- NULL, 3, &ll_task_h);
+ NULL, 2, &ll_task_h);
#endif
/*
@@ -47,5 +47,5 @@ nimble_port_freertos_init(TaskFunction_t host_task_fn)
* default queue it is just easier to make separate task which does this.
*/
xTaskCreate(host_task_fn, "ble", configMINIMAL_STACK_SIZE + 600,
- NULL, 2, &host_task_h);
+ NULL, 1, &host_task_h);
}