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]

Re: hal_diag serial driver: using XON/XOFF flow control?


Heiko Panther <hpanther@mac.com> writes:

> Hi List,
> 
> my hal_diag.c serial driver is all set up to handle incoming
> XON/XOFF messages, that is, it has an ISR and handles the incoming
> interrupts by reading a char. I'm using the hal_diag driver to do my
> debug logging, so I have /dev/haldiag and /dev/ttydiag on top of
> it. As I get it, these are associated with the serial channel from
> serial.c which provides for the flow control.
> 
> Now the problem seems to be that the HAL doesn't send characters
> that come in on interrupt to the serial driver. It just checks for
> CTRL-C and that's it. So that would mean I have to do polling (by
> issuing read's to the serial port) in order to get flow control for
> outgoing data. It also means that characters are lost which are
> received on interrupt.
> 
> Am I overlooking something? If not, I would like to implement
> XON/XOFF for the HAL diag driver. Looks like getting the received
> character to the serial driver needs some architectural change in
> the common HAL. Am I better off with reimplementing flow control
> inside the hal diag driver? What do you suggest?


The HAL serial support is intended solely for polled IO in RedBoot and
for diagnostic output. If you want to have an interrupt driven, flow
controlled serial device then implement a proper device driver, don't
try to hack the HAL driver. There is plenty of documentation on how to
do this and there are plenty of example in the source repository.


-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


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


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