1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

Add specific otion for tick function + inline it

This commit is contained in:
Zaltora 2018-01-14 10:23:16 +01:00
parent 1c34777024
commit 89044a8649
2 changed files with 11 additions and 1 deletions

View File

@ -8,6 +8,15 @@
#ifndef 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
*----------------*/

View File

@ -8,6 +8,7 @@
*********************/
#include "lv_hal_tick.h"
#include <stddef.h>
#include "../../lv_conf.h"
/*********************
* DEFINES
@ -39,7 +40,7 @@ static volatile uint8_t tick_irq_flag;
* You have to call this function periodically
* @param tick_period the call period of this function in milliseconds
*/
void lv_tick_inc(uint32_t tick_period)
inline void LV_TICK_ATTRIBUTE lv_tick_inc(uint32_t tick_period)
{
tick_irq_flag = 0;
sys_time += tick_period;