Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: lib_matrix.h
- Revision:
- 2:675b923da5d2
- Parent:
- 1:61f61158c345
diff -r 61f61158c345 -r 675b923da5d2 lib_matrix.h
--- a/lib_matrix.h Mon Mar 28 10:11:31 2022 +0000
+++ b/lib_matrix.h Wed Jun 08 07:11:52 2022 +0000
@@ -1,25 +1,29 @@
-const unsigned char led_H[]= {
- 0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0xFF
-}; //H
-const unsigned char led_E[]= {
- 0xFF,0xFF,0x99,0x99,0x99,0x99,0x99,0x99
-}; //E
-const unsigned char led_L[]= {
- 0xFF,0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0
-}; //L
-const unsigned char led_O[]= {
- 0x7E,0x81,0x81,0x81,0x81,0x81,0x81,0x7E
-}; //O
-const unsigned char led_W[]= {
- 0x1F,0x60,0x80,0x40,0x40,0x80,0x60,0x1F
-}; //W
-const unsigned char led_blank[]= {
+//------------------------------------------------------------------------------
+#define NO_OP_REG 0x00 //Used for Max7219 Cascading purposes
+#define DECODE_MODE_REG 0x09
+#define INTESITY_REG 0x0A
+#define SCAN_LIMIT_REG 0x0B
+#define SHUTDOWN_REG 0x0C
+#define DISPLAY_TEST_REG 0x0F
+//------------------------------------------------------------------------------
+#define DISABLE_DECODE 0x00
+#define BRIGHTNESS 0x05
+#define SCAN_ALL_DIGITS 0x07
+#define SHUTDOWN_MODE 0x00
+#define NORMAL_OPERATION 0x01
+#define DISABLE_TEST 0x00
+
+
+unsigned const char led_blank[]= {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
}; //blank
-const unsigned char led_heart[]= {
+unsigned const char led_heart[]= {
0x18,0x7E,0x7E,0xF8,0xF8,0x7E,0x7E,0x18
}; //heart
-void disp(char c);
-void SPI_Write2(unsigned char MSB, unsigned char LSB);
-void Init_MAX7219(void);
+void MAX7219_NoOperation();
+void MAX7219_write(char regName,char data,char chip);
+void MAX7219_displayText(char* text);
+void MAX7219_init(char noChips);
+void MAX7219_config(char chip);
+void MAX7219_display(unsigned const char led[], char no_chip);