I’ve been using Serial Tools to do some kernel debugging. It works well, but there’s one feature I would like added. Currently in the Terminal view, I see some lines are double spaced, and some lines are not. This is because different routines are being used in the kernel to output lines to the serial port. One of them does only lf or cr, and the other does crlf. I would like an additional cr/lf option that treats all those combinations as cr/lf (maybe change the existing cr/lf checkbox to a popup menu to select one of the three options). It would work like this:
previousInputCharacter = '\0';
while (GetInputCharacter(&inputCharacter)) {
if (inputCharacter == cr) {
PassCharacter(cr);
PassCharacter(lf);
}
else if (inputCharacter == lf) {
if (previousInputCharacter == cr) {
// ignore lf when it is preceded by cr because we already handled that
}
else {
PassCharacter(cr);
PassCharacter(lf);
}
}
else {
PassCharacter(inputCharacter);
}
previousInputCharacter = inputCharacter;
}
This should correctly handle input that uses lf, cr, or crlf.
Another thing missing is flow control options. (xon/xoff, rts/cts, dtr/dsr)