# sunxi timer This driver implements the Timer protocol [drv/timer] using the timer peripheral included in the Allwinner SoC. It uses timer 0 in continuous mode, no interrupt, $ffffffff interval, 32kHz mode. Because that counter runs backwards, we have our "ticks" implementation negate the counter before yielding it. Timer 1 can be enabled for a periodical IRQ so that the CPU can sleep via WFI. ## API sunxitimer$ ( -- ) Initialize timer 0 as described above ave make it our [drv/timer] active timer. timer1irq$ ( -- ) Enable IRQ on timer 1, for an interval of 10ms. timer1isr, ( -- handled-br ) Compile a IRQ handler for timer 1. reboot ( -- ) Reboot the system.