plan 9 kernel history: overview | file list | diff list

1991/0904/pc/kbd.c (diff list | history)

1991/0823/sys/src/9/pc/kbd.c:277,2921991/0904/sys/src/9/pc/kbd.c:277,295 (short | long | prev | next)
1991/0731    
	unsigned int c; 
1991/0803    
	int tries; 
1991/0731    
 
1991/0803    
	for(tries=0; tries < 10; tries++){ 
		if(outready() < 0) 
			return -1; 
1991/0731    
		outb(Cmd, 0xD4); 
1991/0803    
		if(outready() < 0) 
			return -1; 
1991/0731    
		outb(Data, cmd); 
1991/0803    
		if(inready() < 0) 
			return -1; 
1991/0731    
		c = inb(Data); 
1991/0904    
	c = 0; 
	do{ 
		for(tries=0; tries < 10; tries++){ 
			if(outready() < 0) 
				return -1; 
			outb(Cmd, 0xD4); 
			if(outready() < 0) 
				return -1; 
			outb(Data, cmd); 
			if(inready() < 0) 
				return -1; 
			c = inb(Data); 
		} 
1991/0731    
	} while(c == 0xFE); 
	if(c != 0xFA) 
1991/0803    
		return -1; 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)