2025-03-14 18:59:49 +08:00
|
|
|
/*
|
|
|
|
|
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "main.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern "C" void app_main(void)
|
|
|
|
|
{
|
|
|
|
|
|
2025-03-15 09:37:07 +08:00
|
|
|
/* Initialize the display interface */
|
2025-03-14 18:59:49 +08:00
|
|
|
initialize_display_and_touch();
|
|
|
|
|
|
2025-03-15 09:37:07 +08:00
|
|
|
// Lock the mutex because LVGL APIs are not thread-safe
|
|
|
|
|
// Need to lock the scheduler before modifying UI-related resources
|
2025-03-14 18:59:49 +08:00
|
|
|
if (example_lvgl_lock(-1)) {
|
|
|
|
|
|
2025-03-15 09:37:07 +08:00
|
|
|
|
|
|
|
|
|
2025-03-14 18:59:49 +08:00
|
|
|
|
|
|
|
|
// Release the mutex
|
|
|
|
|
example_lvgl_unlock();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|