6 #include "../port/lib.h"
10 #include "../port/error.h"
13 extern PhysUart arcsphysuart;
15 static Uart arcsuart = {
18 .phys = &arcsphysuart,
30 arcs(0x6c, 1, &c, 1, &r);
43 if(arcs(0x68, 0) == 0)
44 if(arcs(0x64, 0, &b, 1, &r) == 0)
59 tsleep(&up->sleep, return0, nil, 50);
63 uartrecv(&arcsuart, c);
68 * Send queued output to console
75 for(n=0; uart->op < uart->oe || uartstageoutput(uart) > 0; uart->op += n){
76 n = uart->oe - uart->op;
77 if(n <= 0 || !canlock(&arcslock))
79 if(arcs(0x6c, 1, uart->op, n, &n) != 0)
88 interrupt(Ureg*, void *)
109 donothing(Uart*, int)
114 donothingint(Uart*, int)
120 baud(Uart *uart, int n)
130 bits(Uart *uart, int n)
145 stop(Uart *uart, int n)
154 parity(Uart *uart, int n)
163 status(Uart *, void *, long, long)
169 uartarcsputc(Uart*, int c)
180 PhysUart arcsphysuart = {
187 .dobreak = donothing,
192 .modemctl = donothing,
198 .getc = uartarcsgetc,
199 .putc = uartarcsputc,
205 consuart = &arcsuart;
206 consuart->console = 1;