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

Function myAnalogRead

wiringPi/rht03.c:211–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209 */
210
211static int myAnalogRead (struct wiringPiNodeStruct *node, int pin)
212{
213 int piPin = node->fd ;
214 int chan = pin - node->pinBase ;
215 int temp = -9997 ;
216 int rh = -9997 ;
217 int try ;
218
219 if (chan > 1)
220 return -9999 ; // Bad parameters
221
222 for (try = 0 ; try < 10 ; ++try)
223 {
224 if (myReadRHT03 (piPin, &temp, &rh))
225 return chan == 0 ? temp : rh ;
226 }
227
228 return -9998 ;
229}
230
231
232/*

Callers

nothing calls this directly

Calls 1

myReadRHT03Function · 0.85

Tested by

no test coverage detected