From d90b7274fa8bbfa09f79660b45b550d91f7b0125 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Tue, 2 Feb 2021 22:09:00 +0100 Subject: Update to nimble 1.3 master branch commit 82153e744833821e20e9a8b0d61c38b2b0dbcfe1 WARNING : heartbeat task is disabled! --- .../porting/npl/freertos/include/nimble/nimble_npl_os.h | 2 -- .../mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c | 4 ++-- src/libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c | 6 ------ 3 files changed, 2 insertions(+), 10 deletions(-) (limited to 'src/libs/mynewt-nimble/porting/npl/freertos') diff --git a/src/libs/mynewt-nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h b/src/libs/mynewt-nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h index d8810f35..545be0f4 100644 --- a/src/libs/mynewt-nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h +++ b/src/libs/mynewt-nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h @@ -282,14 +282,12 @@ static inline uint32_t ble_npl_hw_enter_critical(void) { //vPortEnterCritical(); - return npl_freertos_hw_enter_critical(); } static inline void ble_npl_hw_exit_critical(uint32_t ctx) { - // vPortExitCritical(); npl_freertos_hw_exit_critical(ctx); } 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 64196b36..8ee3475a 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 @@ -37,7 +37,7 @@ nimble_port_freertos_init(TaskFunction_t host_task_fn) * provided by NimBLE and in case of FreeRTOS it does not need to be wrapped * since it has compatible prototype. */ - xTaskCreate(nimble_port_ll_task_func, "ll", configMINIMAL_STACK_SIZE + 100, + xTaskCreate(nimble_port_ll_task_func, "ll", configMINIMAL_STACK_SIZE + 400, NULL, configMAX_PRIORITIES - 1, &ll_task_h); #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", configMINIMAL_STACK_SIZE + 200, + xTaskCreate(host_task_fn, "ble", configMINIMAL_STACK_SIZE + 400, NULL, tskIDLE_PRIORITY + 1, &host_task_h); } diff --git a/src/libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c b/src/libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c index eb3b4c99..87936bd8 100644 --- a/src/libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c +++ b/src/libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c @@ -268,16 +268,10 @@ void npl_freertos_callout_init(struct ble_npl_callout *co, struct ble_npl_eventq *evq, ble_npl_event_fn *ev_cb, void *ev_arg) { - // I added this 'if' because nimble seems to never delete the timers. I assume it wants to recycle them. - // This condition ensure that a new timer is created only if 'co' points to an uninitialized structure. - // If the struct contains an existing timer, no new timer is created, which prevent a significant memory leak. - // TODO Ensure that this workaround is valid and does not generate bad side-effect. - if(co->handle == NULL) { memset(co, 0, sizeof(*co)); co->handle = xTimerCreate("co", 1, pdFALSE, co, os_callout_timer_cb); co->evq = evq; ble_npl_event_init(&co->ev, ev_cb, ev_arg); - } } ble_npl_error_t -- cgit v1.2.3