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

Function doExtensionPcf8591

wiringPi/wpiExtensions.c:441–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439 */
440
441static int doExtensionPcf8591 (char *progName, int pinBase, char *params)
442{
443 int i2c ;
444
445 if ((params = extractInt (progName, params, &i2c)) == NULL)
446 return false ;
447
448 if ((i2c < 0x03) || (i2c > 0x77))
449 {
450 verbError ("%s: i2c address (0x%X) out of range", progName, i2c) ;
451 return false ;
452 }
453
454 pcf8591Setup (pinBase, i2c) ;
455
456 return true ;
457}
458
459
460/*

Callers

nothing calls this directly

Calls 3

extractIntFunction · 0.85
verbErrorFunction · 0.85
pcf8591SetupFunction · 0.85

Tested by

no test coverage detected