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.