LVGL supports custom implementation of malloc() and free() so using pvPortMalloc() and vPortFree() is just a matter of setting the right variables.
Other libraries (NimBLE, LittleFS) and InfiniTime code (new) call malloc() and free() from stdlib. InfiniTime now provides the file stdlib.c that provides a custom implementation for malloc(), free(), calloc() and realloc(). This ensures that all calls to the standard allocator are redirected to the FreeRTOS memory manager.
Note that realloc() is needed by NimBLE.
In cases where any other task takes too much time to execute (it can happen in Display Task, see https://github.com/InfiniTimeOrg/InfiniTime/issues/825), the timer task does not have the opportunity to run fast enough to detect and debounce presses on the button.
This commit sets the following priorities:
- [0] : Display Task
- [1] : Timer and System tasks
- [2] : BLE Host
- [3] : BLE LL
This way, we ensure that button presses will always be detected, even if the rendering of the display takes a huge amount of time.
More memory for freertos heap and timer stack
Fix warning in watchface
Fix number of bytes read by cst816
Debug app to show freertos tasks
Increased the number of bytes of the twi write buffer
- Disable IDLE hook (it would wake the device up as soon as possible).
- Logger task sleep for 100ms (disable logging for better battery life)
- Logging is disabled by default
- Apply fix for ERRATA 87 (clear FPU interrupt before going to sleep). Ports files from FreeRTOS are now in the sources (they where in the SDK before)