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

Function myDigitalRead

wiringPi/drcSerial.c:131–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129 */
130
131static int myDigitalRead (struct wiringPiNodeStruct *node, int pin)
132{
133 serialPutchar (node->fd, 'r') ; // Send read command
134 serialPutchar (node->fd, pin - node->pinBase) ;
135 return (serialGetchar (node->fd) == '0') ? 0 : 1 ;
136}
137
138
139/*

Callers

nothing calls this directly

Calls 2

serialPutcharFunction · 0.85
serialGetcharFunction · 0.85

Tested by

no test coverage detected