From: Alan Cox Date: Mon, 1 Oct 2018 21:54:50 +0000 (+0100) Subject: sbcv2: prepare for tty handling improvements X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=9c455f88b019f2e0bc54caf4c96afbd3c10ba7f7;p=FUZIX.git sbcv2: prepare for tty handling improvements --- diff --git a/Kernel/platform-sbcv2/devtty.c b/Kernel/platform-sbcv2/devtty.c index 175610fb..d149d00d 100644 --- a/Kernel/platform-sbcv2/devtty.c +++ b/Kernel/platform-sbcv2/devtty.c @@ -39,6 +39,33 @@ __sfr __at 0x6F uart_scr; static char tbuf1[TTYSIZ]; static char tbuf2[TTYSIZ]; +/* + * TTY masks - define which bits can be changed for each port + */ + +tcflag_t uart_mask[4] = { + _ISYS, + /* FIXME: break */ + _OSYS, + /* FIXME CTS/RTS */ + CSIZE|CBAUD|CSTOPB|PARENB|PARODD|_CSYS, + _LSYS, +}; + +tcflag_t prop_mask[4] = { + _ISYS, + _OSYS, + _CSYS, + _LSYS +}; + +tcflag_t *termios_mask[NUM_DEV_TTY + 1] = { + NULL, + uart_mask, + prop_mask +}; + + /* * One entry per tty. The 0th entry is never used as tty minor 0 is * special (/dev/tty) and it's cheaper to waste a few bytes that keep