2021-04-21 17:24:01 +00:00
|
|
|
#include "cmsis_os.h"
|
2021-01-30 15:33:04 +00:00
|
|
|
|
|
|
|
#include "fatfs.h"
|
|
|
|
|
|
|
|
#include "lvgl.h"
|
|
|
|
|
|
|
|
osThreadId_t hello_thread_handle;
|
|
|
|
const osThreadAttr_t hello_thread_attributes = {
|
|
|
|
.name = "HELLO",
|
|
|
|
.priority = (osPriority_t) osPriorityNormal,
|
|
|
|
.stack_size = 1024 * 4
|
|
|
|
};
|
|
|
|
|
|
|
|
extern osSemaphoreId_t g_lvgl_semaphore;
|
|
|
|
|
|
|
|
void hello_thread(void *parameters);
|
|
|
|
|
|
|
|
void user_task_hello_init(void) {
|
|
|
|
hello_thread_handle = osThreadNew(hello_thread, NULL, &hello_thread_attributes);
|
|
|
|
}
|
|
|
|
|
|
|
|
void hello_thread(void *parameters) {
|
|
|
|
osSemaphoreAcquire(g_lvgl_semaphore, osWaitForever);
|
|
|
|
|
|
|
|
osSemaphoreRelease(g_lvgl_semaphore);
|
|
|
|
|
|
|
|
for(;;) {
|
|
|
|
osDelay(1000);
|
|
|
|
}
|
|
|
|
}
|