Procházet zdrojové kódy

Added some missing Mxxx comments to M commands. Fixed the unsetting of the timer dividers for the fast PWM fan.

daid303 před 12 roky
rodič
revize
46ec4b648c
1 změnil soubory, kde provedl 16 přidání a 16 odebrání
  1. 16
    16
      Marlin/Marlin_main.cpp

+ 16
- 16
Marlin/Marlin_main.cpp Zobrazit soubor

@@ -1474,27 +1474,27 @@ void process_commands()
1474 1474
       st_synchronize();
1475 1475
     }
1476 1476
     break;
1477
-    case 500: // Store settings in EEPROM
1477
+    case 500: // M500 Store settings in EEPROM
1478 1478
     {
1479 1479
         Config_StoreSettings();
1480 1480
     }
1481 1481
     break;
1482
-    case 501: // Read settings from EEPROM
1482
+    case 501: // M501 Read settings from EEPROM
1483 1483
     {
1484 1484
         Config_RetrieveSettings();
1485 1485
     }
1486 1486
     break;
1487
-    case 502: // Revert to default settings
1487
+    case 502: // M502 Revert to default settings
1488 1488
     {
1489 1489
         Config_ResetDefault();
1490 1490
     }
1491 1491
     break;
1492
-    case 503: // print settings currently in memory
1492
+    case 503: // M503 print settings currently in memory
1493 1493
     {
1494 1494
         Config_PrintSettings();
1495 1495
     }
1496 1496
     break;
1497
-    case 907: // Set digital trimpot motor current using axis codes.
1497
+    case 907: // M907 Set digital trimpot motor current using axis codes.
1498 1498
     {
1499 1499
       #if DIGIPOTSS_PIN > -1
1500 1500
         for(int i=0;i<=NUM_AXIS;i++) if(code_seen(axis_codes[i])) digipot_current(i,code_value());
@@ -1502,7 +1502,7 @@ void process_commands()
1502 1502
         if(code_seen('S')) for(int i=0;i<=4;i++) digipot_current(i,code_value());
1503 1503
       #endif
1504 1504
     }
1505
-    case 908: // Control digital trimpot directly.
1505
+    case 908: // M908 Control digital trimpot directly.
1506 1506
     {
1507 1507
       #if DIGIPOTSS_PIN > -1
1508 1508
         uint8_t channel,current;
@@ -1512,7 +1512,7 @@ void process_commands()
1512 1512
       #endif
1513 1513
     }
1514 1514
     break;
1515
-    case 350: // Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers.
1515
+    case 350: // M350 Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers.
1516 1516
     {
1517 1517
       #if X_MS1_PIN > -1
1518 1518
         if(code_seen('S')) for(int i=0;i<=4;i++) microstep_mode(i,code_value()); 
@@ -1522,7 +1522,7 @@ void process_commands()
1522 1522
       #endif
1523 1523
     }
1524 1524
     break;
1525
-    case 351: // Toggle MS1 MS2 pins directly, S# determines MS1 or MS2, X# sets the pin high/low.
1525
+    case 351: // M351 Toggle MS1 MS2 pins directly, S# determines MS1 or MS2, X# sets the pin high/low.
1526 1526
     {
1527 1527
       #if X_MS1_PIN > -1
1528 1528
       if(code_seen('S')) switch((int)code_value())
@@ -1540,7 +1540,7 @@ void process_commands()
1540 1540
       #endif
1541 1541
     }
1542 1542
     break;
1543
-    case 999: // Restart after being stopped
1543
+    case 999: // M999: Restart after being stopped
1544 1544
       Stopped = false;
1545 1545
       gcode_LastN = Stopped_gcode_LastN;
1546 1546
       FlushSerialRequestResend();
@@ -1845,7 +1845,7 @@ void setPwmFrequency(uint8_t pin, int val)
1845 1845
     #if defined(TCCR0A)
1846 1846
     case TIMER0A:
1847 1847
     case TIMER0B:
1848
-//         TCCR0B &= ~(CS00 | CS01 | CS02);
1848
+//         TCCR0B &= ~(_BV(CS00) | _BV(CS01) | _BV(CS02));
1849 1849
 //         TCCR0B |= val;
1850 1850
          break;
1851 1851
     #endif
@@ -1853,7 +1853,7 @@ void setPwmFrequency(uint8_t pin, int val)
1853 1853
     #if defined(TCCR1A)
1854 1854
     case TIMER1A:
1855 1855
     case TIMER1B:
1856
-//         TCCR1B &= ~(CS10 | CS11 | CS12);
1856
+//         TCCR1B &= ~(_BV(CS10) | _BV(CS11) | _BV(CS12));
1857 1857
 //         TCCR1B |= val;
1858 1858
          break;
1859 1859
     #endif
@@ -1861,7 +1861,7 @@ void setPwmFrequency(uint8_t pin, int val)
1861 1861
     #if defined(TCCR2)
1862 1862
     case TIMER2:
1863 1863
     case TIMER2:
1864
-         TCCR2 &= ~(CS10 | CS11 | CS12);
1864
+         TCCR2 &= ~(_BV(CS10) | _BV(CS11) | _BV(CS12));
1865 1865
          TCCR2 |= val;
1866 1866
          break;
1867 1867
     #endif
@@ -1869,7 +1869,7 @@ void setPwmFrequency(uint8_t pin, int val)
1869 1869
     #if defined(TCCR2A)
1870 1870
     case TIMER2A:
1871 1871
     case TIMER2B:
1872
-         TCCR2B &= ~(CS20 | CS21 | CS22);
1872
+         TCCR2B &= ~(_BV(CS20) | _BV(CS21) | _BV(CS22));
1873 1873
          TCCR2B |= val;
1874 1874
          break;
1875 1875
     #endif
@@ -1878,7 +1878,7 @@ void setPwmFrequency(uint8_t pin, int val)
1878 1878
     case TIMER3A:
1879 1879
     case TIMER3B:
1880 1880
     case TIMER3C:
1881
-         TCCR3B &= ~(CS30 | CS31 | CS32);
1881
+         TCCR3B &= ~(_BV(CS30) | _BV(CS31) | _BV(CS32));
1882 1882
          TCCR3B |= val;
1883 1883
          break;
1884 1884
     #endif
@@ -1887,7 +1887,7 @@ void setPwmFrequency(uint8_t pin, int val)
1887 1887
     case TIMER4A:
1888 1888
     case TIMER4B:
1889 1889
     case TIMER4C:
1890
-         TCCR4B &= ~(CS40 | CS41 | CS42);
1890
+         TCCR4B &= ~(_BV(CS40) | _BV(CS41) | _BV(CS42));
1891 1891
          TCCR4B |= val;
1892 1892
          break;
1893 1893
    #endif
@@ -1896,7 +1896,7 @@ void setPwmFrequency(uint8_t pin, int val)
1896 1896
     case TIMER5A:
1897 1897
     case TIMER5B:
1898 1898
     case TIMER5C:
1899
-         TCCR5B &= ~(CS50 | CS51 | CS52);
1899
+         TCCR5B &= ~(_BV(CS50) | _BV(CS51) | _BV(CS52));
1900 1900
          TCCR5B |= val;
1901 1901
          break;
1902 1902
    #endif

Loading…
Zrušit
Uložit