🐛 Fix LPC176x M43 Pins Debugging (#22611)

This commit is contained in:
Chris Pepper
2021-08-22 22:47:37 +01:00
committed by GitHub
parent 7d416bd055
commit 104de60d0b
11 changed files with 22 additions and 18 deletions

View File

@@ -203,11 +203,8 @@ inline void report_pin_state_extended(pin_t pin, const bool ignore, const bool e
SERIAL_ECHOPGM("PIN: ");
PRINT_PIN(pin);
PRINT_PORT(pin);
if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) {
sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); // analog pin number
SERIAL_ECHO(buffer);
}
else SERIAL_ECHO_SP(8); // add padding if not an analog pin
if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) PRINT_PIN_ANALOG(pin); // analog pin number
else SERIAL_ECHO_SP(8); // add padding if not an analog pin
}
else {
SERIAL_CHAR('.');
@@ -254,12 +251,8 @@ inline void report_pin_state_extended(pin_t pin, const bool ignore, const bool e
SERIAL_ECHOPGM("PIN: ");
PRINT_PIN(pin);
PRINT_PORT(pin);
if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) {
sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); // analog pin number
SERIAL_ECHO(buffer);
}
else
SERIAL_ECHO_SP(8); // add padding if not an analog pin
if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) PRINT_PIN_ANALOG(pin); // analog pin number
else SERIAL_ECHO_SP(8); // add padding if not an analog pin
SERIAL_ECHOPGM("<unused/unknown>");
if (extended) {