Browse Source

🧑‍💻 Pins and debug list cleanup (#24878)

Scott Lahteine 2 years ago
parent
commit
81976c4360
No account linked to committer's email address

+ 3
- 3
Marlin/src/HAL/AVR/fastio.h View File

@@ -293,11 +293,11 @@ enum ClockSource2 : uint8_t {
293 293
 
294 294
 #if HAS_MOTOR_CURRENT_PWM
295 295
   #if PIN_EXISTS(MOTOR_CURRENT_PWM_XY)
296
-    #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_Z || P == MOTOR_CURRENT_PWM_XY)
296
+    #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_E0  || P == MOTOR_CURRENT_PWM_E1 || P == MOTOR_CURRENT_PWM_Z || P == MOTOR_CURRENT_PWM_XY)
297 297
   #elif PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
298
-    #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_Z)
298
+    #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_E0  || P == MOTOR_CURRENT_PWM_E1 || P == MOTOR_CURRENT_PWM_Z)
299 299
   #else
300
-    #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E)
300
+    #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_E0  || P == MOTOR_CURRENT_PWM_E1)
301 301
   #endif
302 302
 #else
303 303
   #define PWM_CHK_MOTOR_CURRENT(P) false

+ 7
- 7
Marlin/src/lcd/buttons.h View File

@@ -26,7 +26,7 @@
26 26
 #if ((!HAS_ADC_BUTTONS && IS_NEWPANEL) || BUTTONS_EXIST(EN1, EN2)) && !IS_TFTGLCD_PANEL
27 27
   #define HAS_ENCODER_WHEEL 1
28 28
 #endif
29
-#if (HAS_ENCODER_WHEEL || ANY_BUTTON(ENC, BACK, UP, DWN, LFT, RT)) && DISABLED(TOUCH_UI_FTDI_EVE)
29
+#if (HAS_ENCODER_WHEEL || ANY_BUTTON(ENC, BACK, UP, DOWN, LEFT, RIGHT)) && DISABLED(TOUCH_UI_FTDI_EVE)
30 30
   #define HAS_DIGITAL_BUTTONS 1
31 31
 #endif
32 32
 #if !HAS_ADC_BUTTONS && (IS_RRW_KEYPAD || (HAS_WIRED_LCD && !IS_NEWPANEL))
@@ -190,18 +190,18 @@
190 190
 #else
191 191
   #define _BUTTON_PRESSED_UP false
192 192
 #endif
193
-#if BUTTON_EXISTS(DWN)
194
-  #define _BUTTON_PRESSED_DWN _BUTTON_PRESSED(DWN)
193
+#if BUTTON_EXISTS(DOWN)
194
+  #define _BUTTON_PRESSED_DWN _BUTTON_PRESSED(DOWN)
195 195
 #else
196 196
   #define _BUTTON_PRESSED_DWN false
197 197
 #endif
198
-#if BUTTON_EXISTS(LFT)
199
-  #define _BUTTON_PRESSED_LFT _BUTTON_PRESSED(LFT)
198
+#if BUTTON_EXISTS(LEFT)
199
+  #define _BUTTON_PRESSED_LFT _BUTTON_PRESSED(LEFT)
200 200
 #else
201 201
   #define _BUTTON_PRESSED_LFT false
202 202
 #endif
203
-#if BUTTON_EXISTS(RT)
204
-  #define _BUTTON_PRESSED_RT _BUTTON_PRESSED(RT)
203
+#if BUTTON_EXISTS(RIGHT)
204
+  #define _BUTTON_PRESSED_RT _BUTTON_PRESSED(RIGHT)
205 205
 #else
206 206
   #define _BUTTON_PRESSED_RT false
207 207
 #endif

+ 6
- 6
Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp View File

@@ -482,14 +482,14 @@ void lv_encoder_pin_init() {
482 482
   #if BUTTON_EXISTS(UP)
483 483
     SET_INPUT(BTN_UP);
484 484
   #endif
485
-  #if BUTTON_EXISTS(DWN)
486
-    SET_INPUT(BTN_DWN);
485
+  #if BUTTON_EXISTS(DOWN)
486
+    SET_INPUT(BTN_DOWN);
487 487
   #endif
488
-  #if BUTTON_EXISTS(LFT)
489
-    SET_INPUT(BTN_LFT);
488
+  #if BUTTON_EXISTS(LEFT)
489
+    SET_INPUT(BTN_LEFT);
490 490
   #endif
491
-  #if BUTTON_EXISTS(RT)
492
-    SET_INPUT(BTN_RT);
491
+  #if BUTTON_EXISTS(RIGHT)
492
+    SET_INPUT(BTN_RIGHT);
493 493
   #endif
494 494
 }
495 495
 

+ 9
- 9
Marlin/src/lcd/marlinui.cpp View File

@@ -227,14 +227,14 @@ void MarlinUI::init() {
227 227
     #if BUTTON_EXISTS(UP)
228 228
       SET_INPUT(BTN_UP);
229 229
     #endif
230
-    #if BUTTON_EXISTS(DWN)
231
-      SET_INPUT(BTN_DWN);
230
+    #if BUTTON_EXISTS(DOWN)
231
+      SET_INPUT(BTN_DOWN);
232 232
     #endif
233 233
     #if BUTTON_EXISTS(LFT)
234
-      SET_INPUT(BTN_LFT);
234
+      SET_INPUT(BTN_LEFT);
235 235
     #endif
236 236
     #if BUTTON_EXISTS(RT)
237
-      SET_INPUT(BTN_RT);
237
+      SET_INPUT(BTN_RIGHT);
238 238
     #endif
239 239
   #endif
240 240
 
@@ -1303,7 +1303,7 @@ void MarlinUI::init() {
1303 1303
           //
1304 1304
           // Directional buttons
1305 1305
           //
1306
-          #if ANY_BUTTON(UP, DWN, LFT, RT)
1306
+          #if ANY_BUTTON(UP, DOWN, LEFT, RIGHT)
1307 1307
 
1308 1308
             const int8_t pulses = epps * encoderDirection;
1309 1309
 
@@ -1311,20 +1311,20 @@ void MarlinUI::init() {
1311 1311
               encoderDiff = (ENCODER_STEPS_PER_MENU_ITEM) * pulses;
1312 1312
               next_button_update_ms = now + 300;
1313 1313
             }
1314
-            else if (BUTTON_PRESSED(DWN)) {
1314
+            else if (BUTTON_PRESSED(DOWN)) {
1315 1315
               encoderDiff = -(ENCODER_STEPS_PER_MENU_ITEM) * pulses;
1316 1316
               next_button_update_ms = now + 300;
1317 1317
             }
1318
-            else if (BUTTON_PRESSED(LFT)) {
1318
+            else if (BUTTON_PRESSED(LEFT)) {
1319 1319
               encoderDiff = -pulses;
1320 1320
               next_button_update_ms = now + 300;
1321 1321
             }
1322
-            else if (BUTTON_PRESSED(RT)) {
1322
+            else if (BUTTON_PRESSED(RIGHT)) {
1323 1323
               encoderDiff = pulses;
1324 1324
               next_button_update_ms = now + 300;
1325 1325
             }
1326 1326
 
1327
-          #endif // UP || DWN || LFT || RT
1327
+          #endif // UP || DOWN || LEFT || RIGHT
1328 1328
 
1329 1329
           buttons = (newbutton | TERN0(HAS_SLOW_BUTTONS, slow_buttons)
1330 1330
             #if BOTH(HAS_TOUCH_BUTTONS, HAS_ENCODER_ACTION)

+ 3
- 3
Marlin/src/pins/mega/pins_EINSTART-S.h View File

@@ -101,9 +101,9 @@
101 101
 // LCD Display input pins
102 102
 //
103 103
 #define BTN_UP                                25
104
-#define BTN_DWN                               26
105
-#define BTN_LFT                               27
106
-#define BTN_RT                                28
104
+#define BTN_DOWN                              26
105
+#define BTN_LEFT                              27
106
+#define BTN_RIGHT                             28
107 107
 
108 108
 // 'OK' button
109 109
 #define BTN_ENC                               29

+ 7
- 8
Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h View File

@@ -203,14 +203,13 @@
203 203
 
204 204
     #define BTN_EN2                           75  // J4, UP
205 205
     #define BTN_EN1                           73  // J3, DOWN
206
-    //STOP button connected as KILL_PIN
207
-    #define KILL_PIN                          14  // J1, RIGHT
208
-    //KILL - not connected
206
+    // STOP button connected as KILL_PIN
207
+    #define KILL_PIN                          14  // J1, RIGHT (not connected)
209 208
 
210 209
     #define BEEPER_PIN                         8  // H5, SD_WP
211 210
 
212
-    //on board leds
213
-    #define STAT_LED_RED_LED          SERVO0_PIN  // C1 (1280-EX1, DEBUG2)
211
+    // Onboard leds
212
+    #define STAT_LED_RED_PIN          SERVO0_PIN  // C1 (1280-EX1, DEBUG2)
214 213
     #define STAT_LED_BLUE_PIN         SERVO1_PIN  // C0 (1280-EX2, DEBUG3)
215 214
 
216 215
   #else
@@ -220,9 +219,9 @@
220 219
     #define SR_STROBE_PIN                     33  // C4
221 220
 
222 221
     #define BTN_UP                            75  // J4
223
-    #define BTN_DWN                           73  // J3
224
-    #define BTN_LFT                           72  // J2
225
-    #define BTN_RT                            14  // J1
222
+    #define BTN_DOWN                          73  // J3
223
+    #define BTN_LEFT                          72  // J2
224
+    #define BTN_RIGHT                         14  // J1
226 225
 
227 226
     // Disable encoder
228 227
     #undef BTN_EN1

+ 1
- 1
Marlin/src/pins/mega/pins_OVERLORD.h View File

@@ -135,7 +135,7 @@
135 135
 #if IS_NEWPANEL
136 136
   #define BTN_ENC                             16  // Enter Pin
137 137
   #define BTN_UP                              19  // Button UP Pin
138
-  #define BTN_DWN                             17  // Button DOWN Pin
138
+  #define BTN_DOWN                            17  // Button DOWN Pin
139 139
 #endif
140 140
 
141 141
 // Additional connectors/pins on the Overlord V1.X board

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

@@ -45,7 +45,7 @@
45 45
 #define REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(#NAME, COUNTER)
46 46
 
47 47
 #include "pinsDebug_list.h"
48
-#line 48
48
+#line 49
49 49
 
50 50
 // manually add pins that have names that are macros which don't play well with these macros
51 51
 #if ANY(AVR_ATmega2560_FAMILY, AVR_ATmega1284_FAMILY, ARDUINO_ARCH_SAM, TARGET_LPC1768)
@@ -164,7 +164,7 @@ const PinInfo pin_array[] PROGMEM = {
164 164
   #endif
165 165
 
166 166
   #include "pinsDebug_list.h"
167
-  #line 167
167
+  #line 168
168 168
 
169 169
 };
170 170
 

+ 1013
- 672
Marlin/src/pins/pinsDebug_list.h
File diff suppressed because it is too large
View File


+ 3
- 3
Marlin/src/pins/ramps/pins_RIGIDBOARD.h View File

@@ -103,9 +103,9 @@
103 103
 
104 104
   // Direction buttons
105 105
   #define BTN_UP                              37
106
-  #define BTN_DWN                             35
107
-  #define BTN_LFT                             33
108
-  #define BTN_RT                              32
106
+  #define BTN_DOWN                            35
107
+  #define BTN_LEFT                            33
108
+  #define BTN_RIGHT                           32
109 109
 
110 110
   // 'R' button
111 111
   #undef BTN_ENC

+ 2
- 2
Marlin/src/pins/ramps/pins_ULTIMAIN_2.h View File

@@ -107,8 +107,8 @@
107 107
 #define SDSS                                  53
108 108
 #define SD_DETECT_PIN                         39
109 109
 #define LED_PIN                                8
110
-#define SAFETY_TRIGGERED_PIN                  28  // PIN to detect the safety circuit has triggered
111
-#define MAIN_VOLTAGE_MEASURE_PIN              14  // ANALOG PIN to measure the main voltage, with a 100k - 4k7 resitor divider.
110
+//#define SAFETY_TRIGGERED_PIN                28  // PIN to detect the safety circuit has triggered
111
+//#define MAIN_VOLTAGE_MEASURE_PIN            14  // ANALOG PIN to measure the main voltage, with a 100k - 4k7 resitor divider.
112 112
 
113 113
 //
114 114
 // LCD / Controller

+ 12
- 23
Marlin/src/pins/ramps/pins_ZRIB_V20.h View File

@@ -28,31 +28,20 @@
28 28
 
29 29
 #include "pins_MKS_GEN_13.h" // ... RAMPS
30 30
 
31
-#define ZRIB_V20_D6_PIN                        6  // Fan
32
-#define ZRIB_V20_D9_PIN                        9  // Fan2
33
-#define ZRIB_V20_A10_PIN                      10
34
-#define ZRIB_V20_D16_PIN                      16
35
-#define ZRIB_V20_D17_PIN                      17
36
-#define ZRIB_V20_D23_PIN                      23
37
-#define ZRIB_V20_D25_PIN                      25
38
-#define ZRIB_V20_D27_PIN                      27
39
-#define ZRIB_V20_D29_PIN                      29
40
-#define ZRIB_V20_D37_PIN                      37
41
-
42 31
 //
43 32
 // Auto fans
44 33
 //
45 34
 #ifndef E0_AUTO_FAN_PIN
46
-  #define E0_AUTO_FAN_PIN        ZRIB_V20_D6_PIN
35
+  #define E0_AUTO_FAN_PIN                      6  // Fan
47 36
 #endif
48 37
 #ifndef E1_AUTO_FAN_PIN
49
-  #define E1_AUTO_FAN_PIN        ZRIB_V20_D6_PIN
38
+  #define E1_AUTO_FAN_PIN                      6
50 39
 #endif
51 40
 #ifndef E2_AUTO_FAN_PIN
52
-  #define E2_AUTO_FAN_PIN        ZRIB_V20_D6_PIN
41
+  #define E2_AUTO_FAN_PIN                      6
53 42
 #endif
54 43
 #ifndef E3_AUTO_FAN_PIN
55
-  #define E3_AUTO_FAN_PIN        ZRIB_V20_D6_PIN
44
+  #define E3_AUTO_FAN_PIN                      6
56 45
 #endif
57 46
 
58 47
 #ifndef FILWIDTH_PIN
@@ -76,12 +65,12 @@
76 65
   #undef BTN_EN2
77 66
   #undef BTN_ENC
78 67
 
79
-  #define LCD_PINS_RS           ZRIB_V20_D16_PIN
80
-  #define LCD_PINS_ENABLE       ZRIB_V20_D17_PIN
81
-  #define LCD_PINS_D4           ZRIB_V20_D23_PIN
82
-  #define LCD_PINS_D5           ZRIB_V20_D25_PIN
83
-  #define LCD_PINS_D6           ZRIB_V20_D27_PIN
84
-  #define LCD_PINS_D7           ZRIB_V20_D29_PIN
85
-  #define ADC_KEYPAD_PIN        ZRIB_V20_A10_PIN
86
-  #define BEEPER_PIN            ZRIB_V20_D37_PIN
68
+  #define LCD_PINS_RS                         16
69
+  #define LCD_PINS_ENABLE                     17
70
+  #define LCD_PINS_D4                         23
71
+  #define LCD_PINS_D5                         25
72
+  #define LCD_PINS_D6                         27
73
+  #define LCD_PINS_D7                         29
74
+  #define ADC_KEYPAD_PIN                      10  // Analog Input
75
+  #define BEEPER_PIN                          37
87 76
 #endif

Loading…
Cancel
Save