浏览代码

Merge pull request #8521 from teemuatlut/Ultratronics

[2.0.x] Add support for Ultratronics Pro v1.0 and fix compiling for Due HAL
Scott Lahteine 7 年前
父节点
当前提交
001ce7a2fd
没有帐户链接到提交者的电子邮件

+ 146
- 143
Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.cpp 查看文件

34
 #include "../../Marlin.h"
34
 #include "../../Marlin.h"
35
 
35
 
36
 // Based on selected port, use the proper configuration
36
 // Based on selected port, use the proper configuration
37
-#if SERIAL_PORT == 0
37
+#if SERIAL_PORT == -1
38
   #define HWUART UART
38
   #define HWUART UART
39
   #define HWUART_IRQ UART_IRQn
39
   #define HWUART_IRQ UART_IRQn
40
   #define HWUART_IRQ_ID ID_UART
40
   #define HWUART_IRQ_ID ID_UART
41
-#elif SERIAL_PORT == 1
41
+#elif SERIAL_PORT == 0
42
   #define HWUART USART0
42
   #define HWUART USART0
43
   #define HWUART_IRQ USART0_IRQn
43
   #define HWUART_IRQ USART0_IRQn
44
   #define HWUART_IRQ_ID ID_USART0
44
   #define HWUART_IRQ_ID ID_USART0
45
-#elif SERIAL_PORT == 2
45
+#elif SERIAL_PORT == 1
46
   #define HWUART USART1
46
   #define HWUART USART1
47
   #define HWUART_IRQ USART1_IRQn
47
   #define HWUART_IRQ USART1_IRQn
48
   #define HWUART_IRQ_ID ID_USART1
48
   #define HWUART_IRQ_ID ID_USART1
49
+#elif SERIAL_PORT == 2
50
+  #define HWUART USART2
51
+  #define HWUART_IRQ USART2_IRQn
52
+  #define HWUART_IRQ_ID ID_USART2
49
 #elif SERIAL_PORT == 3
53
 #elif SERIAL_PORT == 3
50
   #define HWUART USART3
54
   #define HWUART USART3
51
   #define HWUART_IRQ USART3_IRQn
55
   #define HWUART_IRQ USART3_IRQn
101
 
105
 
102
 #if ENABLED(EMERGENCY_PARSER)
106
 #if ENABLED(EMERGENCY_PARSER)
103
 
107
 
104
-  #include "../../module/stepper.h"
105
-
106
   // Currently looking for: M108, M112, M410
108
   // Currently looking for: M108, M112, M410
107
   // If you alter the parser please don't forget to update the capabilities in Conditionals_post.h
109
   // If you alter the parser please don't forget to update the capabilities in Conditionals_post.h
108
 
110
 
111
     static e_parser_state state = state_RESET;
113
     static e_parser_state state = state_RESET;
112
 
114
 
113
     switch (state) {
115
     switch (state) {
114
-    case state_RESET:
115
-      switch (c) {
116
-        case ' ': break;
117
-        case 'N': state = state_N;      break;
118
-        case 'M': state = state_M;      break;
119
-        default: state = state_IGNORE;
120
-      }
121
-      break;
122
-
123
-    case state_N:
124
-      switch (c) {
125
-        case '0': case '1': case '2':
126
-        case '3': case '4': case '5':
127
-        case '6': case '7': case '8':
128
-        case '9': case '-': case ' ':   break;
129
-        case 'M': state = state_M;      break;
130
-        default:  state = state_IGNORE;
131
-      }
132
-      break;
133
-
134
-    case state_M:
135
-      switch (c) {
136
-        case ' ': break;
137
-        case '1': state = state_M1;     break;
138
-        case '4': state = state_M4;     break;
139
-        default: state = state_IGNORE;
140
-      }
141
-      break;
116
+      case state_RESET:
117
+        switch (c) {
118
+          case ' ': break;
119
+          case 'N': state = state_N;      break;
120
+          case 'M': state = state_M;      break;
121
+          default: state = state_IGNORE;
122
+        }
123
+        break;
124
+
125
+      case state_N:
126
+        switch (c) {
127
+          case '0': case '1': case '2':
128
+          case '3': case '4': case '5':
129
+          case '6': case '7': case '8':
130
+          case '9': case '-': case ' ':   break;
131
+          case 'M': state = state_M;      break;
132
+          default:  state = state_IGNORE;
133
+        }
134
+        break;
135
+
136
+      case state_M:
137
+        switch (c) {
138
+          case ' ': break;
139
+          case '1': state = state_M1;     break;
140
+          case '4': state = state_M4;     break;
141
+          default: state = state_IGNORE;
142
+        }
143
+        break;
142
 
144
 
143
-    case state_M1:
144
-      switch (c) {
145
-        case '0': state = state_M10;    break;
146
-        case '1': state = state_M11;    break;
147
-        default: state = state_IGNORE;
148
-      }
149
-      break;
150
-
151
-    case state_M10:
152
-      state = (c == '8') ? state_M108 : state_IGNORE;
153
-      break;
154
-
155
-    case state_M11:
156
-      state = (c == '2') ? state_M112 : state_IGNORE;
157
-      break;
158
-
159
-    case state_M4:
160
-      state = (c == '1') ? state_M41 : state_IGNORE;
161
-      break;
162
-
163
-    case state_M41:
164
-      state = (c == '0') ? state_M410 : state_IGNORE;
165
-      break;
166
-
167
-    case state_IGNORE:
168
-      if (c == '\n') state = state_RESET;
169
-      break;
170
-
171
-    default:
172
-      if (c == '\n') {
173
-        switch (state) {
174
-          case state_M108:
175
-          wait_for_user = wait_for_heatup = false;
176
-          break;
177
-          case state_M112:
178
-          kill(PSTR(MSG_KILLED));
179
-          break;
180
-          case state_M410:
181
-          quickstop_stepper();
182
-          break;
183
-          default:
184
-          break;
145
+      case state_M1:
146
+        switch (c) {
147
+          case '0': state = state_M10;    break;
148
+          case '1': state = state_M11;    break;
149
+          default: state = state_IGNORE;
150
+        }
151
+        break;
152
+
153
+      case state_M10:
154
+        state = (c == '8') ? state_M108 : state_IGNORE;
155
+        break;
156
+
157
+      case state_M11:
158
+        state = (c == '2') ? state_M112 : state_IGNORE;
159
+        break;
160
+
161
+      case state_M4:
162
+        state = (c == '1') ? state_M41 : state_IGNORE;
163
+        break;
164
+
165
+      case state_M41:
166
+        state = (c == '0') ? state_M410 : state_IGNORE;
167
+        break;
168
+
169
+      case state_IGNORE:
170
+        if (c == '\n') state = state_RESET;
171
+        break;
172
+
173
+      default:
174
+        if (c == '\n') {
175
+          switch (state) {
176
+            case state_M108:
177
+              wait_for_user = wait_for_heatup = false;
178
+              break;
179
+            case state_M112:
180
+              kill(PSTR(MSG_KILLED));
181
+              break;
182
+            case state_M410:
183
+              quickstop_stepper();
184
+              break;
185
+            default:
186
+              break;
187
+          }
188
+          state = state_RESET;
185
         }
189
         }
186
-        state = state_RESET;
187
-      }
188
     }
190
     }
189
   }
191
   }
190
 
192
 
209
     else if (!++rx_dropped_bytes) ++rx_dropped_bytes;
211
     else if (!++rx_dropped_bytes) ++rx_dropped_bytes;
210
   #endif
212
   #endif
211
 
213
 
212
-#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
213
-  // calculate count of bytes stored into the RX buffer
214
-  ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
215
-  // Keep track of the maximum count of enqueued bytes
216
-  NOLESS(rx_max_enqueued, rx_count);
217
-#endif
214
+  #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
215
+    // calculate count of bytes stored into the RX buffer
216
+    ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
217
+    // Keep track of the maximum count of enqueued bytes
218
+    NOLESS(rx_max_enqueued, rx_count);
219
+  #endif
218
 
220
 
219
-#if ENABLED(SERIAL_XON_XOFF)
221
+  #if ENABLED(SERIAL_XON_XOFF)
220
 
222
 
221
-  // for high speed transfers, we can use XON/XOFF protocol to do
222
-  // software handshake and avoid overruns.
223
-  if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XON_CHAR) {
223
+    // for high speed transfers, we can use XON/XOFF protocol to do
224
+    // software handshake and avoid overruns.
225
+    if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XON_CHAR) {
224
 
226
 
225
-    // calculate count of bytes stored into the RX buffer
226
-    ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
227
+      // calculate count of bytes stored into the RX buffer
228
+      ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
227
 
229
 
228
-    // if we are above 12.5% of RX buffer capacity, send XOFF before
229
-    // we run out of RX buffer space .. We need 325 bytes @ 250kbits/s to
230
-    // let the host react and stop sending bytes. This translates to 13mS
231
-    // propagation time.
232
-    if (rx_count >= (RX_BUFFER_SIZE) / 8) {
233
-      // If TX interrupts are disabled and data register is empty,
234
-      // just write the byte to the data register and be done. This
235
-      // shortcut helps significantly improve the effective datarate
236
-      // at high (>500kbit/s) bitrates, where interrupt overhead
237
-      // becomes a slowdown.
238
-      if (!(HWUART->UART_IMR & UART_IMR_TXRDY) && (HWUART->UART_SR & UART_SR_TXRDY)) {
239
-        // Send an XOFF character
240
-        HWUART->UART_THR = XOFF_CHAR;
241
-
242
-        // And remember it was sent
243
-        xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
244
-      }
245
-      else {
246
-        // TX interrupts disabled, but buffer still not empty ... or
247
-        // TX interrupts enabled. Reenable TX ints and schedule XOFF
248
-        // character to be sent
249
-        #if TX_BUFFER_SIZE > 0
250
-          HWUART->UART_IER = UART_IER_TXRDY;
251
-          xon_xoff_state = XOFF_CHAR;
252
-        #else
253
-          // We are not using TX interrupts, we will have to send this manually
254
-          while (!(HWUART->UART_SR & UART_SR_TXRDY)) { sw_barrier(); };
230
+      // if we are above 12.5% of RX buffer capacity, send XOFF before
231
+      // we run out of RX buffer space .. We need 325 bytes @ 250kbits/s to
232
+      // let the host react and stop sending bytes. This translates to 13mS
233
+      // propagation time.
234
+      if (rx_count >= (RX_BUFFER_SIZE) / 8) {
235
+        // If TX interrupts are disabled and data register is empty,
236
+        // just write the byte to the data register and be done. This
237
+        // shortcut helps significantly improve the effective datarate
238
+        // at high (>500kbit/s) bitrates, where interrupt overhead
239
+        // becomes a slowdown.
240
+        if (!(HWUART->UART_IMR & UART_IMR_TXRDY) && (HWUART->UART_SR & UART_SR_TXRDY)) {
241
+          // Send an XOFF character
255
           HWUART->UART_THR = XOFF_CHAR;
242
           HWUART->UART_THR = XOFF_CHAR;
256
-          // And remember we already sent it
243
+
244
+          // And remember it was sent
257
           xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
245
           xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
258
-        #endif
246
+        }
247
+        else {
248
+          // TX interrupts disabled, but buffer still not empty ... or
249
+          // TX interrupts enabled. Reenable TX ints and schedule XOFF
250
+          // character to be sent
251
+          #if TX_BUFFER_SIZE > 0
252
+            HWUART->UART_IER = UART_IER_TXRDY;
253
+            xon_xoff_state = XOFF_CHAR;
254
+          #else
255
+            // We are not using TX interrupts, we will have to send this manually
256
+            while (!(HWUART->UART_SR & UART_SR_TXRDY)) { sw_barrier(); };
257
+            HWUART->UART_THR = XOFF_CHAR;
258
+            // And remember we already sent it
259
+            xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
260
+          #endif
261
+        }
259
       }
262
       }
260
     }
263
     }
261
-  }
262
-#endif // SERIAL_XON_XOFF
264
+  #endif // SERIAL_XON_XOFF
263
 
265
 
264
-#if ENABLED(EMERGENCY_PARSER)
265
-  emergency_parser(c);
266
-#endif
266
+  #if ENABLED(EMERGENCY_PARSER)
267
+    emergency_parser(c);
268
+  #endif
267
 }
269
 }
268
 
270
 
269
 #if TX_BUFFER_SIZE > 0
271
 #if TX_BUFFER_SIZE > 0
292
       HWUART->UART_IDR = UART_IDR_TXRDY;
294
       HWUART->UART_IDR = UART_IDR_TXRDY;
293
   }
295
   }
294
 
296
 
295
-#endif // TX_BUFFER_SIZE
297
+#endif // TX_BUFFER_SIZE > 0
296
 
298
 
297
 static void UART_ISR(void) {
299
 static void UART_ISR(void) {
298
   uint32_t status = HWUART->UART_SR;
300
   uint32_t status = HWUART->UART_SR;
389
     v = rx_buffer.buffer[t];
391
     v = rx_buffer.buffer[t];
390
     rx_buffer.tail = (ring_buffer_pos_t)(t + 1) & (RX_BUFFER_SIZE - 1);
392
     rx_buffer.tail = (ring_buffer_pos_t)(t + 1) & (RX_BUFFER_SIZE - 1);
391
 
393
 
392
-  #if ENABLED(SERIAL_XON_XOFF)
393
-    if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
394
-      // Get count of bytes in the RX buffer
395
-      ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
396
-      // When below 10% of RX buffer capacity, send XON before
397
-      // running out of RX buffer bytes
398
-      if (rx_count < (RX_BUFFER_SIZE) / 10) {
399
-        xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
400
-        CRITICAL_SECTION_END;       // End critical section before returning!
401
-        writeNoHandshake(XON_CHAR);
402
-        return v;
394
+    #if ENABLED(SERIAL_XON_XOFF)
395
+      if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
396
+        // Get count of bytes in the RX buffer
397
+        ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
398
+        // When below 10% of RX buffer capacity, send XON before
399
+        // running out of RX buffer bytes
400
+        if (rx_count < (RX_BUFFER_SIZE) / 10) {
401
+          xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
402
+          CRITICAL_SECTION_END;       // End critical section before returning!
403
+          writeNoHandshake(XON_CHAR);
404
+          return v;
405
+        }
403
       }
406
       }
404
-    }
405
-  #endif
407
+    #endif
406
   }
408
   }
407
   CRITICAL_SECTION_END;
409
   CRITICAL_SECTION_END;
408
   return v;
410
   return v;
423
   rx_buffer.head = rx_buffer.tail;
425
   rx_buffer.head = rx_buffer.tail;
424
   CRITICAL_SECTION_END;
426
   CRITICAL_SECTION_END;
425
 
427
 
426
-#if ENABLED(SERIAL_XON_XOFF)
427
-  if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
428
-    xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
429
-    writeNoHandshake(XON_CHAR);
430
-  }
431
-#endif
428
+  #if ENABLED(SERIAL_XON_XOFF)
429
+    if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
430
+      xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
431
+      writeNoHandshake(XON_CHAR);
432
+    }
433
+  #endif
432
 }
434
 }
433
 
435
 
434
 #if TX_BUFFER_SIZE > 0
436
 #if TX_BUFFER_SIZE > 0
437
+
435
   uint8_t MarlinSerial::availableForWrite(void) {
438
   uint8_t MarlinSerial::availableForWrite(void) {
436
     CRITICAL_SECTION_START;
439
     CRITICAL_SECTION_START;
437
     const uint8_t h = tx_buffer.head, t = tx_buffer.tail;
440
     const uint8_t h = tx_buffer.head, t = tx_buffer.tail;

+ 1
- 0
Marlin/src/core/boards.h 查看文件

175
 #define BOARD_RAMPS4DUE_EEF    1546   // RAMPS4DUE (Power outputs: Hotend0, Hotend1, Fan)
175
 #define BOARD_RAMPS4DUE_EEF    1546   // RAMPS4DUE (Power outputs: Hotend0, Hotend1, Fan)
176
 #define BOARD_RAMPS4DUE_SF     1548   // RAMPS4DUE (Power outputs: Spindle, Controller Fan)
176
 #define BOARD_RAMPS4DUE_SF     1548   // RAMPS4DUE (Power outputs: Spindle, Controller Fan)
177
 #define BOARD_RURAMPS4D        1550   // RuRAMPS4Duo v1 (Power outputs: Hotend0, Hotend2, Hotend2, Fan0, Fan1, Bed)
177
 #define BOARD_RURAMPS4D        1550   // RuRAMPS4Duo v1 (Power outputs: Hotend0, Hotend2, Hotend2, Fan0, Fan1, Bed)
178
+#define BOARD_ULTRATRONICS_PRO 1560   // ReprapWorld Ultratronics Pro V1.0
178
 #define BOARD_ARCHIM2          1590   // UltiMachine Archim2 (with TMC2130 drivers)
179
 #define BOARD_ARCHIM2          1590   // UltiMachine Archim2 (with TMC2130 drivers)
179
 #define BOARD_ALLIGATOR        1602   // Alligator Board R2
180
 #define BOARD_ALLIGATOR        1602   // Alligator Board R2
180
 
181
 

+ 1
- 1
Marlin/src/gcode/gcode.h 查看文件

64
  * G32  - Undock sled (Z_PROBE_SLED only)
64
  * G32  - Undock sled (Z_PROBE_SLED only)
65
  * G33  - Delta Auto-Calibration (Requires DELTA_AUTO_CALIBRATION)
65
  * G33  - Delta Auto-Calibration (Requires DELTA_AUTO_CALIBRATION)
66
  * G38  - Probe in any direction using the Z_MIN_PROBE (Requires G38_PROBE_TARGET)
66
  * G38  - Probe in any direction using the Z_MIN_PROBE (Requires G38_PROBE_TARGET)
67
- * G42  - Coordinated move to a mesh point (Requires HAS_MESH)
67
+ * G42  - Coordinated move to a mesh point (Requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BLINEAR, or AUTO_BED_LEVELING_UBL)
68
  * G90  - Use Absolute Coordinates
68
  * G90  - Use Absolute Coordinates
69
  * G91  - Use Relative Coordinates
69
  * G91  - Use Relative Coordinates
70
  * G92  - Set current position to coordinates given
70
  * G92  - Set current position to coordinates given

+ 4
- 1
Marlin/src/lcd/ultralcd_impl_DOGM.h 查看文件

164
 
164
 
165
 // LCD selection
165
 // LCD selection
166
 #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
166
 #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
167
+  #ifdef CPU_32_BIT // SPI too fast with 32bit?
168
+    U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Original u8glib device. 2 stripes, SW SPI
169
+  #else
167
     U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_RS); // 2 stripes, HW SPI
170
     U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_RS); // 2 stripes, HW SPI
168
-    //U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Original u8glib device. 2 stripes, SW SPI
171
+  #endif
169
 #elif ENABLED(U8GLIB_ST7920)
172
 #elif ENABLED(U8GLIB_ST7920)
170
   // RepRap Discount Full Graphics Smart Controller
173
   // RepRap Discount Full Graphics Smart Controller
171
     //U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_RS); // 2 stripes, HW SPI
174
     //U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_RS); // 2 stripes, HW SPI

+ 2
- 0
Marlin/src/pins/pins.h 查看文件

304
   #include "pins_RAMPS4DUE.h"
304
   #include "pins_RAMPS4DUE.h"
305
 #elif MB(RAMPS4DUE_SF)
305
 #elif MB(RAMPS4DUE_SF)
306
   #include "pins_RAMPS4DUE.h"
306
   #include "pins_RAMPS4DUE.h"
307
+#elif MB(ULTRATRONICS_PRO)
308
+  #include "pins_ULTRATRONICS_PRO.h"
307
 #elif MB(ARCHIM2)
309
 #elif MB(ARCHIM2)
308
   #include "pins_ARCHIM2.h"
310
   #include "pins_ARCHIM2.h"
309
 #elif MB(ALLIGATOR)
311
 #elif MB(ALLIGATOR)

+ 7
- 7
Marlin/src/pins/pins_RAMBO.h 查看文件

55
 #define SERVO3_PIN          5 // PWM header pin 5
55
 #define SERVO3_PIN          5 // PWM header pin 5
56
 
56
 
57
 //
57
 //
58
-// Z Probe (when not Z_MIN_PIN)
59
-//
60
-#ifndef Z_MIN_PROBE_PIN
61
-  #define Z_MIN_PROBE_PIN  30
62
-#endif
63
-
64
-//
65
 // Limit Switches
58
 // Limit Switches
66
 //
59
 //
67
 #define X_MIN_PIN          12
60
 #define X_MIN_PIN          12
72
 #define Z_MAX_PIN          30
65
 #define Z_MAX_PIN          30
73
 
66
 
74
 //
67
 //
68
+// Z Probe (when not Z_MIN_PIN)
69
+//
70
+#ifndef Z_MIN_PROBE_PIN
71
+  #define Z_MIN_PROBE_PIN  30
72
+#endif
73
+
74
+//
75
 // Steppers
75
 // Steppers
76
 //
76
 //
77
 #define X_STEP_PIN         37
77
 #define X_STEP_PIN         37

+ 151
- 0
Marlin/src/pins/pins_ULTRATRONICS_PRO.h 查看文件

1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * ReprapWorld ULTRATRONICS v1.0
25
+ */
26
+
27
+#define KNOWN_BOARD
28
+#define BOARD_NAME "Ultratronics v1.0"
29
+
30
+#ifndef ARDUINO_ARCH_SAM
31
+  #error Oops!  Make sure you have 'Arduino Due' selected from the 'Tools -> Boards' menu.
32
+#endif
33
+
34
+//
35
+// Servos
36
+//
37
+#if NUM_SERVOS > 0
38
+  #define SERVO0_PIN     11
39
+  #if NUM_SERVOS > 1
40
+    #define SERVO1_PIN   12
41
+  #endif
42
+#endif
43
+
44
+//
45
+// Limit Switches
46
+//
47
+#define X_MIN_PIN        31
48
+#define X_MAX_PIN        30
49
+#define Y_MIN_PIN        12
50
+#define Y_MAX_PIN        11
51
+#define Z_MIN_PIN        29
52
+#define Z_MAX_PIN        28
53
+
54
+//
55
+// Steppers
56
+//
57
+#define X_STEP_PIN       35
58
+#define X_DIR_PIN        34
59
+#define X_ENABLE_PIN     37
60
+
61
+#define Y_STEP_PIN       22
62
+#define Y_DIR_PIN        23
63
+#define Y_ENABLE_PIN     33
64
+
65
+#define Z_STEP_PIN       25
66
+#define Z_DIR_PIN        26
67
+#define Z_ENABLE_PIN     24
68
+
69
+#define E0_STEP_PIN      47
70
+#define E0_DIR_PIN       46
71
+#define E0_ENABLE_PIN    48
72
+
73
+#define E1_STEP_PIN      44
74
+#define E1_DIR_PIN       36
75
+#define E1_ENABLE_PIN    45
76
+
77
+#define E2_STEP_PIN      42
78
+#define E2_DIR_PIN       41
79
+#define E2_ENABLE_PIN    43
80
+
81
+#define E3_STEP_PIN      39
82
+#define E3_DIR_PIN       38
83
+#define E3_ENABLE_PIN    40
84
+
85
+//
86
+// Temperature Sensors
87
+//
88
+#define TEMP_0_PIN        0  // Analog Input
89
+#define TEMP_1_PIN        2  // Analog Input
90
+#define TEMP_2_PIN        3  // Analog Input
91
+#define TEMP_3_PIN        4  // Analog Input
92
+#define TEMP_BED_PIN      1  // Analog Input
93
+
94
+//
95
+// Heaters / Fans
96
+//
97
+#define HEATER_0_PIN      3
98
+#define HEATER_1_PIN      8
99
+#define HEATER_2_PIN      7
100
+#define HEATER_3_PIN      9
101
+#define HEATER_BED_PIN    2
102
+
103
+#define FAN_PIN           6
104
+#define FAN2_PIN          5
105
+
106
+//
107
+// Misc. Functions
108
+//
109
+#define SDSS             59
110
+#define SD_DETECT_PIN    60
111
+#define LED_PIN          13
112
+#define PS_ON_PIN        32
113
+
114
+//
115
+// SPI Buses
116
+//
117
+
118
+#define DAC0_SYNC        53 // PB14
119
+#define SPI_CHAN_DAC      1
120
+
121
+#define SPI_CHAN_EEPROM1 -1
122
+#define SPI_EEPROM1_CS   -1
123
+#define SPI_EEPROM2_CS   -1
124
+#define SPI_FLASH_CS     -1
125
+
126
+// SPI for Max6675 or Max31855 Thermocouple
127
+#define MAX6675_SS       65
128
+#define MAX31855_SS0     65
129
+#define MAX31855_SS1     52
130
+#define MAX31855_SS2     50
131
+#define MAX31855_SS3     51
132
+
133
+#define ENC424_SS        61
134
+
135
+//
136
+// LCD / Controller
137
+//
138
+
139
+#define BEEPER_PIN       27
140
+
141
+#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
142
+
143
+  #define LCD_PINS_RS     A8    // CS chip select / SS chip slave select
144
+  #define LCD_PINS_ENABLE MOSI  // SID (MOSI)
145
+  #define LCD_PINS_D4     SCK   // SCK (CLK) clock
146
+
147
+  #define BTN_EN1         20
148
+  #define BTN_EN2         21
149
+  #define BTN_ENC         64
150
+
151
+#endif // REPRAPWORLD_GRAPHICAL_LCD

正在加载...
取消
保存