first commit

This commit is contained in:
stuce-bot 2025-06-30 20:47:33 +02:00
commit 5893b00dd2
1669 changed files with 1982740 additions and 0 deletions

View file

@ -0,0 +1,33 @@
/*
* SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD
*
* SPDX-License-Identifier: MIT
*/
/*!
@file ui_UnitBase.cpp
@brief UI for UnitBase
*/
#include "ui_UnitBase.hpp"
UnitUIBase::UnitUIBase(LovyanGFX* parent) : _parent(parent)
{
_sem = xSemaphoreCreateBinary();
xSemaphoreGive(_sem);
}
UnitUIBase::~UnitUIBase()
{
xSemaphoreTake(_sem, portMAX_DELAY);
vSemaphoreDelete(_sem);
}
bool UnitUIBase::lock(portTickType bt)
{
return xSemaphoreTake(_sem, bt) == pdTRUE;
}
void UnitUIBase::unlock()
{
xSemaphoreGive(_sem);
}