Serial macros cleanup

This commit is contained in:
Scott Lahteine
2021-02-28 19:43:46 -06:00
committed by Scott Lahteine
parent f0b662ff58
commit dd42831cba
48 changed files with 101 additions and 117 deletions

View File

@ -238,7 +238,7 @@ const PinInfo pin_array[] PROGMEM = {
#endif
static void print_input_or_output(const bool isout) {
serialprintPGM(isout ? PSTR("Output = ") : PSTR("Input = "));
SERIAL_ECHOPGM_P(isout ? PSTR("Output = ") : PSTR("Input = "));
}
// pretty report with PWM info
@ -266,8 +266,8 @@ inline void report_pin_state_extended(pin_t pin, const bool ignore, const bool e
LOOP_L_N(x, COUNT(pin_array)) { // scan entire array and report all instances of this pin
if (GET_ARRAY_PIN(x) == pin) {
if (!found) { // report digital and analog pin number only on the first time through
if (start_string) serialprintPGM(start_string);
serialprintPGM(PSTR("PIN: "));
if (start_string) SERIAL_ECHOPGM_P(start_string);
SERIAL_ECHOPGM("PIN: ");
PRINT_PIN(pin);
PRINT_PORT(pin);
if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) {
@ -317,8 +317,8 @@ inline void report_pin_state_extended(pin_t pin, const bool ignore, const bool e
} // end of for loop
if (!found) {
if (start_string) serialprintPGM(start_string);
serialprintPGM(PSTR("PIN: "));
if (start_string) SERIAL_ECHOPGM_P(start_string);
SERIAL_ECHOPGM("PIN: ");
PRINT_PIN(pin);
PRINT_PORT(pin);
if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) {