[ECOS] More questions about the eCos high level serial device driver
Gary D. Thomas
gary.thomas@mind.be
Wed Mar 19 09:25:00 GMT 2003
On Tue, 2003-03-18 at 18:05, Michael Checky wrote:
> It appears that the design of 'serial.c' does not work well for serial
> ports with FIFOs. The functionality provided by the low level device
> driver's 'stop_xmit' routine is overloaded.
>
> The 'stop_xmit' routine is called when '
> CYG_IO_GET_CONFIG_SERIAL_OUTPUT_FLUSH' is requested. It can be assumed
> that in this instance both the serial port transmitter should be disabled
> and the tx FIFO should be reset.
>
> The 'stop_xmit' routine is also called when a XOFF character has been
> received. In this instance, the serial port transmitter should be disabled
> and the tx FIFO should be left as it is.
>
> The 'stop_xmit' routine is also called by 'serial_xmt_char' and '
> serial_data_xmt_done' immediately after these routines determine that they
> have emptied the tx buffer. In this instance, the serial port transmitter
> should NOT be disabled and the tx FIFO should be left to drain, after which
> the serial port transmitter can be disabled.
>
> I propose that the interface between the high and low level serial device
> drivers be changed to call out these three functions. The 'stop_xmit'
> routine can be used for these three functions if the serial port doesn't
> have a FIFO. Changing the 'SERIAL_FUNS' macro to duplicate the 'stop_xmit'
> entry point should work with the current low level device drivers. A new
> macro should be added to initialize the new entry points. Call it
> 'SERIAL_FUNS_BLOCK' or 'SERIAL_FUNS_FIFO' or 'SERIAL_FUNS_EXT'.
This probably needs some thought, but in the meantime, how
about proposing a patch which does all of this? Remember that
eCos is a *volunteer* project. Some of us do work on eCos for
customer needs, but in general changes are made by the user's
themselves.
--
.--------------------------------------------------------.
| Mind: Embedded Linux and eCos Development |
|--------------------------------------------------------|
| Gary Thomas email: gary.thomas@mind.be |
| Mind ( http://mind.be ) tel: +1 (970) 229-1963 |
| gpg: http://www.chez-thomas.org/gary/gpg_key.asc |
'--------------------------------------------------------'
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list