列挙型 | |
enum | ClockDivider { ClockDivider_1 = 0, ClockDivider_64 = 1, ClockDivider_256 = 2, ClockDivider_1024 = 3 } |
allowable timer clock dividers [詳細] | |
関数 | |
void | timerStart (int channel, ClockDivider divider, u16 ticks, fp callback) |
Creates a standard timer. Callback is tied directly to interupt table and called directly resulting in less latency than the attached timer. | |
u16 | timerElapsed (int channel) |
returns the ticks elapsed since the last call to timerElapsed() |
Simple timer instantiation.
enum ClockDivider |
u16 timerElapsed | ( | int | channel | ) |
returns the ticks elapsed since the last call to timerElapsed()
channel | the timer channel returned by newTimer() |
void timerStart | ( | int | channel, | |
ClockDivider | divider, | |||
u16 | ticks, | |||
fp | callback | |||
) |
Creates a standard timer. Callback is tied directly to interupt table and called directly resulting in less latency than the attached timer.
channel | The hardware channel to use (0 - 3) | |
divider | The timer channel clock divider (clock will tick at 33.51392 Mhz / divider) | |
ticks | The number of ticks which must elapse before the timer overflows | |
callback | The callback to be called when the timer expires (if null no irq will be generated by the timer) |