My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

gcode.h 37KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 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 <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. /**
  24. * gcode.h - Temporary container for all gcode handlers
  25. */
  26. /**
  27. * -----------------
  28. * G-Codes in Marlin
  29. * -----------------
  30. *
  31. * Helpful G-code references:
  32. * - https://marlinfw.org/meta/gcode
  33. * - https://reprap.org/wiki/G-code
  34. * - https://linuxcnc.org/docs/html/gcode.html
  35. *
  36. * Help to document Marlin's G-codes online:
  37. * - https://github.com/MarlinFirmware/MarlinDocumentation
  38. *
  39. * -----------------
  40. *
  41. * "G" Codes
  42. *
  43. * G0 -> G1
  44. * G1 - Coordinated Movement X Y Z E
  45. * G2 - CW ARC
  46. * G3 - CCW ARC
  47. * G4 - Dwell S<seconds> or P<milliseconds>
  48. * G5 - Cubic B-spline with XYZE destination and IJPQ offsets
  49. * G10 - Retract filament according to settings of M207 (Requires FWRETRACT)
  50. * G11 - Retract recover filament according to settings of M208 (Requires FWRETRACT)
  51. * G12 - Clean tool (Requires NOZZLE_CLEAN_FEATURE)
  52. * G17 - Select Plane XY (Requires CNC_WORKSPACE_PLANES)
  53. * G18 - Select Plane ZX (Requires CNC_WORKSPACE_PLANES)
  54. * G19 - Select Plane YZ (Requires CNC_WORKSPACE_PLANES)
  55. * G20 - Set input units to inches (Requires INCH_MODE_SUPPORT)
  56. * G21 - Set input units to millimeters (Requires INCH_MODE_SUPPORT)
  57. * G26 - Mesh Validation Pattern (Requires G26_MESH_VALIDATION)
  58. * G27 - Park Nozzle (Requires NOZZLE_PARK_FEATURE)
  59. * G28 - Home one or more axes
  60. * G29 - Start or continue the bed leveling probe procedure (Requires bed leveling)
  61. * G30 - Single Z probe, probes bed at X Y location (defaults to current XY location)
  62. * G31 - Dock sled (Z_PROBE_SLED only)
  63. * G32 - Undock sled (Z_PROBE_SLED only)
  64. * G33 - Delta Auto-Calibration (Requires DELTA_AUTO_CALIBRATION)
  65. * G34 - Z Stepper automatic alignment using probe: I<iterations> T<accuracy> A<amplification> (Requires Z_STEPPER_AUTO_ALIGN)
  66. * G35 - Read bed corners to help adjust bed screws: T<screw_thread> (Requires ASSISTED_TRAMMING)
  67. * G38 - Probe in any direction using the Z_MIN_PROBE (Requires G38_PROBE_TARGET)
  68. * G42 - Coordinated move to a mesh point (Requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BLINEAR, or AUTO_BED_LEVELING_UBL)
  69. * G60 - Save current position. (Requires SAVED_POSITIONS)
  70. * G61 - Apply/restore saved coordinates. (Requires SAVED_POSITIONS)
  71. * G76 - Calibrate first layer temperature offsets. (Requires PROBE_TEMP_COMPENSATION)
  72. * G80 - Cancel current motion mode (Requires GCODE_MOTION_MODES)
  73. * G90 - Use Absolute Coordinates
  74. * G91 - Use Relative Coordinates
  75. * G92 - Set current position to coordinates given
  76. *
  77. * "M" Codes
  78. *
  79. * M0 - Unconditional stop - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled)
  80. * M1 -> M0
  81. * M3 - Turn ON Laser | Spindle (clockwise), set Power | Speed. (Requires SPINDLE_FEATURE or LASER_FEATURE)
  82. * M4 - Turn ON Laser | Spindle (counter-clockwise), set Power | Speed. (Requires SPINDLE_FEATURE or LASER_FEATURE)
  83. * M5 - Turn OFF Laser | Spindle. (Requires SPINDLE_FEATURE or LASER_FEATURE)
  84. * M7 - Turn mist coolant ON. (Requires COOLANT_CONTROL)
  85. * M8 - Turn flood coolant ON. (Requires COOLANT_CONTROL)
  86. * M9 - Turn coolant OFF. (Requires COOLANT_CONTROL)
  87. * M10 - Turn Vacuum or Blower motor ON (Requires AIR_EVACUATION)
  88. * M11 - Turn Vacuum or Blower motor OFF (Requires AIR_EVACUATION)
  89. * M12 - Set up closed loop control system. (Requires EXTERNAL_CLOSED_LOOP_CONTROLLER)
  90. * M16 - Expected printer check. (Requires EXPECTED_PRINTER_CHECK)
  91. * M17 - Enable/Power all stepper motors
  92. * M18 - Disable all stepper motors; same as M84
  93. * M20 - List SD card. (Requires SDSUPPORT)
  94. * M21 - Init SD card. (Requires SDSUPPORT)
  95. * M22 - Release SD card. (Requires SDSUPPORT)
  96. * M23 - Select SD file: "M23 /path/file.gco". (Requires SDSUPPORT)
  97. * M24 - Start/resume SD print. (Requires SDSUPPORT)
  98. * M25 - Pause SD print. (Requires SDSUPPORT)
  99. * M26 - Set SD position in bytes: "M26 S12345". (Requires SDSUPPORT)
  100. * M27 - Report SD print status. (Requires SDSUPPORT)
  101. * OR, with 'S<seconds>' set the SD status auto-report interval. (Requires AUTO_REPORT_SD_STATUS)
  102. * OR, with 'C' get the current filename.
  103. * M28 - Start SD write: "M28 /path/file.gco". (Requires SDSUPPORT)
  104. * M29 - Stop SD write. (Requires SDSUPPORT)
  105. * M30 - Delete file from SD: "M30 /path/file.gco"
  106. * M31 - Report time since last M109 or SD card start to serial.
  107. * M32 - Select file and start SD print: "M32 [S<bytepos>] !/path/file.gco#". (Requires SDSUPPORT)
  108. * Use P to run other files as sub-programs: "M32 P !filename#"
  109. * The '#' is necessary when calling from within sd files, as it stops buffer prereading
  110. * M33 - Get the longname version of a path. (Requires LONG_FILENAME_HOST_SUPPORT)
  111. * M34 - Set SD Card sorting options. (Requires SDCARD_SORT_ALPHA)
  112. * M42 - Change pin status via gcode: M42 P<pin> S<value>. LED pin assumed if P is omitted. (Requires DIRECT_PIN_CONTROL)
  113. * M43 - Display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
  114. * M48 - Measure Z Probe repeatability: M48 P<points> X<pos> Y<pos> V<level> E<engage> L<legs> S<chizoid>. (Requires Z_MIN_PROBE_REPEATABILITY_TEST)
  115. * M73 - Set the progress percentage. (Requires LCD_SET_PROGRESS_MANUALLY)
  116. * M75 - Start the print job timer.
  117. * M76 - Pause the print job timer.
  118. * M77 - Stop the print job timer.
  119. * M78 - Show statistical information about the print jobs. (Requires PRINTCOUNTER)
  120. * M80 - Turn on Power Supply. (Requires PSU_CONTROL)
  121. * M81 - Turn off Power Supply. (Requires PSU_CONTROL)
  122. * M82 - Set E codes absolute (default).
  123. * M83 - Set E codes relative while in Absolute (G90) mode.
  124. * M84 - Disable steppers until next move, or use S<seconds> to specify an idle
  125. * duration after which steppers should turn off. S0 disables the timeout.
  126. * M85 - Set inactivity shutdown timer with parameter S<seconds>. To disable set zero (default)
  127. * M92 - Set planner.settings.axis_steps_per_mm for one or more axes.
  128. * M100 - Watch Free Memory (for debugging) (Requires M100_FREE_MEMORY_WATCHER)
  129. * M104 - Set extruder target temp.
  130. * M105 - Report current temperatures.
  131. * M106 - Set print fan speed.
  132. * M107 - Print fan off.
  133. * M108 - Break out of heating loops (M109, M190, M303). With no controller, breaks out of M0/M1. (Requires EMERGENCY_PARSER)
  134. * M109 - S<temp> Wait for extruder current temp to reach target temp. ** Wait only when heating! **
  135. * R<temp> Wait for extruder current temp to reach target temp. ** Wait for heating or cooling. **
  136. * If AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
  137. * M110 - Set the current line number. (Used by host printing)
  138. * M111 - Set debug flags: "M111 S<flagbits>". See flag bits defined in enum.h.
  139. * M112 - Full Shutdown.
  140. * M113 - Get or set the timeout interval for Host Keepalive "busy" messages. (Requires HOST_KEEPALIVE_FEATURE)
  141. * M114 - Report current position.
  142. * M115 - Report capabilities. (Extended capabilities requires EXTENDED_CAPABILITIES_REPORT)
  143. * M117 - Display a message on the controller screen. (Requires an LCD)
  144. * M118 - Display a message in the host console.
  145. * M119 - Report endstops status.
  146. * M120 - Enable endstops detection.
  147. * M121 - Disable endstops detection.
  148. * M122 - Debug stepper (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660 or L6470)
  149. * M125 - Save current position and move to filament change position. (Requires PARK_HEAD_ON_PAUSE)
  150. * M126 - Solenoid Air Valve Open. (Requires BARICUDA)
  151. * M127 - Solenoid Air Valve Closed. (Requires BARICUDA)
  152. * M128 - EtoP Open. (Requires BARICUDA)
  153. * M129 - EtoP Closed. (Requires BARICUDA)
  154. * M140 - Set bed target temp. S<temp>
  155. * M141 - Set heated chamber target temp. S<temp> (Requires a chamber heater)
  156. * M143 - Set cooler target temp. S<temp> (Requires a laser cooling device)
  157. * M145 - Set heatup values for materials on the LCD. H<hotend> B<bed> F<fan speed> for S<material> (0=PLA, 1=ABS)
  158. * M149 - Set temperature units. (Requires TEMPERATURE_UNITS_SUPPORT)
  159. * M150 - Set Status LED Color as R<red> U<green> B<blue> W<white> P<bright>. Values 0-255. (Requires BLINKM, RGB_LED, RGBW_LED, NEOPIXEL_LED, PCA9533, or PCA9632).
  160. * M154 - Auto-report position with interval of S<seconds>. (Requires AUTO_REPORT_POSITION)
  161. * M155 - Auto-report temperatures with interval of S<seconds>. (Requires AUTO_REPORT_TEMPERATURES)
  162. * M163 - Set a single proportion for a mixing extruder. (Requires MIXING_EXTRUDER)
  163. * M164 - Commit the mix and save to a virtual tool (current, or as specified by 'S'). (Requires MIXING_EXTRUDER)
  164. * M165 - Set the mix for the mixing extruder (and current virtual tool) with parameters ABCDHI. (Requires MIXING_EXTRUDER and DIRECT_MIXING_IN_G1)
  165. * M166 - Set the Gradient Mix for the mixing extruder. (Requires GRADIENT_MIX)
  166. * M190 - S<temp> Wait for bed current temp to reach target temp. ** Wait only when heating! **
  167. * R<temp> Wait for bed current temp to reach target temp. ** Wait for heating or cooling. **
  168. * M193 - R<temp> Wait for cooler temp to reach target temp. ** Wait for cooling. **
  169. * M200 - Set filament diameter, D<diameter>, setting E axis units to cubic. (Use S0 to revert to linear units.)
  170. * M201 - Set max acceleration in units/s^2 for print moves: "M201 X<accel> Y<accel> Z<accel> E<accel>"
  171. * M202 - Set max acceleration in units/s^2 for travel moves: "M202 X<accel> Y<accel> Z<accel> E<accel>" ** UNUSED IN MARLIN! **
  172. * M203 - Set maximum feedrate: "M203 X<fr> Y<fr> Z<fr> E<fr>" in units/sec.
  173. * M204 - Set default acceleration in units/sec^2: P<printing> R<extruder_only> T<travel>
  174. * M205 - Set advanced settings. Current units apply:
  175. S<print> T<travel> minimum speeds
  176. B<minimum segment time>
  177. X<max X jerk>, Y<max Y jerk>, Z<max Z jerk>, E<max E jerk>
  178. * M206 - Set additional homing offset. (Disabled by NO_WORKSPACE_OFFSETS or DELTA)
  179. * M207 - Set Retract Length: S<length>, Feedrate: F<units/min>, and Z lift: Z<distance>. (Requires FWRETRACT)
  180. * M208 - Set Recover (unretract) Additional (!) Length: S<length> and Feedrate: F<units/min>. (Requires FWRETRACT)
  181. * M209 - Turn Automatic Retract Detection on/off: S<0|1> (For slicers that don't support G10/11). (Requires FWRETRACT_AUTORETRACT)
  182. Every normal extrude-only move will be classified as retract depending on the direction.
  183. * M211 - Enable, Disable, and/or Report software endstops: S<0|1> (Requires MIN_SOFTWARE_ENDSTOPS or MAX_SOFTWARE_ENDSTOPS)
  184. * M217 - Set filament swap parameters: "M217 S<length> P<feedrate> R<feedrate>". (Requires SINGLENOZZLE)
  185. * M218 - Set/get a tool offset: "M218 T<index> X<offset> Y<offset>". (Requires 2 or more extruders)
  186. * M220 - Set Feedrate Percentage: "M220 S<percent>" (i.e., "FR" on the LCD)
  187. * Use "M220 B" to back up the Feedrate Percentage and "M220 R" to restore it. (Requires an MMU_MODEL version 2 or 2S)
  188. * M221 - Set Flow Percentage: "M221 S<percent>"
  189. * M226 - Wait until a pin is in a given state: "M226 P<pin> S<state>" (Requires DIRECT_PIN_CONTROL)
  190. * M240 - Trigger a camera to take a photograph. (Requires PHOTO_GCODE)
  191. * M250 - Set LCD contrast: "M250 C<contrast>" (0-63). (Requires LCD support)
  192. * M260 - i2c Send Data (Requires EXPERIMENTAL_I2CBUS)
  193. * M261 - i2c Request Data (Requires EXPERIMENTAL_I2CBUS)
  194. * M280 - Set servo position absolute: "M280 P<index> S<angle|µs>". (Requires servos)
  195. * M281 - Set servo min|max position: "M281 P<index> L<min> U<max>". (Requires EDITABLE_SERVO_ANGLES)
  196. * M290 - Babystepping (Requires BABYSTEPPING)
  197. * M300 - Play beep sound S<frequency Hz> P<duration ms>
  198. * M301 - Set PID parameters P I and D. (Requires PIDTEMP)
  199. * M302 - Allow cold extrudes, or set the minimum extrude S<temperature>. (Requires PREVENT_COLD_EXTRUSION)
  200. * M303 - PID relay autotune S<temperature> sets the target temperature. Default 150C. (Requires PIDTEMP)
  201. * M304 - Set bed PID parameters P I and D. (Requires PIDTEMPBED)
  202. * M305 - Set user thermistor parameters R T and P. (Requires TEMP_SENSOR_x 1000)
  203. * M309 - Set chamber PID parameters P I and D. (Requires PIDTEMPCHAMBER)
  204. * M350 - Set microstepping mode. (Requires digital microstepping pins.)
  205. * M351 - Toggle MS1 MS2 pins directly. (Requires digital microstepping pins.)
  206. * M355 - Set Case Light on/off and set brightness. (Requires CASE_LIGHT_PIN)
  207. * M380 - Activate solenoid on active extruder. (Requires EXT_SOLENOID)
  208. * M381 - Disable all solenoids. (Requires EXT_SOLENOID)
  209. * M400 - Finish all moves.
  210. * M401 - Deploy and activate Z probe. (Requires a probe)
  211. * M402 - Deactivate and stow Z probe. (Requires a probe)
  212. * M403 - Set filament type for PRUSA MMU2
  213. * M404 - Display or set the Nominal Filament Width: "W<diameter>". (Requires FILAMENT_WIDTH_SENSOR)
  214. * M405 - Enable Filament Sensor flow control. "M405 D<delay_cm>". (Requires FILAMENT_WIDTH_SENSOR)
  215. * M406 - Disable Filament Sensor flow control. (Requires FILAMENT_WIDTH_SENSOR)
  216. * M407 - Display measured filament diameter in millimeters. (Requires FILAMENT_WIDTH_SENSOR)
  217. * M410 - Quickstop. Abort all planned moves.
  218. * M412 - Enable / Disable Filament Runout Detection. (Requires FILAMENT_RUNOUT_SENSOR)
  219. * M413 - Enable / Disable Power-Loss Recovery. (Requires POWER_LOSS_RECOVERY)
  220. * M414 - Set language by index. (Requires LCD_LANGUAGE_2...)
  221. * M420 - Enable/Disable Leveling (with current values) S1=enable S0=disable (Requires MESH_BED_LEVELING or ABL)
  222. * M421 - Set a single Z coordinate in the Mesh Leveling grid. X<units> Y<units> Z<units> (Requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_UBL)
  223. * M422 - Set Z Stepper automatic alignment position using probe. X<units> Y<units> A<axis> (Requires Z_STEPPER_AUTO_ALIGN)
  224. * M425 - Enable/Disable and tune backlash correction. (Requires BACKLASH_COMPENSATION and BACKLASH_GCODE)
  225. * M428 - Set the home_offset based on the current_position. Nearest edge applies. (Disabled by NO_WORKSPACE_OFFSETS or DELTA)
  226. * M430 - Read the system current, voltage, and power (Requires POWER_MONITOR_CURRENT, POWER_MONITOR_VOLTAGE, or POWER_MONITOR_FIXED_VOLTAGE)
  227. * M486 - Identify and cancel objects. (Requires CANCEL_OBJECTS)
  228. * M500 - Store parameters in EEPROM. (Requires EEPROM_SETTINGS)
  229. * M501 - Restore parameters from EEPROM. (Requires EEPROM_SETTINGS)
  230. * M502 - Revert to the default "factory settings". ** Does not write them to EEPROM! **
  231. * M503 - Print the current settings (in memory): "M503 S<verbose>". S0 specifies compact output.
  232. * M504 - Validate EEPROM contents. (Requires EEPROM_SETTINGS)
  233. * M510 - Lock Printer
  234. * M511 - Unlock Printer
  235. * M512 - Set/Change/Remove Password
  236. * M524 - Abort the current SD print job started with M24. (Requires SDSUPPORT)
  237. * M540 - Enable/disable SD card abort on endstop hit: "M540 S<state>". (Requires SD_ABORT_ON_ENDSTOP_HIT)
  238. * M552 - Get or set IP address. Enable/disable network interface. (Requires enabled Ethernet port)
  239. * M553 - Get or set IP netmask. (Requires enabled Ethernet port)
  240. * M554 - Get or set IP gateway. (Requires enabled Ethernet port)
  241. * M569 - Enable stealthChop on an axis. (Requires at least one _DRIVER_TYPE to be TMC2130/2160/2208/2209/5130/5160)
  242. * M600 - Pause for filament change: "M600 X<pos> Y<pos> Z<raise> E<first_retract> L<later_retract>". (Requires ADVANCED_PAUSE_FEATURE)
  243. * M603 - Configure filament change: "M603 T<tool> U<unload_length> L<load_length>". (Requires ADVANCED_PAUSE_FEATURE)
  244. * M605 - Set Dual X-Carriage movement mode: "M605 S<mode> [X<x_offset>] [R<temp_offset>]". (Requires DUAL_X_CARRIAGE)
  245. * M665 - Set delta configurations: "M665 H<delta height> L<diagonal rod> R<delta radius> S<segments/s> B<calibration radius> X<Alpha angle trim> Y<Beta angle trim> Z<Gamma angle trim> (Requires DELTA)
  246. * M666 - Set/get offsets for delta (Requires DELTA) or dual endstops. (Requires [XYZ]_DUAL_ENDSTOPS)
  247. * M672 - Set/Reset Duet Smart Effector's sensitivity. (Requires DUET_SMART_EFFECTOR and SMART_EFFECTOR_MOD_PIN)
  248. * M701 - Load filament (Requires FILAMENT_LOAD_UNLOAD_GCODES)
  249. * M702 - Unload filament (Requires FILAMENT_LOAD_UNLOAD_GCODES)
  250. * M808 - Set or Goto a Repeat Marker (Requires GCODE_REPEAT_MARKERS)
  251. * M810-M819 - Define/execute a G-code macro (Requires GCODE_MACROS)
  252. * M851 - Set Z probe's XYZ offsets in current units. (Negative values: X=left, Y=front, Z=below)
  253. * M852 - Set skew factors: "M852 [I<xy>] [J<xz>] [K<yz>]". (Requires SKEW_CORRECTION_GCODE, and SKEW_CORRECTION_FOR_Z for IJ)
  254. * M860 - Report the position of position encoder modules.
  255. * M861 - Report the status of position encoder modules.
  256. * M862 - Perform an axis continuity test for position encoder modules.
  257. * M863 - Perform steps-per-mm calibration for position encoder modules.
  258. * M864 - Change position encoder module I2C address.
  259. * M865 - Check position encoder module firmware version.
  260. * M866 - Report or reset position encoder module error count.
  261. * M867 - Enable/disable or toggle error correction for position encoder modules.
  262. * M868 - Report or set position encoder module error correction threshold.
  263. * M869 - Report position encoder module error.
  264. * M871 - Print/reset/clear first layer temperature offset values. (Requires PROBE_TEMP_COMPENSATION)
  265. * M192 - Wait for probe temp (Requires PROBE_TEMP_COMPENSATION)
  266. * M876 - Handle Prompt Response. (Requires HOST_PROMPT_SUPPORT and not EMERGENCY_PARSER)
  267. * M900 - Get or Set Linear Advance K-factor. (Requires LIN_ADVANCE)
  268. * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660 or L6470)
  269. * M907 - Set digital trimpot motor current using axis codes. (Requires a board with digital trimpots)
  270. * M908 - Control digital trimpot directly. (Requires HAS_MOTOR_CURRENT_DAC or DIGIPOTSS_PIN)
  271. * M909 - Print digipot/DAC current value. (Requires HAS_MOTOR_CURRENT_DAC)
  272. * M910 - Commit digipot/DAC value to external EEPROM via I2C. (Requires HAS_MOTOR_CURRENT_DAC)
  273. * M911 - Report stepper driver overtemperature pre-warn condition. (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660)
  274. * M912 - Clear stepper driver overtemperature pre-warn condition flag. (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660)
  275. * M913 - Set HYBRID_THRESHOLD speed. (Requires HYBRID_THRESHOLD)
  276. * M914 - Set StallGuard sensitivity. (Requires SENSORLESS_HOMING or SENSORLESS_PROBING)
  277. * M916 - L6470 tuning: Increase KVAL_HOLD until thermal warning. (Requires at least one _DRIVER_TYPE L6470)
  278. * M917 - L6470 tuning: Find minimum current thresholds. (Requires at least one _DRIVER_TYPE L6470)
  279. * M918 - L6470 tuning: Increase speed until max or error. (Requires at least one _DRIVER_TYPE L6470)
  280. * M951 - Set Magnetic Parking Extruder parameters. (Requires MAGNETIC_PARKING_EXTRUDER)
  281. * M7219 - Control Max7219 Matrix LEDs. (Requires MAX7219_GCODE)
  282. *
  283. * M360 - SCARA calibration: Move to cal-position ThetaA (0 deg calibration)
  284. * M361 - SCARA calibration: Move to cal-position ThetaB (90 deg calibration - steps per degree)
  285. * M362 - SCARA calibration: Move to cal-position PsiA (0 deg calibration)
  286. * M363 - SCARA calibration: Move to cal-position PsiB (90 deg calibration - steps per degree)
  287. * M364 - SCARA calibration: Move to cal-position PSIC (90 deg to Theta calibration position)
  288. *
  289. * ************ Custom codes - This can change to suit future G-code regulations
  290. * G425 - Calibrate using a conductive object. (Requires CALIBRATION_GCODE)
  291. * M928 - Start SD logging: "M928 filename.gco". Stop with M29. (Requires SDSUPPORT)
  292. * M993 - Backup SPI Flash to SD
  293. * M994 - Load a Backup from SD to SPI Flash
  294. * M995 - Touch screen calibration for TFT display
  295. * M997 - Perform in-application firmware update
  296. * M999 - Restart after being stopped by error
  297. * D... - Custom Development G-code. Add hooks to 'gcode_D.cpp' for developers to test features. (Requires MARLIN_DEV_MODE)
  298. *
  299. * "T" Codes
  300. *
  301. * T0-T3 - Select an extruder (tool) by index: "T<n> F<units/min>"
  302. */
  303. #include "../inc/MarlinConfig.h"
  304. #include "parser.h"
  305. #if ENABLED(I2C_POSITION_ENCODERS)
  306. #include "../feature/encoder_i2c.h"
  307. #endif
  308. #if IS_SCARA || defined(G0_FEEDRATE)
  309. #define HAS_FAST_MOVES 1
  310. #endif
  311. enum AxisRelative : uint8_t { REL_X, REL_Y, REL_Z, REL_E, E_MODE_ABS, E_MODE_REL };
  312. extern const char G28_STR[];
  313. class GcodeSuite {
  314. public:
  315. static uint8_t axis_relative;
  316. static inline bool axis_is_relative(const AxisEnum a) {
  317. if (a == E_AXIS) {
  318. if (TEST(axis_relative, E_MODE_REL)) return true;
  319. if (TEST(axis_relative, E_MODE_ABS)) return false;
  320. }
  321. return TEST(axis_relative, a);
  322. }
  323. static inline void set_relative_mode(const bool rel) {
  324. axis_relative = rel ? _BV(REL_X) | _BV(REL_Y) | _BV(REL_Z) | _BV(REL_E) : 0;
  325. }
  326. static inline void set_e_relative() {
  327. CBI(axis_relative, E_MODE_ABS);
  328. SBI(axis_relative, E_MODE_REL);
  329. }
  330. static inline void set_e_absolute() {
  331. CBI(axis_relative, E_MODE_REL);
  332. SBI(axis_relative, E_MODE_ABS);
  333. }
  334. #if ENABLED(CNC_WORKSPACE_PLANES)
  335. /**
  336. * Workspace planes only apply to G2/G3 moves
  337. * (and "canned cycles" - not a current feature)
  338. */
  339. enum WorkspacePlane : char { PLANE_XY, PLANE_ZX, PLANE_YZ };
  340. static WorkspacePlane workspace_plane;
  341. #endif
  342. #define MAX_COORDINATE_SYSTEMS 9
  343. #if ENABLED(CNC_COORDINATE_SYSTEMS)
  344. static int8_t active_coordinate_system;
  345. static xyz_pos_t coordinate_system[MAX_COORDINATE_SYSTEMS];
  346. static bool select_coordinate_system(const int8_t _new);
  347. #endif
  348. static millis_t previous_move_ms, max_inactive_time, stepper_inactive_time;
  349. FORCE_INLINE static void reset_stepper_timeout(const millis_t ms=millis()) { previous_move_ms = ms; }
  350. FORCE_INLINE static bool stepper_max_timed_out(const millis_t ms=millis()) {
  351. return max_inactive_time && ELAPSED(ms, previous_move_ms + max_inactive_time);
  352. }
  353. FORCE_INLINE static bool stepper_inactive_timeout(const millis_t ms=millis()) {
  354. return ELAPSED(ms, previous_move_ms + stepper_inactive_time);
  355. }
  356. static int8_t get_target_extruder_from_command();
  357. static int8_t get_target_e_stepper_from_command();
  358. static void get_destination_from_command();
  359. static void process_parsed_command(const bool no_ok=false);
  360. static void process_next_command();
  361. // Execute G-code in-place, preserving current G-code parameters
  362. static void process_subcommands_now_P(PGM_P pgcode);
  363. static void process_subcommands_now(char * gcode);
  364. static inline void home_all_axes(const bool keep_leveling=false) {
  365. process_subcommands_now_P(keep_leveling ? G28_STR : TERN(G28_L0_ENSURES_LEVELING_OFF, PSTR("G28L0"), G28_STR));
  366. }
  367. #if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
  368. static bool autoreport_paused;
  369. static inline bool set_autoreport_paused(const bool p) {
  370. const bool was = autoreport_paused;
  371. autoreport_paused = p;
  372. return was;
  373. }
  374. #else
  375. static constexpr bool autoreport_paused = false;
  376. static inline bool set_autoreport_paused(const bool) { return false; }
  377. #endif
  378. #if ENABLED(HOST_KEEPALIVE_FEATURE)
  379. /**
  380. * States for managing Marlin and host communication
  381. * Marlin sends messages if blocked or busy
  382. */
  383. enum MarlinBusyState : char {
  384. NOT_BUSY, // Not in a handler
  385. IN_HANDLER, // Processing a GCode
  386. IN_PROCESS, // Known to be blocking command input (as in G29)
  387. PAUSED_FOR_USER, // Blocking pending any input
  388. PAUSED_FOR_INPUT // Blocking pending text input (concept)
  389. };
  390. static MarlinBusyState busy_state;
  391. static uint8_t host_keepalive_interval;
  392. static void host_keepalive();
  393. #define KEEPALIVE_STATE(N) REMEMBER(_KA_, gcode.busy_state, gcode.N)
  394. #else
  395. #define KEEPALIVE_STATE(N) NOOP
  396. #endif
  397. static void dwell(millis_t time);
  398. private:
  399. #if ENABLED(MARLIN_DEV_MODE)
  400. static void D(const int16_t dcode);
  401. #endif
  402. static void G0_G1(TERN_(HAS_FAST_MOVES, const bool fast_move=false));
  403. #if ENABLED(ARC_SUPPORT)
  404. static void G2_G3(const bool clockwise);
  405. #endif
  406. static void G4();
  407. #if ENABLED(BEZIER_CURVE_SUPPORT)
  408. static void G5();
  409. #endif
  410. #if ENABLED(DIRECT_STEPPING)
  411. static void G6();
  412. #endif
  413. #if ENABLED(FWRETRACT)
  414. static void G10();
  415. static void G11();
  416. #endif
  417. #if ENABLED(NOZZLE_CLEAN_FEATURE)
  418. static void G12();
  419. #endif
  420. #if ENABLED(CNC_WORKSPACE_PLANES)
  421. static void G17();
  422. static void G18();
  423. static void G19();
  424. #endif
  425. #if ENABLED(INCH_MODE_SUPPORT)
  426. static void G20();
  427. static void G21();
  428. #endif
  429. #if ENABLED(G26_MESH_VALIDATION)
  430. static void G26();
  431. #endif
  432. #if ENABLED(NOZZLE_PARK_FEATURE)
  433. static void G27();
  434. #endif
  435. static void G28();
  436. #if HAS_LEVELING
  437. #if ENABLED(G29_RETRY_AND_RECOVER)
  438. static void event_probe_failure();
  439. static void event_probe_recover();
  440. static void G29_with_retry();
  441. #define G29_TYPE bool
  442. #else
  443. #define G29_TYPE void
  444. #endif
  445. static G29_TYPE G29();
  446. #endif
  447. #if HAS_BED_PROBE
  448. static void G30();
  449. #if ENABLED(Z_PROBE_SLED)
  450. static void G31();
  451. static void G32();
  452. #endif
  453. #endif
  454. #if ENABLED(DELTA_AUTO_CALIBRATION)
  455. static void G33();
  456. #endif
  457. #if ANY(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN, MECHANICAL_GANTRY_CALIBRATION)
  458. static void G34();
  459. #endif
  460. #if ENABLED(Z_STEPPER_AUTO_ALIGN)
  461. static void M422();
  462. #endif
  463. #if ENABLED(ASSISTED_TRAMMING)
  464. static void G35();
  465. #endif
  466. #if ENABLED(G38_PROBE_TARGET)
  467. static void G38(const int8_t subcode);
  468. #endif
  469. #if ENABLED(HAS_MESH)
  470. static void G42();
  471. #endif
  472. #if ENABLED(CNC_COORDINATE_SYSTEMS)
  473. static void G53();
  474. static void G54();
  475. static void G55();
  476. static void G56();
  477. static void G57();
  478. static void G58();
  479. static void G59();
  480. #endif
  481. #if ENABLED(PROBE_TEMP_COMPENSATION)
  482. static void G76();
  483. #endif
  484. #if SAVED_POSITIONS
  485. static void G60();
  486. static void G61();
  487. #endif
  488. #if ENABLED(GCODE_MOTION_MODES)
  489. static void G80();
  490. #endif
  491. static void G92();
  492. #if ENABLED(CALIBRATION_GCODE)
  493. static void G425();
  494. #endif
  495. #if ENABLED(HAS_RESUME_CONTINUE)
  496. static void M0_M1();
  497. #endif
  498. #if HAS_CUTTER
  499. static void M3_M4(const bool is_M4);
  500. static void M5();
  501. #if ENABLED(AIR_EVACUATION)
  502. static void M10();
  503. static void M11();
  504. #endif
  505. #endif
  506. #if ENABLED(COOLANT_CONTROL)
  507. #if ENABLED(COOLANT_MIST)
  508. static void M7();
  509. #endif
  510. #if ENABLED(COOLANT_FLOOD)
  511. static void M8();
  512. #endif
  513. static void M9();
  514. #endif
  515. #if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER)
  516. static void M12();
  517. #endif
  518. #if ENABLED(EXPECTED_PRINTER_CHECK)
  519. static void M16();
  520. #endif
  521. static void M17();
  522. static void M18_M84();
  523. #if ENABLED(SDSUPPORT)
  524. static void M20();
  525. static void M21();
  526. static void M22();
  527. static void M23();
  528. static void M24();
  529. static void M25();
  530. static void M26();
  531. static void M27();
  532. static void M28();
  533. static void M29();
  534. static void M30();
  535. #endif
  536. static void M31();
  537. #if ENABLED(SDSUPPORT)
  538. #if ENABLED(HAS_MEDIA_SUBCALLS)
  539. static void M32();
  540. #endif
  541. #if ENABLED(LONG_FILENAME_HOST_SUPPORT)
  542. static void M33();
  543. #endif
  544. #if BOTH(SDCARD_SORT_ALPHA, SDSORT_GCODE)
  545. static void M34();
  546. #endif
  547. #endif
  548. #if ENABLED(DIRECT_PIN_CONTROL)
  549. static void M42();
  550. #endif
  551. #if ENABLED(PINS_DEBUGGING)
  552. static void M43();
  553. #endif
  554. #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
  555. static void M48();
  556. #endif
  557. #if ENABLED(LCD_SET_PROGRESS_MANUALLY)
  558. static void M73();
  559. #endif
  560. static void M75();
  561. static void M76();
  562. static void M77();
  563. #if ENABLED(PRINTCOUNTER)
  564. static void M78();
  565. #endif
  566. #if ENABLED(PSU_CONTROL)
  567. static void M80();
  568. #endif
  569. static void M81();
  570. #if HAS_EXTRUDERS
  571. static void M82();
  572. static void M83();
  573. #endif
  574. static void M85();
  575. static void M92();
  576. #if ENABLED(M100_FREE_MEMORY_WATCHER)
  577. static void M100();
  578. #endif
  579. #if HAS_EXTRUDERS
  580. static void M104_M109(const bool isM109);
  581. FORCE_INLINE static void M104() { M104_M109(false); }
  582. FORCE_INLINE static void M109() { M104_M109(true); }
  583. #endif
  584. static void M105();
  585. #if HAS_FAN
  586. static void M106();
  587. static void M107();
  588. #endif
  589. #if DISABLED(EMERGENCY_PARSER)
  590. static void M108();
  591. static void M112();
  592. static void M410();
  593. #if ENABLED(HOST_PROMPT_SUPPORT)
  594. static void M876();
  595. #endif
  596. #endif
  597. static void M110();
  598. static void M111();
  599. #if ENABLED(HOST_KEEPALIVE_FEATURE)
  600. static void M113();
  601. #endif
  602. static void M114();
  603. static void M115();
  604. static void M117();
  605. static void M118();
  606. static void M119();
  607. static void M120();
  608. static void M121();
  609. #if ENABLED(PARK_HEAD_ON_PAUSE)
  610. static void M125();
  611. #endif
  612. #if ENABLED(BARICUDA)
  613. #if HAS_HEATER_1
  614. static void M126();
  615. static void M127();
  616. #endif
  617. #if HAS_HEATER_2
  618. static void M128();
  619. static void M129();
  620. #endif
  621. #endif
  622. #if HAS_HEATED_BED
  623. static void M140_M190(const bool isM190);
  624. FORCE_INLINE static void M140() { M140_M190(false); }
  625. FORCE_INLINE static void M190() { M140_M190(true); }
  626. #endif
  627. #if HAS_HEATED_CHAMBER
  628. static void M141();
  629. static void M191();
  630. #endif
  631. #if HAS_COOLER
  632. static void M143();
  633. static void M193();
  634. #endif
  635. #if PREHEAT_COUNT
  636. static void M145();
  637. #endif
  638. #if ENABLED(TEMPERATURE_UNITS_SUPPORT)
  639. static void M149();
  640. #endif
  641. #if ENABLED(HAS_COLOR_LEDS)
  642. static void M150();
  643. #endif
  644. #if ENABLED(AUTO_REPORT_POSITION)
  645. static void M154();
  646. #endif
  647. #if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR)
  648. static void M155();
  649. #endif
  650. #if ENABLED(MIXING_EXTRUDER)
  651. static void M163();
  652. static void M164();
  653. #if ENABLED(DIRECT_MIXING_IN_G1)
  654. static void M165();
  655. #endif
  656. #if ENABLED(GRADIENT_MIX)
  657. static void M166();
  658. #endif
  659. #endif
  660. static void M200();
  661. static void M201();
  662. #if 0
  663. static void M202(); // Not used for Sprinter/grbl gen6
  664. #endif
  665. static void M203();
  666. static void M204();
  667. static void M205();
  668. #if ENABLED(HAS_M206_COMMAND)
  669. static void M206();
  670. #endif
  671. #if ENABLED(FWRETRACT)
  672. static void M207();
  673. static void M208();
  674. #if ENABLED(FWRETRACT_AUTORETRACT)
  675. static void M209();
  676. #endif
  677. #endif
  678. static void M211();
  679. #if ENABLED(HAS_MULTI_EXTRUDER)
  680. static void M217();
  681. #endif
  682. #if ENABLED(HAS_HOTEND_OFFSET)
  683. static void M218();
  684. #endif
  685. static void M220();
  686. #if HAS_EXTRUDERS
  687. static void M221();
  688. #endif
  689. #if ENABLED(DIRECT_PIN_CONTROL)
  690. static void M226();
  691. #endif
  692. #if ENABLED(PHOTO_GCODE)
  693. static void M240();
  694. #endif
  695. #if ENABLED(HAS_LCD_CONTRAST)
  696. static void M250();
  697. #endif
  698. #if ENABLED(EXPERIMENTAL_I2CBUS)
  699. static void M260();
  700. static void M261();
  701. #endif
  702. #if HAS_SERVOS
  703. static void M280();
  704. #if ENABLED(EDITABLE_SERVO_ANGLES)
  705. static void M281();
  706. #endif
  707. #endif
  708. #if ENABLED(BABYSTEPPING)
  709. static void M290();
  710. #endif
  711. #if ENABLED(HAS_BUZZER)
  712. static void M300();
  713. #endif
  714. #if ENABLED(PIDTEMP)
  715. static void M301();
  716. #endif
  717. #if ENABLED(PREVENT_COLD_EXTRUSION)
  718. static void M302();
  719. #endif
  720. #if ENABLED(HAS_PID_HEATING)
  721. static void M303();
  722. #endif
  723. #if ENABLED(PIDTEMPBED)
  724. static void M304();
  725. #endif
  726. #if ENABLED(HAS_USER_THERMISTORS)
  727. static void M305();
  728. #endif
  729. #if ENABLED(PIDTEMPCHAMBER)
  730. static void M309();
  731. #endif
  732. #if HAS_MICROSTEPS
  733. static void M350();
  734. static void M351();
  735. #endif
  736. #if ENABLED(CASE_LIGHT_ENABLE)
  737. static void M355();
  738. #endif
  739. #if ENABLED(REPETIER_GCODE_M360)
  740. static void M360();
  741. #endif
  742. #if ENABLED(MORGAN_SCARA)
  743. static bool M360();
  744. static bool M361();
  745. static bool M362();
  746. static bool M363();
  747. static bool M364();
  748. #endif
  749. #if EITHER(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL)
  750. static void M380();
  751. static void M381();
  752. #endif
  753. static void M400();
  754. #if HAS_BED_PROBE
  755. static void M401();
  756. static void M402();
  757. #endif
  758. #if ENABLED(HAS_PRUSA_MMU2)
  759. static void M403();
  760. #endif
  761. #if ENABLED(FILAMENT_WIDTH_SENSOR)
  762. static void M404();
  763. static void M405();
  764. static void M406();
  765. static void M407();
  766. #endif
  767. #if ENABLED(HAS_FILAMENT_SENSOR)
  768. static void M412();
  769. #endif
  770. #if ENABLED(HAS_MULTI_LANGUAGE)
  771. static void M414();
  772. #endif
  773. #if HAS_LEVELING
  774. static void M420();
  775. static void M421();
  776. #endif
  777. #if ENABLED(BACKLASH_GCODE)
  778. static void M425();
  779. #endif
  780. #if ENABLED(HAS_M206_COMMAND)
  781. static void M428();
  782. #endif
  783. #if ENABLED(HAS_POWER_MONITOR)
  784. static void M430();
  785. #endif
  786. #if ENABLED(CANCEL_OBJECTS)
  787. static void M486();
  788. #endif
  789. static void M500();
  790. static void M501();
  791. static void M502();
  792. #if DISABLED(DISABLE_M503)
  793. static void M503();
  794. #endif
  795. #if ENABLED(EEPROM_SETTINGS)
  796. static void M504();
  797. #endif
  798. #if ENABLED(PASSWORD_FEATURE)
  799. static void M510();
  800. #if ENABLED(PASSWORD_UNLOCK_GCODE)
  801. static void M511();
  802. #endif
  803. #if ENABLED(PASSWORD_CHANGE_GCODE)
  804. static void M512();
  805. #endif
  806. #endif
  807. #if ENABLED(SDSUPPORT)
  808. static void M524();
  809. #endif
  810. #if ENABLED(SD_ABORT_ON_ENDSTOP_HIT)
  811. static void M540();
  812. #endif
  813. #if HAS_ETHERNET
  814. static void M552();
  815. static void M553();
  816. static void M554();
  817. #endif
  818. #if ENABLED(BAUD_RATE_GCODE)
  819. static void M575();
  820. #endif
  821. #if ENABLED(ADVANCED_PAUSE_FEATURE)
  822. static void M600();
  823. static void M603();
  824. #endif
  825. #if ENABLED(HAS_DUPLICATION_MODE)
  826. static void M605();
  827. #endif
  828. #if ENABLED(IS_KINEMATIC)
  829. static void M665();
  830. #endif
  831. #if ENABLED(DELTA) || HAS_EXTRA_ENDSTOPS
  832. static void M666();
  833. #endif
  834. #if ENABLED(DUET_SMART_EFFECTOR) && PIN_EXISTS(SMART_EFFECTOR_MOD)
  835. static void M672();
  836. #endif
  837. #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
  838. static void M701();
  839. static void M702();
  840. #endif
  841. #if ENABLED(GCODE_REPEAT_MARKERS)
  842. static void M808();
  843. #endif
  844. #if ENABLED(GCODE_MACROS)
  845. static void M810_819();
  846. #endif
  847. #if ENABLED(HAS_BED_PROBE)
  848. static void M851();
  849. #endif
  850. #if ENABLED(SKEW_CORRECTION_GCODE)
  851. static void M852();
  852. #endif
  853. #if ENABLED(I2C_POSITION_ENCODERS)
  854. FORCE_INLINE static void M860() { I2CPEM.M860(); }
  855. FORCE_INLINE static void M861() { I2CPEM.M861(); }
  856. FORCE_INLINE static void M862() { I2CPEM.M862(); }
  857. FORCE_INLINE static void M863() { I2CPEM.M863(); }
  858. FORCE_INLINE static void M864() { I2CPEM.M864(); }
  859. FORCE_INLINE static void M865() { I2CPEM.M865(); }
  860. FORCE_INLINE static void M866() { I2CPEM.M866(); }
  861. FORCE_INLINE static void M867() { I2CPEM.M867(); }
  862. FORCE_INLINE static void M868() { I2CPEM.M868(); }
  863. FORCE_INLINE static void M869() { I2CPEM.M869(); }
  864. #endif
  865. #if ENABLED(PROBE_TEMP_COMPENSATION)
  866. static void M192();
  867. static void M871();
  868. #endif
  869. #if ENABLED(LIN_ADVANCE)
  870. static void M900();
  871. #endif
  872. #if HAS_TRINAMIC_CONFIG
  873. static void M122();
  874. static void M906();
  875. #if ENABLED(HAS_STEALTHCHOP)
  876. static void M569();
  877. #endif
  878. #if ENABLED(MONITOR_DRIVER_STATUS)
  879. static void M911();
  880. static void M912();
  881. #endif
  882. #if ENABLED(HYBRID_THRESHOLD)
  883. static void M913();
  884. #endif
  885. #if ENABLED(USE_SENSORLESS)
  886. static void M914();
  887. #endif
  888. #endif
  889. #if HAS_L64XX
  890. static void M122();
  891. static void M906();
  892. static void M916();
  893. static void M917();
  894. static void M918();
  895. #endif
  896. #if ANY(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_PWM, HAS_MOTOR_CURRENT_I2C, HAS_MOTOR_CURRENT_DAC)
  897. static void M907();
  898. #if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC)
  899. static void M908();
  900. #if ENABLED(HAS_MOTOR_CURRENT_DAC)
  901. static void M909();
  902. static void M910();
  903. #endif
  904. #endif
  905. #endif
  906. #if ENABLED(SDSUPPORT)
  907. static void M928();
  908. #endif
  909. #if ENABLED(MAGNETIC_PARKING_EXTRUDER)
  910. static void M951();
  911. #endif
  912. #if ENABLED(TOUCH_SCREEN_CALIBRATION)
  913. static void M995();
  914. #endif
  915. #if BOTH(HAS_SPI_FLASH, SDSUPPORT)
  916. static void M993();
  917. static void M994();
  918. #endif
  919. #if ENABLED(PLATFORM_M997_SUPPORT)
  920. static void M997();
  921. #endif
  922. static void M999();
  923. #if ENABLED(POWER_LOSS_RECOVERY)
  924. static void M413();
  925. static void M1000();
  926. #endif
  927. #if ENABLED(SDSUPPORT)
  928. static void M1001();
  929. #endif
  930. #if ENABLED(DGUS_LCD_UI_MKS)
  931. static void M1002();
  932. #endif
  933. #if ENABLED(UBL_MESH_WIZARD)
  934. static void M1004();
  935. #endif
  936. #if ENABLED(MAX7219_GCODE)
  937. static void M7219();
  938. #endif
  939. #if ENABLED(CONTROLLER_FAN_EDITABLE)
  940. static void M710();
  941. #endif
  942. static void T(const int8_t tool_index);
  943. };
  944. extern GcodeSuite gcode;