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

Function myAnalogRead

wiringPi/drcSerial.c:113–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111 */
112
113static int myAnalogRead (struct wiringPiNodeStruct *node, int pin)
114{
115 int vHi, vLo ;
116
117 serialPutchar (node->fd, 'a') ;
118 serialPutchar (node->fd, pin - node->pinBase) ;
119 vHi = serialGetchar (node->fd) ;
120 vLo = serialGetchar (node->fd) ;
121
122 return (vHi << 8) | vLo ;
123}
124
125
126/*

Callers

nothing calls this directly

Calls 2

serialPutcharFunction · 0.85
serialGetcharFunction · 0.85

Tested by

no test coverage detected