~kris/9p

9hist

0dc57f6dbebec708f79df268200733a379d858f1 — David du Colombier 25 years ago 81b393a
Plan 9 from Bell Labs 2001-06-06
3 files changed, 14 insertions(+), 8 deletions(-)

M bitsy/devµc.c
M bitsy/uartsa1110.c
M port/devuart.c
M bitsy/devµc.c => bitsy/devµc.c +3 -3
@@ 93,14 93,14 @@ int
	uchar cksum;
	uchar *p;
	static int samseq;
	static int touching;		/* guard against something we call going spllo() */
	static int buttoning;		/* guard against something we call going spllo() */
	static int touching;	/* guard against something we call going spllo() */
	static int buttoning;	/* guard against something we call going spllo() */

	if(ctlr.n > sizeof(ctlr.buf))
		panic("µcputc");

	ctlr.buf[ctlr.n++] = (uchar)ch;
		

	for(;;){
		/* message hasn't started yet? */
		if(ctlr.buf[0] != SOF){

M bitsy/uartsa1110.c => bitsy/uartsa1110.c +2 -0
@@ 73,6 73,7 @@ static Uart sa1110uart[2] = {
	.parity	= 'n',
	.baud	= 115200,
	.phys	= &sa1110physuart,
	.putc		= µcputc,
	.special	= 0,
	.next		= nil, },
};


@@ 484,6 485,7 @@ sa1110_uartsetup(int console)
	p->regs = mapspecial(UART1REGS, 64);
	uartctl(p, "b115200 l8 pn s1");
	µcuart = p;
	p->special = 1;
	(*p->phys->enable)(p, 0);
	intrenable(IRQ, IRQuart1b, sa1110_uartintr, p, p->name);
}

M port/devuart.c => port/devuart.c +9 -5
@@ 183,11 183,15 @@ uartreset(void)

		uart[i] = p;
		p->dev = i;
		if(p->console && uartenable(p) != nil){
			kbdq = p->iq;
			serialoq = p->oq;
			p->putc = kbdcr2nl;
			p->opens++;
		if(p->console || p->special){
			if(uartenable(p) != nil){
				if(p->console){
					kbdq = p->iq;
					serialoq = p->oq;
					p->putc = kbdcr2nl;
				}
				p->opens++;
			}
		}
		p = p->next;
	}