diff options
author | Chris Xiong <chirs241097@gmail.com> | 2018-11-08 19:47:52 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2018-11-08 19:47:52 +0800 |
commit | 07493b94b141506e051b0adb9f68132ebfc583c0 (patch) | |
tree | 9962ad4f3794a30e11b2666ee1548eee28f22505 /rpi/max7219/max7219.h | |
parent | edd226da50ab7e960aee5e12004d9e8c42e23d24 (diff) | |
download | oddities-07493b94b141506e051b0adb9f68132ebfc583c0.tar.xz |
Added the max7219 stuff.
Diffstat (limited to 'rpi/max7219/max7219.h')
-rw-r--r-- | rpi/max7219/max7219.h | 19 |
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); + |