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

Function myPullUpDnControl

wiringPi/drcSerial.c:62–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60 */
61
62static void myPullUpDnControl (struct wiringPiNodeStruct *node, int pin, int mode)
63{
64
65// Force pin into input mode
66
67 serialPutchar (node->fd, 'i' ) ;
68 serialPutchar (node->fd, pin - node->pinBase) ;
69
70 if (mode == PUD_UP)
71 {
72 serialPutchar (node->fd, '1') ;
73 serialPutchar (node->fd, pin - node->pinBase) ;
74 }
75 else if (mode == PUD_OFF)
76 {
77 serialPutchar (node->fd, '0') ;
78 serialPutchar (node->fd, pin - node->pinBase) ;
79 }
80}
81
82
83/*

Callers

nothing calls this directly

Calls 1

serialPutcharFunction · 0.85

Tested by

no test coverage detected