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