aboutsummaryrefslogtreecommitdiff
path: root/rpi/max7219/max7219_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'rpi/max7219/max7219_test.c')
-rw-r--r--rpi/max7219/max7219_test.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/rpi/max7219/max7219_test.c b/rpi/max7219/max7219_test.c
new file mode 100644
index 0000000..d01a32c
--- /dev/null
+++ b/rpi/max7219/max7219_test.c
@@ -0,0 +1,15 @@
+#include <unistd.h>
+#include "max7219.h"
+int main()
+{
+ max7219_init();
+ for(int c=0;c<4;++c)
+ {
+ for(int cc=0;cc<4;++cc)
+ for(int i=0;i<8;++i)
+ max7219_send(i+1,c==cc?(1<<(i+1))-1:0,cc);
+ sleep(2);
+ }
+ max7219_deinit(1);
+ return 0;
+}