diff --git a/application.c b/application.c index 00034f7..cc5ea8c 100644 --- a/application.c +++ b/application.c @@ -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 } diff --git a/global.c b/global.c index cfef145..2ce1b9d 100644 --- a/global.c +++ b/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;