Marc PASTEUR c7b46b5bfe chgt ui
2025-12-31 08:48:02 +01:00

18 lines
613 B
C

#include "lvgl.h"
extern SemaphoreHandle_t lvgl_mux;
static const char* TAG_BSP="bsp";
bool bsp_display_lock(int timeout_ms)
{
//ESP_LOGI(TAG_BSP, "Obtention mutex");
// Convert timeout in milliseconds to FreeRTOS ticks
// If `timeout_ms` is set to -1, the program will block until the condition is met
//const TickType_t timeout_ticks = (timeout_ms == -1) ? portMAX_DELAY : pdMS_TO_TICKS(timeout_ms);
//return xSemaphoreTakeRecursive(lvgl_mux, timeout_ticks) == pdTRUE;
lv_lock();
return true;
}
void bsp_display_unlock() {
//xSemaphoreGiveRecursive(lvgl_mux);
lv_unlock();
}