Browse Source

Remove unused defines, fix typo (#14699)

pull/1/head
Giuliano Zaro 5 years ago
committed by Scott Lahteine
parent
commit
1005f225f3
  1. 1
      Marlin/src/HAL/HAL_DUE/pinsDebug.h
  2. 1
      Marlin/src/HAL/HAL_LINUX/pinsDebug.h
  3. 2
      Marlin/src/HAL/HAL_LINUX/spi_pins.h
  4. 1
      Marlin/src/HAL/HAL_LPC1768/pinsDebug.h
  5. 2
      Marlin/src/HAL/HAL_LPC1768/spi_pins.h
  6. 1
      Marlin/src/HAL/HAL_STM32/pinsDebug_STM32GENERIC.h
  7. 1
      Marlin/src/HAL/HAL_STM32/pinsDebug_STM32duino.h
  8. 2
      Marlin/src/pins/pinsDebug.h

1
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

1
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

2
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

1
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

2
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

1
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)

1
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

2
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);

Loading…
Cancel
Save