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

Function myPinMode

wiringPi/drcSerial.c:43–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 */
42
43static void myPinMode (struct wiringPiNodeStruct *node, int pin, int mode)
44{
45 if (mode == OUTPUT)
46 serialPutchar (node->fd, 'o') ; // Input
47 else if (mode == PWM_OUTPUT)
48 serialPutchar (node->fd, 'p') ; // PWM
49 else
50 serialPutchar (node->fd, 'i') ; // Default to input
51
52 serialPutchar (node->fd, pin - node->pinBase) ;
53}
54
55
56/*

Callers

nothing calls this directly

Calls 1

serialPutcharFunction · 0.85

Tested by

no test coverage detected