Jim Cromie wrote:
>
> looking at the API docs, I see
>
> int rt_timer_start ( RTIME /nstick/ )
>
> (snip)
>
> This leaves me unclear on how to program the timer to expire in say, 1.5
> mSec.
rt_timer_start starts the hardware timer to tick in either periodic or
aperiodic mode. Programming a particular expiration delay requires
creating and programming a "software" timer, i.e. an alarm in the native
skin API vocabulary. See the rt_alarm* services.
> (...)
> Is this something I should be using nucleus for ?
> ( while Im asking, rt_timer_start is part of native services,
> and xntimer_start is nucleus services ? )
Right. when writing applications, you should only look for skins
services... What you are after is aperiodic mode.
>
> It seems that the API supports creating multiple timers,
> but I see no advantage in using multiples vs 1 for my app,
> either way I have to reprogramm timer-duration and handler each time.
There is always at least one implicit timer on the system: Linux
timer, since RTAI is using the same hardware as Linux and relaying the
timer tick to Linux only when needed.
--
Gilles Chanteperdrix.