keypad driver

Dependents:   class_keypad_lcd_password

Fork of Keypadlatest by tatiuc embedded

Revision:
1:dd892be4b7c7
Parent:
0:4bbd88022a6f
Child:
2:909929293a23
--- a/Keypad.cpp	Tue Apr 05 17:37:55 2016 +0000
+++ b/Keypad.cpp	Wed Jun 21 09:35:40 2017 +0000
@@ -4,7 +4,7 @@
 
 // Keypad layout:
 //                [row][col]   Col0 Col1 Col2 Col3 
-char const kpdLayout[4][4] = {{'1' ,'2' ,'3' ,'A'},  //row0
+char const kpdLayout[4][4] = {{'1' ,'2' ,'3' ,'4'},  //row0
                               {'4' ,'5' ,'6' ,'B'},  //row1
                               {'7' ,'8' ,'9' ,'C'},  //row2
                               {'*' ,'0' ,'#' ,'D'}}; //row3
@@ -23,7 +23,8 @@
 char Keypad::ReadKey() {
     char KeyValue, Done=0;
     uint16_t y, x;
-    
+     _rows.mode(PullUp); 
+
     //delay_ms(ContactBounceTime);  //warning no contact bounce protection
                                     //call read_key more than once with delay
                                     //between if key stay constant then key is pressed