Added in the SN3218 LED controller IC - as used in the PiGlow

so write a little test program with it too.
Updated gpio to use the sn3218 too.
This commit is contained in:
Gordon Henderson
2013-07-23 17:52:27 +01:00
parent 8c8578a26b
commit d24cf0630b
6 changed files with 184 additions and 1 deletions

View 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 },
} ;