3x4 keypad library (Extended not only 3x4 but 4x4,4x5 and 5x5 keys)

Dependents:   Keypad_input_OS2 Keypad_input

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

Files at this revision

API Documentation at this revision

Comitter:
kenjiArai
Date:
Thu Feb 18 08:14:19 2021 +0000
Parent:
4:f74ca02cdba1
Commit message:
changed attach function call

Changed in this revision

Keypad.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r f74ca02cdba1 -r 8929ce2f393c Keypad.cpp
--- a/Keypad.cpp	Mon Apr 13 02:04:25 2020 +0000
+++ b/Keypad.cpp	Thu Feb 18 08:14:19 2021 +0000
@@ -4,11 +4,11 @@
  *      Akizuki AE-KIT45-KEYPAD4X3
  *      http://akizukidenshi.com/catalog/g/gK-12229/
  *
- * Copyright (c) 2017,'20 Kenji Arai / JH1PJL
+ * Copyright (c) 2017,'20,'21 Kenji Arai / JH1PJL
  *  http://www7b.biglobe.ne.jp/~kenjia/
  *  https://os.mbed.com/users/kenjiArai/
  *      Created:    September 27th, 2017
- *      Revised:    April     13th, 2020
+ *      Revised:    February  18th, 2021
  */
 
 #include "Keypad.h"
@@ -116,7 +116,11 @@
     }
     read_addr = 0;
     write_addr = 0;
+#if (MBED_MAJOR_VERSION == 2)
     tk.attach_us(callback(this, &Keypad::key_scan), 2000); // 2mS
+#else
+    tk.attach(callback(this, &Keypad::key_scan), 2ms); // 2mS
+#endif
 }
 
 void Keypad::key_scan(void)