Hello,
I was thinking of creating a generic library for the 8 and 16 bit
timers. For almost every project with PICs I've used the timers wihin
the PICs. So I browsed through my JAL source files and looked for a
common timer pattern(s) I've used. Below a first shot how the
interface, which can be used to start the discussion. In addition it
would be nice to have a wiki page with the timer related registers
(Seb?).


const TIMERX_TICKS_PER_SECOND = 1200


-- reset timer, set value to 0
procedure timerX_reset() is
end procedure

-- enable timer X
procedure timerX_enable() is
end procedure

-- disable timer X
procedure timerX_disable() is
end procedure

-- get the current timer value
function timer1_get() return word is
end function

-- block until ticks value < timer value
procedure timer_wait_till_tick( word in ticks) is
end procedure

-- initialize timer
procedure timer1_init() is
end procedure

-- enable timer X
procedure timerX_enable_interrupt() is
end procedure

-- disable timer X
procedure timerX_disable_interrupt() is
end procedure


--~--~---------~--~----~------------~-------~--~----~
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