timer interrupts hopefully work now (pwm and isr not yet working!)
[my-code/arm.git] / betty / betty.c
index 3b29d2e..24ea2eb 100644 (file)
@@ -192,9 +192,11 @@ int main() {
        // timer interrupt
        interrupt_tc_config(INTERRUPT_TC0,INTERRUPT_TC_MODE_T,0,0);
        interrupt_tc_match_config(INTERRUPT_TC0,INTERRUPT_M0,120,
-                                 INTERRUPT_TC_MATCH_IR|INTERRUPT_TC_MATCH_RESET);
-       interrupt_tc_ir_set(INTERRUPT_TC0,INTERRUPT_M0);
-       interrupt_enable(INTERRUPT_PWM,INTERRUPT_MODE_VIRQ,1,(u32)&set_sample);
+                                 INTERRUPT_TC_MATCH_IR|
+                                 INTERRUPT_TC_MATCH_RESET);
+       interrupt_tc_ir_set(INTERRUPT_TC0,INTERRUPT_MATCH0);
+       interrupt_enable(INTERRUPT_TIMER0,INTERRUPT_MODE_VIRQ,
+                        1,(u32)&set_sample);
 
        /* pwm init */
        pwm_set_rate_and_prescaler(0xff,0);