陀螺仪的初级数据获取

This commit is contained in:
bmy
2023-12-22 15:24:39 +08:00
parent 8feb4bab66
commit 2dffcf04f0
7 changed files with 106 additions and 36 deletions

View File

@@ -198,10 +198,11 @@ void EXTI9_5_IRQHandler(void)
EXTI_ClearITPendingBit(EXTI_Line9);
if (SET == gpio_get_level(E10)) {
potate_button = POTATE_BUTTOM_BACKWARD;
} else {
potate_button = POTATE_BUTTOM_FOREWARD;
}
}
}
@@ -222,6 +223,7 @@ void EXTI15_10_IRQHandler(void)
system_delay_us(200);
if (SET == !gpio_get_level(E11)) {
potate_button = POTATE_BUTTOM_PRESS;
}
}
if (SET == EXTI_GetITStatus(EXTI_Line12)) {