fork of original freetronics library

Dependents:   AwsomeStation

Fork of Freetronics_16x2_LCD by Components

Revision:
4:b4b2435f4a7f
Parent:
3:0e04b6c4abb8
Child:
5:7b216d7781f8
--- a/freetronicsLCDShield.h	Thu Oct 31 14:26:31 2013 +0000
+++ b/freetronicsLCDShield.h	Thu Jun 02 13:31:16 2016 +0000
@@ -46,6 +46,17 @@
         AnalogIn _a0;
         
     public:
+        // add definition for each button
+        typedef enum 
+        {
+            BTN_NONE = 0,
+            BTN_RIGHT,
+            BTN_UP,
+            BTN_DOWN,
+            BTN_LEFT,
+            BTN_SELECT
+        } ButtonType_t;
+        
         /** 
          * The constructor creates an freeTronics LCD Shield object, the pins are to be provided by the user. In sequence, RegisterSelect, Enable, Data0 
          * to Data3. Bl is the backlight and a0 is to be provided for button support. 
@@ -160,7 +171,10 @@
          * 
          * 
          */  
-        float readButton(void);
+        float readButtonAnalog(void);
+        
+        // determine which button is pressed
+        ButtonType_t readButton(void);
              
     protected:
         // Stream implementation functions