TM1638 LED controller. Max 80 LEDs, Max 24 Key scan. Supports LED&KEY, QYF-TM1638 and JY-LKM1638 module.

Dependents:   mbed_TM1638 Otjimaniya RL0201-V1

See here for more information.

Revision:
2:532ce15ea9ec
Parent:
1:1f2453ed85d7
Child:
4:b2bbdc58967e
--- a/TM1638.h	Sat Jan 09 14:30:43 2016 +0000
+++ b/TM1638.h	Fri Jan 15 19:09:59 2016 +0000
@@ -1,5 +1,6 @@
 /* mbed TM1638 Library, for TM1638 LED controller
  * Copyright (c) 2015, v01: WH, Initial version
+ *               2016, v02: WH, refactored display and keyboard defines 
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -64,11 +65,17 @@
  * @endcode
  */
 
+
+//TM1638 Display and Keymatrix data
+#define TM1638_MAX_NR_GRIDS    8
+#define TM1638_BYTES_PER_GRID  2
+//Significant bits Keymatrix data
+#define TM1638_KEY_MSK      0x77 
+
 //Memory size in bytes for Display and Keymatrix
-#define TM1638_DISPLAY_MEM    16
+#define TM1638_DISPLAY_MEM  (TM1638_MAX_NR_GRIDS * TM1638_BYTES_PER_GRID)
 #define TM1638_KEY_MEM         4
-//Significant bits Keymatrix data
-#define TM1638_KEY_BITS        6 
+
 
 //Reserved bits for commands
 #define TM1638_CMD_MSK      0xC0