Implement LVGL with SDL for simulator (#16)

* Implemented LVGL with SDL for simulator

* cleanup

* added SDL to build

* build fix

* mutex fixes

* sim app cleanup and improvements

* docs updated

* fix for sdl?

* fix for SDL cmake setup
This commit is contained in:
Ken Van Hoeylandt
2024-01-21 22:27:00 +01:00
committed by GitHub
parent 18a5c5aa45
commit d6baf40d0b
118 changed files with 15327 additions and 1181 deletions
+65
View File
@@ -0,0 +1,65 @@
#include "tactility.h"
#include "FreeRTOS.h"
#include "task.h"
#define TAG "freertos"
#define mainQUEUE_RECEIVE_TASK_PRIORITY (tskIDLE_PRIORITY + 2)
_Noreturn void app_main();
bool lvgl_is_ready();
void lvgl_task(void*);
void app_main_task(TT_UNUSED void* parameter) {
while (!lvgl_is_ready()) {
TT_LOG_I(TAG, "waiting for lvgl task");
vTaskDelay(50);
}
app_main();
}
int main() {
// Create the main app loop, like ESP-IDF
xTaskCreate(
lvgl_task,
"lvgl",
8192,
NULL,
mainQUEUE_RECEIVE_TASK_PRIORITY + 2,
NULL
);
xTaskCreate(
app_main_task,
"app_main",
8192,
NULL,
mainQUEUE_RECEIVE_TASK_PRIORITY + 1,
NULL
);
// Blocks forever
vTaskStartScheduler();
}
/**
* Assert implementation as defined in the FreeRTOSConfig.h
* It allows you to set breakpoints and debug asserts.
*/
void vAssertCalled(TT_UNUSED unsigned long line, TT_UNUSED const char* const file) {
static portBASE_TYPE xPrinted = pdFALSE;
volatile uint32_t set_to_nonzero_in_debugger_to_continue = 0;
TT_LOG_E(TAG, "assert triggered");
taskENTER_CRITICAL();
{
// Step out by attaching a debugger and setting set_to_nonzero_in_debugger_to_continue
while (set_to_nonzero_in_debugger_to_continue == 0) {
// NO-OP
}
}
taskEXIT_CRITICAL();
}