2007/9/26, Jan Kiszka <[EMAIL PROTECTED]>:
> Guillaume Gaudonville wrote:
> > Hello,
> >
> > I'm working on a project which aims at porting an application
> > running under VxWorks to Linux. This application uses the serial
> > port.
> >
> > I would like to add an ioctl or a field in the config structure
> > to permit to strip or not the parity bit of each byte on reception. This
> > feature is implemented on Linux and VxWorks.
> >
> > Is it something I can do and then submit to Xenomai or your driver is
> only
> > an example and will never be improved?
> The driver is far from being just an example, it's used in real
> applications.

It was just to be sure... I'm using it for a real application.

If your feature is useful and doesn't turn the existing code upside
> down, it will surely be considered for merging.
> >
> > I think that I will have more feature to add to the driver, that's why
> I'm
> > asking this.
> I don't want to exclude anything (specifically as long as I haven't seen
> some patch yet), but I also don't want to overload the driver over the
> time with corner-case features. We need a good balance.
> But we first of all need more details about what you plan to add, what
> application scenario is behind it, why you need the driver to implement
> the feature, and what impact it may have on the code. You are welcome to
> elaborate on this or, even better, post some patch drafts here.

I don't  know  which  features  I'll need. For the ISTRIP feature the goal
is only to
remove the eigth'th bit of every byte received: I've got a VxWorks
application which communicate
with an external clock on the serial port. The clock uses the parity bit but
my application
do not. In the original code an ioctl was done to say the serial driver to
remove the parity bit on
reception. This feature is also offered under Linux and seems to be posix
(man tcsetattr, search ISTRIP).
In order to reduce the code modifications, I would like to implement it in
the driver.

If so, I think the better way would be to add a field in the rtser_config
struct, do you agree? And then depending
upon this field to apply a mask (0x7f) to the character in the interrupt
handler rt_16550_rx_interrupt() or only
to the characters passed to user space depending upon what is done in other
to reproduce the same behaviour).

> --
> Siemens AG, Corporate Technology, CT SE 2
> Corporate Competence Center Embedded Linux

Guillaume Gaudonville
Xenomai-core mailing list

Reply via email to