Browse Source

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

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

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

293
 
293
 
294
 #if HAS_MOTOR_CURRENT_PWM
294
 #if HAS_MOTOR_CURRENT_PWM
295
   #if PIN_EXISTS(MOTOR_CURRENT_PWM_XY)
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
   #elif PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
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
   #else
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
   #endif
301
   #endif
302
 #else
302
 #else
303
   #define PWM_CHK_MOTOR_CURRENT(P) false
303
   #define PWM_CHK_MOTOR_CURRENT(P) false

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

26
 #if ((!HAS_ADC_BUTTONS && IS_NEWPANEL) || BUTTONS_EXIST(EN1, EN2)) && !IS_TFTGLCD_PANEL
26
 #if ((!HAS_ADC_BUTTONS && IS_NEWPANEL) || BUTTONS_EXIST(EN1, EN2)) && !IS_TFTGLCD_PANEL
27
   #define HAS_ENCODER_WHEEL 1
27
   #define HAS_ENCODER_WHEEL 1
28
 #endif
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
   #define HAS_DIGITAL_BUTTONS 1
30
   #define HAS_DIGITAL_BUTTONS 1
31
 #endif
31
 #endif
32
 #if !HAS_ADC_BUTTONS && (IS_RRW_KEYPAD || (HAS_WIRED_LCD && !IS_NEWPANEL))
32
 #if !HAS_ADC_BUTTONS && (IS_RRW_KEYPAD || (HAS_WIRED_LCD && !IS_NEWPANEL))
190
 #else
190
 #else
191
   #define _BUTTON_PRESSED_UP false
191
   #define _BUTTON_PRESSED_UP false
192
 #endif
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
 #else
195
 #else
196
   #define _BUTTON_PRESSED_DWN false
196
   #define _BUTTON_PRESSED_DWN false
197
 #endif
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
 #else
200
 #else
201
   #define _BUTTON_PRESSED_LFT false
201
   #define _BUTTON_PRESSED_LFT false
202
 #endif
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
 #else
205
 #else
206
   #define _BUTTON_PRESSED_RT false
206
   #define _BUTTON_PRESSED_RT false
207
 #endif
207
 #endif

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

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

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

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

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

101
 // LCD Display input pins
101
 // LCD Display input pins
102
 //
102
 //
103
 #define BTN_UP                                25
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
 // 'OK' button
108
 // 'OK' button
109
 #define BTN_ENC                               29
109
 #define BTN_ENC                               29

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

203
 
203
 
204
     #define BTN_EN2                           75  // J4, UP
204
     #define BTN_EN2                           75  // J4, UP
205
     #define BTN_EN1                           73  // J3, DOWN
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
     #define BEEPER_PIN                         8  // H5, SD_WP
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
     #define STAT_LED_BLUE_PIN         SERVO1_PIN  // C0 (1280-EX2, DEBUG3)
213
     #define STAT_LED_BLUE_PIN         SERVO1_PIN  // C0 (1280-EX2, DEBUG3)
215
 
214
 
216
   #else
215
   #else
220
     #define SR_STROBE_PIN                     33  // C4
219
     #define SR_STROBE_PIN                     33  // C4
221
 
220
 
222
     #define BTN_UP                            75  // J4
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
     // Disable encoder
226
     // Disable encoder
228
     #undef BTN_EN1
227
     #undef BTN_EN1

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

135
 #if IS_NEWPANEL
135
 #if IS_NEWPANEL
136
   #define BTN_ENC                             16  // Enter Pin
136
   #define BTN_ENC                             16  // Enter Pin
137
   #define BTN_UP                              19  // Button UP Pin
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
 #endif
139
 #endif
140
 
140
 
141
 // Additional connectors/pins on the Overlord V1.X board
141
 // Additional connectors/pins on the Overlord V1.X board

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

45
 #define REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(#NAME, COUNTER)
45
 #define REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(#NAME, COUNTER)
46
 
46
 
47
 #include "pinsDebug_list.h"
47
 #include "pinsDebug_list.h"
48
-#line 48
48
+#line 49
49
 
49
 
50
 // manually add pins that have names that are macros which don't play well with these macros
50
 // manually add pins that have names that are macros which don't play well with these macros
51
 #if ANY(AVR_ATmega2560_FAMILY, AVR_ATmega1284_FAMILY, ARDUINO_ARCH_SAM, TARGET_LPC1768)
51
 #if ANY(AVR_ATmega2560_FAMILY, AVR_ATmega1284_FAMILY, ARDUINO_ARCH_SAM, TARGET_LPC1768)
164
   #endif
164
   #endif
165
 
165
 
166
   #include "pinsDebug_list.h"
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
 
103
 
104
   // Direction buttons
104
   // Direction buttons
105
   #define BTN_UP                              37
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
   // 'R' button
110
   // 'R' button
111
   #undef BTN_ENC
111
   #undef BTN_ENC

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

107
 #define SDSS                                  53
107
 #define SDSS                                  53
108
 #define SD_DETECT_PIN                         39
108
 #define SD_DETECT_PIN                         39
109
 #define LED_PIN                                8
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
 // LCD / Controller
114
 // LCD / Controller

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

28
 
28
 
29
 #include "pins_MKS_GEN_13.h" // ... RAMPS
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
 // Auto fans
32
 // Auto fans
44
 //
33
 //
45
 #ifndef E0_AUTO_FAN_PIN
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
 #endif
36
 #endif
48
 #ifndef E1_AUTO_FAN_PIN
37
 #ifndef E1_AUTO_FAN_PIN
49
-  #define E1_AUTO_FAN_PIN        ZRIB_V20_D6_PIN
38
+  #define E1_AUTO_FAN_PIN                      6
50
 #endif
39
 #endif
51
 #ifndef E2_AUTO_FAN_PIN
40
 #ifndef E2_AUTO_FAN_PIN
52
-  #define E2_AUTO_FAN_PIN        ZRIB_V20_D6_PIN
41
+  #define E2_AUTO_FAN_PIN                      6
53
 #endif
42
 #endif
54
 #ifndef E3_AUTO_FAN_PIN
43
 #ifndef E3_AUTO_FAN_PIN
55
-  #define E3_AUTO_FAN_PIN        ZRIB_V20_D6_PIN
44
+  #define E3_AUTO_FAN_PIN                      6
56
 #endif
45
 #endif
57
 
46
 
58
 #ifndef FILWIDTH_PIN
47
 #ifndef FILWIDTH_PIN
76
   #undef BTN_EN2
65
   #undef BTN_EN2
77
   #undef BTN_ENC
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
 #endif
76
 #endif

Loading…
Cancel
Save