keypad driver
Dependents: class_keypad_lcd_password
Fork of Keypadlatest by
Revision 2:909929293a23, committed 2017-07-04
- Comitter:
- mijimy
- Date:
- Tue Jul 04 08:44:57 2017 +0000
- Parent:
- 1:dd892be4b7c7
- Commit message:
- keypad.h adjust;
Changed in this revision
Keypad.cpp | Show annotated file Show diff for this revision Revisions of this file |
Keypad.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r dd892be4b7c7 -r 909929293a23 Keypad.cpp --- a/Keypad.cpp Wed Jun 21 09:35:40 2017 +0000 +++ b/Keypad.cpp Tue Jul 04 08:44:57 2017 +0000 @@ -4,11 +4,11 @@ // Keypad layout: // [row][col] Col0 Col1 Col2 Col3 -char const kpdLayout[4][4] = {{'1' ,'2' ,'3' ,'4'}, //row0 +/*char const kpdLayout[4][4] = {{'1' ,'2' ,'3' ,'4'}, //row0 {'4' ,'5' ,'6' ,'B'}, //row1 {'7' ,'8' ,'9' ,'C'}, //row2 - {'*' ,'0' ,'#' ,'D'}}; //row3 - + {'*' ,'0' ,'#' ,'D'}}; //row3*/ +extern char kpdLayout[4][4]; //NIBBLE LOW=0000, HIGH= 0111 1011 1101 1110 Col (x) //const char KpdInMask[4] ={0xe0,0xd0,0xb0,0x70}; const char KpdInMask[4] ={0x0e,0x0d,0x0b,0x07};
diff -r dd892be4b7c7 -r 909929293a23 Keypad.h --- a/Keypad.h Wed Jun 21 09:35:40 2017 +0000 +++ b/Keypad.h Tue Jul 04 08:44:57 2017 +0000 @@ -35,7 +35,11 @@ * @code * #include "mbed.h" * #include "Keypad.h" - * + * char kpdLayout[4][4] = {{'1' ,'2' ,'3' ,'4'}, //row0 + * {'4' ,'5' ,'6' ,'B'}, //row1 + * {'7' ,'8' ,'9' ,'C'}, //row2 + * {'*' ,'0' ,'#' ,'D'}}; //row3 + * Keypad kpad(PE_15, PE_14, PE_13, PE_12, PE_11, PE_10, PE_9, PE_8); * * int main() {