2009/8/1 Sebastien Lelong <[email protected]>:

> Nice idea. User could also register a callable called when timer reaches 0
> (or another value), or when an interrupt is raised. Having alias feature
> makes code clear.
>
>
> procedure my_proc() is
>    -- bla
> end procedure
>
> alias my_proc is timerX_callable
>
You love new features, don't you ;)
Why don't you just define your code with the name timerX_callable?

This does require to include the timer library after the procedure. We
do this for i2c slave also, but I do not realy like this. I'd prefer
includes and defines at the top of the program, before any procedure
definitions.

An other thing is what my_proc() exactly is. I think you assume it is
not the isr itself, but called from the isr. This would make the isr:

if (defined(timerX_callable) == true) then
procedure timerX_isr is
   pragma interrupt

   if (timerXif == true) then
      timerX_callable()
      timerXif = false
  end if
end procedure
end if

But... this would take an other stack level and more code. Would this
be worth it?  We also could tell how to create the isr...

Joep

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to