chiark / gitweb /
Added in the SN3218 LED controller IC - as used in the PiGlow
[wiringPi.git] / gpio / extensions.c
index 8be0ec0eceb78aa809545985b3faaf5333b7759d..c7e53086f9189251342efd0e0e5c0795355eaa14 100644 (file)
@@ -49,6 +49,7 @@
 #include <mcp3004.h>
 #include <mcp4802.h>
 #include <mcp3422.h>
+#include <sn3218.h>
 
 #include "extensions.h"
 
@@ -466,6 +467,20 @@ static int doExtensionMcp4802 (char *progName, int pinBase, char *params)
 }
 
 
+/*
+ * doExtensionSn3218:
+ *     Analog Output (LED Driver)
+ *     sn3218:base
+ *********************************************************************************
+ */
+
+static int doExtensionSn3218 (char *progName, int pinBase, char *params)
+{
+  sn3218Setup (pinBase) ;
+  return TRUE ;
+}
+
+
 /*
  * doExtensionMcp3422:
  *     Analog IO
@@ -531,6 +546,7 @@ struct extensionFunctionStruct extensionFunctions [] =
   { "mcp3422",         &doExtensionMcp3422     },
   { "max31855",                &doExtensionMax31855    },
   { "max5322",         &doExtensionMax5322     },
+  { "sn3218",          &doExtensionSn3218      },
   { NULL,              NULL                    },
 } ;