Keypad program runs on OS2. Extended not only 3x4 but 4x4,4x5 and 5x5 keys.
see /users/kenjiArai/notebook/keypadkey-matrix--control/
check_revision.cpp@3:8a7b6370956f, 2020-04-13 (annotated)
- 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?
User | Revision | Line number | New contents of line |
---|---|---|---|
kenjiArai | 2:d0ae519c229c | 1 | /* |
kenjiArai | 2:d0ae519c229c | 2 | * Check Mbed revision |
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 | * Revised: Feburary 16th, 2020 |
kenjiArai | 2:d0ae519c229c | 8 | * Revised: April 6th, 2020 |
kenjiArai | 2:d0ae519c229c | 9 | */ |
kenjiArai | 2:d0ae519c229c | 10 | |
kenjiArai | 2:d0ae519c229c | 11 | #include "mbed.h" |
kenjiArai | 2:d0ae519c229c | 12 | |
kenjiArai | 2:d0ae519c229c | 13 | // RUN on mbed-os-6.0.0-alpha-3 |
kenjiArai | 2:d0ae519c229c | 14 | // https://github.com/ARMmbed/mbed-os/releases/tag/mbed-os-6.0.0-alpha-3 |
kenjiArai | 2:d0ae519c229c | 15 | #if (MBED_MAJOR_VERSION == 5) &&\ |
kenjiArai | 2:d0ae519c229c | 16 | (MBED_MINOR_VERSION == 15) &&\ |
kenjiArai | 2:d0ae519c229c | 17 | (MBED_PATCH_VERSION == 1) |
kenjiArai | 2:d0ae519c229c | 18 | // RUN on mbed 2.0.165 |
kenjiArai | 2:d0ae519c229c | 19 | #elif (MBED_MAJOR_VERSION == 2) &&\ |
kenjiArai | 2:d0ae519c229c | 20 | (MBED_MINOR_VERSION == 0) &&\ |
kenjiArai | 2:d0ae519c229c | 21 | (MBED_PATCH_VERSION == 165) |
kenjiArai | 2:d0ae519c229c | 22 | #else |
kenjiArai | 2:d0ae519c229c | 23 | # error "Please use mbed-os-6.0.0-alpha-3 or mbed2-165" |
kenjiArai | 2:d0ae519c229c | 24 | #endif |
kenjiArai | 2:d0ae519c229c | 25 | |
kenjiArai | 2:d0ae519c229c | 26 | void print_revision(void) |
kenjiArai | 2:d0ae519c229c | 27 | { |
kenjiArai | 2:d0ae519c229c | 28 | printf("MBED_MAJOR_VERSION = %d, ", MBED_MAJOR_VERSION); |
kenjiArai | 2:d0ae519c229c | 29 | printf("MINOR = %d, ", MBED_MINOR_VERSION); |
kenjiArai | 2:d0ae519c229c | 30 | printf("PATCH = %d\r\n", MBED_PATCH_VERSION); |
kenjiArai | 2:d0ae519c229c | 31 | } |