MCPcopy Create free account
hub / github.com/WiringPi/WiringPi / pcf8591Setup

Function pcf8591Setup

wiringPi/pcf8591.c:80–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 */
79
80int pcf8591Setup (const int pinBase, const int i2cAddress)
81{
82 int fd ;
83 struct wiringPiNodeStruct *node ;
84
85 if ((fd = wiringPiI2CSetup (i2cAddress)) < 0)
86 return false ;
87
88 node = wiringPiNewNode (pinBase, 4) ;
89
90 node->fd = fd ;
91 node->analogRead = myAnalogRead ;
92 node->analogWrite = myAnalogWrite ;
93
94 return true ;
95}

Callers 3

doExtensionPcf8591Function · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 2

wiringPiI2CSetupFunction · 0.85
wiringPiNewNodeFunction · 0.85

Tested by

no test coverage detected