MCPcopy Create free account
hub / github.com/F-Stack/f-stack / led_func

Function led_func

freebsd/i386/i386/geode.c:99–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97static int led1b, led2b, led3b;
98
99static void
100led_func(void *ptr, int onoff)
101{
102 uint32_t u;
103 int bit;
104
105 bit = *(int *)ptr;
106 if (bit < 0) {
107 bit = -bit;
108 onoff = !onoff;
109 }
110
111 u = inl(gpio + 4);
112 if (onoff)
113 u |= 1 << bit;
114 else
115 u &= ~(1 << bit);
116 outl(gpio, u);
117}
118
119static void
120cs5536_led_func(void *ptr, int onoff)

Callers 1

geode_probeFunction · 0.85

Calls 2

inlFunction · 0.50
outlFunction · 0.50

Tested by

no test coverage detected