aboutsummaryrefslogtreecommitdiff
path: root/rpi/max7219/max7219.h
diff options
context:
space:
mode:
Diffstat (limited to 'rpi/max7219/max7219.h')
-rw-r--r--rpi/max7219/max7219.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/rpi/max7219/max7219.h b/rpi/max7219/max7219.h
new file mode 100644
index 0000000..2e5b1ba
--- /dev/null
+++ b/rpi/max7219/max7219.h
@@ -0,0 +1,19 @@
+#define NCHIPS 4
+//pins
+#define P_DATA 0
+#define P_CS 1
+#define P_CLK 2
+//registers
+#define NO_OP 0x00
+//register #1 to #8 are for the digits
+#define DECODE_MODE 0x09
+#define INTENSITY 0x0a
+#define SCAN_LIMIT 0x0b
+#define SHUTDOWN 0x0c
+#define DISPLAY_TEST 0x0f
+
+void max7219_send(unsigned char r,unsigned char d,int chip);
+void max7219_batch(unsigned short *d);
+void max7219_init();
+void max7219_deinit(int clear);
+