[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: term & user space console
From: |
Marcus Brinkmann |
Subject: |
Re: term & user space console |
Date: |
Sun, 3 Feb 2002 01:48:02 +0100 |
User-agent: |
Mutt/1.3.27i |
On Sat, Feb 02, 2002 at 07:42:23PM -0500, Roland McGrath wrote:
> > Just two issues: What about CSTOP and/or CSIZE, do I handle it the way it
> > is done for Mach devices?
>
> I don't understand the question. These are serial hardware settings that
> should be passed down directly just like the speed.
I am referring to this code in devio_set_bits:
/* Mach forces us to use the normal stop bit convention:
two bits at 110 bps; 1 bit otherwise. */
if (termstate.__ispeed == 110)
termstate.c_cflag |= CSTOPB;
else
termstate.c_cflag &= ~CSTOPB;
/* Figure out how to munge input, since we are unable to actually
affect what the hardware does. */
switch (termstate.c_cflag & CSIZE)
{
case CS5:
char_size_mask_xxx = 0x1f;
break;
case CS6:
char_size_mask_xxx = 0x3f;
break;
case CS7:
char_size_mask_xxx = 0x7f;
break;
case CS8:
default:
char_size_mask_xxx = 0xff;
break;
}
if (termstate.c_cflag & PARENB)
char_size_mask_xxx |= 0x80;
> You don't really need to think about the specific meanings of the bits.
> Generally speaking, the bits that translate into something passed directly
> to the device in devio should be passed down directly to an underyling
> tioctl-supporting io port.
So far I got it, I am just worried about stuff like the above, where I don't
know if it is something idiosyncratic to Mach devices, or generic.
Thanks for your answers, much appreciated!
Marcus
--
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann GNU http://www.gnu.org marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de
Re: term & user space console, Thomas Bushnell, BSG, 2002/02/04