Application Support > Serial Tools

Suggestion: new cr/lf option

(1/1)

joevt:
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:


--- Code: ---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;
}

--- End code ---

This should correctly handle input that uses lf, cr, or crlf.

Another thing missing is flow control options. (xon/xoff, rts/cts, dtr/dsr)

Navigation

[0] Message Index

Go to full version