Hi kashin,<br><br>Having a delay is very simple and clean, simpler than saying it, <br><br>#include &lt;interfaces/timer_client.h&gt;<br>#include &lt;timer/timer.h&gt;<br><br>timer_t tim, tim_ret;<br>int r;<br><br>timer_init();
<br>tim = timer_create();<br>r = timer_request(tim, MICROSECS(10), TIMER_ONESHOT);<br>do {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tim_ret = timer_wait();<br>
} while(tim_ret!=tim) ;<br><br>And that&#39;s it, or you can always go dirty with for(i=0;i&lt;N;i++);<br><br>
Hope it helps,<br><br>Cheers,<br><font color="#888888"><br>Jorge</font><br><br><div class="gmail_quote">On Nov 30, 2007 8:18 PM, Jorge Torres &lt;<a href="mailto:jorge.torres.maldonado@gmail.com">jorge.torres.maldonado@gmail.com
</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi kashin,<br><br>Having a delay is very simple and clean, simpler than saying it, 
<br><br>#include &lt;interfaces/timer_client.h&gt;<br>#include &lt;timer/timer.h&gt;<br><br>timer_t tim, tim_ret;<br>int r;<br><br>timer_init();
<br>tim = timer_create();<br>r = timer_request(tim, MICROSECS(10), TIMER_ONESHOT);<br>tim_ret = timer_wait();<br><br>while(tim_ret!=tim);<br><br>And that&#39;s it, or you can always go dirty with for(i=0;i&lt;N;i++);<br>
<br>
Hope it helps,<br><br>Cheers,<br><font color="#888888"><br>Jorge</font><div><div></div><div class="Wj3C7c"><br><div class="gmail_quote">On Nov 29, 2007 10:19 AM, kashin Lin &lt;<a href="mailto:kashin08@gmail.com" target="_blank">
kashin08@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>thanks for your reply. <br><br>the reason of the need for delay is that :<br>i want to add some milliseconds delay between contiguous hardware configuration instruction. <br>so maybe it&#39;s no need to use this powerful method&nbsp; such as timer. 
<br>so are there any alternative way to achieve this goal?<br>p.s. where are those examples use timer server i can refer to?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( i want to learn how to use timer too )<br><br><br><br>another questions for register irq handler: 
<br>if i want to use function_A as irq #B&#39;s handler<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;thread_ref_t thrd;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;thrd = thread_create_simple( function_A, NULL, 100 );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hardware_register_interrupt( thread_l4tid(thrd), B );<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>is the right way to register it?<br><br><br><br><br><div><span class="gmail_quote">2007/11/29, Jorge Torres &lt;<a href="mailto:jorge.torres.maldonado@gmail.com" target="_blank">
  jorge.torres.maldonado@gmail.com</a>&gt;:</span><div><div></div><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hi,</div><div>&nbsp;</div><div>You can use iguana&#39;s timer server, there are some examples, at which you can look at,</div><div>&nbsp;</div><div>Cheers,</div><div>&nbsp;</div><div>Jorge<br><br></div><div class="gmail_quote"><div>


<span>On Nov 28, 2007 2:49 AM, kashin Lin &lt;<a href="mailto:kashin08@gmail.com" target="_blank">kashin08@gmail.com</a>&gt; wrote: <br></span></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">


<div><span>Hi,<br><br>i wonder know if OKL4&nbsp;or&nbsp;Iguana has any system call or API that can delay<br><br>several msec,( similar to uDelay or mDelay in linux kernel). and how to use it? <br><br>ex: which header file&nbsp;i&nbsp;should&nbsp;include,&nbsp;and&nbsp;what&nbsp;function&nbsp;i&nbsp;can&nbsp;call? 
<br><br><br>another quetion is about request IRQ:<br><br>in linux kernel there is a functin named request_irq whitch can map a IRQ# to a handler routine.  <br><br>i noticed there is a function named hardware_register_interrupt in iguana, but the parameters are 
<br><br>IRQ# and a thread id. it doesn&#39;t make sense for me. why not a handler routine instead of a thread id?<br><br>if i want to rigster a handler routine for a IRQ#, how should i do?<br><br></span></div>_______________________________________________
<br>Developer mailing list<br><a href="mailto:Developer@okl4.org" target="_blank">   Developer@okl4.org</a><br><a href="https://lists.okl4.org/mailman/listinfo/developer" target="_blank">
 https://lists.okl4.org/mailman/listinfo/developer</a><br><br></blockquote></div><br></blockquote></div></div></div><br>
</blockquote></div><br>
</div></div></blockquote></div><br>