| 59 | std::mutex AllChannels::_mutex_pollLine; |
| 60 | |
| 61 | void heapCheckTask(void* pvParameters) { |
| 62 | static uint32_t heapSize = 0; |
| 63 | while (true) { |
| 64 | std::atomic_thread_fence(std::memory_order_seq_cst); // read fence for settings and whatnot |
| 65 | uint32_t newHeapSize = xPortGetFreeHeapSize(); |
| 66 | if (newHeapSize != heapSize) { |
| 67 | heapSize = newHeapSize; |
| 68 | log_info("heap " << heapSize); |
| 69 | } |
| 70 | vTaskDelay(3000 / portTICK_PERIOD_MS); // Yield to other tasks |
| 71 | |
| 72 | #ifdef DEBUG_TASK_STACK |
| 73 | static UBaseType_t uxHighWaterMark = 0; |
| 74 | reportTaskStackSize(uxHighWaterMark); |
| 75 | #endif |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | void AllChannels::init() { |
| 80 | registration(&startupLog); // Early startup messages for $SS |
nothing calls this directly
no test coverage detected