8:4 Matrix Multiplexer

Fork of max14661 by Maxim Integrated

This is an untested driver for the MAX14724.

Revision:
6:be4f2d7fc054
Parent:
4:45fa0192f66d
Child:
7:1d4e59ec0fba
diff -r 58f3bbd30777 -r be4f2d7fc054 max14661.cpp
--- a/max14661.cpp	Fri Dec 05 22:38:56 2014 +0000
+++ b/max14661.cpp	Sat Feb 07 21:55:29 2015 +0000
@@ -277,9 +277,10 @@
 uint16_t Max14661::rd_dir_registers(uint8_t* data)
 {
     uint16_t rtn_val = 1;
-    uint8_t local_data = DIR0;
     
-    rtn_val = write(w_adrs,(const char*) local_data, 1);
+    data[0] = DIR0;
+    
+    rtn_val = write(w_adrs,(const char*) data, 1);
     
     if(!rtn_val)
     {
@@ -319,9 +320,10 @@
 uint16_t Max14661::rd_shadow_registers(uint8_t* data)  
 {
     uint16_t rtn_val = 1;
-    uint8_t local_data = SHDW0;
     
-    rtn_val = write(w_adrs,(const char*) local_data, 1);
+    data[0] = SHDW0;
+    
+    rtn_val = write(w_adrs,(const char*) data, 1);
     
     if(!rtn_val)
     {