source: ctrl/firmware/Main/SES/Core/Src/utils.cpp

Last change on this file was 64, checked in by Zed, 15 hours ago

USART3 TX DMA is working.

File size: 496 bytes
Line 
1#include <cstdio>
2#include <cstdint>
3
4#include "tx_api.h"
5
6#include "utils.h"
7
8void printThreadStackInfo(const char* const TAG)
9{
10        TX_THREAD* current_thread = tx_thread_identify();
11
12        printf("%s: Stack size: %lu, used: %u, free: %u\n", TAG, current_thread->tx_thread_stack_size,
13                  (uint8_t*)current_thread->tx_thread_stack_ptr - (uint8_t*)current_thread->tx_thread_stack_start,
14                  (uint8_t*)current_thread->tx_thread_stack_end - (uint8_t*)current_thread->tx_thread_stack_ptr);
15
16}
Note: See TracBrowser for help on using the repository browser.