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

Function doReadByte

gpio/gpio.c:667–682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

665 */
666
667static void doReadByte (int argc, char *argv [], int printHex)
668{
669 int val ;
670
671 if (argc != 2)
672 {
673 fprintf (stderr, "Usage: %s rbx|rbd\n", argv [0]) ;
674 exit (1) ;
675 }
676
677 val = digitalReadByte () ;
678 if (printHex)
679 printf ("%02X\n", val) ;
680 else
681 printf ("%d\n", val) ;
682}
683
684
685/*

Callers 1

mainFunction · 0.85

Calls 1

digitalReadByteFunction · 0.85

Tested by

no test coverage detected