Browse Source

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

daid303 12 years ago
parent
commit
46ec4b648c
1 changed files with 16 additions and 16 deletions
  1. 16
    16
      Marlin/Marlin_main.cpp

+ 16
- 16
Marlin/Marlin_main.cpp View File

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

Loading…
Cancel
Save