Skip navigation.
Home
The QNX Community Portal

View topic - Line Disciplines

Line Disciplines

For discussion of realtime and/or embedded programming.

Line Disciplines

Postby rahil » Mon Jul 27, 2009 12:44 pm

In Linux, TTY Management provides the TTY_LDISC (Line Discpline) structure to provide the capability of using the generic serial hardware for a new purpose.
Does QNX provide an equivalent for that structure?

I basically want to port a linux driver for lonworks serial socket interface to QNX. I want to use the existing serial driver (devc-ser8250) to do the hardware related things.
So, I want my driver/resource manager in QNX to be an interface in between the client process and the serial driver (devc-ser8250). Any pointers on how could this be accomplished?
rahil
Active Member
 
Posts: 75
Joined: Wed Feb 11, 2009 12:13 pm
Location: India

RE: Line Disciplines

Postby mario » Mon Jul 27, 2009 1:39 pm

I'm not familiar with the Linux stuff you are talking about. If it is what I think it is then now the QNX driver doesn't support that.

How I don't think there is a need for that. Either you take the source to devc-ser8250 and turn it into your own driver, or you simply use the available interface (open/read/write/close) to devc-ser8250 to access the serial driver.

If for some reason you'd want to driver/resource manager to take over /dev/serx then you can use union mount point but I don't think you would want to get into that, nor does it sounds like your design requires it.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Re: RE: Line Disciplines

Postby rahil » Tue Jul 28, 2009 10:01 am

mario wrote:How I don't think there is a need for that. Either you take the source to devc-ser8250 and turn it into your own driver, or you simply use the available interface (open/read/write/close) to devc-ser8250 to access the serial driver.

The latter case seems to be a more charming option, but in that case how will I attach my own interrupt handler for a particular serial port. Because devc-ser8250 has probably got its own interrupt handler.
And if I attach my interrupt handler to the IRQ of a particular port, how will QNX get to know which handler shall it call?

mario wrote:If for some reason you'd want to driver/resource manager to take over /dev/serx then you can use union mount point but I don't think you would want to get into that, nor does it sounds like your design requires it.


If we talk about the viability of the former option that you suggested, I'd want to have two mountpoints viz. "/dev/ser1" as well as "/dev/lon". I have no idea how will I tweak in the devc-ser8250 code to facilitate that.
The design will require to monitor the Interrupts of the serial port.

Any suggestions
rahil
Active Member
 
Posts: 75
Joined: Wed Feb 11, 2009 12:13 pm
Location: India

RE: Re: RE: Line Disciplines

Postby mario » Tue Jul 28, 2009 11:46 am

If need to monitor interrupt serial port, I suspect you don`t have to, then you cannot have devc-ser8250 running. If you want to take control of the serial hardware, you cannot use devc-ser8250 at the same time.

As for /dev/lon it will be a resmgr yes, but it is at the same time a normal program and if you can use the standard services devc-8250 provide then devc-ser8250 doesn`t care about the nature of the program that talk to it.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am


Return to Realtime and Embedded

Who is online

Users browsing this forum: No registered users and 3 guests