Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
CTCaer
GitHub Repository: CTCaer/hekate
Path: blob/master/bdk/libs/lvgl/lv_hal/lv_hal_tick.h
1476 views
1
/**
2
* @file lv_hal_tick.h
3
* Provide access to the system tick with 1 millisecond resolution
4
*/
5
6
#ifndef LV_HAL_TICK_H
7
#define LV_HAL_TICK_H
8
9
#ifdef __cplusplus
10
extern "C" {
11
#endif
12
13
/*********************
14
* INCLUDES
15
*********************/
16
#ifdef LV_CONF_INCLUDE_SIMPLE
17
#include "lv_conf.h"
18
#else
19
#include "../../lv_conf.h"
20
#endif
21
#include <stdint.h>
22
23
/*********************
24
* DEFINES
25
*********************/
26
#ifndef LV_ATTRIBUTE_TICK_INC
27
#define LV_ATTRIBUTE_TICK_INC
28
#endif
29
30
/**********************
31
* TYPEDEFS
32
**********************/
33
34
/**********************
35
* GLOBAL PROTOTYPES
36
**********************/
37
38
/**
39
* You have to call this function periodically
40
* @param tick_period the call period of this function in milliseconds
41
*/
42
LV_ATTRIBUTE_TICK_INC void lv_tick_inc(uint32_t tick_period);
43
44
/**
45
* Get the elapsed milliseconds since start up
46
* @return the elapsed milliseconds
47
*/
48
uint32_t lv_tick_get(void);
49
50
/**
51
* Get the elapsed milliseconds since a previous time stamp
52
* @param prev_tick a previous time stamp (return value of systick_get() )
53
* @return the elapsed milliseconds since 'prev_tick'
54
*/
55
uint32_t lv_tick_elaps(uint32_t prev_tick);
56
57
/**********************
58
* MACROS
59
**********************/
60
61
#ifdef __cplusplus
62
} /* extern "C" */
63
#endif
64
65
#endif /*LV_HAL_TICK_H*/
66
67