瀏覽代碼

Tweaks for M43

Scott Lahteine 7 年之前
父節點
當前提交
5ef1e5ef60
共有 2 個檔案被更改,包括 15 行新增11 行删除
  1. 11
    11
      Marlin/Marlin_main.cpp
  2. 4
    0
      Marlin/fastio_AT90USB.h

+ 11
- 11
Marlin/Marlin_main.cpp 查看文件

@@ -6474,20 +6474,20 @@ inline void gcode_M42() {
6474 6474
       else {
6475 6475
         report_pin_state_extended(pin, I_flag, true, "Pulsing   ");
6476 6476
         #if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
6477
-          if (pin == 46) {
6478
-            SET_OUTPUT(46);
6477
+          if (pin == TEENSY_E2) {
6478
+            SET_OUTPUT(TEENSY_E2);
6479 6479
             for (int16_t j = 0; j < repeat; j++) {
6480
-              WRITE(46, 0); safe_delay(wait);
6481
-              WRITE(46, 1); safe_delay(wait);
6482
-              WRITE(46, 0); safe_delay(wait);
6480
+              WRITE(TEENSY_E2, LOW);  safe_delay(wait);
6481
+              WRITE(TEENSY_E2, HIGH); safe_delay(wait);
6482
+              WRITE(TEENSY_E2, LOW);  safe_delay(wait);
6483 6483
             }
6484 6484
           }
6485
-          else if (pin == 47) {
6486
-            SET_OUTPUT(47);
6485
+          else if (pin == TEENSY_E3) {
6486
+            SET_OUTPUT(TEENSY_E3);
6487 6487
             for (int16_t j = 0; j < repeat; j++) {
6488
-              WRITE(47, 0); safe_delay(wait);
6489
-              WRITE(47, 1); safe_delay(wait);
6490
-              WRITE(47, 0); safe_delay(wait);
6488
+              WRITE(TEENSY_E3, LOW);  safe_delay(wait);
6489
+              WRITE(TEENSY_E3, HIGH); safe_delay(wait);
6490
+              WRITE(TEENSY_E3, LOW);  safe_delay(wait);
6491 6491
             }
6492 6492
           }
6493 6493
           else
@@ -6671,7 +6671,7 @@ inline void gcode_M42() {
6671 6671
     if (parser.seen('E')) {
6672 6672
       endstop_monitor_flag = parser.value_bool();
6673 6673
       SERIAL_PROTOCOLPGM("endstop monitor ");
6674
-      SERIAL_PROTOCOL(endstop_monitor_flag ? "en" : "dis");
6674
+      serialprintPGM(endstop_monitor_flag ? PSTR("en") : PSTR("dis"));
6675 6675
       SERIAL_PROTOCOLLNPGM("abled");
6676 6676
       return;
6677 6677
     }

+ 4
- 0
Marlin/fastio_AT90USB.h 查看文件

@@ -382,6 +382,10 @@
382 382
 #define DIO47_WPORT PORTE
383 383
 #define DIO47_PWM   NULL
384 384
 #define DIO47_DDR   DDRE
385
+
386
+#define TEENSY_E2   46
387
+#define TEENSY_E3   47
388
+
385 389
 //-- end not supported by Teensyduino
386 390
 
387 391
 #undef PA0

Loading…
取消
儲存