Merge branch 'master' of http://git.isthmus.tk:441/btl143/firmware_violet_zf
This commit is contained in:
@@ -37,6 +37,8 @@
|
||||
#include "by_rt_button.h"
|
||||
#include "by_imu.h"
|
||||
#include "jj_blueteeth.h"
|
||||
#include "by_buzzer.h"
|
||||
|
||||
void NMI_Handler(void) __attribute__((interrupt()));
|
||||
void HardFault_Handler(void) __attribute__((interrupt()));
|
||||
|
||||
@@ -200,9 +202,10 @@ void EXTI9_5_IRQHandler(void)
|
||||
|
||||
if (SET == gpio_get_level(E10)) {
|
||||
rotate_button = rotate_button_backward;
|
||||
|
||||
queue_add_element(BY_BACKWARD);
|
||||
} else {
|
||||
rotate_button = rotate_button_forward;
|
||||
queue_add_element(BY_FORWARD);
|
||||
}
|
||||
EXTI_ClearITPendingBit(EXTI_Line9);
|
||||
}
|
||||
@@ -228,8 +231,11 @@ void EXTI15_10_IRQHandler(void)
|
||||
time_via = system_get_tick() - time_via;
|
||||
if (time_via > LONG_PRESS_THRESHOLD_TICK) {
|
||||
rotate_button = rotate_button_press_long;
|
||||
queue_add_element(BY_PRESS_LONG);
|
||||
|
||||
} else {
|
||||
rotate_button = rotate_button_press_short;
|
||||
queue_add_element(BY_PRESS_SHORT);
|
||||
}
|
||||
time_via = 0;
|
||||
EXTI_ClearITPendingBit(EXTI_Line11);
|
||||
|
||||
Reference in New Issue
Block a user