+ 0,(u32)&input_event);
+
+ // timer interrupt
+ interrupt_tc_config(INTERRUPT_TC0,INTERRUPT_TC_MODE_T,0,0);
+ interrupt_tc_match_config(INTERRUPT_TC0,INTERRUPT_M0,AUDIO_TONE_A,
+ 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);
+ interrupt_tc_enable(INTERRUPT_TC0);
+
+ /* pwm init */
+ pwm_reset;
+ pwm_set_rate_and_prescaler(0xff,0);
+ pwm_config(PWM_CHAN2,PWM_SINGLE_EDGE,0,0);
+ pwm_match_ctrl_config(PWM_CHAN2,PWM_MATCH_RESET);
+ pwm_enable;
+