From 2b7bcfabc7f53f14eee56a6ea959da5602ee9010 Mon Sep 17 00:00:00 2001 From: Josh Goebel Date: Fri, 12 Feb 2016 21:23:26 -0500 Subject: [PATCH] buttonsState(), deprecate getInput() --- core.cpp | 6 ++++++ core.h | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core.cpp b/core.cpp index db74227..71e4f85 100644 --- a/core.cpp +++ b/core.cpp @@ -303,6 +303,12 @@ void ArduboyCore::setRGBled(uint8_t red, uint8_t green, uint8_t blue) /* Buttons */ uint8_t ArduboyCore::getInput() +{ + return buttonsState(); +} + + +uint8_t ArduboyCore::buttonsState() { uint8_t buttons; diff --git a/core.h b/core.h index 7f16b3a..50f8ef9 100755 --- a/core.h +++ b/core.h @@ -154,7 +154,7 @@ class ArduboyCore uint8_t static width(); //< return display width uint8_t static height(); // < return display height - /// get current state of buttons (bitmask) + /// get current state of all buttons (bitmask) /** * Bit mask that is returned: * @@ -170,7 +170,8 @@ class ArduboyCore * LEFT_BUTTON, A_BUTTON, UP_BUTTON, etc. */ - uint8_t static getInput(); + uint8_t static getInput(); __attribute__ ((deprecated("use buttonsState() instead"))); + uint8_t static buttonsState(); // paints 8 pixels (vertically) from a single byte // - 1 is lit, 0 is unlit