「App:Library:LVGL:docs:Porting:Task Handler」の版間の差分

提供: robot-jp wiki
ナビゲーションに移動検索に移動
 
(同じ利用者による、間の6版が非表示)
1行目: 1行目:
 
https://docs.lvgl.io/8.2/porting/task-handler.html
 
https://docs.lvgl.io/8.2/porting/task-handler.html
 
__NOTOC__
 
__NOTOC__
{| class="wikitable"
 
!英文
 
!自動翻訳
 
|-
 
|
 
|
 
|}
 
 
 
  
 
= Task Handler =
 
= Task Handler =
17行目: 8行目:
 
|-
 
|-
 
|
 
|
To handle the tasks of LVGL you need to call <code style="color: #bb0000;">lv_timer_handler()</code> periodically in one of the following:
+
'''To handle the tasks of LVGL you need to call''' <code style="color: #bb0000;">lv_timer_handler()</code> '''periodically in one of the following:'''
  
 
* ''while(1)'' of ''main()'' function
 
* ''while(1)'' of ''main()'' function
26行目: 17行目:
  
 
Example:
 
Example:
<syntaxhighlight lang="C++">
+
<syntaxhighlight lang="C++" style="border: 1px dashed gray;">
 
  while(1) {
 
  while(1) {
 
   lv_timer_handler();
 
   lv_timer_handler();
33行目: 24行目:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
To learn more about timers visit the [https://docs.lvgl.io/8.2/overview/timer.html '''Timer'''] section.
 
To learn more about timers visit the [https://docs.lvgl.io/8.2/overview/timer.html '''Timer'''] section.
|LVGLのタスクを処理するに<code>lv_timer_handler()</code>は、次のいずれかで定期的に 呼び出す必要があります。
+
|'''LVGLのタスクを処理するには、次のいずれかの方法で繰り返し'''<code style="color: #bb0000;">lv_timer_handler()</code> '''を呼び出し続ける必要があります。'''
 
+
*''main()''関数の''while(1)※無限ループで連続呼び出し''
* <font class="goog-text-highlight">LVGLのタスクを処理するに</font>''main()''関数の''while(1)''
+
* タイマーによる定期割込(タイマーの割込は<code style="color: #bb0000;">lv_tick_inc()</code>より低い優先度にする)
* タイマー割り込みを定期的に(より低い優先度<code>lv_tick_inc()</code>
+
* 定期的なOSタスク
* 定期的にOSタスク
 
  
タイミングは重要ではありませんが、システムの応答性を維持するには約5ミリ秒である必要があります。
+
割込で処理するため、タイミングは重要ではありませんが、システムの応答性を維持するには約5ミリ秒毎の割込にする必要があります。
  
 
例:
 
例:
 +
<syntaxhighlight lang="C++" style="border: 1px dashed gray;">
 
   while (1 ) {  
 
   while (1 ) {  
 
     lv_timer_handler ();  
 
     lv_timer_handler ();  
 
     my_delay_ms (5 );  
 
     my_delay_ms (5 );  
 
   } 
 
   } 
'''タイマーの詳細については、タイマー'''のセクションをご覧ください。
+
</syntaxhighlight>
 +
 
 +
タイマーの詳細については、 '''[https://docs.lvgl.io/8.2/overview/timer.html Timer]''' セクションをご覧ください。
 
|}
 
|}
:[[App:Library:LVGL:docs:Porting|戻る : Previous]]
+
:[[App:Library:LVGL:docs:Porting#Task Handler|戻る : Previous]]

2022年8月18日 (木) 22:41時点における最新版

https://docs.lvgl.io/8.2/porting/task-handler.html


Task Handler

英文 自動翻訳

To handle the tasks of LVGL you need to call lv_timer_handler() periodically in one of the following:

  • while(1) of main() function
  • timer interrupt periodically (lower priority than lv_tick_inc())
  • an OS task periodically

The timing is not critical but it should be about 5 milliseconds to keep the system responsive.

Example:

 while(1) {
   lv_timer_handler();
   my_delay_ms(5);
 } 

To learn more about timers visit the Timer section.

LVGLのタスクを処理するには、次のいずれかの方法で繰り返しlv_timer_handler() を呼び出し続ける必要があります。
  • main()関数のwhile(1)※無限ループで連続呼び出し
  • タイマーによる定期割込(タイマーの割込はlv_tick_inc()より低い優先度にする)
  • 定期的なOSタスク

割込で処理するため、タイミングは重要ではありませんが、システムの応答性を維持するには約5ミリ秒毎の割込にする必要があります。

例:

  while 1  { 
    lv_timer_handler (); 
    my_delay_ms 5 ; 
  } 

タイマーの詳細については、 Timer セクションをご覧ください。

戻る : Previous