From: Alan Cox Date: Sat, 19 Jan 2019 21:17:13 +0000 (+0000) Subject: amstradnc: static tty buffers and lay framework for cts/rts wakeups X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=bc4a5bd0888d17a1a4e5ec41671b9e595ab0c08f;p=FUZIX.git amstradnc: static tty buffers and lay framework for cts/rts wakeups --- diff --git a/Kernel/platform-amstradnc/devtty.c b/Kernel/platform-amstradnc/devtty.c index 2e4dda5a..33dbe60e 100644 --- a/Kernel/platform-amstradnc/devtty.c +++ b/Kernel/platform-amstradnc/devtty.c @@ -43,8 +43,10 @@ uint8_t vtattr_cap; struct vt_repeat keyrepeat; static uint8_t kbd_timer; -char tbuf1[TTYSIZ]; -char tbuf2[TTYSIZ]; +static uint8_t txwait; + +static char tbuf1[TTYSIZ]; +static char tbuf2[TTYSIZ]; struct s_queue ttyinq[NUM_DEV_TTY + 1] = { /* ttyinq[0] is never used */ {NULL, NULL, NULL, 0, 0, 0}, @@ -204,7 +206,7 @@ int tty_carrier(uint8_t minor) void tty_sleeping(uint8_t minor) { - minor; + txwait = 1; } #define SER_INIT 0x4F /* 1 stop,no parity,8bit,16x */ @@ -365,6 +367,10 @@ void platform_interrupt(void) /* work around sdcc bug */ c = uarta; tty_inproc(2, c); + if (txwait && (uartb & 1)) { + tty_outproc(2); + txwait = 0; + } } if (!(a & 8)) { keyin[0] = kmap0;