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/

Revision:
1:ed0ad90ad734
Parent:
0:b7249629f337
Child:
2:a3545b56bdd7
--- a/Keypad.h	Sat Sep 30 23:17:15 2017 +0000
+++ b/Keypad.h	Sat Sep 30 23:26:44 2017 +0000
@@ -56,7 +56,7 @@
                     
     /** Read key data into buffer
      *  @param none
-     *  @return key number 1 to 12 (0 = no key action)
+     *  @return key number by ASCII code
      */
     uint8_t read(void);
 
@@ -72,9 +72,10 @@
     void key_scan(void);
     
     // buffer control
+    #define BF_SIZE 16
     uint8_t         read_addr;
     uint8_t         write_addr;
-    uint8_t         buf[32];
+    uint8_t         buf[BF_SIZE];
     void bf_put (char dat);
     int8_t bf_get (void);