Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Keypad by
Revision 1:dd892be4b7c7, committed 2017-06-21
- Comitter:
- mijimy
- Date:
- Wed Jun 21 09:35:40 2017 +0000
- Parent:
- 0:4bbd88022a6f
- Commit message:
- PULLUP IN IN ROW
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 |
--- 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
--- a/Keypad.h Tue Apr 05 17:37:55 2016 +0000
+++ b/Keypad.h Wed Jun 21 09:35:40 2017 +0000
@@ -76,7 +76,8 @@
private:
BusOut _cols;
- BusIn _rows;
+ BusIn _rows ;
+
};
#endif
\ No newline at end of file
