Browse Source

Remove unused defines, fix typo (#14699)

Giuliano Zaro 6 years ago
parent
commit
1005f225f3

+ 0
- 1
Marlin/src/HAL/HAL_DUE/pinsDebug.h View File

62
 
62
 
63
 #define digitalRead_mod(p) extDigitalRead(p)  // AVR digitalRead disabled PWM before it read the pin
63
 #define digitalRead_mod(p) extDigitalRead(p)  // AVR digitalRead disabled PWM before it read the pin
64
 #define PRINT_PORT(p)
64
 #define PRINT_PORT(p)
65
-#define NAME_FORMAT(p) PSTR("%-##p##s")
66
 #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
65
 #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
67
 #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0)
66
 #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0)
68
 #define GET_ARRAY_PIN(p) pin_array[p].pin
67
 #define GET_ARRAY_PIN(p) pin_array[p].pin

+ 0
- 1
Marlin/src/HAL/HAL_LINUX/pinsDebug.h View File

32
 #define digitalRead_mod(p)  digitalRead(p)
32
 #define digitalRead_mod(p)  digitalRead(p)
33
 #define PRINT_PORT(p)
33
 #define PRINT_PORT(p)
34
 #define GET_ARRAY_PIN(p) pin_array[p].pin
34
 #define GET_ARRAY_PIN(p) pin_array[p].pin
35
-#define NAME_FORMAT(p) PSTR("%-##p##s")
36
 #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
35
 #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
37
 #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
36
 #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
38
 #define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
37
 #define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin

+ 1
- 1
Marlin/src/HAL/HAL_LINUX/spi_pins.h View File

26
 
26
 
27
 #if HAS_GRAPHICAL_LCD && ENABLED(SDSUPPORT) && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN)
27
 #if HAS_GRAPHICAL_LCD && ENABLED(SDSUPPORT) && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN)
28
   #define LPC_SOFTWARE_SPI  // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
28
   #define LPC_SOFTWARE_SPI  // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
29
-                            // needed due to the speed and mode requred for communicating with each device being different.
29
+                            // needed due to the speed and mode required for communicating with each device being different.
30
                             // This requirement can be removed if the SPI access to these devices is updated to use
30
                             // This requirement can be removed if the SPI access to these devices is updated to use
31
                             // spiBeginTransaction.
31
                             // spiBeginTransaction.
32
 #endif
32
 #endif

+ 0
- 1
Marlin/src/HAL/HAL_LPC1768/pinsDebug.h View File

32
 #define digitalRead_mod(p) extDigitalRead(p)
32
 #define digitalRead_mod(p) extDigitalRead(p)
33
 #define PRINT_PORT(p)
33
 #define PRINT_PORT(p)
34
 #define GET_ARRAY_PIN(p) pin_array[p].pin
34
 #define GET_ARRAY_PIN(p) pin_array[p].pin
35
-#define NAME_FORMAT(p) PSTR("%-##p##s")
36
 #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
35
 #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
37
 #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%d.%02d"), LPC1768_PIN_PORT(p), LPC1768_PIN_PIN(p)); SERIAL_ECHO(buffer); }while(0)
36
 #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%d.%02d"), LPC1768_PIN_PORT(p), LPC1768_PIN_PIN(p)); SERIAL_ECHO(buffer); }while(0)
38
 #define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
37
 #define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/spi_pins.h View File

25
 
25
 
26
 #if ENABLED(SDSUPPORT) && HAS_GRAPHICAL_LCD && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN)
26
 #if ENABLED(SDSUPPORT) && HAS_GRAPHICAL_LCD && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN)
27
   #define LPC_SOFTWARE_SPI  // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
27
   #define LPC_SOFTWARE_SPI  // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
28
-                            // needed due to the speed and mode requred for communicating with each device being different.
28
+                            // needed due to the speed and mode required for communicating with each device being different.
29
                             // This requirement can be removed if the SPI access to these devices is updated to use
29
                             // This requirement can be removed if the SPI access to these devices is updated to use
30
                             // spiBeginTransaction.
30
                             // spiBeginTransaction.
31
 #endif
31
 #endif

+ 0
- 1
Marlin/src/HAL/HAL_STM32/pinsDebug_STM32GENERIC.h View File

42
 #define GET_ARRAY_PIN(p) pin_t(pin_array[p].pin)
42
 #define GET_ARRAY_PIN(p) pin_t(pin_array[p].pin)
43
 #define pwm_status(pin) PWM_PIN(pin)
43
 #define pwm_status(pin) PWM_PIN(pin)
44
 #define digitalRead_mod(p) extDigitalRead(p)
44
 #define digitalRead_mod(p) extDigitalRead(p)
45
-#define NAME_FORMAT(p) PSTR("%-##p##s")
46
 #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3hd "), int16_t(p)); SERIAL_ECHO(buffer); }while(0)
45
 #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3hd "), int16_t(p)); SERIAL_ECHO(buffer); }while(0)
47
 #define PRINT_PORT(p) print_port(p)
46
 #define PRINT_PORT(p) print_port(p)
48
 #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
47
 #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)

+ 0
- 1
Marlin/src/HAL/HAL_STM32/pinsDebug_STM32duino.h View File

107
 #define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
107
 #define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
108
 #define VALID_PIN(ANUM) ((ANUM) >= 0 && (ANUM) < NUMBER_PINS_TOTAL)
108
 #define VALID_PIN(ANUM) ((ANUM) >= 0 && (ANUM) < NUMBER_PINS_TOTAL)
109
 #define digitalRead_mod(Ard_num) extDigitalRead(Ard_num)  // must use Arduino pin numbers when doing reads
109
 #define digitalRead_mod(Ard_num) extDigitalRead(Ard_num)  // must use Arduino pin numbers when doing reads
110
-#define NAME_FORMAT(p) PSTR("%-##p##s")
111
 #define PRINT_PIN(Q)
110
 #define PRINT_PIN(Q)
112
 #define PRINT_PORT(ANUM) port_print(ANUM)
111
 #define PRINT_PORT(ANUM) port_print(ANUM)
113
 #define DIGITAL_PIN_TO_ANALOG_PIN(ANUM) -1  // will report analog pin number in the print port routine
112
 #define DIGITAL_PIN_TO_ANALOG_PIN(ANUM) -1  // will report analog pin number in the print port routine

+ 1
- 1
Marlin/src/pins/pinsDebug.h View File

117
     if (GET_ARRAY_PIN(x) == pin) {
117
     if (GET_ARRAY_PIN(x) == pin) {
118
       if (found) multi_name_pin = true;
118
       if (found) multi_name_pin = true;
119
       found = true;
119
       found = true;
120
-      if (!multi_name_pin) {    // report digitial and analog pin number only on the first time through
120
+      if (!multi_name_pin) {    // report digital and analog pin number only on the first time through
121
         sprintf_P(buffer, PSTR("%sPIN: "), start_string);     // digital pin number
121
         sprintf_P(buffer, PSTR("%sPIN: "), start_string);     // digital pin number
122
         SERIAL_ECHO(buffer);
122
         SERIAL_ECHO(buffer);
123
         PRINT_PIN(pin);
123
         PRINT_PIN(pin);

Loading…
Cancel
Save