add a Lock, LockGuard and printThreadInfo

* `Lock`: trivial wrapper for FreeRTOS binary semaphores
* `LockGuard`: RAII wrapper for using `Lock`
* `printThreadInfo`: helper for showing which core/FreeRTOS task we are
  running under
This commit is contained in:
Girts Folkmanis
2020-03-15 16:47:19 -07:00
parent 3c9be48445
commit 2874b22d6c
4 changed files with 112 additions and 0 deletions

10
src/debug.h Normal file
View File

@@ -0,0 +1,10 @@
#pragma once
namespace meshtastic
{
/// Dumps out which core we are running on, and min level of remaining stack
/// seen.
void printThreadInfo(const char *extra);
} // namespace meshtastic