Driver for a CD22M3494 cross point switcher

Library description

The CD22M3494 is a 16x8 crosspoint switch matrix, it can be used in any configuration i.e. 16 ins' 8 outs' or 16 outs' and 8 ins'. Control of the chip is pretty simple there are two parallel address buses a 4 byte address controls the X axis (16 IO pins) and a 3 byte address controls the Y axis (8 IO pins). A data bus says whether to open or close the switch and a 'strobe' bus actually performs the switch. This library provides a simple interface to control the CD22M3494 and provides a mechanism to associate source and destinations in pairs and switch the pairs via their names.

Revision:
13:ee719eb11161
Parent:
9:4b836ceacfba
Child:
14:7cb4d76170b2
--- a/CD22M3494.h	Thu Dec 26 12:20:25 2013 +0000
+++ b/CD22M3494.h	Tue Jan 14 13:55:56 2014 +0000
@@ -165,30 +165,15 @@
         delete reset;
         associationTable.clear();
         delete &associationTable;
-    }
-    
-    const char *byte_to_binary(int x)
-    {
-        static char b[9];
-        b[0] = '\0';
-    
-        int z;
-        for (z = 128; z > 0; z >>= 1)
-        {
-            strcat(b, ((x & z) == z) ? "1" : "0");
-        }
-    
-        return b;
-    }
+    }  
 
-        
     /**Closes the switch at the given cross point.
      *
      * @param x the x axis
      * @param y the y axis
      */
     bool crossPointConnect(unsigned short x, unsigned short y) {
-       // INFO("Got x point connect for x %s, y %s", byte_to_binary(x), byte_to_binary(y));
+        INFO("Got x point connect for x %d, y %d", x, y);
         if (x <= MAX_X && y <= MAX_Y) {
             INFO("setting data high...");
             data->write(1);
@@ -215,7 +200,7 @@
      * @param y the y axis
      */
     bool crossPointDisconnect(unsigned short x, unsigned short y) {
-       // INFO("Got x point disconnect for x %s, y %s", byte_to_binary(x), byte_to_binary(y));
+        INFO("Got x point disconnect for x %d, y %d", x, y);
         if (x <= MAX_X && y <= MAX_Y) {
             INFO("setting data high...");
             data->write(0);