Merge develop into main (#353)
## TactilityC - Add `tt_lvgl_lock()` and `tt_lvgl_unlock()` - Add `tt_thread_set_affinity()` - Add support for STL symbols ## Other - Add `Thread::setAffinity()` - `GuiService`: replace `#define` with `constexpr` - Remove log storage and log app for now - Split up ELF symbols into more groups
This commit is contained in:
committed by
GitHub
parent
c7621b5e4c
commit
b214a3358e
@@ -1,36 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "LogMessages.h"
|
||||
#include <array>
|
||||
#include <memory>
|
||||
|
||||
#if not defined(ESP_PLATFORM) or (defined(CONFIG_SPIRAM_USE_MALLOC) && CONFIG_SPIRAM_USE_MALLOC == 1)
|
||||
#define TT_LOG_ENTRY_COUNT 200
|
||||
#define TT_LOG_MESSAGE_SIZE 128
|
||||
#else
|
||||
#define TT_LOG_ENTRY_COUNT 50
|
||||
#define TT_LOG_MESSAGE_SIZE 50
|
||||
#endif
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
#include "LogEsp.h"
|
||||
#else
|
||||
#include "LogSimulator.h"
|
||||
#endif
|
||||
|
||||
#include "LogMessages.h"
|
||||
#include "LogCommon.h"
|
||||
|
||||
namespace tt {
|
||||
|
||||
struct LogEntry {
|
||||
LogLevel level = LogLevel::Verbose;
|
||||
char message[TT_LOG_MESSAGE_SIZE] = { 0 };
|
||||
};
|
||||
|
||||
/** Make a copy of the currently stored entries.
|
||||
* The array size is TT_LOG_ENTRY_COUNT
|
||||
* @param[out] outIndex the write index for the next log entry.
|
||||
*/
|
||||
std::unique_ptr<std::array<LogEntry, TT_LOG_ENTRY_COUNT>> copyLogEntries(std::size_t& outIndex);
|
||||
|
||||
} // namespace tt
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#ifdef ESP_PLATFORM
|
||||
|
||||
#include <esp_log.h>
|
||||
#include "Tactility/LogCommon.h"
|
||||
|
||||
#define TT_LOG_E(tag, format, ...) \
|
||||
ESP_LOGE(tag, format, ##__VA_ARGS__)
|
||||
|
||||
@@ -97,6 +97,11 @@ public:
|
||||
*/
|
||||
void setStackSize(size_t stackSize);
|
||||
|
||||
/** Set CPU core pinning for this thread.
|
||||
* @param[in] affinity -1 means not pinned, otherwise it's the core id (e.g. 0 or 1 on ESP32)
|
||||
*/
|
||||
void setAffinity(portBASE_TYPE affinity);
|
||||
|
||||
/** Set Thread callback
|
||||
* @param[in] callback ThreadCallback, called upon thread run
|
||||
* @param[in] callbackContext what to pass to the callback
|
||||
|
||||
Reference in New Issue
Block a user