Browse Source

Fix M43 warning, XL density timers (#14555)

Tanguy Pruvot 6 years ago
parent
commit
881e5a48bc
1 changed files with 3 additions and 17 deletions
  1. 3
    17
      Marlin/src/HAL/HAL_STM32/pinsDebug_STM32GENERIC.h

+ 3
- 17
Marlin/src/HAL/HAL_STM32/pinsDebug_STM32GENERIC.h View File

@@ -48,7 +48,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS];
48 48
 #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3hd "), int16_t(p)); SERIAL_ECHO(buffer); }while(0)
49 49
 #define PRINT_PORT(p) print_port(p)
50 50
 #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
51
-#define MULTI_NAME_PAD 20 // space needed to be pretty if not first name assigned to a pin
51
+#define MULTI_NAME_PAD 21 // space needed to be pretty if not first name assigned to a pin
52 52
 
53 53
 // pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities
54 54
 #ifndef M43_NEVER_TOUCH
@@ -97,7 +97,7 @@ static inline void pwm_details(const pin_t pin) {
97 97
     timer_dev * const tdev = PIN_MAP[pin].timer_device;
98 98
     const uint8_t channel = PIN_MAP[pin].timer_channel;
99 99
     const char num = (
100
-      #ifdef STM32_HIGH_DENSITY
100
+      #if defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY)
101 101
         tdev == &timer8 ? '8' :
102 102
         tdev == &timer5 ? '5' :
103 103
       #endif
@@ -114,22 +114,8 @@ static inline void pwm_details(const pin_t pin) {
114 114
 
115 115
 static inline void print_port(pin_t pin) {
116 116
   const char port = 'A' + char(pin >> 4); // pin div 16
117
-  /* seems not to be required for our devices
118
-  gpio_dev * const gp = PIN_MAP[pin].gpio_device;
119
-  const char port = (
120
-    #if STM32_NR_GPIO_PORTS > 4
121
-      gp == &gpiog ? 'G' :
122
-      gp == &gpiof ? 'F' :
123
-      gp == &gpioe ? 'E' :
124
-    #endif
125
-    gp == &gpiod ? 'D' :
126
-    gp == &gpioc ? 'C' :
127
-    gp == &gpiob ? 'B' :
128
-    gp == &gpioa ? 'A' : '?'
129
-  );
130
-  */
131 117
   const int16_t gbit = PIN_MAP[pin].gpio_bit;
132
-  char buffer[6];
118
+  char buffer[8];
133 119
   sprintf_P(buffer, PSTR("P%c%hd "), port, gbit);
134 120
   if (gbit < 10) SERIAL_CHAR(' ');
135 121
   SERIAL_ECHO(buffer);

Loading…
Cancel
Save