diff options
Diffstat (limited to 'src/utils/buttons.cpp')
| -rw-r--r-- | src/utils/buttons.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/utils/buttons.cpp b/src/utils/buttons.cpp deleted file mode 100644 index 166ee41..0000000 --- a/src/utils/buttons.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "buttons.h" -#include "config.h" -#include <Arduino.h> - -void buttonsInit() { - pinMode(BTN_UP, INPUT_PULLUP); - pinMode(BTN_DOWN, INPUT_PULLUP); - pinMode(BTN_SELECT, INPUT_PULLUP); - pinMode(BTN_BACK, INPUT_PULLUP); - pinMode(BTN_RIGHT, INPUT_PULLUP); - pinMode(BTN_LEFT, INPUT_PULLUP); -} - -bool btnUp() { return !digitalRead(BTN_UP); } -bool btnDown() { return !digitalRead(BTN_DOWN); } -bool btnSelect() { return !digitalRead(BTN_SELECT); } -bool btnBack() { return !digitalRead(BTN_BACK); } -bool btnRight() { return !digitalRead(BTN_RIGHT); } -bool btnLeft() { return !digitalRead(BTN_LEFT); } |
