Board implementations and fixes (#247)

- Implemented Elecrow Crowpanel Basic 5.0"
- Implemented Elecrow Crowpanel Advance 5.0"
- Implemented CYD 2432S032C
- Fix for CYD 4848S040C rendering drift (lower transfer speed)
- Fix for SD card locking mechanism for various boards
This commit is contained in:
Ken Van Hoeylandt
2025-03-14 22:37:09 +01:00
committed by GitHub
parent 21936f7e9e
commit f85d0239ff
64 changed files with 1587 additions and 134 deletions
@@ -134,20 +134,15 @@ SdCardDevice::State SpiSdCardDevice::getState() const {
* Writing and reading to the bus from 2 devices at the same time causes crashes.
* This work-around ensures that this check is only happening when LVGL isn't rendering.
*/
if (config->lock) {
bool locked = config->lock->lock(50); // TODO: Refactor to a more reliable locking mechanism
if (!locked) {
TT_LOG_E(TAG, LOG_MESSAGE_MUTEX_LOCK_FAILED_FMT, "LVGL");
return State::Unknown;
}
auto lock = getLock().asScopedLock();
bool locked = lock.lock(50); // TODO: Refactor to a more reliable locking mechanism
if (!locked) {
TT_LOG_E(TAG, LOG_MESSAGE_MUTEX_LOCK_FAILED_FMT, "LVGL");
return State::Unknown;
}
bool result = sdmmc_get_status(card) == ESP_OK;
if (config->lock) {
config->lock->unlock();
}
if (result) {
return State::Mounted;
} else {