From 07493b94b141506e051b0adb9f68132ebfc583c0 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Thu, 8 Nov 2018 19:47:52 +0800 Subject: Added the max7219 stuff. --- rpi/max7219/max7219.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 rpi/max7219/max7219.h (limited to 'rpi/max7219/max7219.h') 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); + -- cgit v1.2.3