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 [EMAIL PROTECTED]
Marcus Brinkmann              GNU    http://www.gnu.org    [EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.marcus-brinkmann.de

_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to