BigW Consortium Gitlab

Commit 6bab1d28 by Zaltora

add handle fn to attribute + reorganize

parent 89044a86
...@@ -9,15 +9,6 @@ ...@@ -9,15 +9,6 @@
#define LV_CONF_H #define LV_CONF_H
/*---------------- /*----------------
* Compiler attribute
*----------------*/
/*
* Some Architecture can be customized, like put function or variable
* to a specific memory segment.
*/
#define LV_TICK_ATTRIBUTE /* Define a custom attribute to Tick function */
/*----------------
* Dynamic memory * Dynamic memory
*----------------*/ *----------------*/
/* /*
...@@ -99,6 +90,10 @@ ...@@ -99,6 +90,10 @@
#define USE_LV_GPU 1 /*1: Enable GPU interface*/ #define USE_LV_GPU 1 /*1: Enable GPU interface*/
#define USE_LV_FILESYSTEM 1 /*1: Enable file system (required by images*/ #define USE_LV_FILESYSTEM 1 /*1: Enable file system (required by images*/
/*Compiler attributes*/
#define LV_ATTRIBUTE_TICK_INC /* Define a custom attribute to tick increment function */
#define LV_ATTRIBUTE_TASK_HANDLE /* Define a custom attribute to task handle function */
/*================ /*================
* THEME USAGE * THEME USAGE
*================*/ *================*/
......
...@@ -40,7 +40,7 @@ static volatile uint8_t tick_irq_flag; ...@@ -40,7 +40,7 @@ static volatile uint8_t tick_irq_flag;
* You have to call this function periodically * You have to call this function periodically
* @param tick_period the call period of this function in milliseconds * @param tick_period the call period of this function in milliseconds
*/ */
inline void LV_TICK_ATTRIBUTE lv_tick_inc(uint32_t tick_period) inline void LV_ATTRIBUTE_TICK_INC lv_tick_inc(uint32_t tick_period)
{ {
tick_irq_flag = 0; tick_irq_flag = 0;
sys_time += tick_period; sys_time += tick_period;
......
...@@ -54,7 +54,7 @@ void lv_task_init(void) ...@@ -54,7 +54,7 @@ void lv_task_init(void)
/** /**
* Call it periodically to handle lv_tasks. * Call it periodically to handle lv_tasks.
*/ */
void lv_task_handler(void) inline void LV_ATTRIBUTE_TASK_HANDLE lv_task_handler(void)
{ {
static uint32_t idle_period_start = 0; static uint32_t idle_period_start = 0;
static uint32_t handler_start = 0; static uint32_t handler_start = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment