HAL and serial cleanup

Co-Authored-By: Jason Smith <20053467+sjasonsmith@users.noreply.github.com>
This commit is contained in:
Scott Lahteine
2020-09-23 19:45:33 -05:00
parent 27c067612c
commit f588d50d57
33 changed files with 220 additions and 420 deletions

View File

@ -53,23 +53,10 @@ void GcodeSuite::M575() {
case 115200: case 250000: case 500000: case 1000000: {
const int8_t port = parser.intval('P', -99);
const bool set0 = (port == -99 || port == 0);
if (set0) {
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(" Serial "
#if HAS_MULTI_SERIAL
, '0',
#else
"0"
#endif
" baud rate set to ", baud
);
}
if (set0) SERIAL_ECHO_MSG(" Serial ", '0', " baud rate set to ", baud);
#if HAS_MULTI_SERIAL
const bool set1 = (port == -99 || port == 1);
if (set1) {
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(" Serial ", '1', " baud rate set to ", baud);
}
if (set1) SERIAL_ECHO_MSG(" Serial ", '1', " baud rate set to ", baud);
#endif
SERIAL_FLUSH();
@ -85,4 +72,4 @@ void GcodeSuite::M575() {
}
}
#endif // NUM_SERIAL > 0 && BAUD_RATE_GCODE
#endif // BAUD_RATE_GCODE