Rob, Thanks for your review and your helpful suggestions.
On Apr 11, 3:11 am, Rob Hamerling <[email protected]> wrote: > Why not let the compiler do the low level work? > > if target_cpu == PIC_16 then > TMR0 = timer0_load -- 16-bits timer0 > else > TMR0 = byte(timer0_load) -- 8-bits timer0 > end if > Thanks for the suggestion, but I wanted to make certain that the registers are loaded in the proper order, as required by the datasheet. > BTW > 1. Registers are declared in uppercase in the device files, so for > consistency a library should use uppercase as well. True, but I was trying to keep the style of the original library. But since you brought it up, I'd like to see timer0_isr_interval.jal improved so that it will work on 18F chips ( see issue #111) -- but I didn't have time right now to re-test with 16F, so I left it alone. Another thing I'd don't like to see in a library, is the setting of global interrupt enable-- that should be left for the main program, shouldn't it? What if I have other devices to set up before I want to enable global interrupts? > 2. Some comments just above a procedure or function describing its > functionality will generate (better) documentation (I'm afraid many > libraries are suffering of such comments!). > Tell me more about this. I'm not sure I understand. Thank you, William -- 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.
