changelog shortlog tags branches changeset file revisions annotate raw help

Mercurial > hg > plan9front / sys/src/9/bcm/uartmini.c

revision 7152: e93129fc35e7
parent 6832: f80792d28e0e
child 7153: 7048df8bc401
     1.1--- a/sys/src/9/bcm/uartmini.c
     1.2+++ b/sys/src/9/bcm/uartmini.c
     1.3@@ -332,31 +332,3 @@ PhysUart miniphysuart = {
     1.4 	.getc		= getc,
     1.5 	.putc		= putc,
     1.6 };
     1.7-
     1.8-void
     1.9-okay(int on)
    1.10-{
    1.11-	static int first;
    1.12-	static int okled, polarity;
    1.13-	char *p;
    1.14-
    1.15-	if(!first++){
    1.16-		p = getconf("bcm2709.disk_led_gpio");
    1.17-		if(p == nil)
    1.18-			p = getconf("bcm2708.disk_led_gpio");
    1.19-		if(p != nil)
    1.20-			okled = strtol(p, 0, 0);
    1.21-		else
    1.22-			okled = 'v';
    1.23-		p = getconf("bcm2709.disk_led_active_low");
    1.24-		if(p == nil)
    1.25-			p = getconf("bcm2708.disk_led_active_low");
    1.26-		polarity = (p == nil || *p == '1');
    1.27-		if(okled != 'v')
    1.28-			gpiosel(okled, Output);
    1.29-	}
    1.30-	if(okled == 'v')
    1.31-		vgpset(0, on);
    1.32-	else if(okled != 0)
    1.33-		gpioout(okled, on^polarity);
    1.34-}