From 1005f225f3d2ffba21fe970e2055ec16444fc8e3 Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Mon, 22 Jul 2019 04:44:03 +0200 Subject: [PATCH] Remove unused defines, fix typo (#14699) --- Marlin/src/HAL/HAL_DUE/pinsDebug.h | 1 - Marlin/src/HAL/HAL_LINUX/pinsDebug.h | 1 - Marlin/src/HAL/HAL_LINUX/spi_pins.h | 2 +- Marlin/src/HAL/HAL_LPC1768/pinsDebug.h | 1 - Marlin/src/HAL/HAL_LPC1768/spi_pins.h | 2 +- Marlin/src/HAL/HAL_STM32/pinsDebug_STM32GENERIC.h | 1 - Marlin/src/HAL/HAL_STM32/pinsDebug_STM32duino.h | 1 - Marlin/src/pins/pinsDebug.h | 2 +- 8 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Marlin/src/HAL/HAL_DUE/pinsDebug.h b/Marlin/src/HAL/HAL_DUE/pinsDebug.h index e4da398cc..ed78f8adb 100644 --- a/Marlin/src/HAL/HAL_DUE/pinsDebug.h +++ b/Marlin/src/HAL/HAL_DUE/pinsDebug.h @@ -62,7 +62,6 @@ #define digitalRead_mod(p) extDigitalRead(p) // AVR digitalRead disabled PWM before it read the pin #define PRINT_PORT(p) -#define NAME_FORMAT(p) PSTR("%-##p##s") #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0) #define GET_ARRAY_PIN(p) pin_array[p].pin diff --git a/Marlin/src/HAL/HAL_LINUX/pinsDebug.h b/Marlin/src/HAL/HAL_LINUX/pinsDebug.h index 702a73bf7..a28d2b60b 100644 --- a/Marlin/src/HAL/HAL_LINUX/pinsDebug.h +++ b/Marlin/src/HAL/HAL_LINUX/pinsDebug.h @@ -32,7 +32,6 @@ #define digitalRead_mod(p) digitalRead(p) #define PRINT_PORT(p) #define GET_ARRAY_PIN(p) pin_array[p].pin -#define NAME_FORMAT(p) PSTR("%-##p##s") #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) #define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin diff --git a/Marlin/src/HAL/HAL_LINUX/spi_pins.h b/Marlin/src/HAL/HAL_LINUX/spi_pins.h index 62b643cc0..fdd09b1c0 100644 --- a/Marlin/src/HAL/HAL_LINUX/spi_pins.h +++ b/Marlin/src/HAL/HAL_LINUX/spi_pins.h @@ -26,7 +26,7 @@ #if HAS_GRAPHICAL_LCD && ENABLED(SDSUPPORT) && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN) #define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently - // needed due to the speed and mode requred for communicating with each device being different. + // needed due to the speed and mode required for communicating with each device being different. // This requirement can be removed if the SPI access to these devices is updated to use // spiBeginTransaction. #endif diff --git a/Marlin/src/HAL/HAL_LPC1768/pinsDebug.h b/Marlin/src/HAL/HAL_LPC1768/pinsDebug.h index 99c4e3805..e39f2d245 100644 --- a/Marlin/src/HAL/HAL_LPC1768/pinsDebug.h +++ b/Marlin/src/HAL/HAL_LPC1768/pinsDebug.h @@ -32,7 +32,6 @@ #define digitalRead_mod(p) extDigitalRead(p) #define PRINT_PORT(p) #define GET_ARRAY_PIN(p) pin_array[p].pin -#define NAME_FORMAT(p) PSTR("%-##p##s") #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%d.%02d"), LPC1768_PIN_PORT(p), LPC1768_PIN_PIN(p)); SERIAL_ECHO(buffer); }while(0) #define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin diff --git a/Marlin/src/HAL/HAL_LPC1768/spi_pins.h b/Marlin/src/HAL/HAL_LPC1768/spi_pins.h index 2e17abd31..acf991a9d 100644 --- a/Marlin/src/HAL/HAL_LPC1768/spi_pins.h +++ b/Marlin/src/HAL/HAL_LPC1768/spi_pins.h @@ -25,7 +25,7 @@ #if ENABLED(SDSUPPORT) && HAS_GRAPHICAL_LCD && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN) #define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently - // needed due to the speed and mode requred for communicating with each device being different. + // needed due to the speed and mode required for communicating with each device being different. // This requirement can be removed if the SPI access to these devices is updated to use // spiBeginTransaction. #endif diff --git a/Marlin/src/HAL/HAL_STM32/pinsDebug_STM32GENERIC.h b/Marlin/src/HAL/HAL_STM32/pinsDebug_STM32GENERIC.h index 063eeb665..8281a7a07 100644 --- a/Marlin/src/HAL/HAL_STM32/pinsDebug_STM32GENERIC.h +++ b/Marlin/src/HAL/HAL_STM32/pinsDebug_STM32GENERIC.h @@ -42,7 +42,6 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS]; #define GET_ARRAY_PIN(p) pin_t(pin_array[p].pin) #define pwm_status(pin) PWM_PIN(pin) #define digitalRead_mod(p) extDigitalRead(p) -#define NAME_FORMAT(p) PSTR("%-##p##s") #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3hd "), int16_t(p)); SERIAL_ECHO(buffer); }while(0) #define PRINT_PORT(p) print_port(p) #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) diff --git a/Marlin/src/HAL/HAL_STM32/pinsDebug_STM32duino.h b/Marlin/src/HAL/HAL_STM32/pinsDebug_STM32duino.h index c31f9b009..92d14d027 100644 --- a/Marlin/src/HAL/HAL_STM32/pinsDebug_STM32duino.h +++ b/Marlin/src/HAL/HAL_STM32/pinsDebug_STM32duino.h @@ -107,7 +107,6 @@ const XrefInfo pin_xref[] PROGMEM = { #define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS #define VALID_PIN(ANUM) ((ANUM) >= 0 && (ANUM) < NUMBER_PINS_TOTAL) #define digitalRead_mod(Ard_num) extDigitalRead(Ard_num) // must use Arduino pin numbers when doing reads -#define NAME_FORMAT(p) PSTR("%-##p##s") #define PRINT_PIN(Q) #define PRINT_PORT(ANUM) port_print(ANUM) #define DIGITAL_PIN_TO_ANALOG_PIN(ANUM) -1 // will report analog pin number in the print port routine diff --git a/Marlin/src/pins/pinsDebug.h b/Marlin/src/pins/pinsDebug.h index 61f05c11b..042190777 100644 --- a/Marlin/src/pins/pinsDebug.h +++ b/Marlin/src/pins/pinsDebug.h @@ -117,7 +117,7 @@ inline void report_pin_state_extended(pin_t pin, bool ignore, bool extended = fa if (GET_ARRAY_PIN(x) == pin) { if (found) multi_name_pin = true; found = true; - if (!multi_name_pin) { // report digitial and analog pin number only on the first time through + if (!multi_name_pin) { // report digital and analog pin number only on the first time through sprintf_P(buffer, PSTR("%sPIN: "), start_string); // digital pin number SERIAL_ECHO(buffer); PRINT_PIN(pin);