key table
Dependencies: FPointer keypad mbed
Revision 0:9a880586b57e, committed 2012-10-16
- Comitter:
- ficofer
- Date:
- Tue Oct 16 18:43:40 2012 +0000
- Commit message:
- KEYPAD to 3x4
Changed in this revision
diff -r 000000000000 -r 9a880586b57e FPointer.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FPointer.lib Tue Oct 16 18:43:40 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/AjK/code/FPointer/#56e309e76c19
diff -r 000000000000 -r 9a880586b57e keypad.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/keypad.lib Tue Oct 16 18:43:40 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/yoonghm/code/keypad/#e48ba5b4c497
diff -r 000000000000 -r 9a880586b57e main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Oct 16 18:43:40 2012 +0000 @@ -0,0 +1,32 @@ +#include "mbed.h" + #include "keypad.h" + + Serial pc(USBTX, USBRX); + + + // Define your own keypad values + char Keytable[] = { '1', '2', '3', + '4', '5', '6', + '7', '8', '9', + '*', '0', '#' + }; + + uint32_t + cbAfterInput(uint32_t index) + { + pc.printf("Code\n"); + pc.printf("Index:%d => Key:%c\n", index, Keytable[index]); + return 0; + } + + int main() + { + pc.printf("Code\n"); + Keypad keypad(p25, p26, p27, p28, p21, p22, p23, p24); + keypad.CallAfterInput(&cbAfterInput); + keypad.Start(); + + while (1) { + wait_ms(100); + } + } \ No newline at end of file
diff -r 000000000000 -r 9a880586b57e mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Oct 16 18:43:40 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/cd19af002ccc \ No newline at end of file