![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
pachas
Dependencies: mbed QEI FastPWM
Diff: buttons.cpp
- Revision:
- 3:45299e7882b9
- Parent:
- 1:aa5df1878126
- Child:
- 6:d38287621cca
--- a/buttons.cpp Thu Apr 16 13:22:16 2020 +0000 +++ b/buttons.cpp Fri Apr 17 11:22:43 2020 +0000 @@ -5,6 +5,7 @@ /* Object definition */ BusIn buttons (ENTER_SW_PIN, LIMIT_SW_01_PIN, GAS_INPUT_SW_PIN); +DigitalIn push_button(ENTER_SW_PIN); /* Global variable definition */ volatile uint8_t button_state = 0; // debounced button state (bit == 1: button pressed) @@ -14,7 +15,7 @@ void Buttons_Initialize(void){ // Enable the pull-up resistors for the buttons and the switch - //buttons.mode(PullUp); + push_button.mode(PullUp); }