From: Alan Cox Date: Tue, 2 Oct 2018 11:46:28 +0000 (+0100) Subject: zeta-v2: update for termios masks X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=b062d0f81500c0240bf718b3111039297215afa7;p=FUZIX.git zeta-v2: update for termios masks --- diff --git a/Kernel/platform-zeta-v2/devtty.c b/Kernel/platform-zeta-v2/devtty.c index c067a322..5ac85ef4 100644 --- a/Kernel/platform-zeta-v2/devtty.c +++ b/Kernel/platform-zeta-v2/devtty.c @@ -22,6 +22,31 @@ struct s_queue ttyinq[NUM_DEV_TTY+1] = { /* ttyinq[0] is never used */ #endif }; +static tcflag_t uart_mask[4] = { + _ISYS, + /* FIXME: break */ + _OSYS, + /* FIXME CTS/RTS */ + CSIZE|CBAUD|CSTOPB|PARENB|PARODD|_CSYS, + _LSYS, +}; + +static tcflag_t prop_mask[4] = { + _ISYS, + _OSYS, + _CSYS, + _LSYS +}; + +tcflag_t *termios_mask[NUM_DEV_TTY + 1] = { + NULL, + uart_mask, +#ifdef CONFIG_PPP + prop_mask +#endif +}; + + uint16_t divisor_table[16] = { 0, UART_CLOCK / 16 / 50, UART_CLOCK / 16 / 75, UART_CLOCK / 16 / 110, UART_CLOCK / 16 / 134, UART_CLOCK / 16 / 150, UART_CLOCK / 16 / 300,