Plan 9 from Bell Labs’s /usr/web/sources/extra/9hist/carrera/ns16552.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


## diffname carrera/ns16552.h 1994/0902
## diff -e /dev/null /n/fornaxdump/1994/0902/sys/src/brazil/carrera/ns16552.h
0a
#define outb(p, ch)			*(uchar*)((p)^7) = ch	
#define uartwrreg(u,r,v)	outb((u)->port + (r), (u)->sticky[r] | (v))
#define uartrdreg(u,r)		*(uchar*)(((u)->port + (r))^7)

#define uartpower(x, y)

void
ns16552install(void)
{
	static int already;

	if(already)
		return;
	already = 1;

	ns16552setup(Uart1, UartFREQ);
}

#define RD(r)	(*(uchar*)((Uart1+r)^7))
static void
ns16552iputc(char c)
{
	while((RD(5) & (1<<5)) == 0)
		;
	*(uchar*)(Uart1^7) = c;
	while((RD(5) & (1<<5)) == 0)
		;
}

int
iprint(char *fmt, ...)
{
	int n, i;
	char buf[512];

	n = doprint(buf, buf+sizeof(buf), fmt, (&fmt+1)) - buf;
	for(i = 0; i < n; i++)
		ns16552iputc(buf[i]);
	
	return n;
}
.
## diffname carrera/ns16552.h 1994/1108
## diff -e /n/fornaxdump/1994/0902/sys/src/brazil/carrera/ns16552.h /n/fornaxdump/1994/1108/sys/src/brazil/carrera/ns16552.h
16c
	ns16552setup(Uart1, UartFREQ, "eia0");
.
## diffname carrera/ns16552.h 1996/0214
## diff -e /n/fornaxdump/1994/1108/sys/src/brazil/carrera/ns16552.h /n/fornaxdump/1996/0214/sys/src/brazil/carrera/ns16552.h
36c
	va_start(arg, fmt);
	n = doprint(buf, buf+sizeof(buf), fmt, arg) - buf;
	va_end(arg);

.
34a
	va_list arg;
.
## diffname carrera/ns16552.h 1999/0608
## diff -e /n/fornaxdump/1996/0214/sys/src/brazil/carrera/ns16552.h /n/emeliedump/1999/0608/sys/src/brazil/carrera/ns16552.h
16c
	ns16552setup(Uart1, UartFREQ, "eia0", Ns550);
.
## diffname carrera/ns16552.h 1999/0825
## diff -e /n/emeliedump/1999/0608/sys/src/brazil/carrera/ns16552.h /n/emeliedump/1999/0825/sys/src/brazil/carrera/ns16552.h
19,45d
1a
#define inb(p)	*(uchar*)((p)^7)
.
## diffname carrera/ns16552.h 2001/0527 # deleted
## diff -e /n/emeliedump/1999/0825/sys/src/brazil/carrera/ns16552.h /n/emeliedump/2001/0527/sys/src/9/carrera/ns16552.h
1,19d

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.