mirror of
https://github.com/No-Chicken/Power-Pico.git
synced 2026-04-03 13:02:36 +08:00
分离LVGL task到新文件
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
//tasks
|
||||
#include "user_HardwareInitTask.h"
|
||||
#include "user_LVGLTask.h"
|
||||
#include "user_PDUFPTask.h"
|
||||
#include "user_KeyTask.h"
|
||||
#include "user_MessageTask.h"
|
||||
@@ -116,37 +117,3 @@ void User_Tasks_Init(void)
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief FreeRTOS Tick Hook, to increase the LVGL tick
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void TaskTickHook(void)
|
||||
{
|
||||
//to increase the LVGL tick
|
||||
lv_tick_inc(1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief LVGL Handler task, to run the lvgl
|
||||
* @param argument: Not used
|
||||
* @retval None
|
||||
*/
|
||||
void LvHandlerTask(void *argument)
|
||||
{
|
||||
key_event_t key_event;
|
||||
while(1)
|
||||
{
|
||||
if(osMessageQueueGet(Key_MessageQueue, &key_event, NULL, 1)==osOK) {
|
||||
lv_lib_pm_handle_key_event(&key_event);
|
||||
}
|
||||
lv_task_handler();
|
||||
osDelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user