Demo of the RA8875 Keypad to enter a username and password.

Dependencies:   mbed RA8875 Keypad

Revision:
3:954431ea9b0d
Parent:
2:117fb9168afc
Child:
4:8c1932fcd628
--- a/main.cpp	Sat Mar 05 16:23:10 2016 +0000
+++ b/main.cpp	Sat Mar 05 16:50:26 2016 +0000
@@ -46,8 +46,12 @@
             fwrite(&matrix, sizeof(tpMatrix_t), 1, fh);
             fclose(fh);
         } else {
+            lcd.printf("Cannot save calibration in /local/tpcal.cfg\r\n");
+            wait_ms(1000);
         }
     } else {
+        lcd.printf("TouchPanelCalibrate returned error code %d\r\n", r);
+        wait_ms(2000);
     }
 }
 
@@ -113,7 +117,8 @@
     char name1[10];
     
     // copy definition and then resize it
-    memcpy(&tiny, kp.GetInternalKeypad(), sizeof(Keypad::keyboard_t));
+    kp.SetKeyboard();   // select the internal keyboard
+    memcpy(&tiny, kp.GetKeyboard(), sizeof(Keypad::keyboard_t));
     tiny.x = x; tiny.y = y;
     tiny.width = w; tiny.height=h;
     
@@ -165,4 +170,3 @@
         wait(5);
     }
 }
-