Share T096 Full mOTA memory with the offline queue

This commit is contained in:
mikecarper
2026-09-08 01:15:19 -07:00
parent 6958d82432
commit 1b6a9dcb6a
26 changed files with 1198 additions and 23 deletions
+22 -2
View File
@@ -4,6 +4,16 @@
#include <FreeRTOS.h>
#include <task.h>
#include <string.h>
#include <helpers/nrf52/BleTaskStartup.h>
namespace mesh {
namespace nrf52 {
static uint8_t ble_task_mask;
void resetBleTaskStartup() { ble_task_mask = 0; }
bool bleTasksStarted() { return ble_task_mask == 3; }
} // namespace nrf52
} // namespace mesh
#ifndef MESH_NRF52_LOOP_STACK_WORDS
#define MESH_NRF52_LOOP_STACK_WORDS 2048
@@ -32,8 +42,18 @@ extern "C" BaseType_t __wrap_xTaskCreate(
&& stack_depth == 1024) {
adjusted_depth = MESH_NRF52_LOOP_STACK_WORDS;
}
return __real_xTaskCreate(task_code, task_name, adjusted_depth, parameters,
priority, created_task);
const BaseType_t result = __real_xTaskCreate(
task_code, task_name, adjusted_depth, parameters, priority, created_task);
if (task_name != NULL) {
const uint8_t mask = strcmp(task_name, "BLE") == 0 ? 1
: strcmp(task_name, "SOC") == 0 ? 2 : 0;
if (result == pdPASS) {
mesh::nrf52::ble_task_mask |= mask;
} else {
mesh::nrf52::ble_task_mask &= ~mask;
}
}
return result;
}
#endif