Keypad program runs on OS2. Extended not only 3x4 but 4x4,4x5 and 5x5 keys.

Dependencies:   mbed Keypad

see /users/kenjiArai/notebook/keypadkey-matrix--control/

Committer:
kenjiArai
Date:
Mon Apr 13 02:07:27 2020 +0000
Revision:
3:8a7b6370956f
Parent:
2:d0ae519c229c
modified keypad library and changed port assign

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kenjiArai 2:d0ae519c229c 1 /*
kenjiArai 2:d0ae519c229c 2 * Mbed Application program
kenjiArai 2:d0ae519c229c 3 *
kenjiArai 2:d0ae519c229c 4 * Copyright (c) 2020 Kenji Arai / JH1PJL
kenjiArai 2:d0ae519c229c 5 * http://www7b.biglobe.ne.jp/~kenjia/
kenjiArai 2:d0ae519c229c 6 * https://os.mbed.com/users/kenjiArai/
kenjiArai 2:d0ae519c229c 7 * Created: April 5th, 2020
kenjiArai 3:8a7b6370956f 8 * Revised: April 13th, 2020
kenjiArai 2:d0ae519c229c 9 */
kenjiArai 2:d0ae519c229c 10 /*
kenjiArai 2:d0ae519c229c 11 You can select several examples as followings.
kenjiArai 2:d0ae519c229c 12 0. key_3x4.cpp
kenjiArai 2:d0ae519c229c 13 1. key_4x4.cpp
kenjiArai 2:d0ae519c229c 14 2. key_4x5.cpp
kenjiArai 2:d0ae519c229c 15 3. key_5x5.cpp
kenjiArai 2:d0ae519c229c 16 4. key_complex.cpp
kenjiArai 2:d0ae519c229c 17 */
kenjiArai 3:8a7b6370956f 18 #define PROG_NUMBER 0 // select 0 to 4
kenjiArai 2:d0ae519c229c 19
kenjiArai 2:d0ae519c229c 20 //----------------- You don't need any modification ----------------------------
kenjiArai 2:d0ae519c229c 21 #if PROG_NUMBER == 0
kenjiArai 2:d0ae519c229c 22 # define KEY3X4
kenjiArai 2:d0ae519c229c 23 #elif PROG_NUMBER == 1
kenjiArai 2:d0ae519c229c 24 # define KEY4X4
kenjiArai 2:d0ae519c229c 25 #elif PROG_NUMBER == 2
kenjiArai 2:d0ae519c229c 26 # define KEY4X5
kenjiArai 2:d0ae519c229c 27 #elif PROG_NUMBER == 3
kenjiArai 2:d0ae519c229c 28 # define KEY5X5
kenjiArai 2:d0ae519c229c 29 #elif PROG_NUMBER == 4
kenjiArai 2:d0ae519c229c 30 # define COMPLEX
kenjiArai 2:d0ae519c229c 31 #else
kenjiArai 2:d0ae519c229c 32 # error " Please set 0 to 4 number for PROG_NUMBER!!"
kenjiArai 2:d0ae519c229c 33 #endif