Many changes - tidying up the extensions interfaces.

Updating the GPIO command - new command - allreadall
ScrollPhat code
max31855 code (tested with adafruit breakout board)
more tests
updated rht03 code

Raspberry Pi v3 support.
This commit is contained in:
Gordon Henderson
2016-02-29 06:57:38 +00:00
parent 2dbecfca0a
commit b0a60c3302
27 changed files with 406 additions and 185 deletions

View File

@@ -212,11 +212,10 @@ static int myDigitalRead (struct wiringPiNodeStruct *node, int pin)
int mcp23s17Setup (const int pinBase, const int spiPort, const int devId)
{
int x ;
struct wiringPiNodeStruct *node ;
if ((x = wiringPiSPISetup (spiPort, MCP_SPEED)) < 0)
return x ;
if (wiringPiSPISetup (spiPort, MCP_SPEED) < 0)
return FALSE ;
writeByte (spiPort, devId, MCP23x17_IOCON, IOCON_INIT | IOCON_HAEN) ;
writeByte (spiPort, devId, MCP23x17_IOCONB, IOCON_INIT | IOCON_HAEN) ;
@@ -232,5 +231,5 @@ int mcp23s17Setup (const int pinBase, const int spiPort, const int devId)
node->data2 = readByte (spiPort, devId, MCP23x17_OLATA) ;
node->data3 = readByte (spiPort, devId, MCP23x17_OLATB) ;
return 0 ;
return TRUE ;
}