修改错误
This commit is contained in:
parent
e3f724347c
commit
0bd2d4005a
|
@ -232,7 +232,7 @@ void tmc2160_init()
|
|||
|
||||
nvic_irq_enable(TIMER4_IRQn, 2u, 3u);//配置中断优先级
|
||||
|
||||
/* TIMER7 enable */
|
||||
/* TIMER4 enable */
|
||||
// timer_enable(TIMER4);//使能定时器
|
||||
#endif
|
||||
|
||||
|
|
|
@ -246,16 +246,16 @@ void EXTI5_9_IRQHandler(void)
|
|||
if ( !gpio_input_bit_get(GPIOE, GPIO_PIN_9) )
|
||||
{
|
||||
exti_init(EXTI_9, EXTI_INTERRUPT, EXTI_TRIG_RISING);//上升沿中断
|
||||
timer_enable(TIMER12);//使能定时器
|
||||
timer_counter_value_config(TIMER12, 0u);
|
||||
timer_enable(TIMER4);//使能定时器
|
||||
timer_counter_value_config(TIMER4, 0u);
|
||||
// ptz_hori_timer_stop();
|
||||
g_dcStepHori = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
exti_init(EXTI_9, EXTI_INTERRUPT, EXTI_TRIG_FALLING);//下降沿中断
|
||||
timer_disable(TIMER12);//失能定时器
|
||||
timer_counter_value_config(TIMER12, 0u);
|
||||
timer_disable(TIMER4);//失能定时器
|
||||
timer_counter_value_config(TIMER4, 0u);
|
||||
g_dcStepHori = 1;
|
||||
}
|
||||
/*function end*/
|
||||
|
|
Loading…
Reference in New Issue