Browse Source

M42 P1.20 fix

Bob-the-Kuhn 7 years ago
parent
commit
a28ccabe2a

+ 7
- 7
Marlin/src/HAL/HAL_LPC1768/HAL.cpp View File

174
 #define SBIT_PWMEN     2
174
 #define SBIT_PWMEN     2
175
 #define SBIT_PWMMR0R   1
175
 #define SBIT_PWMMR0R   1
176
 
176
 
177
-#define PWM_1          0  //P2_0 (0-1 Bits of PINSEL4)
178
-#define PWM_2          2  //P2_1 (2-3 Bits of PINSEL4)
179
-#define PWM_3          4  //P2_2 (4-5 Bits of PINSEL4)
180
-#define PWM_4          6  //P2_3 (6-7 Bits of PINSEL4)
181
-#define PWM_5          8  //P2_4 (8-9 Bits of PINSEL4)
182
-#define PWM_6          10 //P2_5 (10-11 Bits of PINSEL4)
177
+#define PWM_1          0  //P2_00 (0-1 Bits of PINSEL4)
178
+#define PWM_2          2  //P2_01 (2-3 Bits of PINSEL4)
179
+#define PWM_3          4  //P2_02 (4-5 Bits of PINSEL4)
180
+#define PWM_4          6  //P2_03 (6-7 Bits of PINSEL4)
181
+#define PWM_5          8  //P2_04 (8-9 Bits of PINSEL4)
182
+#define PWM_6          10 //P2_05 (10-11 Bits of PINSEL4)
183
 
183
 
184
 void HAL_pwm_init(void) {
184
 void HAL_pwm_init(void) {
185
   LPC_PINCON->PINSEL4 = _BV(PWM_5) | _BV(PWM_6);
185
   LPC_PINCON->PINSEL4 = _BV(PWM_5) | _BV(PWM_6);
193
 
193
 
194
   // Trigger the latch Enable Bits to load the new Match Values MR0, MR5, MR6
194
   // Trigger the latch Enable Bits to load the new Match Values MR0, MR5, MR6
195
   LPC_PWM1->LER = _BV(0) | _BV(5) | _BV(6);
195
   LPC_PWM1->LER = _BV(0) | _BV(5) | _BV(6);
196
-  // Enable the PWM output pins for PWM_5-PWM_6(P2_4 - P2_5)
196
+  // Enable the PWM output pins for PWM_5-PWM_6(P2_04 - P2_05)
197
   LPC_PWM1->PCR = _BV(13) | _BV(14);
197
   LPC_PWM1->PCR = _BV(13) | _BV(14);
198
 }
198
 }
199
 
199
 

+ 6
- 3
Marlin/src/HAL/HAL_LPC1768/pinmapping.cpp View File

35
   return -1;
35
   return -1;
36
 }
36
 }
37
 
37
 
38
-int16_t PARSED_PIN_INDEX(char code, int16_t dval) {
38
+int16_t PARSED_PIN_INDEX(char code, int16_t dval) {  // treats 1.2 and 1.20 as the same thing
39
   if (parser.seenval(code)) {
39
   if (parser.seenval(code)) {
40
     int port, pin;
40
     int port, pin;
41
-    if (sscanf(parser.strval(code), "%d.%d", &port, &pin) == 2)
41
+    char pin_string[3] = {"  "};
42
+    if (sscanf(parser.strval(code), "%d.%2s", &port, pin_string) == 2) {
43
+      if (pin_string[1] == '\0') pin_string[1] = '0';   // add trailing zero if a null is found
44
+      pin = (10 * (pin_string[0] - '0')) + (pin_string[1] - '0');  // convert string to number
42
       for (size_t i = 0; i < NUM_DIGITAL_PINS; ++i)
45
       for (size_t i = 0; i < NUM_DIGITAL_PINS; ++i)
43
         if (LPC1768_PIN_PORT(pin_map[i]) == port && LPC1768_PIN_PIN(pin_map[i]) == pin)
46
         if (LPC1768_PIN_PORT(pin_map[i]) == port && LPC1768_PIN_PIN(pin_map[i]) == pin)
44
           return i;
47
           return i;
48
+    }
45
   }
49
   }
46
-
47
   return dval;
50
   return dval;
48
 }
51
 }
49
 
52
 

+ 33
- 33
Marlin/src/HAL/HAL_LPC1768/pinmapping.h View File

109
 #define P_NC   -1
109
 #define P_NC   -1
110
 
110
 
111
 #if SERIAL_PORT != 3
111
 #if SERIAL_PORT != 3
112
-  #define P0_0   LPC1768_PIN(PORT(0), PIN(0), INTERRUPT(1), PWM(0), ADC_NONE)
113
-  #define P0_1   LPC1768_PIN(PORT(0), PIN(1), INTERRUPT(1), PWM(0), ADC_NONE)
112
+  #define P0_00   LPC1768_PIN(PORT(0), PIN(0), INTERRUPT(1), PWM(0), ADC_NONE)
113
+  #define P0_01   LPC1768_PIN(PORT(0), PIN(1), INTERRUPT(1), PWM(0), ADC_NONE)
114
 #endif
114
 #endif
115
 #if SERIAL_PORT != 0
115
 #if SERIAL_PORT != 0
116
-  #define P0_2   LPC1768_PIN(PORT(0), PIN(2), INTERRUPT(1), PWM(0), ADC_CHAN(7))
117
-  #define P0_3   LPC1768_PIN(PORT(0), PIN(3), INTERRUPT(1), PWM(0), ADC_CHAN(6))
116
+  #define P0_02   LPC1768_PIN(PORT(0), PIN(2), INTERRUPT(1), PWM(0), ADC_CHAN(7))
117
+  #define P0_03   LPC1768_PIN(PORT(0), PIN(3), INTERRUPT(1), PWM(0), ADC_CHAN(6))
118
 #endif
118
 #endif
119
-#define P0_4   LPC1768_PIN(PORT(0), PIN(4), INTERRUPT(1), PWM(0), ADC_NONE)
120
-#define P0_5   LPC1768_PIN(PORT(0), PIN(5), INTERRUPT(1), PWM(0), ADC_NONE)
121
-#define P0_6   LPC1768_PIN(PORT(0), PIN(6), INTERRUPT(1), PWM(0), ADC_NONE)
122
-#define P0_7   LPC1768_PIN(PORT(0), PIN(7), INTERRUPT(1), PWM(0), ADC_NONE)
123
-#define P0_8   LPC1768_PIN(PORT(0), PIN(8), INTERRUPT(1), PWM(0), ADC_NONE)
124
-#define P0_9   LPC1768_PIN(PORT(0), PIN(9), INTERRUPT(1), PWM(0), ADC_NONE)
119
+#define P0_04   LPC1768_PIN(PORT(0), PIN(4), INTERRUPT(1), PWM(0), ADC_NONE)
120
+#define P0_05   LPC1768_PIN(PORT(0), PIN(5), INTERRUPT(1), PWM(0), ADC_NONE)
121
+#define P0_06   LPC1768_PIN(PORT(0), PIN(6), INTERRUPT(1), PWM(0), ADC_NONE)
122
+#define P0_07   LPC1768_PIN(PORT(0), PIN(7), INTERRUPT(1), PWM(0), ADC_NONE)
123
+#define P0_08   LPC1768_PIN(PORT(0), PIN(8), INTERRUPT(1), PWM(0), ADC_NONE)
124
+#define P0_09   LPC1768_PIN(PORT(0), PIN(9), INTERRUPT(1), PWM(0), ADC_NONE)
125
 #if SERIAL_PORT != 2
125
 #if SERIAL_PORT != 2
126
   #define P0_10  LPC1768_PIN(PORT(0), PIN(10), INTERRUPT(1), PWM(0), ADC_NONE)
126
   #define P0_10  LPC1768_PIN(PORT(0), PIN(10), INTERRUPT(1), PWM(0), ADC_NONE)
127
   #define P0_11  LPC1768_PIN(PORT(0), PIN(11), INTERRUPT(1), PWM(0), ADC_NONE)
127
   #define P0_11  LPC1768_PIN(PORT(0), PIN(11), INTERRUPT(1), PWM(0), ADC_NONE)
144
 #define P0_28  LPC1768_PIN(PORT(0), PIN(28), INTERRUPT(1), PWM(0), ADC_NONE)
144
 #define P0_28  LPC1768_PIN(PORT(0), PIN(28), INTERRUPT(1), PWM(0), ADC_NONE)
145
 #define P0_29  LPC1768_PIN(PORT(0), PIN(29), INTERRUPT(1), PWM(0), ADC_NONE)
145
 #define P0_29  LPC1768_PIN(PORT(0), PIN(29), INTERRUPT(1), PWM(0), ADC_NONE)
146
 #define P0_30  LPC1768_PIN(PORT(0), PIN(30), INTERRUPT(1), PWM(0), ADC_NONE)
146
 #define P0_30  LPC1768_PIN(PORT(0), PIN(30), INTERRUPT(1), PWM(0), ADC_NONE)
147
-#define P1_0   LPC1768_PIN(PORT(1), PIN(0), INTERRUPT(0), PWM(0), ADC_NONE)
148
-#define P1_1   LPC1768_PIN(PORT(1), PIN(1), INTERRUPT(0), PWM(0), ADC_NONE)
149
-#define P1_4   LPC1768_PIN(PORT(1), PIN(4), INTERRUPT(0), PWM(0), ADC_NONE)
150
-#define P1_8   LPC1768_PIN(PORT(1), PIN(8), INTERRUPT(0), PWM(0), ADC_NONE)
151
-#define P1_9   LPC1768_PIN(PORT(1), PIN(9), INTERRUPT(0), PWM(0), ADC_NONE)
147
+#define P1_00   LPC1768_PIN(PORT(1), PIN(0), INTERRUPT(0), PWM(0), ADC_NONE)
148
+#define P1_01   LPC1768_PIN(PORT(1), PIN(1), INTERRUPT(0), PWM(0), ADC_NONE)
149
+#define P1_04   LPC1768_PIN(PORT(1), PIN(4), INTERRUPT(0), PWM(0), ADC_NONE)
150
+#define P1_08   LPC1768_PIN(PORT(1), PIN(8), INTERRUPT(0), PWM(0), ADC_NONE)
151
+#define P1_09   LPC1768_PIN(PORT(1), PIN(9), INTERRUPT(0), PWM(0), ADC_NONE)
152
 #define P1_10  LPC1768_PIN(PORT(1), PIN(10), INTERRUPT(0), PWM(0), ADC_NONE)
152
 #define P1_10  LPC1768_PIN(PORT(1), PIN(10), INTERRUPT(0), PWM(0), ADC_NONE)
153
 #define P1_14  LPC1768_PIN(PORT(1), PIN(14), INTERRUPT(0), PWM(0), ADC_NONE)
153
 #define P1_14  LPC1768_PIN(PORT(1), PIN(14), INTERRUPT(0), PWM(0), ADC_NONE)
154
 #define P1_15  LPC1768_PIN(PORT(1), PIN(15), INTERRUPT(0), PWM(0), ADC_NONE)
154
 #define P1_15  LPC1768_PIN(PORT(1), PIN(15), INTERRUPT(0), PWM(0), ADC_NONE)
168
 #define P1_29  LPC1768_PIN(PORT(1), PIN(29), INTERRUPT(0), PWM(0), ADC_NONE)
168
 #define P1_29  LPC1768_PIN(PORT(1), PIN(29), INTERRUPT(0), PWM(0), ADC_NONE)
169
 #define P1_30  LPC1768_PIN(PORT(1), PIN(30), INTERRUPT(0), PWM(0), ADC_CHAN(4))
169
 #define P1_30  LPC1768_PIN(PORT(1), PIN(30), INTERRUPT(0), PWM(0), ADC_CHAN(4))
170
 #define P1_31  LPC1768_PIN(PORT(1), PIN(31), INTERRUPT(0), PWM(0), ADC_CHAN(5))
170
 #define P1_31  LPC1768_PIN(PORT(1), PIN(31), INTERRUPT(0), PWM(0), ADC_CHAN(5))
171
-#define P2_0   LPC1768_PIN(PORT(2), PIN(0), INTERRUPT(1), PWM(1), ADC_NONE)
172
-#define P2_1   LPC1768_PIN(PORT(2), PIN(1), INTERRUPT(1), PWM(1), ADC_NONE)
173
-#define P2_2   LPC1768_PIN(PORT(2), PIN(2), INTERRUPT(1), PWM(1), ADC_NONE)
174
-#define P2_3   LPC1768_PIN(PORT(2), PIN(3), INTERRUPT(1), PWM(1), ADC_NONE)
175
-#define P2_4   LPC1768_PIN(PORT(2), PIN(4), INTERRUPT(1), PWM(1), ADC_NONE)
176
-#define P2_5   LPC1768_PIN(PORT(2), PIN(5), INTERRUPT(1), PWM(1), ADC_NONE)
177
-#define P2_6   LPC1768_PIN(PORT(2), PIN(6), INTERRUPT(1), PWM(0), ADC_NONE)
178
-#define P2_7   LPC1768_PIN(PORT(2), PIN(7), INTERRUPT(1), PWM(0), ADC_NONE)
179
-#define P2_8   LPC1768_PIN(PORT(2), PIN(8), INTERRUPT(1), PWM(0), ADC_NONE)
180
-#define P2_9   LPC1768_PIN(PORT(2), PIN(9), INTERRUPT(1), PWM(0), ADC_NONE)
171
+#define P2_00   LPC1768_PIN(PORT(2), PIN(0), INTERRUPT(1), PWM(1), ADC_NONE)
172
+#define P2_01   LPC1768_PIN(PORT(2), PIN(1), INTERRUPT(1), PWM(1), ADC_NONE)
173
+#define P2_02   LPC1768_PIN(PORT(2), PIN(2), INTERRUPT(1), PWM(1), ADC_NONE)
174
+#define P2_03   LPC1768_PIN(PORT(2), PIN(3), INTERRUPT(1), PWM(1), ADC_NONE)
175
+#define P2_04   LPC1768_PIN(PORT(2), PIN(4), INTERRUPT(1), PWM(1), ADC_NONE)
176
+#define P2_05   LPC1768_PIN(PORT(2), PIN(5), INTERRUPT(1), PWM(1), ADC_NONE)
177
+#define P2_06   LPC1768_PIN(PORT(2), PIN(6), INTERRUPT(1), PWM(0), ADC_NONE)
178
+#define P2_07   LPC1768_PIN(PORT(2), PIN(7), INTERRUPT(1), PWM(0), ADC_NONE)
179
+#define P2_08   LPC1768_PIN(PORT(2), PIN(8), INTERRUPT(1), PWM(0), ADC_NONE)
180
+#define P2_09   LPC1768_PIN(PORT(2), PIN(9), INTERRUPT(1), PWM(0), ADC_NONE)
181
 #define P2_10  LPC1768_PIN(PORT(2), PIN(10), INTERRUPT(1), PWM(0), ADC_NONE)
181
 #define P2_10  LPC1768_PIN(PORT(2), PIN(10), INTERRUPT(1), PWM(0), ADC_NONE)
182
 #define P2_11  LPC1768_PIN(PORT(2), PIN(11), INTERRUPT(1), PWM(0), ADC_NONE)
182
 #define P2_11  LPC1768_PIN(PORT(2), PIN(11), INTERRUPT(1), PWM(0), ADC_NONE)
183
 #define P2_12  LPC1768_PIN(PORT(2), PIN(12), INTERRUPT(1), PWM(0), ADC_NONE)
183
 #define P2_12  LPC1768_PIN(PORT(2), PIN(12), INTERRUPT(1), PWM(0), ADC_NONE)
231
 constexpr pin_t adc_pin_table[] = {
231
 constexpr pin_t adc_pin_table[] = {
232
   P0_23, P0_24, P0_25, P0_26, P1_30, P1_31,
232
   P0_23, P0_24, P0_25, P0_26, P1_30, P1_31,
233
   #if SERIAL_PORT != 0
233
   #if SERIAL_PORT != 0
234
-    P0_3, P0_2
234
+    P0_03, P0_02
235
   #endif
235
   #endif
236
 };
236
 };
237
 
237
 
245
 
245
 
246
 // P0.6 thru P0.9 are for the onboard SD card
246
 // P0.6 thru P0.9 are for the onboard SD card
247
 // P0.29 and P0.30 are for the USB port
247
 // P0.29 and P0.30 are for the USB port
248
-#define HAL_SENSITIVE_PINS P0_6, P0_7, P0_8, P0_9, P0_29, P0_30
248
+#define HAL_SENSITIVE_PINS P0_06, P0_07, P0_08, P0_09, P0_29, P0_30
249
 
249
 
250
 // Pin map for M43 and M226
250
 // Pin map for M43 and M226
251
 const pin_t pin_map[] = {
251
 const pin_t pin_map[] = {
252
   #if SERIAL_PORT != 3
252
   #if SERIAL_PORT != 3
253
-    P0_0,  P0_1,
253
+    P0_00,  P0_01,
254
   #endif
254
   #endif
255
   #if SERIAL_PORT != 0
255
   #if SERIAL_PORT != 0
256
-    P0_2,  P0_3,
256
+    P0_02,  P0_03,
257
   #endif
257
   #endif
258
-  P0_4,  P0_5,  P0_6,  P0_7,  P0_8,  P0_9,
258
+  P0_04,  P0_05,  P0_06,  P0_07,  P0_08,  P0_09,
259
   #if SERIAL_PORT != 2
259
   #if SERIAL_PORT != 2
260
     P0_10, P0_11,
260
     P0_10, P0_11,
261
   #endif
261
   #endif
264
   #endif
264
   #endif
265
   P0_17, P0_18, P0_19, P0_20, P0_21, P0_22, P0_23, P0_24,
265
   P0_17, P0_18, P0_19, P0_20, P0_21, P0_22, P0_23, P0_24,
266
   P0_25, P0_26, P0_27, P0_28, P0_29, P0_30,
266
   P0_25, P0_26, P0_27, P0_28, P0_29, P0_30,
267
-  P1_0,  P1_1,  P1_4,  P1_8,  P1_9,  P1_10, P1_14, P1_15,
267
+  P1_00,  P1_01,  P1_04,  P1_08,  P1_09,  P1_10, P1_14, P1_15,
268
   P1_16, P1_17, P1_18, P1_19, P1_20, P1_21, P1_22, P1_23,
268
   P1_16, P1_17, P1_18, P1_19, P1_20, P1_21, P1_22, P1_23,
269
   P1_24, P1_25, P1_26, P1_27, P1_28, P1_29, P1_30, P1_31,
269
   P1_24, P1_25, P1_26, P1_27, P1_28, P1_29, P1_30, P1_31,
270
-  P2_0,  P2_1,  P2_2,  P2_3,  P2_4,  P2_5,  P2_6,  P2_7,
271
-  P2_8,  P2_9,  P2_10, P2_11, P2_12, P2_13,
270
+  P2_00,  P2_01,  P2_02,  P2_03,  P2_04,  P2_05,  P2_06,  P2_07,
271
+  P2_08,  P2_09,  P2_10, P2_11, P2_12, P2_13,
272
   P3_25, P3_26,
272
   P3_25, P3_26,
273
   P4_28, P4_29
273
   P4_28, P4_29
274
 };
274
 };

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

26
 #define LPC_SOFTWARE_SPI
26
 #define LPC_SOFTWARE_SPI
27
 
27
 
28
 /** onboard SD card */
28
 /** onboard SD card */
29
-//#define SCK_PIN           P0_7
30
-//#define MISO_PIN          P0_8
31
-//#define MOSI_PIN          P0_9
32
-//#define SS_PIN            P0_6
29
+//#define SCK_PIN           P0_07
30
+//#define MISO_PIN          P0_08
31
+//#define MOSI_PIN          P0_09
32
+//#define SS_PIN            P0_06
33
 /** external */
33
 /** external */
34
 #define SCK_PIN           P0_15
34
 #define SCK_PIN           P0_15
35
 #define MISO_PIN          P0_17
35
 #define MISO_PIN          P0_17

+ 1
- 5
Marlin/src/gcode/control/M42.cpp View File

28
  * M42: Change pin status via GCode
28
  * M42: Change pin status via GCode
29
  *
29
  *
30
  *  P<pin>  Pin number (LED if omitted)
30
  *  P<pin>  Pin number (LED if omitted)
31
- *            For LPC1768 use M42 P1.20 S255 if wanting to set P1_20 to logic 1
32
- *              NOTE - Repetier Host truncates trailing zeros on a decimal when
33
- *                     sending commands so typing M42 P1.20 S255 results in 
34
- *                     M42 P1.2 S255 being sent.  Pronterface doesn't have this issue.
35
- *                     
31
+ *            For LPC1768 enter pin P1_20 as M42 P1.20
36
  *  S<byte> Pin status from 0 - 255
32
  *  S<byte> Pin status from 0 - 255
37
  */
33
  */
38
 void GcodeSuite::M42() {
34
 void GcodeSuite::M42() {

+ 16
- 16
Marlin/src/pins/pins_AZSMZ_MINI.h View File

48
 //
48
 //
49
 // Steppers
49
 // Steppers
50
 //
50
 //
51
-#define X_STEP_PIN         P2_0
52
-#define X_DIR_PIN          P0_5
53
-#define X_ENABLE_PIN       P0_4
51
+#define X_STEP_PIN         P2_00
52
+#define X_DIR_PIN          P0_05
53
+#define X_ENABLE_PIN       P0_04
54
 
54
 
55
-#define Y_STEP_PIN         P2_1
55
+#define Y_STEP_PIN         P2_01
56
 #define Y_DIR_PIN          P0_11
56
 #define Y_DIR_PIN          P0_11
57
 #define Y_ENABLE_PIN       P0_10
57
 #define Y_ENABLE_PIN       P0_10
58
 
58
 
59
-#define Z_STEP_PIN         P2_2
59
+#define Z_STEP_PIN         P2_02
60
 #define Z_DIR_PIN          P0_20
60
 #define Z_DIR_PIN          P0_20
61
 #define Z_ENABLE_PIN       P0_19
61
 #define Z_ENABLE_PIN       P0_19
62
 
62
 
63
-#define E0_STEP_PIN        P2_3
63
+#define E0_STEP_PIN        P2_03
64
 #define E0_DIR_PIN         P0_22
64
 #define E0_DIR_PIN         P0_22
65
 #define E0_ENABLE_PIN      P0_21
65
 #define E0_ENABLE_PIN      P0_21
66
 
66
 
67
-#define E1_STEP_PIN        P2_8
67
+#define E1_STEP_PIN        P2_08
68
 #define E1_DIR_PIN         P2_13
68
 #define E1_DIR_PIN         P2_13
69
 #define E1_ENABLE_PIN      P4_29
69
 #define E1_ENABLE_PIN      P4_29
70
 
70
 
80
 // Heaters / Fans
80
 // Heaters / Fans
81
 //
81
 //
82
 // EFB
82
 // EFB
83
-#define HEATER_0_PIN       P2_4
84
-#define HEATER_BED_PIN     P2_5
85
-#define FAN_PIN            P2_7
83
+#define HEATER_0_PIN       P2_04
84
+#define HEATER_BED_PIN     P2_05
85
+#define FAN_PIN            P2_07
86
 #define FAN1_PIN           P0_26
86
 #define FAN1_PIN           P0_26
87
 
87
 
88
 #if ENABLED(AZSMZ_12864)
88
 #if ENABLED(AZSMZ_12864)
89
   #define BEEPER_PIN       P1_30
89
   #define BEEPER_PIN       P1_30
90
-  #define DOGLCD_A0        P2_6
90
+  #define DOGLCD_A0        P2_06
91
   #define DOGLCD_CS        P1_22
91
   #define DOGLCD_CS        P1_22
92
   #define BTN_EN1          P4_28
92
   #define BTN_EN1          P4_28
93
   #define BTN_EN2          P1_27
93
   #define BTN_EN2          P1_27
104
 #define ENET_RXD1          P1_10
104
 #define ENET_RXD1          P1_10
105
 #define ENET_MOC           P1_16
105
 #define ENET_MOC           P1_16
106
 #define REF_CLK            P1_15
106
 #define REF_CLK            P1_15
107
-#define ENET_RXD0          P1_9
108
-#define ENET_CRS           P1_8
109
-#define ENET_TX_EN         P1_4
110
-#define ENET_TXD0          P1_0
111
-#define ENET_TXD1          P1_1
107
+#define ENET_RXD0          P1_09
108
+#define ENET_CRS           P1_08
109
+#define ENET_TX_EN         P1_04
110
+#define ENET_TXD0          P1_00
111
+#define ENET_TXD1          P1_01
112
 
112
 
113
 /**
113
 /**
114
  *  PWMs
114
  *  PWMs

+ 11
- 11
Marlin/src/pins/pins_AZTEEG_X5_GT.h View File

49
 //
49
 //
50
 // Steppers
50
 // Steppers
51
 //
51
 //
52
-#define X_STEP_PIN         P2_1
52
+#define X_STEP_PIN         P2_01
53
 #define X_DIR_PIN          P0_11
53
 #define X_DIR_PIN          P0_11
54
 #define X_ENABLE_PIN       P0_10
54
 #define X_ENABLE_PIN       P0_10
55
 
55
 
56
-#define Y_STEP_PIN         P2_2
56
+#define Y_STEP_PIN         P2_02
57
 #define Y_DIR_PIN          P0_20
57
 #define Y_DIR_PIN          P0_20
58
 #define Y_ENABLE_PIN       P0_19
58
 #define Y_ENABLE_PIN       P0_19
59
 
59
 
60
-#define Z_STEP_PIN         P2_3
60
+#define Z_STEP_PIN         P2_03
61
 #define Z_DIR_PIN          P0_22
61
 #define Z_DIR_PIN          P0_22
62
 #define Z_ENABLE_PIN       P0_21
62
 #define Z_ENABLE_PIN       P0_21
63
 
63
 
64
-#define E0_STEP_PIN        P2_0
65
-#define E0_DIR_PIN         P0_5
66
-#define E0_ENABLE_PIN      P0_4
64
+#define E0_STEP_PIN        P2_00
65
+#define E0_DIR_PIN         P0_05
66
+#define E0_ENABLE_PIN      P0_04
67
 
67
 
68
-#define E1_STEP_PIN        P2_8
68
+#define E1_STEP_PIN        P2_08
69
 #define E1_DIR_PIN         P2_13
69
 #define E1_DIR_PIN         P2_13
70
 #define E1_ENABLE_PIN      P4_29
70
 #define E1_ENABLE_PIN      P4_29
71
 
71
 
82
 // Heaters / Fans
82
 // Heaters / Fans
83
 //
83
 //
84
 
84
 
85
-#define HEATER_BED_PIN     P2_7
86
-#define HEATER_0_PIN       P2_4
87
-#define HEATER_1_PIN       P2_5
85
+#define HEATER_BED_PIN     P2_07
86
+#define HEATER_0_PIN       P2_04
87
+#define HEATER_1_PIN       P2_05
88
 #define FAN_PIN            P0_26
88
 #define FAN_PIN            P0_26
89
 #define FAN1_PIN           P1_22
89
 #define FAN1_PIN           P1_22
90
 
90
 
94
 
94
 
95
 #if ENABLED(VIKI2) || ENABLED(miniVIKI)
95
 #if ENABLED(VIKI2) || ENABLED(miniVIKI)
96
     #define BEEPER_PIN        P1_30
96
     #define BEEPER_PIN        P1_30
97
-    #define DOGLCD_A0         P2_6
97
+    #define DOGLCD_A0         P2_06
98
     #define DOGLCD_CS         P0_16
98
     #define DOGLCD_CS         P0_16
99
 
99
 
100
     #define BTN_EN1           P3_25
100
     #define BTN_EN1           P3_25

+ 22
- 22
Marlin/src/pins/pins_MKS_SBASE.h View File

53
 //
53
 //
54
 // Steppers
54
 // Steppers
55
 //
55
 //
56
-#define X_STEP_PIN         P2_0
57
-#define X_DIR_PIN          P0_5
58
-#define X_ENABLE_PIN       P0_4
56
+#define X_STEP_PIN         P2_00
57
+#define X_DIR_PIN          P0_05
58
+#define X_ENABLE_PIN       P0_04
59
 
59
 
60
-#define Y_STEP_PIN         P2_1
60
+#define Y_STEP_PIN         P2_01
61
 #define Y_DIR_PIN          P0_11
61
 #define Y_DIR_PIN          P0_11
62
 #define Y_ENABLE_PIN       P0_10
62
 #define Y_ENABLE_PIN       P0_10
63
 
63
 
64
-#define Z_STEP_PIN         P2_2
64
+#define Z_STEP_PIN         P2_02
65
 #define Z_DIR_PIN          P0_20
65
 #define Z_DIR_PIN          P0_20
66
 #define Z_ENABLE_PIN       P0_19
66
 #define Z_ENABLE_PIN       P0_19
67
 
67
 
68
-#define E0_STEP_PIN        P2_3
68
+#define E0_STEP_PIN        P2_03
69
 #define E0_DIR_PIN         P0_22
69
 #define E0_DIR_PIN         P0_22
70
 #define E0_ENABLE_PIN      P0_21
70
 #define E0_ENABLE_PIN      P0_21
71
 
71
 
72
-#define E1_STEP_PIN        P2_8
72
+#define E1_STEP_PIN        P2_08
73
 #define E1_DIR_PIN         P2_13
73
 #define E1_DIR_PIN         P2_13
74
 #define E1_ENABLE_PIN      P4_29
74
 #define E1_ENABLE_PIN      P4_29
75
 
75
 
88
 // Heaters / Fans
88
 // Heaters / Fans
89
 //
89
 //
90
 
90
 
91
-#define HEATER_BED_PIN     P2_5
92
-#define HEATER_0_PIN       P2_7
93
-#define HEATER_1_PIN       P2_6
94
-#define FAN_PIN            P2_4
91
+#define HEATER_BED_PIN     P2_05
92
+#define HEATER_0_PIN       P2_07
93
+#define HEATER_1_PIN       P2_06
94
+#define FAN_PIN            P2_04
95
 
95
 
96
 
96
 
97
 #define PS_ON_PIN          P0_25
97
 #define PS_ON_PIN          P0_25
166
 #endif
166
 #endif
167
 #define ENET_MOC           P1_16  // J12-3
167
 #define ENET_MOC           P1_16  // J12-3
168
 #define REF_CLK            P1_15  // J12-5
168
 #define REF_CLK            P1_15  // J12-5
169
-#define ENET_RXD0          P1_9   // J12-7
170
-#define ENET_CRS           P1_8   // J12-9
171
-#define ENET_TX_EN         P1_4   // J12-10
172
-#define ENET_TXD0          P1_0   // J12-11
173
-#define ENET_TXD1          P1_1   // J12-12
169
+#define ENET_RXD0          P1_09  // J12-7
170
+#define ENET_CRS           P1_08  // J12-9
171
+#define ENET_TX_EN         P1_04  // J12-10
172
+#define ENET_TXD0          P1_00  // J12-11
173
+#define ENET_TXD1          P1_01  // J12-12
174
 
174
 
175
 /**
175
 /**
176
  *  PWMs
176
  *  PWMs
180
  *  SERVO2 does NOT have a PWM assigned to it.
180
  *  SERVO2 does NOT have a PWM assigned to it.
181
  *
181
  *
182
  *  PWM1.1   P1_18   SERVO3_PIN       FIL_RUNOUT_PIN   5V output, PWM
182
  *  PWM1.1   P1_18   SERVO3_PIN       FIL_RUNOUT_PIN   5V output, PWM
183
- *  PWM1.1   P2_0    E0_STEP_PIN
183
+ *  PWM1.1   P2_00   E0_STEP_PIN
184
  *  PWM1.2   P1_20   SERVO0_PIN
184
  *  PWM1.2   P1_20   SERVO0_PIN
185
- *  PWM1.2   P2_1    X_STEP_PIN
185
+ *  PWM1.2   P2_01   X_STEP_PIN
186
  *  PWM1.3   P1_21   SERVO1_PIN       J5-1
186
  *  PWM1.3   P1_21   SERVO1_PIN       J5-1
187
- *  PWM1.3   P2_2    Y_STEP_PIN
187
+ *  PWM1.3   P2_02   Y_STEP_PIN
188
  *  PWM1.4   P1_23   SDSS(SSEL0)      J3-5  AUX-3
188
  *  PWM1.4   P1_23   SDSS(SSEL0)      J3-5  AUX-3
189
- *  PWM1.4   P2_3    Z_STEP_PIN
189
+ *  PWM1.4   P2_03   Z_STEP_PIN
190
  *  PWM1.5   P1_24   X_MIN_PIN        10K PULLUP TO 3.3v, 1K SERIES
190
  *  PWM1.5   P1_24   X_MIN_PIN        10K PULLUP TO 3.3v, 1K SERIES
191
- *  PWM1.5   P2_4    RAMPS_D9_PIN
191
+ *  PWM1.5   P2_04   RAMPS_D9_PIN
192
  *  PWM1.6   P1_26   Y_MIN_PIN        10K PULLUP TO 3.3v, 1K SERIES
192
  *  PWM1.6   P1_26   Y_MIN_PIN        10K PULLUP TO 3.3v, 1K SERIES
193
- *  PWM1.6   P2_5    RAMPS_D10_PIN
193
+ *  PWM1.6   P2_05   RAMPS_D10_PIN
194
  */
194
  */
195
 
195
 
196
  /**
196
  /**

+ 24
- 24
Marlin/src/pins/pins_RAMPS_RE_ARM.h View File

65
 //
65
 //
66
 // Steppers
66
 // Steppers
67
 //
67
 //
68
-#define X_STEP_PIN         P2_1   // (54)
68
+#define X_STEP_PIN         P2_01  // (54)
69
 #define X_DIR_PIN          P0_11  // (55)
69
 #define X_DIR_PIN          P0_11  // (55)
70
 #define X_ENABLE_PIN       P0_10  // (38)
70
 #define X_ENABLE_PIN       P0_10  // (38)
71
 
71
 
72
-#define Y_STEP_PIN         P2_2   // (60)
72
+#define Y_STEP_PIN         P2_02  // (60)
73
 #define Y_DIR_PIN          P0_20  // (61)
73
 #define Y_DIR_PIN          P0_20  // (61)
74
 #define Y_ENABLE_PIN       P0_19  // (56)
74
 #define Y_ENABLE_PIN       P0_19  // (56)
75
 
75
 
76
-#define Z_STEP_PIN         P2_3   // (46)
76
+#define Z_STEP_PIN         P2_03  // (46)
77
 #define Z_DIR_PIN          P0_22  // (48)
77
 #define Z_DIR_PIN          P0_22  // (48)
78
 #define Z_ENABLE_PIN       P0_21  // (62)
78
 #define Z_ENABLE_PIN       P0_21  // (62)
79
 
79
 
80
-#define E0_STEP_PIN        P2_0   // (26)
81
-#define E0_DIR_PIN         P0_5   // (28)
82
-#define E0_ENABLE_PIN      P0_4   // (24)
80
+#define E0_STEP_PIN        P2_00  // (26)
81
+#define E0_DIR_PIN         P0_05  // (28)
82
+#define E0_ENABLE_PIN      P0_04  // (24)
83
 
83
 
84
-#define E1_STEP_PIN        P2_8   // (36)
84
+#define E1_STEP_PIN        P2_08  // (36)
85
 #define E1_DIR_PIN         P2_13  // (34)
85
 #define E1_DIR_PIN         P2_13  // (34)
86
 #define E1_ENABLE_PIN      P4_29  // (30)
86
 #define E1_ENABLE_PIN      P4_29  // (30)
87
 
87
 
88
-#define E2_STEP_PIN        P2_8   // (36)
88
+#define E2_STEP_PIN        P2_08  // (36)
89
 #define E2_DIR_PIN         P2_13  // (34)
89
 #define E2_DIR_PIN         P2_13  // (34)
90
 #define E2_ENABLE_PIN      P4_29  // (30)
90
 #define E2_ENABLE_PIN      P4_29  // (30)
91
 
91
 
127
   #define MOSFET_D_PIN   -1
127
   #define MOSFET_D_PIN   -1
128
 #endif
128
 #endif
129
 #ifndef RAMPS_D8_PIN
129
 #ifndef RAMPS_D8_PIN
130
-  #define RAMPS_D8_PIN   P2_7  // (8)
130
+  #define RAMPS_D8_PIN   P2_07 // (8)
131
 #endif
131
 #endif
132
 #ifndef RAMPS_D9_PIN
132
 #ifndef RAMPS_D9_PIN
133
-  #define RAMPS_D9_PIN   P2_4  // (9)
133
+  #define RAMPS_D9_PIN   P2_04 // (9)
134
 #endif
134
 #endif
135
 #ifndef RAMPS_D10_PIN
135
 #ifndef RAMPS_D10_PIN
136
-  #define RAMPS_D10_PIN  P2_5  // (10)
136
+  #define RAMPS_D10_PIN  P2_05 // (10)
137
 #endif
137
 #endif
138
 
138
 
139
 #define HEATER_0_PIN     RAMPS_D10_PIN
139
 #define HEATER_0_PIN     RAMPS_D10_PIN
198
 //
198
 //
199
 // Průša i3 MK2 Multiplexer Support
199
 // Průša i3 MK2 Multiplexer Support
200
 //
200
 //
201
-#define E_MUX0_PIN         P0_3    // ( 0) Z_CS_PIN
202
-#define E_MUX1_PIN         P0_2    // ( 1) E0_CS_PIN
201
+#define E_MUX0_PIN         P0_03   // ( 0) Z_CS_PIN
202
+#define E_MUX1_PIN         P0_02   // ( 1) E0_CS_PIN
203
 #define E_MUX2_PIN         P0_26   // (63) E1_CS_PIN
203
 #define E_MUX2_PIN         P0_26   // (63) E1_CS_PIN
204
 
204
 
205
 /**
205
 /**
237
   #define LCD_PINS_ENABLE     P0_18  // (51) (MOSI) J3-10 & AUX-3
237
   #define LCD_PINS_ENABLE     P0_18  // (51) (MOSI) J3-10 & AUX-3
238
   #define LCD_PINS_D4         P0_15  // (52) (SCK)  J3-9 & AUX-3
238
   #define LCD_PINS_D4         P0_15  // (52) (SCK)  J3-9 & AUX-3
239
 
239
 
240
-  #define DOGLCD_A0           P2_6   // (59) J3-8 & AUX-2
240
+  #define DOGLCD_A0           P2_06  // (59) J3-8 & AUX-2
241
   #define DOGLCD_CS           P0_26  // (63) J5-3 & AUX-2
241
   #define DOGLCD_CS           P0_26  // (63) J5-3 & AUX-2
242
 
242
 
243
   #ifdef ULTIPANEL
243
   #ifdef ULTIPANEL
278
     #undef  LCD_PINS_ENABLE     //P0_18  // (51) (MOSI) J3-10 & AUX-3
278
     #undef  LCD_PINS_ENABLE     //P0_18  // (51) (MOSI) J3-10 & AUX-3
279
     #undef  LCD_PINS_D4         //P0_15  // (52) (SCK)  J3-9 & AUX-3
279
     #undef  LCD_PINS_D4         //P0_15  // (52) (SCK)  J3-9 & AUX-3
280
 
280
 
281
-    #undef  LCD_PINS_D5         //P2_6   // (59) J3-8 & AUX-2
282
-    #define DOGLCD_A0           P2_6   // (59) J3-8 & AUX-2
281
+    #undef  LCD_PINS_D5         //P2_06  // (59) J3-8 & AUX-2
282
+    #define DOGLCD_A0           P2_06  // (59) J3-8 & AUX-2
283
     #undef  LCD_PINS_D6         //P0_26  // (63) J5-3 & AUX-2
283
     #undef  LCD_PINS_D6         //P0_26  // (63) J5-3 & AUX-2
284
     #undef  LCD_PINS_D7         //P1_21  // ( 6) (SERVO1) J5-1 & SERVO connector
284
     #undef  LCD_PINS_D7         //P1_21  // ( 6) (SERVO1) J5-1 & SERVO connector
285
     #define DOGLCD_SCK          SCK_PIN
285
     #define DOGLCD_SCK          SCK_PIN
315
 #endif
315
 #endif
316
 #define ENET_MOC      P1_16  // (70)  J12-3
316
 #define ENET_MOC      P1_16  // (70)  J12-3
317
 #define REF_CLK       P1_15  // (72)  J12-5
317
 #define REF_CLK       P1_15  // (72)  J12-5
318
-#define ENET_RXD0     P1_9   // (74)  J12-7
319
-#define ENET_CRS      P1_8   // (76)  J12-9
320
-#define ENET_TX_EN    P1_4   // (77)  J12-10
321
-#define ENET_TXD0     P1_0   // (78)  J12-11
322
-#define ENET_TXD1     P1_1   // (79)  J12-12
318
+#define ENET_RXD0     P1_09  // (74)  J12-7
319
+#define ENET_CRS      P1_08  // (76)  J12-9
320
+#define ENET_TX_EN    P1_04  // (77)  J12-10
321
+#define ENET_TXD0     P1_00  // (78)  J12-11
322
+#define ENET_TXD1     P1_01  // (79)  J12-12
323
 
323
 
324
 /**
324
 /**
325
  *  Fast PWMS
325
  *  Fast PWMS
339
  *     P1_20 (11)   SERVO0_PIN
339
  *     P1_20 (11)   SERVO0_PIN
340
  *     P1_21 ( 6)   SERVO1_PIN       J5-1
340
  *     P1_21 ( 6)   SERVO1_PIN       J5-1
341
  *     P0_18 ( 4)   SERVO3_PIN       5V output
341
  *     P0_18 ( 4)   SERVO3_PIN       5V output
342
- *    *P2_4  ( 9)   RAMPS_D9_PIN
343
- *    *P2_5  (10)   RAMPS_D10_PIN
342
+ *    *P2_04 ( 9)   RAMPS_D9_PIN
343
+ *    *P2_05 (10)   RAMPS_D10_PIN
344
  *
344
  *
345
  *    * - If used as a heater driver then a Fast PWM is NOT assigned.  If used as
345
  *    * - If used as a heater driver then a Fast PWM is NOT assigned.  If used as
346
  *        a fan driver then enabling FAST_PWM_FAN assigns a Fast PWM to it.
346
  *        a fan driver then enabling FAST_PWM_FAN assigns a Fast PWM to it.
375
  *  64
375
  *  64
376
  *  65
376
  *  65
377
  *  66
377
  *  66
378
- */
378
+ */

Loading…
Cancel
Save