diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/Components/Ble/DeviceInformationService.h | 2 | ||||
-rw-r--r-- | src/libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c | 6 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index be73dbfb..ff2e1812 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,7 +44,7 @@ set(SDK_SOURCE_FILES # FreeRTOS ${NRF5_SDK_PATH}/external/freertos/source/croutine.c ${NRF5_SDK_PATH}/external/freertos/source/event_groups.c - ${NRF5_SDK_PATH}/external/freertos/source/portable/MemMang/heap_1.c + ${NRF5_SDK_PATH}/external/freertos/source/portable/MemMang/heap_4.c ${NRF5_SDK_PATH}/external/freertos/source/list.c ${NRF5_SDK_PATH}/external/freertos/source/queue.c ${NRF5_SDK_PATH}/external/freertos/source/stream_buffer.c diff --git a/src/Components/Ble/DeviceInformationService.h b/src/Components/Ble/DeviceInformationService.h index 6249893d..d768da8e 100644 --- a/src/Components/Ble/DeviceInformationService.h +++ b/src/Components/Ble/DeviceInformationService.h @@ -25,7 +25,7 @@ namespace Pinetime { static constexpr char* manufacturerName = "Codingfield"; static constexpr char* modelNumber = "1"; static constexpr char* serialNumber = "9.8.7.6.5.4"; - static constexpr char* fwRevision = "0.5.0"; + static constexpr char* fwRevision = "0.7.0"; static constexpr char* hwRevision = "1.0.0"; static constexpr ble_uuid16_t deviceInfoUuid { 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 87936bd8..eb3b4c99 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,10 +268,16 @@ 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 |