File locking refactored (#631)
Remove FileMutex and wire locking into driver subsystems.
This commit is contained in:
committed by
GitHub
parent
92ca046681
commit
020aa471e2
@@ -4,12 +4,7 @@
|
||||
namespace tt::lvgl {
|
||||
|
||||
bool label_set_text_file(lv_obj_t* label, const char* filepath) {
|
||||
std::unique_ptr<uint8_t[]> text;
|
||||
{
|
||||
file::FileMutexGuard guard(filepath);
|
||||
text = file::readString(filepath);
|
||||
}
|
||||
|
||||
std::unique_ptr<uint8_t[]> text = file::readString(filepath);
|
||||
if (text != nullptr) {
|
||||
lv_label_set_text(label, reinterpret_cast<const char*>(text.get()));
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user