This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

More questions about the eCos high level serial device driver


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'.

Thanks
Michael Checky




-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]