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

Function myDigitalWrite

wiringPi/pcf8574.c:67–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 */
66
67static void myDigitalWrite (struct wiringPiNodeStruct *node, int pin, int value)
68{
69 int bit, old ;
70
71 bit = 1 << ((pin - node->pinBase) & 7) ;
72
73 old = node->data2 ;
74 if (value == LOW)
75 old &= (~bit) ;
76 else
77 old |= bit ;
78
79 wiringPiI2CWrite (node->fd, old) ;
80 node->data2 = old ;
81}
82
83
84/*

Callers

nothing calls this directly

Calls 1

wiringPiI2CWriteFunction · 0.85

Tested by

no test coverage detected