application: remove button since we will use the pins
This commit is contained in:
parent
48c1b5800e
commit
4dc895d793
|
@ -468,13 +468,6 @@ void main(void)
|
|||
char c = user_input_get(); // store receive character
|
||||
terminal_send(c); // send received character to terminal
|
||||
}
|
||||
if (button_flag) { // user pressed button
|
||||
action = true; // action has been performed
|
||||
puts("button pressed\n");
|
||||
led_toggle(); // toggle LED
|
||||
sleep_ms(100); // wait a bit to remove noise and double trigger
|
||||
button_flag = false; // reset flag
|
||||
}
|
||||
if (wakeup_flag) { // time to do periodic checks
|
||||
wakeup_flag = false; // clear flag
|
||||
}
|
||||
|
|
2
global.c
2
global.c
|
@ -261,6 +261,7 @@ void board_setup(void)
|
|||
#endif // LED_PIN
|
||||
|
||||
// setup button
|
||||
/*
|
||||
#if defined(BUTTON_PIN) && defined(BUTTON_PRESSED)
|
||||
rcc_periph_clock_enable(GPIO_RCC(BUTTON_PIN)); // enable clock for button
|
||||
exti_select_source(GPIO_EXTI(BUTTON_PIN), GPIO_PORT(BUTTON_PIN)); // mask external interrupt of this pin only for this port
|
||||
|
@ -274,6 +275,7 @@ void board_setup(void)
|
|||
exti_enable_request(GPIO_EXTI(BUTTON_PIN)); // enable external interrupt
|
||||
nvic_enable_irq(GPIO_NVIC_EXTI_IRQ(BUTTON_PIN)); // enable interrupt
|
||||
#endif
|
||||
*/
|
||||
|
||||
// reset user input buffer
|
||||
user_input_available = false;
|
||||
|
|
Loading…
Reference in New Issue