Skip to content

Commit

Permalink
buttonsState(), deprecate getInput()
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Feb 13, 2016
1 parent 1b96a0d commit 2b7bcfa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
5 changes: 3 additions & 2 deletions core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
*
Expand All @@ -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
Expand Down

0 comments on commit 2b7bcfa

Please sign in to comment.