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:
@@ -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 ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user