「App:Library:LVGL:docs:Porting:Tick interface」の版間の差分
27行目: | 27行目: | ||
On Linux based operating systems (e.g. on Raspberry Pi) <code style="color: #bb0000;">lv_tick_inc</code> can be called in a thread like below: | On Linux based operating systems (e.g. on Raspberry Pi) <code style="color: #bb0000;">lv_tick_inc</code> can be called in a thread like below: | ||
− | <syntaxhighlight lang="C++"> | + | <syntaxhighlight lang="C++" style="border: 1px dashed gray;"> |
void * tick_thread (void *args) | void * tick_thread (void *args) | ||
{ | { | ||
51行目: | 51行目: | ||
Linuxベースのオペレーティングシステム(Raspberry Piなど)<code>lv_tick_inc</code>では、次のようなスレッドで呼び出すことができます。 | Linuxベースのオペレーティングシステム(Raspberry Piなど)<code>lv_tick_inc</code>では、次のようなスレッドで呼び出すことができます。 | ||
+ | <syntaxhighlight lang="C++" style="border: 1px dashed gray;"> | ||
void * tick_thread (void * args ) | void * tick_thread (void * args ) | ||
{ | { | ||
58行目: | 59行目: | ||
} | } | ||
} | } | ||
+ | </syntaxhighlight> | ||
|} | |} | ||
:[[App:Library:LVGL:docs:Porting|戻る : Previous]] | :[[App:Library:LVGL:docs:Porting|戻る : Previous]] |
2022年6月22日 (水) 23:58時点における版
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
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*/
}
}
|
Linuxベースのオペレーティングシステム(Raspberry Piなど) void * tick_thread (void * args )
{
while (1 ) {
usleep (5 * 1000 ); /*5ミリ秒スリープ*/
lv_tick_inc (5 ); /*5ミリ秒が経過したことをLVGLに通知します*/
}
}
|
API
英文 | 自動翻訳 |
---|---|
Provide access to the system tick with 1 millisecond resolution Functions
|
Functions
|