C++ conversion (#80)

Converted project to C++
This commit is contained in:
Ken Van Hoeylandt
2024-11-22 20:26:08 +01:00
committed by GitHub
parent 6d80144e12
commit 85e26636a3
488 changed files with 6017 additions and 39466 deletions
+27
View File
@@ -0,0 +1,27 @@
#include "LvglSync.h"
namespace tt::lvgl {
static LvglLock lock_singleton = nullptr;
static LvglUnlock unlock_singleton = nullptr;
void sync_set(LvglLock lock, LvglUnlock unlock) {
lock_singleton = lock;
unlock_singleton = unlock;
}
bool lock(uint32_t timeout_ticks) {
if (lock_singleton) {
return lock_singleton(timeout_ticks);
} else {
return true;
}
}
void unlock() {
if (unlock_singleton) {
unlock_singleton();
}
}
} // namespace