Make namespaces more consistent (#92)

This commit is contained in:
Ken Van Hoeylandt
2024-11-26 18:30:54 +01:00
committed by GitHub
parent ca5d4b8226
commit a312bd5527
75 changed files with 108 additions and 109 deletions
+25
View File
@@ -0,0 +1,25 @@
#include "LvglSync.h"
#include "Check.h"
namespace tt::lvgl {
static LvglLock lock_singleton = nullptr;
static LvglUnlock unlock_singleton = nullptr;
void syncSet(LvglLock lock, LvglUnlock unlock) {
lock_singleton = lock;
unlock_singleton = unlock;
}
bool lock(uint32_t timeout_ticks) {
tt_check(lock_singleton);
return lock_singleton(timeout_ticks);
}
void unlock() {
tt_check(unlock_singleton);
unlock_singleton();
}
} // namespace