「App:Library:LVGL:docs:Porting:Tick interface」の版間の差分
提供: robot-jp wiki
ナビゲーションに移動検索に移動12行目: | 12行目: | ||
= Tick interface = | = Tick interface = | ||
+ | {| class="wikitable" | ||
+ | !英文 | ||
+ | !自動翻訳 | ||
+ | |- | ||
+ | | | ||
LVGL needs a system tick to know elapsed time for animations and other tasks. | LVGL needs a system tick to know elapsed time for animations and other tasks. | ||
17行目: | 22行目: | ||
<code style="color: #bb0000;">lv_tick_inc</code> should be called in a higher priority routine than <code style="color: #bb0000;">lv_task_handler()</code> (e.g. in an interrupt) to precisely know the elapsed milliseconds even if the execution of <code style="color: #bb0000;">lv_task_handler</code> takes more time. | <code style="color: #bb0000;">lv_tick_inc</code> should be called in a higher priority routine than <code style="color: #bb0000;">lv_task_handler()</code> (e.g. in an interrupt) to precisely know the elapsed milliseconds even if the execution of <code style="color: #bb0000;">lv_task_handler</code> takes more time. | ||
− | |||
With FreeRTOS <code style="color: #bb0000;">lv_tick_inc</code> can be called in <code style="color: #bb0000;">vApplicationTickHook</code>. | With FreeRTOS <code style="color: #bb0000;">lv_tick_inc</code> can be called in <code style="color: #bb0000;">vApplicationTickHook</code>. | ||
31行目: | 35行目: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | | | ||
+ | |} | ||
+ | :[[App:Library:LVGL:docs:Porting|戻る : Previous]] | ||
== API == | == API == | ||
+ | {| class="wikitable" | ||
+ | !英文 | ||
+ | !自動翻訳 | ||
+ | |- | ||
+ | | | ||
Provide access to the system tick with 1 millisecond resolution | Provide access to the system tick with 1 millisecond resolution | ||
'''Functions''' | '''Functions''' | ||
− | ; <span style="background-color: # | + | ; <span style="background-color: #eeeeee;">uint32_t lv_tick_get(void) </span> |
: Get the elapsed milliseconds since start up | : Get the elapsed milliseconds since start up | ||
: '''Returns''' | : '''Returns''' | ||
:: the elapsed milliseconds | :: the elapsed milliseconds | ||
− | ; <span style="background-color: # | + | ; <span style="background-color: #eeeeee;">uint32_t lv_tick_elaps(uint32_t prev_tick) </span> |
: Get the elapsed milliseconds since a previous time stamp | : Get the elapsed milliseconds since a previous time stamp | ||
: '''Parameters''' | : '''Parameters''' | ||
49行目: | 61行目: | ||
: '''Returns''' | : '''Returns''' | ||
:: the elapsed milliseconds since 'prev_tick' | :: the elapsed milliseconds since 'prev_tick' | ||
− | + | | | |
− | + | |} | |
− | + | :[[App:Library:LVGL:docs:Porting|戻る : Previous]] | |
− | |||
− | [[App:Library:LVGL:docs:Porting|戻る : Previous]] |
2022年6月22日 (水) 14:20時点における版
https://docs.lvgl.io/8.2/porting/tick.html
英文 | 自動翻訳 |
---|---|
Tick interface
英文 | 自動翻訳 |
---|---|
LVGL needs a system tick to know elapsed time for animations and other tasks. You need to call the
With FreeRTOS On Linux based operating systems (e.g. on Raspberry Pi) void * tick_thread (void *args)
{
while(1) {
usleep(5*1000); /*Sleep for 5 millisecond*/
lv_tick_inc(5); /*Tell LVGL that 5 milliseconds were elapsed*/
}
}
|
API
英文 | 自動翻訳 |
---|---|
Provide access to the system tick with 1 millisecond resolution Functions
|