From: Alan Cox Date: Tue, 2 Oct 2018 11:45:44 +0000 (+0100) Subject: trs80: update for termios masks X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=61c84156553e1cbc7c2ecd52376b9d9d4fc5e819;p=FUZIX.git trs80: update for termios masks --- diff --git a/Kernel/platform-trs80/devtty.c b/Kernel/platform-trs80/devtty.c index edaabd9b..6eb6af08 100644 --- a/Kernel/platform-trs80/devtty.c +++ b/Kernel/platform-trs80/devtty.c @@ -33,6 +33,29 @@ struct s_queue ttyinq[NUM_DEV_TTY+1] = { /* ttyinq[0] is never used */ { tbuf3, tbuf3, tbuf3, TTYSIZ, 0, TTYSIZ/2 } }; +static tcflag_t console_mask[4] = { + _ISYS, + _OSYS, + _CSYS, + _LSYS +}; + +static tcflag_t uart_mask[4] = { + _ISYS, + /* FIXME: break */ + _OSYS, + /* FIXME CTS/RTS, CSTOPB ? */ + CSIZE|CBAUD|PARENB|PARODD|_CSYS, + _LSYS, +}; + +tcflag_t *termios_mask[NUM_DEV_TTY + 1] = { + NULL, + console_mask, + console_mask, + uart_mask +}; + /* Write to system console */ void kputchar(char c) { @@ -121,6 +144,7 @@ void tty_putc(uint8_t minor, unsigned char c) void tty_interrupt(void) { + /* TODO: carrier change handling */ uint8_t reg = tr1865_status; if (reg & 0x80) { reg = tr1865_rxtx;