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:
parent
1c34777024
commit
89044a8649
@ -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
|
||||
*----------------*/
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user