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?