I've just seen your blog post. One thing I don't understand... This is an ISR, so when an interrupt is triggered (end of timer), you decrement a countdown. When countdown == 0, this means this is the end of delay, and you have to do something (or not...). So, instead of polling check_delay(slot), wouldn't it be easier to specify a callback when interrupts are triggered and countdown reached 0 ?
(I guess you need a countdown becaus timer0 is too small for big delay, right ?) Seb PS: thanks for your post, again ! I promise to write one or two soon... 2008/12/31 Sebastien LELONG <[email protected]> > > Hi Joep, > > > I had a look at your timer0_isr_interval.jal library, looks promising ! > There > was a JSG error + weird indentation, I couldn't resist to fix it :) > > About the lib, I understand you have to specify the delay as a number > of "ticks". Is there any plan to specify the delay with a number > microseconds, or milliseconds ? That would be very handy (and much more > complex to code...). > > Eur's RTC lib, rtc_isr_tmr0.jal, also uses timer0, but is also coded using > assembler. Maybe it could be rewrite and based on yours (I dunno). BTW, > I've > no news from Eur since a while, does anybody know if he's still there ? > (I'm > sure he is :)) > > Cheers, > Seb > -- > Sébastien LELONG > http://www.sirloon.net > http://sirbot.org > > > > -- Sébastien Lelong http://www.sirloon.net http://sirbot.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
