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

Function myDigitalRead

wiringPi/pcf8574.c:89–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 */
88
89static int myDigitalRead (struct wiringPiNodeStruct *node, int pin)
90{
91 int mask, value ;
92
93 mask = 1 << ((pin - node->pinBase) & 7) ;
94 value = wiringPiI2CRead (node->fd) ;
95
96 if ((value & mask) == 0)
97 return LOW ;
98 else
99 return HIGH ;
100}
101
102
103/*

Callers

nothing calls this directly

Calls 1

wiringPiI2CReadFunction · 0.85

Tested by

no test coverage detected