Ejemplo n.º 1
0
/* Use *system timer* peripheral -> compare module CM1 */
void
timer_init()
{
    /* 10 ms seems good */
    set_next_tick_default();

    /* Enable timer irq */
    ENABLE_TIMER_IRQ();

    /* Enable interrupt *line* */
    Set32(0x2000B210, 0x00000002);
}
Ejemplo n.º 2
0
void irq_handler(void)
{
    set_next_tick_default();
    ENABLE_TIMER_IRQ();
    ENABLE_IRQ();
}