Compare commits

..

205 Commits

Author SHA1 Message Date
InsanityAutomation 3e15472e05 Update MarlinCore.cpp 2024-04-10 15:12:02 -04:00
InsanityAutomation 55360141fd Update MarlinCore.cpp 2024-04-07 19:33:27 -04:00
Keith Bennett a3434de2e6 🩹 Fix MCU check for STM32H7-based BTT Octopus Pro V1 (#26831)
* 🩹 Fix MCU check for STM32H7-based BTT Octopus Pro V1

Co-authored-by: ellensp <530024+ellensp@users.noreply.github.com>

* Update Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h

---------

Co-authored-by: ellensp <530024+ellensp@users.noreply.github.com>
2024-04-07 12:05:35 -07:00
Keith Bennett 2bf56b00d4 🔧 Improve BIQU BX pins, allow Z swap (#26871)
* Add a swap Z & E1 option for BIQU BX

Users can add #define BX_SWAP_ZM_E1M to their config instead of opening their printer up & swapping Z & E1 motor cables. Allows G34 to work correctly on early BX printers since both Z motor wires were installed without a standard procedure in place and wires could be swapped from the factory.

* Add BOARD URL, DIAG pin info, update pin comments

* Add WIFISUPPORT defines for documentation purposes

WIFISUPPORT does not need to be enabled (read: shouldn't be enabled). Simply enable an available SERIAL_PORT*, set it to 4, and connect an ESP-01/ESP-01S flashed with luc-github's ESP3D firmware for basic WiFi functionality.

* Sanity check TOUCH_SCREEN_CALIBRATION on GT911 TFTs (BIQU BX TFT70)

Use a sanity check so it's clear which options are valid for TFT_TOUCH_DEVICE_GT911 / BIQU_BX_TFT70.
2024-04-07 10:49:36 -07:00
Andrew Bortz c31d9e717b 🩹Fix ProUI Z probe offset text (#26832) 2024-04-07 09:37:37 -07:00
narno2202 d9d7820b0d 🩹 Set correct LCD serial port for MKS_MONSTER8_V1 (#26879) 2024-04-07 08:52:35 -07:00
sargonphin 9343247e07 🩹Increase range of G34 accuracy target (#26771)
* Allow G34 accuracy down to 0.001mm, previous minimum was 0.01mm.
2024-04-07 08:48:13 -07:00
ellensp 351a1a1332 🔧 Add UART 5 for SKR Mini E3 V3.0 (#26825) 2024-04-06 23:29:19 -07:00
thinkyhead 7e9868d762 [cron] Bump distribution date (2024-04-07) 2024-04-07 06:05:53 +00:00
ellensp d1cf817660 🐛 Fix CREALITY_ENDER2P_V24S4 pins (#26908) 2024-04-06 22:57:42 -07:00
Vovodroid c91771a51e 🩹Disable nonlinear extrusion on unretract (#26824)
* Fixes disable NLE on unretract #26808, which reported blobs at the start of lines during unretract.
2024-04-06 22:41:01 -07:00
ellensp a337a43bfd 🩹 Fix type mismatch when SEGMENT_LEVELED_MOVES disabled (#26819) 2024-04-06 21:47:40 -07:00
Keith Bennett 77f93e0b8c 🩹 Fix Mini 12864 on BTT Kraken (#26918)
Co-authored-by: ellensp <530024+ellensp@users.noreply.github.com>
2024-04-06 21:22:25 -07:00
Keith Bennett 7dc7195696 🩹 Fix active extruder indicator (#26834)
* 🩹 No active extruder when any of several incompatible features are enabled
2024-04-06 21:17:00 -07:00
ellensp 56773bd80e 🩹 add onSetMinExtrusionTemp to anycubic_viper (#26933) 2024-04-06 21:11:32 -07:00
thinkyhead 1dec9831d3 [cron] Bump distribution date (2024-04-06) 2024-04-06 06:06:36 +00:00
Jason Smith 390f1f7c69 🐛 Don't apply settings during validation (#26935)
Check the `validating` variable before applying settings for several features.
This specifically avoids settings corruption for BACKLASH_PREVENTION, which has side-effects when first applied using incorrect values.
2024-04-05 17:27:30 -07:00
Jason Smith d30fcb8fff 🐛 Fix bool evalution of XYval and similar types (#26936)
Require explicit cast to get T* pointers from XYval and similar types. This prevents the pointer from being implicitly returned and checked for nullptr when trying to evaluate these structs in boolean expressions.
2024-04-05 17:24:58 -07:00
thinkyhead 17dfe8edc9 [cron] Bump distribution date (2024-04-03) 2024-04-03 00:20:46 +00:00
Scott Lahteine 7b6b6e1c3e 🩹 Revert motion change 2024-04-01 22:20:28 -05:00
Sophist 60f2837a98 🔧 Minor INPUT_SHAPING config fixes (#26882)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-04-01 21:30:04 -05:00
thinkyhead ef5fb390ec [cron] Bump distribution date (2024-04-02) 2024-04-02 00:20:47 +00:00
Andrew 87e94f4563 🚸 Update ProUI Plot graph - part 2 (#26563)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-04-01 15:05:11 -05:00
thinkyhead 017a9032f1 [cron] Bump distribution date (2024-04-01) 2024-04-01 00:23:48 +00:00
Scott Lahteine 466282f322 🩹 Misc. changes from ProUI / ExtUI updates (#26928) 2024-03-31 18:20:37 -05:00
thinkyhead 17594298e1 [cron] Bump distribution date (2024-03-28) 2024-03-28 00:20:53 +00:00
Jordan Stocker 0b9f487ab9 🔨 Fix binary upload firmware path (#26909) 2024-03-27 14:44:03 -05:00
Chris d3e1a92b84 🔨 Fix HC32 preflight (#26912) 2024-03-27 14:39:54 -05:00
Holger Mößinger cd357b0278 🔧🚸 Tweaks for (MiniRambo) CNC (#26892)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-03-27 14:38:08 -05:00
thinkyhead d0d229e380 [cron] Bump distribution date (2024-03-25) 2024-03-25 00:21:58 +00:00
Ikko Eltociear Ashimine eb897e65a1 📝 Fix Cutter.md typo (#26901) 2024-03-24 13:49:25 -05:00
thinkyhead 825ebfd5fe [cron] Bump distribution date (2024-03-24) 2024-03-24 00:23:21 +00:00
John Robertson 3ee3964bec 🐛 Fix ESP32 laser M4 exception (#26884) 2024-03-22 19:57:23 -05:00
Sophist aecfb257e9 🚸 Hide auto-run as needed (#26853) 2024-03-22 19:29:06 -05:00
thinkyhead 896a6a93af [cron] Bump distribution date (2024-03-23) 2024-03-23 00:20:15 +00:00
Holger Mößinger 075f96d2bf ✏️ Fix stepper MS pin typos (#26891) 2024-03-22 16:36:42 -05:00
thinkyhead 05896551f1 [cron] Bump distribution date (2024-03-18) 2024-03-18 00:21:39 +00:00
Manuel McLure ea6a891038 MAX7219_REINIT_ON_POWERUP (#26163) 2024-03-17 14:23:12 -05:00
Giuliano Zaro 983aee5718 🌐 Update Italian language (#26837) 2024-03-16 19:46:22 -05:00
thinkyhead c913020dc2 [cron] Bump distribution date (2024-03-17) 2024-03-17 00:22:34 +00:00
Scott Lahteine a50490b11f 👷 Minor signature.py adjustments 2024-03-16 16:39:47 -05:00
Sophist 4b01c901bc 📝 Fix M201 typos (#26854) 2024-03-16 15:00:16 -05:00
Keith Bennett c1be36bc66 🎨 Add MKS TinyBee silkscreen labels (#26777) 2024-03-16 14:58:53 -05:00
Keith Bennett e0222d3e01 🩹 Fix G35 "Probing Failed" output (#26780) 2024-03-16 14:56:33 -05:00
janenen c0264ae787 🐛 Fix DETECT_BROKEN_ENDSTOP on IDEX (#26790)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-03-16 14:52:14 -05:00
Sophist 3a2c50c199 🩹 Thermistor name fixes (#26857) 2024-03-16 14:09:50 -05:00
Scott Lahteine 3b4adac579 🎨 Trailing ws 2024-03-16 13:55:35 -05:00
ellensp d36b3fbf9d 🧑‍💻 Fix RLE script for infille == outfile (#26795) 2024-03-16 13:37:42 -05:00
Keith Bennett bca40e07e3 📝 Remove Flattr Link (#26796) 2024-03-16 13:34:02 -05:00
thinkyhead 9a1c993719 [cron] Bump distribution date (2024-03-10) 2024-03-10 06:05:40 +00:00
InsanityAutomation 504219817c Redundant PSU Control with EDM (#26751) 2024-03-09 21:22:23 -06:00
thinkyhead 4f2b7271bd [cron] Bump distribution date (2024-03-04) 2024-03-04 00:21:13 +00:00
fredycpu ec6f9dd5c8 🔧 MKS_ROBIN_PRO : I2C EEPROM + MKS Wifi (#26823)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-03-03 12:39:50 -06:00
thinkyhead e6cda9932b [cron] Bump distribution date (2024-03-02) 2024-03-02 06:06:49 +00:00
Keith Bennett b9cfbaa8d4 Update Actions versions (#26814) 2024-03-01 22:34:12 -06:00
ellensp 3fd175af8e 🚸 M115 "KINEMATICS:…" (#26806) 2024-03-01 22:31:42 -06:00
Keith Bennett a9e72b2a2c 🔧 Simpler CREALITY_V422 warning (#26826) 2024-03-01 22:09:12 -06:00
ellensp ecde3a3158 🩹 Fix AVR bootscreen RLE decode (#26827) 2024-03-01 21:58:56 -06:00
DerAndere c8d51c2723 🚸 Enable G92.9 with rotational axes (#26174)
- Supporting axes that can rotate forever.
2024-03-01 21:16:39 -06:00
thinkyhead d609bb4671 [cron] Bump distribution date (2024-02-28) 2024-02-28 06:06:10 +00:00
Scott Lahteine 982b425792 🔥 Drop TMC26X support (#26770) 2024-02-27 20:45:34 -06:00
thinkyhead 9e879a5b1f [cron] Bump distribution date (2024-02-11) 2024-02-11 00:22:45 +00:00
ellensp 9974327d33 extend uart checks 2024-02-11 03:28:37 +13:00
thinkyhead 4eba643ae1 [cron] Bump distribution date (2024-02-10) 2024-02-10 06:17:34 +00:00
Scott Lahteine 8d7be79108 👷 Improve BIGTREE_GTR_V1_0 tests 2024-02-09 19:14:15 -06:00
Scott Lahteine 76b5688304 🚸 Optional encoder multipliers 2024-02-09 19:14:15 -06:00
thinkyhead 1e8fbb7bbb [cron] Bump distribution date (2024-02-09) 2024-02-09 00:20:11 +00:00
Scott Lahteine 20c6a6233b 🧑‍💻 HC32 endstop interrupts for X2/Y2/Z4 2024-02-08 16:49:13 -06:00
Scott Lahteine 1d295f7983 🔥 Clean up SCARA/TPARA 2024-02-07 23:45:51 -06:00
Scott Lahteine 669814d0d4 MARLIN_SMALL_BUILD option (#26775) 2024-02-07 23:40:54 -06:00
Scott Lahteine 4aa48beb37 🚸 Adjust encoder multiplier 2024-02-07 19:48:36 -06:00
thinkyhead 371fb5a256 [cron] Bump distribution date (2024-02-08) 2024-02-08 00:20:32 +00:00
Scott Lahteine 0829a511f0 🧑‍💻 "static_warning" 2024-02-07 18:09:36 -06:00
Scott Lahteine a3c78c4510 🎨 Delete old FTDI Eve bootscreen 2024-02-07 14:01:25 -06:00
Scott Lahteine a3211253a0 🩹 Fix FTDI Eve Touch UI M84 2024-02-07 13:58:49 -06:00
thinkyhead 2c8e7bd5a5 [cron] Bump distribution date (2024-02-07) 2024-02-07 12:07:15 +00:00
ellensp 005d6879d9 🔧 Restore probe XY edit defaults, remove arbitrary Z limit (#26774) 2024-02-07 00:33:54 -06:00
thinkyhead 3dd22349a9 [cron] Bump distribution date (2024-02-06) 2024-02-06 06:06:16 +00:00
Scott Mikutsky e61a84a717 🚸 Keep Filament Change near the top (#26172) 2024-02-05 23:37:29 -06:00
thinkyhead d8e73d3036 [cron] Bump distribution date (2024-02-05) 2024-02-05 00:21:40 +00:00
Robherc b12340b1d5 🔧 Fix extraneous DIAG warnings (#26694) 2024-02-04 16:10:11 -06:00
Scott Lahteine ec46a59539 🧑‍💻 Fix uncrustify config 2024-02-04 16:07:27 -06:00
Keith Bennett 5003681414 🩹 Fix HOTEND_IDLE_TIMEOUT with no heated bed (#26746) 2024-02-04 12:14:49 -06:00
Keith Bennett d9396929aa 🩹 Update BTT GTR v1.0 DIAG jumper/pin (#26764) 2024-02-04 12:13:03 -06:00
Scott Lahteine 1dee4d92c6 🔧 TOUCH_IDLE_SLEEP_MINS => DISPLAY_SLEEP_MINUTES
Follow up to #26517
2024-02-04 12:09:48 -06:00
Smokey Pell 9364cbb4b5 🚸 Tronxy V10 w/ TFT_TRONXY_X5SA + MKS_ROBIN_TFT43 (#26747) 2024-02-04 09:37:32 -06:00
Taylor Talkington 755b661c2d 🔧 Fix USE_Z_MIN conditions (#26762) 2024-02-04 09:03:08 -06:00
thinkyhead 7f4792e47c [cron] Bump distribution date (2024-02-04) 2024-02-04 00:22:42 +00:00
Keith Bennett e6837b2b8d 🩹 Fix STM32 HW Serial 6 (#26763)
Followup to #26328
2024-02-03 17:19:19 -06:00
thinkyhead 9e21330d7a [cron] Bump distribution date (2024-02-03) 2024-02-03 00:20:49 +00:00
Davide Rombolà c476e62a6f 🩹 Fix STM32 HW Serial (#26531)
Followup to #26328
2024-02-01 19:31:39 -06:00
thinkyhead 4c5d7831c1 [cron] Bump distribution date (2024-02-02) 2024-02-02 00:20:22 +00:00
Abdullah YILMAZ 9a5cfb3f26 🌐 Turkish language update (#26739) 2024-01-31 20:11:08 -06:00
InsanityAutomation 5a87bea762 🚸 Fix repeating "Power Off" message (#26755) 2024-01-31 19:24:08 -06:00
thinkyhead d62f45bdc1 [cron] Bump distribution date (2024-02-01) 2024-02-01 00:21:39 +00:00
ellensp f9d5ee04b4 🩹 Patch STM32 serial UUID (#26737)
Followup to #26715

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-31 12:33:42 -06:00
thinkyhead ef04680cc5 [cron] Bump distribution date (2024-01-31) 2024-01-31 06:06:35 +00:00
Keith Bennett 1c6cfc3ffe 🐛 Fix I/J/K chopper timing (#26736)
Followup to #19112
2024-01-30 23:00:02 -06:00
Keith Bennett 0266e7fe53 📝 Biqu => BIQU (#26735) 2024-01-30 22:58:06 -06:00
ellensp 610ea0a9d3 🔨 No strlcpy in Windows (#26748) 2024-01-30 22:56:46 -06:00
thinkyhead 70d942a184 [cron] Bump distribution date (2024-01-30) 2024-01-30 06:06:23 +00:00
Scott Lahteine 5639237e2b 🎨 Misc. cleanup 29-01 2024-01-29 23:10:12 -06:00
thinkyhead 541bd26cd7 [cron] Bump distribution date (2024-01-29) 2024-01-29 00:21:02 +00:00
Keith Bennett 7a4d601f4d 🩹 Temp constraints followup (#26744)
Followup to cb291e8d
2024-01-28 16:13:23 -06:00
thinkyhead bf8675b44a [cron] Bump distribution date (2024-01-28) 2024-01-28 00:22:35 +00:00
Scott Lahteine ebea672240 🐛 Protect EEPROM bytes 916-926
Followup to #26729

Ender-3S1 STM32F401 Bootloader
2024-01-27 11:49:57 -06:00
Scott Lahteine ce8535f01c 🧑‍💻 Fix warning, adjust tests 2024-01-27 11:49:57 -06:00
thinkyhead 0ba4cd2b3b [cron] Bump distribution date (2024-01-27) 2024-01-27 00:19:36 +00:00
Scott Lahteine afc2dd6cab 🎨 Misc. cleanup 25-01 2024-01-25 22:09:19 -06:00
Scott Lahteine 5768b42c39 Add Conditionals_type.h 2024-01-25 22:06:09 -06:00
thinkyhead ee8630c282 [cron] Bump distribution date (2024-01-26) 2024-01-26 00:42:39 +00:00
Miguel Risco-Castillo 01094ea6aa 🔨 EEPROM exclusion zone (#26729)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-25 18:18:49 -06:00
qwertymodo 6c1fd1f69c 🩹 Fix single Neo strip M150 K (#26709)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-25 18:16:32 -06:00
sargonphin 4f65466161 🔧 HYBRID_THRESHOLD sanity checks (#26681) 2024-01-25 18:13:18 -06:00
ellensp 9b3119393f 🩹 Followup to EDITABLE_STEPS_PER_UNIT (#26677)
Followup to #26618
2024-01-25 17:39:09 -06:00
ejhoness 8594e9462c ✏️ Fix draw_dialog.cpp typo (#26684) 2024-01-25 17:37:35 -06:00
Cesar Guillermo Montiel 16acb57b22 Creality v2.4.S4_170 (Ender 2 Pro, HC32F460KCTA) (#26730) 2024-01-25 17:12:49 -06:00
Scott Lahteine 04c8a3138e 🎨 Misc. LCD pins comments 2024-01-25 15:07:48 -06:00
engrenage 38560378fc 🔧 Allow float Z_PROBE_LOW_POINT (#26711) 2024-01-25 14:31:39 -06:00
Scott Lahteine ffbf4a6a90 🩹 Fix IA Creality IDEX case 2024-01-25 14:31:39 -06:00
thinkyhead a215bc2ca3 [cron] Bump distribution date (2024-01-25) 2024-01-25 00:28:09 +00:00
minding-myown-business cbc674ff99 📝 Fix dead LCD link (#26669) 2024-01-24 18:24:25 -06:00
ellensp 97546bf55b 🚸 PLR recover chamber temp (#26696) 2024-01-24 14:33:02 -06:00
Vovodroid ed1391ee5d 🔧 Wrap POWER_LOSS_RETRACT_LEN (#26695) 2024-01-24 14:21:00 -06:00
Keith Bennett 7fbd9ec5f4 🔧 Allow RAMPS FAN1_PIN override (#26725) 2024-01-24 12:55:59 -06:00
Keith Bennett 63989023b8 🔧 Update SKR_MINI_SCREEN_ADAPTER error (#26726) 2024-01-24 12:54:37 -06:00
ellensp e668d5afd7 🔧 STM32 UID followup (#26727)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-24 12:50:48 -06:00
thinkyhead a2228276bb [cron] Bump distribution date (2024-01-24) 2024-01-24 00:22:20 +00:00
Scott Lahteine 3ef192e7c7 🎨 Cosmetic cleanup 23-01 2024-01-23 16:05:41 -06:00
Scott Lahteine 5fea79fd07 🔧 Fix ROTATIONAL_AXIS_GANG
Co-Authored-By: DerAndere <26200979+DerAndere1@users.noreply.github.com>
2024-01-23 16:02:33 -06:00
Scott Lahteine 18e65f5eb4 🩹 Fix _U and other conflicts
Fix #26220
2024-01-23 15:55:13 -06:00
Scott Lahteine 5ed6bf65ba 🔧 Allow for no STOP pin
Co-Authored-By: DerAndere <26200979+DerAndere1@users.noreply.github.com>
2024-01-23 15:44:51 -06:00
DerAndere d79bcef802 🔧 Sanity check Z_CLEARANCE_FOR_HOMING (#26721) 2024-01-23 14:09:31 -06:00
Anson Liu f1a53407e7 🚸 DOGM active extruder indicator (#26152) 2024-01-23 10:24:49 -06:00
Scott Lahteine 4309e6ab76 🧑‍💻 Fix build_all_examples 2024-01-22 23:58:17 -06:00
thinkyhead 0c3d1cf566 [cron] Bump distribution date (2024-01-23) 2024-01-23 00:50:39 +00:00
Scott Lahteine aa7d571486 ♻️ LCD pins migration precursor (#26719)
Preliminary changes for #25650
2024-01-22 17:32:01 -06:00
Scott Lahteine 604d3e8fad 🎨 Move EXIT_M303 2024-01-22 16:38:08 -06:00
Scott Lahteine 22fc07d72b 🧑‍💻 ExtUI::onPlayTone optional duration 2024-01-22 00:04:08 -06:00
Scott Lahteine dd3b5a10a0 Misc. aesthetic adjustments
Co-Authored-By: Andrew <18502096+classicrocker883@users.noreply.github.com>
2024-01-21 22:15:16 -06:00
thinkyhead 416f94f03a [cron] Bump distribution date (2024-01-22) 2024-01-22 00:23:03 +00:00
Keith Bennett 204de723f1 BIQU MicroProbe (#26527) 2024-01-21 06:01:25 -06:00
Vovodroid 80cd89d8f7 🩹 Fix M592 report (#26680) 2024-01-21 05:11:03 -06:00
ellensp 624226c91d 🩹 Fix STM32 CPU serial UUID (#26715)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-21 05:09:36 -06:00
Keith Bennett 3adf73a2cd 🔥 Remove ALLOW_LOW_EJERK (#26712) 2024-01-20 23:47:26 -06:00
thinkyhead eb7b207e4c [cron] Bump distribution date (2024-01-21) 2024-01-21 00:24:10 +00:00
ellensp d7e45367af 🔨 Fix POLAR build (#26687) 2024-01-20 00:24:30 -06:00
thinkyhead 388c7018c4 [cron] Bump distribution date (2024-01-20) 2024-01-20 00:21:13 +00:00
Vovodroid da96607b65 🔧 Adjust DEFAULT_EJERK settings (#26665) 2024-01-19 16:38:25 -06:00
ellensp fb49645b32 📝 Fix Anet pins typo (#26660) 2024-01-19 13:49:35 -06:00
German Borisov 7d751a20b1 Status Screen flow adjustment (#26627) 2024-01-19 13:17:36 -06:00
thinkyhead 9f7d5bbc86 [cron] Bump distribution date (2024-01-19) 2024-01-19 00:22:09 +00:00
Abdullah YILMAZ 0df25b1008 🌐 Update Turkish language (#26676) 2024-01-18 18:00:43 -06:00
engrenage cef623b7d2 🔧 Clarify M600 sanity-check (#26702) 2024-01-18 17:57:46 -06:00
Andrew 12434e78e4 🔨 Improve CMakeLists.txt (#26700) 2024-01-18 17:55:37 -06:00
thinkyhead 2200607989 [cron] Bump distribution date (2024-01-17) 2024-01-17 06:06:41 +00:00
Scott Lahteine c31381183b Minor Orca update
Followup to #26534
2024-01-16 23:15:04 -06:00
thinkyhead 76dce41580 [cron] Bump distribution date (2024-01-16) 2024-01-16 06:06:41 +00:00
Scott Lahteine 1f1ca34ea6 🧑‍💻 Tweak limit_and_warn 2024-01-15 22:22:08 -06:00
Scott Lahteine 8d4ab15748 🧑‍💻 Tweak planner debug 2024-01-15 21:36:15 -06:00
thinkyhead 745577693d [cron] Bump distribution date (2024-01-15) 2024-01-15 00:22:58 +00:00
Scott Lahteine 3019af1c93 🔨 Make / pins-format patches 2024-01-13 18:34:12 -06:00
thinkyhead 8916e6f826 [cron] Bump distribution date (2024-01-14) 2024-01-14 00:24:03 +00:00
Robherc b2fd631d82 🔧 Fix SD connection defaults (#26666)
Co-authored-by: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-12 22:03:34 -06:00
thinkyhead cadef64418 [cron] Bump distribution date (2024-01-13) 2024-01-13 00:21:34 +00:00
ThomasToka ab3497161a 🐛 Fix PLR pos/sdpos (#26365)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-11 23:56:45 -06:00
thinkyhead 46f370ae3c [cron] Bump distribution date (2024-01-12) 2024-01-12 00:21:50 +00:00
Scott Lahteine 0f43ac79f6 ️ Revert encoder changes
Reverts #26501
2024-01-10 18:25:17 -06:00
thinkyhead ef92b6c369 [cron] Bump distribution date (2024-01-11) 2024-01-11 00:21:50 +00:00
Scott Lahteine f44f9eb9f8 🎨 Misc. style adjustments 2024-01-10 14:49:28 -06:00
plampix 854f3315af EDITABLE_STEPS_PER_UNIT (#26618)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-10 00:33:54 -06:00
Vovodroid 1d46e67de2 PLR_BED_THRESHOLD (#26649)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-09 23:13:10 -06:00
Scott Lahteine 85ded0b9bd 🩹 Clarify servo µs min/max 2024-01-09 22:41:54 -06:00
Scott Lahteine cb291e8d00 🩹 Fix some temp constraints 2024-01-09 22:41:00 -06:00
ellensp 25caae1e8c 🩹 Fix PID / MPC tune background tasks (#26652)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-09 20:55:20 -06:00
Scott Lahteine 12d7995a18 🎨 Minor temp / UI refactor 2024-01-09 18:45:17 -06:00
thinkyhead 320b7a9ac3 [cron] Bump distribution date (2024-01-10) 2024-01-10 00:21:58 +00:00
Vovodroid a533e9e637 🩹 Fix edit Z jerk step size (#26650)
Followup to #25514

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-09 15:42:08 -06:00
ellensp f6ecdae972 🔧 Base NUM_SERVO_PLUGS on SERVO PINS (#26640)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-09 15:19:47 -06:00
thinkyhead 477b70eccf [cron] Bump distribution date (2024-01-09) 2024-01-09 00:22:16 +00:00
narno2202 b2dd2dc217 🚸 FT Motion M493 report less precision (#26643) 2024-01-07 22:26:34 -06:00
narno2202 b106f59eb4 🐛 Refine FT Motion, I2S Stepping (#26628)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-07 22:17:43 -06:00
mikemerryguy 38f483c4a6 🩹 Skip post-G28 XY move for untrusted X or Y (#26644)
Followup to #26469

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-07 22:14:24 -06:00
Scott Lahteine f4eafed188 🔧 Z_PROBE_END_SCRIPT => EVENT_GCODE_AFTER_G29 2024-01-07 21:59:25 -06:00
Scott Lahteine 5987a5464b 🎨 Use float CEIL/FLOOR 2024-01-07 19:34:34 -06:00
thinkyhead 3a888e956b [cron] Bump distribution date (2024-01-08) 2024-01-08 00:30:52 +00:00
Alexander Gavrilenko 4cddc61eda 🐛 Fix SPI TFT for STM32F1/F4 (#26052) 2024-01-07 18:18:18 -06:00
thinkyhead 2a8c00bdeb [cron] Bump distribution date (2024-01-06) 2024-01-06 00:21:22 +00:00
Scott Lahteine 4ae2a76492 🎨 Clean up ws 2024-01-05 12:34:50 -06:00
Scott Lahteine a5d097abe6 ✏️ Fix CTC_A10S_A13 typo
Followup to #26514
2024-01-04 18:51:32 -06:00
thinkyhead 5e0a8d2124 [cron] Bump distribution date (2024-01-05) 2024-01-05 00:21:26 +00:00
plampix 994aa9f692 ️ Slimmer null T command (#26615)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-04 17:09:53 -06:00
Andrew 6e67ad51b7 🎨 Followup to optional M111/M115 (#26626)
Followup to #26603
2024-01-04 17:07:53 -06:00
Scott Lahteine 52693f72af 🎨 Clean up some checks & includes 2024-01-04 13:06:41 -06:00
Jason Smith 991f433ac1 🐛 Fix hangs in DUE native USB (#26572) 2024-01-03 21:14:17 -06:00
Taylor Talkington 54b7da18cb 🩹 Fix Bed PID Autotune output (#26606)
Followup to #25928
2024-01-03 20:45:50 -06:00
thinkyhead f8771e9ad5 [cron] Bump distribution date (2024-01-04) 2024-01-04 00:21:47 +00:00
Orel be1dee7caf 🎨 Clean up old #includes (#26621) 2024-01-03 14:02:20 -06:00
narno2202 68b7802fc1 📝 Update M493 (FT_MOTION) comments (#26620)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-03 13:19:19 -06:00
plampix 6d407767e7 🔧 CONFIGURE_FILAMENT_CHANGE - Optional M603 (#26613)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-03 09:43:18 -06:00
I3DBeeTech 4a9e102c2e 📺 I3DBEE TECH Beez Mini 12864 (#26596) 2024-01-02 18:53:41 -06:00
ellensp 1ac6428c82 🔪 Options to slim M111, remove M115 (#26603)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 18:52:12 -06:00
thinkyhead 7c159a20e5 [cron] Bump distribution date (2024-01-03) 2024-01-03 00:21:14 +00:00
ellensp 5b74e25108 🔨 BSD string workaround (#26532)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 01:25:26 -06:00
thinkyhead f02fa6339f [cron] Bump distribution date (2024-01-02) 2024-01-02 00:21:06 +00:00
713 changed files with 21178 additions and 17960 deletions
-40
View File
@@ -1,40 +0,0 @@
#
# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app
#
# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 60
# Skip issues and pull requests created before a given timestamp. Timestamp must
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
skipCreatedBefore: false
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
exemptLabels: [ 'no-locking' ]
# Label to add before locking, such as `outdated`. Set to `false` to disable
lockLabel: false
# Comment to post before locking. Set to `false` to disable
lockComment: >
This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.
# Assign `resolved` as the reason for locking. Set to `false` to disable
setLockReason: true
# Limit to only `issues` or `pulls`
# only: issues
# Optionally, specify configuration settings just for `issues` or `pulls`
# issues:
# exemptLabels:
# - help-wanted
# lockLabel: outdated
# pulls:
# daysUntilLock: 30
# Repository to extend settings from
# _extends: repo
+2 -2
View File
@@ -19,7 +19,7 @@ jobs:
steps: steps:
- name: Check out bugfix-2.0.x - name: Check out bugfix-2.0.x
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
ref: bugfix-2.0.x ref: bugfix-2.0.x
@@ -39,7 +39,7 @@ jobs:
exit 0 exit 0
- name: Check out bugfix-2.1.x - name: Check out bugfix-2.1.x
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
ref: bugfix-2.1.x ref: bugfix-2.1.x
+1 -1
View File
@@ -32,7 +32,7 @@ jobs:
- "Needs: Work" - "Needs: Work"
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Remove Labels - name: Remove Labels
uses: actions-ecosystem/action-remove-labels@v1 uses: actions-ecosystem/action-remove-labels@v1
with: with:
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v8 - uses: actions/stale@v9
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: | stale-issue-message: |
+6 -6
View File
@@ -17,15 +17,15 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: dessant/lock-threads@v2 - uses: dessant/lock-threads@v5
with: with:
github-token: ${{ github.token }} github-token: ${{ github.token }}
process-only: 'issues' process-only: 'issues'
issue-lock-inactive-days: '60' issue-inactive-days: '60'
issue-exclude-created-before: '' exclude-issue-created-before: ''
issue-exclude-labels: 'no-locking' exclude-any-issue-labels: 'no-locking'
issue-lock-labels: '' add-issue-labels: ''
issue-lock-comment: > issue-comment: >
This issue has been automatically locked since there This issue has been automatically locked since there
has not been any recent activity after it was closed. has not been any recent activity after it was closed.
Please open a new issue for related bugs. Please open a new issue for related bugs.
+3 -3
View File
@@ -152,7 +152,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Cache pip - name: Cache pip
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ~/.cache/pip path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
@@ -160,13 +160,13 @@ jobs:
${{ runner.os }}-pip- ${{ runner.os }}-pip-
- name: Cache PlatformIO - name: Cache PlatformIO
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ~/.platformio path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Select Python 3.9 - name: Select Python 3.9
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: '3.9' python-version: '3.9'
architecture: 'x64' architecture: 'x64'
+13 -17
View File
@@ -5,13 +5,14 @@ CONTAINER_IMAGE := marlin-dev
help: help:
@echo "Tasks for local development:" @echo "Tasks for local development:"
@echo "* format-pins: Reformat all pins files" @echo "make marlin : Build marlin for the configured board"
@echo "* tests-single-ci: Run a single test from inside the CI" @echo "make format-pins : Reformat all pins files"
@echo "* tests-single-local: Run a single test locally" @echo "make tests-single-ci : Run a single test from inside the CI"
@echo "* tests-single-local-docker: Run a single test locally, using docker" @echo "make tests-single-local : Run a single test locally"
@echo "* tests-all-local: Run all tests locally" @echo "make tests-single-local-docker : Run a single test locally, using docker"
@echo "* tests-all-local-docker: Run all tests locally, using docker" @echo "make tests-all-local : Run all tests locally"
@echo "* setup-local-docker: Build the local docker image" @echo "make tests-all-local-docker : Run all tests locally, using docker"
@echo "make setup-local-docker : Build the local docker image"
@echo "" @echo ""
@echo "Options for testing:" @echo "Options for testing:"
@echo " TEST_TARGET Set when running tests-single-*, to select the" @echo " TEST_TARGET Set when running tests-single-*, to select the"
@@ -24,46 +25,41 @@ help:
@echo " VERBOSE_PLATFORMIO If you want the full PIO output, set any value" @echo " VERBOSE_PLATFORMIO If you want the full PIO output, set any value"
@echo " GIT_RESET_HARD Used by CI: reset all local changes. WARNING:" @echo " GIT_RESET_HARD Used by CI: reset all local changes. WARNING:"
@echo " THIS WILL UNDO ANY CHANGES YOU'VE MADE!" @echo " THIS WILL UNDO ANY CHANGES YOU'VE MADE!"
.PHONY: help
marlin:
./buildroot/bin/mftest -a
.PHONY: marlin
tests-single-ci: tests-single-ci:
export GIT_RESET_HARD=true export GIT_RESET_HARD=true
$(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) PLATFORMIO_BUILD_FLAGS=-DGITHUB_ACTION $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) PLATFORMIO_BUILD_FLAGS=-DGITHUB_ACTION
.PHONY: tests-single-ci
tests-single-local: tests-single-local:
@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local" ; return 1; fi @if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local" ; return 1; fi
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \ export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \ && export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
&& run_tests . $(TEST_TARGET) "$(ONLY_TEST)" && run_tests . $(TEST_TARGET) "$(ONLY_TEST)"
.PHONY: tests-single-local
tests-single-local-docker: tests-single-local-docker:
@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local-docker" ; return 1; fi @if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local-docker" ; return 1; fi
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi @if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)" $(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)"
.PHONY: tests-single-local-docker
tests-all-local: tests-all-local:
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \ export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \ && export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
&& for TEST_TARGET in $$($(SCRIPTS_DIR)/get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done && for TEST_TARGET in $$($(SCRIPTS_DIR)/get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done
.PHONY: tests-all-local
tests-all-local-docker: tests-all-local-docker:
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi @if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) $(MAKE) tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) $(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) $(MAKE) tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD)
.PHONY: tests-all-local-docker
setup-local-docker: setup-local-docker:
$(CONTAINER_RT_BIN) build -t $(CONTAINER_IMAGE) -f docker/Dockerfile . $(CONTAINER_RT_BIN) build -t $(CONTAINER_IMAGE) -f docker/Dockerfile .
.PHONY: setup-local-docker
PINS := $(shell find Marlin/src/pins -mindepth 2 -name '*.h') PINS := $(shell find Marlin/src/pins -mindepth 2 -name '*.h')
.PHONY: $(PINS)
$(PINS): %: $(PINS): %:
@echo "Formatting $@" && node buildroot/share/scripts/pinsformat.js $@ @echo "Formatting $@" && node $(SCRIPTS_DIR)/pinsformat.js $@
format-pins: $(PINS) format-pins: $(PINS)
+107 -86
View File
@@ -61,14 +61,14 @@
// @section info // @section info
// Author info of this build printed to the host during boot and M115 // Author info of this build printed to the host during boot and M115
#define STRING_CONFIG_H_AUTHOR "InsanityAutomation" // Who made the changes. #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes) //#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
// @section machine // @section machine
// Choose the name from boards.h that matches your setup // Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD #ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_BTT_OCTOPUS_V1_0 #define MOTHERBOARD BOARD_RAMPS_14_EFB
#endif #endif
/** /**
@@ -79,7 +79,7 @@
* *
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7] * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/ */
#define SERIAL_PORT -1 #define SERIAL_PORT 0
/** /**
* Serial Port Baud Rate * Serial Port Baud Rate
@@ -101,7 +101,7 @@
* Currently Ethernet (-2) is only supported on Teensy 4.1 boards. * Currently Ethernet (-2) is only supported on Teensy 4.1 boards.
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7] * :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
*/ */
#define SERIAL_PORT_2 1 //#define SERIAL_PORT_2 -1
//#define BAUDRATE_2 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE //#define BAUDRATE_2 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
/** /**
@@ -116,7 +116,7 @@
//#define BLUETOOTH //#define BLUETOOTH
// Name displayed in the LCD "Ready" message and Info menu // Name displayed in the LCD "Ready" message and Info menu
#define CUSTOM_MACHINE_NAME "FatBoy" //#define CUSTOM_MACHINE_NAME "3D Printer"
// Printer's unique ID, used by some programs to differentiate between machines. // Printer's unique ID, used by some programs to differentiate between machines.
// Choose your own or use a service like https://www.uuidgenerator.net/version4 // Choose your own or use a service like https://www.uuidgenerator.net/version4
@@ -135,25 +135,25 @@
* Options: A4988, A5984, DRV8825, LV8729, TB6560, TB6600, TMC2100, * Options: A4988, A5984, DRV8825, LV8729, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE, * TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE,
* TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE, * TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, * TMC2660, TMC2660_STANDALONE, TMC5130, TMC5130_STANDALONE,
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE * TMC5160, TMC5160_STANDALONE
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE'] * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
*/ */
#define X_DRIVER_TYPE TB6560 #define X_DRIVER_TYPE A4988
#define Y_DRIVER_TYPE TB6560 #define Y_DRIVER_TYPE A4988
#define Z_DRIVER_TYPE TB6560 #define Z_DRIVER_TYPE A4988
//#define X2_DRIVER_TYPE A4988 //#define X2_DRIVER_TYPE A4988
#define Y2_DRIVER_TYPE TB6560 //#define Y2_DRIVER_TYPE A4988
#define Z2_DRIVER_TYPE TB6560 //#define Z2_DRIVER_TYPE A4988
#define Z3_DRIVER_TYPE TB6560 //#define Z3_DRIVER_TYPE A4988
#define Z4_DRIVER_TYPE TB6560 //#define Z4_DRIVER_TYPE A4988
//#define I_DRIVER_TYPE A4988 //#define I_DRIVER_TYPE A4988
//#define J_DRIVER_TYPE A4988 //#define J_DRIVER_TYPE A4988
//#define K_DRIVER_TYPE A4988 //#define K_DRIVER_TYPE A4988
//#define U_DRIVER_TYPE A4988 //#define U_DRIVER_TYPE A4988
//#define V_DRIVER_TYPE A4988 //#define V_DRIVER_TYPE A4988
//#define W_DRIVER_TYPE A4988 //#define W_DRIVER_TYPE A4988
#define E0_DRIVER_TYPE TMC2209 #define E0_DRIVER_TYPE A4988
//#define E1_DRIVER_TYPE A4988 //#define E1_DRIVER_TYPE A4988
//#define E2_DRIVER_TYPE A4988 //#define E2_DRIVER_TYPE A4988
//#define E3_DRIVER_TYPE A4988 //#define E3_DRIVER_TYPE A4988
@@ -401,9 +401,18 @@
//#define PS_OFF_SOUND // Beep 1s when power off //#define PS_OFF_SOUND // Beep 1s when power off
#define PSU_ACTIVE_STATE LOW // Set 'LOW' for ATX, 'HIGH' for X-Box #define PSU_ACTIVE_STATE LOW // Set 'LOW' for ATX, 'HIGH' for X-Box
//#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80 //#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80
//#define PSU_POWERUP_DELAY 250 // (ms) Delay for the PSU to warm up to full power //#define PSU_POWERUP_DELAY 250 // (ms) Delay for the PSU to warm up to full power
//#define LED_POWEROFF_TIMEOUT 10000 // (ms) Turn off LEDs after power-off, with this amount of delay //#define LED_POWEROFF_TIMEOUT 10000 // (ms) Turn off LEDs after power-off, with this amount of delay
//#define PSU_OFF_REDUNDANT // Second pin for redundant power control
//#define PSU_OFF_REDUNDANT_INVERTED // Redundant pin state is the inverse of PSU_ACTIVE_STATE
//#define PS_ON1_PIN 6 // Redundant pin required to enable power in combination with PS_ON_PIN
//#define PS_ON_EDM_PIN 8 // External Device Monitoring pins for external power control relay feedback. Fault on mismatch.
//#define PS_ON1_EDM_PIN 9
#define PS_EDM_RESPONSE 250 // (ms) Time to allow for relay action
//#define POWER_OFF_TIMER // Enable M81 D<seconds> to power off after a delay //#define POWER_OFF_TIMER // Enable M81 D<seconds> to power off after a delay
//#define POWER_OFF_WAIT_FOR_COOLDOWN // Enable M81 S to power off only after cooldown //#define POWER_OFF_WAIT_FOR_COOLDOWN // Enable M81 S to power off only after cooldown
@@ -552,7 +561,7 @@
#define TEMP_SENSOR_5 0 #define TEMP_SENSOR_5 0
#define TEMP_SENSOR_6 0 #define TEMP_SENSOR_6 0
#define TEMP_SENSOR_7 0 #define TEMP_SENSOR_7 0
#define TEMP_SENSOR_BED 11 #define TEMP_SENSOR_BED 1
#define TEMP_SENSOR_PROBE 0 #define TEMP_SENSOR_PROBE 0
#define TEMP_SENSOR_CHAMBER 0 #define TEMP_SENSOR_CHAMBER 0
#define TEMP_SENSOR_COOLER 0 #define TEMP_SENSOR_COOLER 0
@@ -628,7 +637,7 @@
// Above this temperature the heater will be switched off. // Above this temperature the heater will be switched off.
// This can protect components from overheating, but NOT from shorts and failures. // This can protect components from overheating, but NOT from shorts and failures.
// (Use MINTEMP for thermistor short/failure protection.) // (Use MINTEMP for thermistor short/failure protection.)
#define HEATER_0_MAXTEMP 300 #define HEATER_0_MAXTEMP 275
#define HEATER_1_MAXTEMP 275 #define HEATER_1_MAXTEMP 275
#define HEATER_2_MAXTEMP 275 #define HEATER_2_MAXTEMP 275
#define HEATER_3_MAXTEMP 275 #define HEATER_3_MAXTEMP 275
@@ -636,7 +645,7 @@
#define HEATER_5_MAXTEMP 275 #define HEATER_5_MAXTEMP 275
#define HEATER_6_MAXTEMP 275 #define HEATER_6_MAXTEMP 275
#define HEATER_7_MAXTEMP 275 #define HEATER_7_MAXTEMP 275
#define BED_MAXTEMP 120 #define BED_MAXTEMP 150
#define CHAMBER_MAXTEMP 60 #define CHAMBER_MAXTEMP 60
/** /**
@@ -645,7 +654,7 @@
* (especially before PID tuning). Setting the target temperature too close to MAXTEMP guarantees * (especially before PID tuning). Setting the target temperature too close to MAXTEMP guarantees
* a MAXTEMP shutdown! Use these values to forbid temperatures being set too close to MAXTEMP. * a MAXTEMP shutdown! Use these values to forbid temperatures being set too close to MAXTEMP.
*/ */
#define HOTEND_OVERSHOOT 10 // (°C) Forbid temperatures over MAXTEMP - OVERSHOOT #define HOTEND_OVERSHOOT 15 // (°C) Forbid temperatures over MAXTEMP - OVERSHOOT
#define BED_OVERSHOOT 10 // (°C) Forbid temperatures over MAXTEMP - OVERSHOOT #define BED_OVERSHOOT 10 // (°C) Forbid temperatures over MAXTEMP - OVERSHOOT
#define COOLER_OVERSHOOT 2 // (°C) Forbid temperatures closer than OVERSHOOT #define COOLER_OVERSHOOT 2 // (°C) Forbid temperatures closer than OVERSHOOT
@@ -748,7 +757,7 @@
* When set to any value below 255, enables a form of PWM to the bed that acts like a divider * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
* so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
*/ */
#define MAX_BED_POWER 180 // limits duty cycle to bed; 255=full current #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
/** /**
* PID Bed Heating * PID Bed Heating
@@ -762,7 +771,7 @@
* *
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis. * With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/ */
#define PIDTEMPBED //#define PIDTEMPBED
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0 //#define MIN_BED_POWER 0
@@ -833,8 +842,8 @@
#define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of flash) //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of flash)
#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of flash) //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of flash)
#endif #endif
// @section safety // @section safety
@@ -1006,9 +1015,6 @@
// Radius around the center where the arm cannot reach // Radius around the center where the arm cannot reach
#define MIDDLE_DEAD_ZONE_R 0 // (mm) #define MIDDLE_DEAD_ZONE_R 0 // (mm)
#define THETA_HOMING_OFFSET 0 // Calculated from Calibration Guide and M360 / M114. See https://www.morgan3dp.com/morgan-calibration-guide/
#define PSI_HOMING_OFFSET 0 // Calculated from Calibration Guide and M364 / M114. See https://www.morgan3dp.com/morgan-calibration-guide/
#elif ENABLED(MP_SCARA) #elif ENABLED(MP_SCARA)
#define SCARA_OFFSET_THETA1 12 // degrees #define SCARA_OFFSET_THETA1 12 // degrees
@@ -1027,23 +1033,19 @@
#define DEFAULT_SEGMENTS_PER_SECOND 200 #define DEFAULT_SEGMENTS_PER_SECOND 200
// Length of inner and outer support arms. Measure arm lengths precisely. // Length of inner and outer support arms. Measure arm lengths precisely.
#define TPARA_LINKAGE_1 120 // (mm) #define TPARA_LINKAGE_1 120 // (mm)
#define TPARA_LINKAGE_2 120 // (mm) #define TPARA_LINKAGE_2 120 // (mm)
// SCARA tower offset (position of Tower relative to bed zero position) // TPARA tower offset (position of Tower relative to bed zero position)
// This needs to be reasonably accurate as it defines the printbed position in the SCARA space. // This needs to be reasonably accurate as it defines the printbed position in the TPARA space.
#define TPARA_OFFSET_X 0 // (mm) #define TPARA_OFFSET_X 0 // (mm)
#define TPARA_OFFSET_Y 0 // (mm) #define TPARA_OFFSET_Y 0 // (mm)
#define TPARA_OFFSET_Z 0 // (mm) #define TPARA_OFFSET_Z 0 // (mm)
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly #define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
// Radius around the center where the arm cannot reach // Radius around the center where the arm cannot reach
#define MIDDLE_DEAD_ZONE_R 0 // (mm) #define MIDDLE_DEAD_ZONE_R 0 // (mm)
// Calculated from Calibration Guide and M360 / M114. See https://www.morgan3dp.com/morgan-calibration-guide/
#define THETA_HOMING_OFFSET 0
#define PSI_HOMING_OFFSET 0
#endif #endif
// @section polar // @section polar
@@ -1231,10 +1233,15 @@
/** /**
* Default Axis Steps Per Unit (linear=steps/mm, rotational=steps/°) * Default Axis Steps Per Unit (linear=steps/mm, rotational=steps/°)
* Override with M92 * Override with M92 (when enabled below)
* X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]] * X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]]
*/ */
#define DEFAULT_AXIS_STEPS_PER_UNIT { 40, 40, 200, 425 } #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 500 }
/**
* Enable support for M92. Disable to save at least ~530 bytes of flash.
*/
#define EDITABLE_STEPS_PER_UNIT
/** /**
* Default Max Feed Rate (linear=mm/s, rotational=°/s) * Default Max Feed Rate (linear=mm/s, rotational=°/s)
@@ -1254,7 +1261,7 @@
* Override with M201 * Override with M201
* X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]] * X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]]
*/ */
#define DEFAULT_MAX_ACCELERATION { 12000, 12000, 500, 10000 } #define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 }
//#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2 //#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
#if ENABLED(LIMITED_MAX_ACCEL_EDITING) #if ENABLED(LIMITED_MAX_ACCEL_EDITING)
@@ -1269,9 +1276,9 @@
* M204 R Retract Acceleration * M204 R Retract Acceleration
* M204 T Travel Acceleration * M204 T Travel Acceleration
*/ */
#define DEFAULT_ACCELERATION 7000 // X, Y, Z and E acceleration for printing moves #define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts #define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION 7000 // X, Y, Z acceleration for travel (non printing) moves #define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves
/** /**
* Default Jerk limits (mm/s) * Default Jerk limits (mm/s)
@@ -1286,6 +1293,7 @@
#define DEFAULT_XJERK 10.0 #define DEFAULT_XJERK 10.0
#define DEFAULT_YJERK 10.0 #define DEFAULT_YJERK 10.0
#define DEFAULT_ZJERK 0.3 #define DEFAULT_ZJERK 0.3
#define DEFAULT_EJERK 5.0
//#define DEFAULT_IJERK 0.3 //#define DEFAULT_IJERK 0.3
//#define DEFAULT_JJERK 0.3 //#define DEFAULT_JJERK 0.3
//#define DEFAULT_KJERK 0.3 //#define DEFAULT_KJERK 0.3
@@ -1301,8 +1309,6 @@
#endif #endif
#endif #endif
#define DEFAULT_EJERK 5.0 // May be used by Linear Advance
/** /**
* Junction Deviation Factor * Junction Deviation Factor
* *
@@ -1324,7 +1330,7 @@
* *
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/ */
#define S_CURVE_ACCELERATION //#define S_CURVE_ACCELERATION
//=========================================================================== //===========================================================================
//============================= Z Probe Options ============================= //============================= Z Probe Options =============================
@@ -1340,10 +1346,10 @@
* The probe replaces the Z-MIN endstop and is used for Z homing. * The probe replaces the Z-MIN endstop and is used for Z homing.
* (Automatically enables USE_PROBE_FOR_Z_HOMING.) * (Automatically enables USE_PROBE_FOR_Z_HOMING.)
*/ */
//#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN #define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
// Force the use of the probe for Z-axis homing // Force the use of the probe for Z-axis homing
#define USE_PROBE_FOR_Z_HOMING //#define USE_PROBE_FOR_Z_HOMING
/** /**
* Z_MIN_PROBE_PIN * Z_MIN_PROBE_PIN
@@ -1400,7 +1406,7 @@
/** /**
* The BLTouch probe uses a Hall effect sensor and emulates a servo. * The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/ */
#define BLTOUCH //#define BLTOUCH
/** /**
* MagLev V4 probe by MDD * MagLev V4 probe by MDD
@@ -1442,6 +1448,17 @@
//#define BD_SENSOR_PROBE_NO_STOP // Probe bed without stopping at each probe point //#define BD_SENSOR_PROBE_NO_STOP // Probe bed without stopping at each probe point
#endif #endif
/**
* BIQU MicroProbe
*
* A lightweight, solenoid-driven probe.
* For information about this sensor https://github.com/bigtreetech/MicroProbe
*
* Also requires: PROBE_ENABLE_DISABLE
*/
//#define BIQU_MICROPROBE_V1 // Triggers HIGH
//#define BIQU_MICROPROBE_V2 // Triggers LOW
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE //#define SOLENOID_PROBE
@@ -1630,7 +1647,7 @@
* A total of 2 does fast/slow probes with a weighted average. * A total of 2 does fast/slow probes with a weighted average.
* A total of 3 or more adds more slow probes, taking the average. * A total of 3 or more adds more slow probes, taking the average.
*/ */
#define MULTIPLE_PROBING 2 //#define MULTIPLE_PROBING 2
//#define EXTRA_PROBING 1 //#define EXTRA_PROBING 1
/** /**
@@ -1653,7 +1670,7 @@
#define Z_PROBE_ERROR_TOLERANCE 3 // (mm) Tolerance for early trigger (<= -probe.offset.z + ZPET) #define Z_PROBE_ERROR_TOLERANCE 3 // (mm) Tolerance for early trigger (<= -probe.offset.z + ZPET)
//#define Z_AFTER_PROBING 5 // (mm) Z position after probing is done //#define Z_AFTER_PROBING 5 // (mm) Z position after probing is done
#define Z_PROBE_LOW_POINT -5 // (mm) Farthest distance below the trigger-point to go before stopping #define Z_PROBE_LOW_POINT -2 // (mm) Farthest distance below the trigger-point to go before stopping
// For M851 provide ranges for adjusting the X, Y, and Z probe offsets // For M851 provide ranges for adjusting the X, Y, and Z probe offsets
//#define PROBE_OFFSET_XMIN -50 // (mm) //#define PROBE_OFFSET_XMIN -50 // (mm)
@@ -1732,9 +1749,9 @@
// @section motion // @section motion
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR true #define INVERT_X_DIR false
#define INVERT_Y_DIR false #define INVERT_Y_DIR true
#define INVERT_Z_DIR true #define INVERT_Z_DIR false
//#define INVERT_I_DIR false //#define INVERT_I_DIR false
//#define INVERT_J_DIR false //#define INVERT_J_DIR false
//#define INVERT_K_DIR false //#define INVERT_K_DIR false
@@ -1804,8 +1821,8 @@
// @section geometry // @section geometry
// The size of the printable area // The size of the printable area
#define X_BED_SIZE 1200 #define X_BED_SIZE 200
#define Y_BED_SIZE 1200 #define Y_BED_SIZE 200
// Travel limits (linear=mm, rotational=°) after homing, corresponding to endstop positions. // Travel limits (linear=mm, rotational=°) after homing, corresponding to endstop positions.
#define X_MIN_POS 0 #define X_MIN_POS 0
@@ -1813,7 +1830,7 @@
#define Z_MIN_POS 0 #define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE #define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE #define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 1000 #define Z_MAX_POS 200
//#define I_MIN_POS 0 //#define I_MIN_POS 0
//#define I_MAX_POS 50 //#define I_MAX_POS 50
//#define J_MIN_POS 0 //#define J_MIN_POS 0
@@ -1865,7 +1882,7 @@
#endif #endif
#if ANY(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #if ANY(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
#endif #endif
/** /**
@@ -2024,7 +2041,7 @@
*/ */
//#define AUTO_BED_LEVELING_3POINT //#define AUTO_BED_LEVELING_3POINT
//#define AUTO_BED_LEVELING_LINEAR //#define AUTO_BED_LEVELING_LINEAR
#define AUTO_BED_LEVELING_BILINEAR //#define AUTO_BED_LEVELING_BILINEAR
//#define AUTO_BED_LEVELING_UBL //#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING //#define MESH_BED_LEVELING
@@ -2032,14 +2049,14 @@
* Commands to execute at the end of G29 probing. * Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way. * Useful to retract or move the Z probe out of the way.
*/ */
//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //#define EVENT_GCODE_AFTER_G29 "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
/** /**
* Normally G28 leaves leveling disabled on completion. Enable one of * Normally G28 leaves leveling disabled on completion. Enable one of
* these options to restore the prior leveling state or to always enable * these options to restore the prior leveling state or to always enable
* leveling immediately after G28. * leveling immediately after G28.
*/ */
#define RESTORE_LEVELING_AFTER_G28 //#define RESTORE_LEVELING_AFTER_G28
//#define ENABLE_LEVELING_AFTER_G28 //#define ENABLE_LEVELING_AFTER_G28
/** /**
@@ -2054,7 +2071,7 @@
/** /**
* Enable detailed logging of G28, G29, M48, etc. * Enable detailed logging of G28, G29, M48, etc.
* Turn on with the command 'M111 S32'. * Turn on with the command 'M111 S32'.
* NOTE: Requires a lot of PROGMEM! * NOTE: Requires a lot of flash!
*/ */
//#define DEBUG_LEVELING_FEATURE //#define DEBUG_LEVELING_FEATURE
@@ -2071,7 +2088,7 @@
*/ */
#define ENABLE_LEVELING_FADE_HEIGHT #define ENABLE_LEVELING_FADE_HEIGHT
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
#define DEFAULT_LEVELING_FADE_HEIGHT 0.0 // (mm) Default fade height. #define DEFAULT_LEVELING_FADE_HEIGHT 10.0 // (mm) Default fade height.
#endif #endif
/** /**
@@ -2085,7 +2102,7 @@
/** /**
* Enable the G26 Mesh Validation Pattern tool. * Enable the G26 Mesh Validation Pattern tool.
*/ */
#define G26_MESH_VALIDATION //#define G26_MESH_VALIDATION
#if ENABLED(G26_MESH_VALIDATION) #if ENABLED(G26_MESH_VALIDATION)
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle. #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for G26. #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for G26.
@@ -2101,7 +2118,7 @@
#if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) #if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
// Set the number of grid points per dimension. // Set the number of grid points per dimension.
#define GRID_MAX_POINTS_X 15 #define GRID_MAX_POINTS_X 3
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Probe along the Y axis, advancing X after each column // Probe along the Y axis, advancing X after each column
@@ -2111,7 +2128,7 @@
// Beyond the probed grid, continue the implied tilt? // Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge. // Default is to maintain the height of the nearest edge.
#define EXTRAPOLATE_BEYOND_GRID //#define EXTRAPOLATE_BEYOND_GRID
// //
// Subdivision of the grid by Catmull-Rom method. // Subdivision of the grid by Catmull-Rom method.
@@ -2187,12 +2204,12 @@
* Add a bed leveling sub-menu for ABL or MBL. * Add a bed leveling sub-menu for ABL or MBL.
* Include a guided procedure if manual probing is enabled. * Include a guided procedure if manual probing is enabled.
*/ */
#define LCD_BED_LEVELING //#define LCD_BED_LEVELING
#if ENABLED(LCD_BED_LEVELING) #if ENABLED(LCD_BED_LEVELING)
#define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis. #define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 8 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment #define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment
#define MESH_EDIT_MENU // Add a menu to edit mesh points //#define MESH_EDIT_MENU // Add a menu to edit mesh points
#endif #endif
// Add a menu item to move between bed corners for manual bed adjustment // Add a menu item to move between bed corners for manual bed adjustment
@@ -2254,7 +2271,7 @@
* - Allows Z homing only when XY positions are known and trusted. * - Allows Z homing only when XY positions are known and trusted.
* - If stepper drivers sleep, XY homing may be required again before Z homing. * - If stepper drivers sleep, XY homing may be required again before Z homing.
*/ */
#define Z_SAFE_HOMING //#define Z_SAFE_HOMING
#if ENABLED(Z_SAFE_HOMING) #if ENABLED(Z_SAFE_HOMING)
#define Z_SAFE_HOMING_X_POINT X_CENTER // (mm) X point for Z homing #define Z_SAFE_HOMING_X_POINT X_CENTER // (mm) X point for Z homing
@@ -2341,12 +2358,12 @@
* M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes)
* M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.)
*/ */
#define EEPROM_SETTINGS // Persistent storage with M500 and M501 //#define EEPROM_SETTINGS // Persistent storage with M500 and M501
//#define DISABLE_M503 // Saves ~2700 bytes of flash. Disable for release! //#define DISABLE_M503 // Saves ~2700 bytes of flash. Disable for release!
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. #define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save flash.
#define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load #define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS)
#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors.
//#define EEPROM_INIT_NOW // Init EEPROM on first boot after a new build. //#define EEPROM_INIT_NOW // Init EEPROM on first boot after a new build.
#endif #endif
@@ -2404,11 +2421,11 @@
* P1 Raise the nozzle always to Z-park height. * P1 Raise the nozzle always to Z-park height.
* P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
*/ */
#define NOZZLE_PARK_FEATURE //#define NOZZLE_PARK_FEATURE
#if ENABLED(NOZZLE_PARK_FEATURE) #if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z_raise } // Specify a park position as { X, Y, Z_raise }
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MIN_POS + 10), 5 } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
#define NOZZLE_PARK_MOVE 0 // Park motion: 0 = XY Move, 1 = X Only, 2 = Y Only, 3 = X before Y, 4 = Y before X #define NOZZLE_PARK_MOVE 0 // Park motion: 0 = XY Move, 1 = X Only, 2 = Y Only, 3 = X before Y, 4 = Y before X
#define NOZZLE_PARK_Z_RAISE_MIN 2 // (mm) Always raise Z by at least this distance #define NOZZLE_PARK_Z_RAISE_MIN 2 // (mm) Always raise Z by at least this distance
#define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis)
@@ -2619,9 +2636,9 @@
#define DISPLAY_CHARSET_HD44780 JAPANESE #define DISPLAY_CHARSET_HD44780 JAPANESE
/** /**
* Info Screen Style (0:Classic, 1:Průša) * Info Screen Style (0:Classic, 1:Průša, 2:CNC)
* *
* :[0:'Classic', 1:'Průša'] * :[0:'Classic', 1:'Průša', 2:'CNC']
*/ */
#define LCD_INFO_SCREEN_STYLE 0 #define LCD_INFO_SCREEN_STYLE 0
@@ -2631,7 +2648,7 @@
* SD Card support is disabled by default. If your controller has an SD slot, * SD Card support is disabled by default. If your controller has an SD slot,
* you must uncomment the following option or it won't work. * you must uncomment the following option or it won't work.
*/ */
#define SDSUPPORT //#define SDSUPPORT
/** /**
* SD CARD: ENABLE CRC * SD CARD: ENABLE CRC
@@ -2711,7 +2728,7 @@
// //
// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. // Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
// //
#define INDIVIDUAL_AXIS_HOMING_MENU //#define INDIVIDUAL_AXIS_HOMING_MENU
//#define INDIVIDUAL_AXIS_HOMING_SUBMENU //#define INDIVIDUAL_AXIS_HOMING_SUBMENU
// //
@@ -2720,7 +2737,7 @@
// If you have a speaker that can produce tones, enable it here. // If you have a speaker that can produce tones, enable it here.
// By default Marlin assumes you have a buzzer with a fixed frequency. // By default Marlin assumes you have a buzzer with a fixed frequency.
// //
#define SPEAKER //#define SPEAKER
// //
// The duration and frequency for the UI feedback sound. // The duration and frequency for the UI feedback sound.
@@ -2914,7 +2931,7 @@
// RepRapDiscount FULL GRAPHIC Smart Controller // RepRapDiscount FULL GRAPHIC Smart Controller
// https://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // https://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
// //
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
// //
// K.3D Full Graphic Smart Controller // K.3D Full Graphic Smart Controller
@@ -3015,9 +3032,14 @@
// //
//#define BTT_MINI_12864 //#define BTT_MINI_12864
//
// BEEZ MINI 12864 is an alias for FYSETC_MINI_12864_2_1. Type A/B. NeoPixel RGB Backlight.
//
//#define BEEZ_MINI_12864
// //
// Factory display for Creality CR-10 / CR-7 / Ender-3 // Factory display for Creality CR-10 / CR-7 / Ender-3
// https://www.aliexpress.com/item/32833148327.html // https://marlinfw.org/docs/hardware/controllers.html#cr10_stockdisplay
// //
// Connect to EXP1 on RAMPS and compatible boards. // Connect to EXP1 on RAMPS and compatible boards.
// //
@@ -3394,7 +3416,6 @@
#define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus #define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus
//#define DISABLE_ENCODER // Disable the click encoder, if any //#define DISABLE_ENCODER // Disable the click encoder, if any
//#define TOUCH_IDLE_SLEEP_MINS 5 // (minutes) Display Sleep after a period of inactivity. Set with M255 S.
#define TOUCH_SCREEN_CALIBRATION #define TOUCH_SCREEN_CALIBRATION
+141 -125
View File
@@ -307,11 +307,11 @@
#define THERMAL_PROTECTION_PERIOD 40 // (seconds) #define THERMAL_PROTECTION_PERIOD 40 // (seconds)
#define THERMAL_PROTECTION_HYSTERESIS 4 // (°C) #define THERMAL_PROTECTION_HYSTERESIS 4 // (°C)
#define ADAPTIVE_FAN_SLOWING // Slow down the part-cooling fan if the temperature drops //#define ADAPTIVE_FAN_SLOWING // Slow down the part-cooling fan if the temperature drops
#if ENABLED(ADAPTIVE_FAN_SLOWING) #if ENABLED(ADAPTIVE_FAN_SLOWING)
//#define REPORT_ADAPTIVE_FAN_SLOWING // Report fan slowing activity to the console //#define REPORT_ADAPTIVE_FAN_SLOWING // Report fan slowing activity to the console
#if ANY(MPCTEMP, PIDTEMP) #if ANY(MPCTEMP, PIDTEMP)
#define TEMP_TUNING_MAINTAIN_FAN // Don't slow down the fan speed during M303 or M306 T //#define TEMP_TUNING_MAINTAIN_FAN // Don't slow down the fan speed during M303 or M306 T
#endif #endif
#endif #endif
@@ -335,7 +335,7 @@
* Thermal Protection parameters for the bed are just as above for hotends. * Thermal Protection parameters for the bed are just as above for hotends.
*/ */
#if ENABLED(THERMAL_PROTECTION_BED) #if ENABLED(THERMAL_PROTECTION_BED)
#define THERMAL_PROTECTION_BED_PERIOD 90 // (seconds) #define THERMAL_PROTECTION_BED_PERIOD 20 // (seconds)
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // (°C) #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // (°C)
/** /**
@@ -459,7 +459,7 @@
#define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0 #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
#else #else
#define PID_FAN_SCALING_LIN_FACTOR (0) // Power loss due to cooling = Kf * (fan_speed) #define PID_FAN_SCALING_LIN_FACTOR (0) // Power-loss due to cooling = Kf * (fan_speed)
#define DEFAULT_Kf 10 // A constant value added to the PID-tuner #define DEFAULT_Kf 10 // A constant value added to the PID-tuner
#define PID_FAN_SCALING_MIN_SPEED 10 // Minimum fan speed at which to enable PID_FAN_SCALING #define PID_FAN_SCALING_MIN_SPEED 10 // Minimum fan speed at which to enable PID_FAN_SCALING
#endif #endif
@@ -547,10 +547,10 @@
* Hotend Idle Timeout * Hotend Idle Timeout
* Prevent filament in the nozzle from charring and causing a critical jam. * Prevent filament in the nozzle from charring and causing a critical jam.
*/ */
#define HOTEND_IDLE_TIMEOUT //#define HOTEND_IDLE_TIMEOUT
#if ENABLED(HOTEND_IDLE_TIMEOUT) #if ENABLED(HOTEND_IDLE_TIMEOUT)
#define HOTEND_IDLE_TIMEOUT_SEC (30*60) // (seconds) Time without extruder movement to trigger protection #define HOTEND_IDLE_TIMEOUT_SEC (5*60) // (seconds) Time without extruder movement to trigger protection
#define HOTEND_IDLE_MIN_TRIGGER 170 // (°C) Minimum temperature to enable hotend protection #define HOTEND_IDLE_MIN_TRIGGER 180 // (°C) Minimum temperature to enable hotend protection
#define HOTEND_IDLE_NOZZLE_TARGET 0 // (°C) Safe temperature for the nozzle after timeout #define HOTEND_IDLE_NOZZLE_TARGET 0 // (°C) Safe temperature for the nozzle after timeout
#define HOTEND_IDLE_BED_TARGET 0 // (°C) Safe temperature for the bed after timeout #define HOTEND_IDLE_BED_TARGET 0 // (°C) Safe temperature for the bed after timeout
#endif #endif
@@ -602,8 +602,8 @@
* gets it spinning reliably for a short time before setting the requested speed. * gets it spinning reliably for a short time before setting the requested speed.
* (Does not work on Sanguinololu with FAN_SOFT_PWM.) * (Does not work on Sanguinololu with FAN_SOFT_PWM.)
*/ */
#define FAN_KICKSTART_TIME 100 // (ms) //#define FAN_KICKSTART_TIME 100 // (ms)
#define FAN_KICKSTART_POWER 180 // 64-255 //#define FAN_KICKSTART_POWER 180 // 64-255
// Some coolers may require a non-zero "off" state. // Some coolers may require a non-zero "off" state.
//#define FAN_OFF_PWM 1 //#define FAN_OFF_PWM 1
@@ -931,7 +931,7 @@
//#define HOMING_BACKOFF_POST_MM { 2, 2, 2 } // (linear=mm, rotational=°) Backoff from endstops after homing //#define HOMING_BACKOFF_POST_MM { 2, 2, 2 } // (linear=mm, rotational=°) Backoff from endstops after homing
//#define XY_COUNTERPART_BACKOFF_MM 0 // (mm) Backoff X after homing Y, and vice-versa //#define XY_COUNTERPART_BACKOFF_MM 0 // (mm) Backoff X after homing Y, and vice-versa
#define QUICK_HOME // If G28 contains XY do a diagonal move first //#define QUICK_HOME // If G28 contains XY do a diagonal move first
//#define HOME_Y_BEFORE_X // If G28 contains XY home Y before X //#define HOME_Y_BEFORE_X // If G28 contains XY home Y before X
//#define HOME_Z_FIRST // Home Z first. Requires a real endstop (not a probe). //#define HOME_Z_FIRST // Home Z first. Requires a real endstop (not a probe).
//#define CODEPENDENT_XY_HOMING // If X/Y can't home without homing Y/X first //#define CODEPENDENT_XY_HOMING // If X/Y can't home without homing Y/X first
@@ -1020,7 +1020,7 @@
* Z Steppers Auto-Alignment * Z Steppers Auto-Alignment
* Add the G34 command to align multiple Z steppers using a bed probe. * Add the G34 command to align multiple Z steppers using a bed probe.
*/ */
#define Z_STEPPER_AUTO_ALIGN //#define Z_STEPPER_AUTO_ALIGN
#if ENABLED(Z_STEPPER_AUTO_ALIGN) #if ENABLED(Z_STEPPER_AUTO_ALIGN)
/** /**
* Define probe X and Y positions for Z1, Z2 [, Z3 [, Z4]] * Define probe X and Y positions for Z1, Z2 [, Z3 [, Z4]]
@@ -1204,14 +1204,14 @@
//#define INPUT_SHAPING_Y //#define INPUT_SHAPING_Y
#if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y) #if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y)
#if ENABLED(INPUT_SHAPING_X) #if ENABLED(INPUT_SHAPING_X)
#define SHAPING_FREQ_X 40 // (Hz) The default dominant resonant frequency on the X axis. #define SHAPING_FREQ_X 40.0 // (Hz) The default dominant resonant frequency on the X axis.
#define SHAPING_ZETA_X 0.15f // Damping ratio of the X axis (range: 0.0 = no damping to 1.0 = critical damping). #define SHAPING_ZETA_X 0.15 // Damping ratio of the X axis (range: 0.0 = no damping to 1.0 = critical damping).
#endif #endif
#if ENABLED(INPUT_SHAPING_Y) #if ENABLED(INPUT_SHAPING_Y)
#define SHAPING_FREQ_Y 40 // (Hz) The default dominant resonant frequency on the Y axis. #define SHAPING_FREQ_Y 40.0 // (Hz) The default dominant resonant frequency on the Y axis.
#define SHAPING_ZETA_Y 0.15f // Damping ratio of the Y axis (range: 0.0 = no damping to 1.0 = critical damping). #define SHAPING_ZETA_Y 0.15 // Damping ratio of the Y axis (range: 0.0 = no damping to 1.0 = critical damping).
#endif #endif
//#define SHAPING_MIN_FREQ 20 // By default the minimum of the shaping frequencies. Override to affect SRAM usage. //#define SHAPING_MIN_FREQ 20.0 // (Hz) By default the minimum of the shaping frequencies. Override to affect SRAM usage.
//#define SHAPING_MAX_STEPRATE 10000 // By default the maximum total step rate of the shaped axes. Override to affect SRAM usage. //#define SHAPING_MAX_STEPRATE 10000 // By default the maximum total step rate of the shaped axes. Override to affect SRAM usage.
//#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters.
#endif #endif
@@ -1270,18 +1270,18 @@
* XY Frequency limit * XY Frequency limit
* Reduce resonance by limiting the frequency of small zigzag infill moves. * Reduce resonance by limiting the frequency of small zigzag infill moves.
* See https://hydraraptor.blogspot.com/2010/12/frequency-limit.html * See https://hydraraptor.blogspot.com/2010/12/frequency-limit.html
* Use M201 F<freq> G<min%> to change limits at runtime. * Use M201 F<freq> S<min%> to change limits at runtime.
*/ */
//#define XY_FREQUENCY_LIMIT 10 // (Hz) Maximum frequency of small zigzag infill moves. Set with M201 F<hertz>. //#define XY_FREQUENCY_LIMIT 10 // (Hz) Maximum frequency of small zigzag infill moves. Set with M201 F<hertz>.
#ifdef XY_FREQUENCY_LIMIT #ifdef XY_FREQUENCY_LIMIT
#define XY_FREQUENCY_MIN_PERCENT 5 // (%) Minimum FR percentage to apply. Set with M201 G<min%>. #define XY_FREQUENCY_MIN_PERCENT 5 // (%) Minimum FR percentage to apply. Set with M201 S<min%>.
#endif #endif
// //
// Backlash Compensation // Backlash Compensation
// Adds extra movement to axes on direction-changes to account for backlash. // Adds extra movement to axes on direction-changes to account for backlash.
// //
#define BACKLASH_COMPENSATION //#define BACKLASH_COMPENSATION
#if ENABLED(BACKLASH_COMPENSATION) #if ENABLED(BACKLASH_COMPENSATION)
// Define values for backlash distance and correction. // Define values for backlash distance and correction.
// If BACKLASH_GCODE is enabled these values are the defaults. // If BACKLASH_GCODE is enabled these values are the defaults.
@@ -1296,7 +1296,7 @@
//#define BACKLASH_SMOOTHING_MM 3 // (mm) //#define BACKLASH_SMOOTHING_MM 3 // (mm)
// Add runtime configuration and tuning of backlash values (M425) // Add runtime configuration and tuning of backlash values (M425)
#define BACKLASH_GCODE //#define BACKLASH_GCODE
#if ENABLED(BACKLASH_GCODE) #if ENABLED(BACKLASH_GCODE)
// Measure the Z backlash when probing (G29) and set with "M425 Z" // Measure the Z backlash when probing (G29) and set with "M425 Z"
@@ -1342,7 +1342,7 @@
#define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
#define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
// Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM). // Uncomment to enable reporting (required for "G425 V", but consumes flash).
//#define CALIBRATION_REPORTING //#define CALIBRATION_REPORTING
// The true location and dimension the cube/bolt/washer on the bed. // The true location and dimension the cube/bolt/washer on the bed.
@@ -1474,6 +1474,7 @@
#if IS_ULTIPANEL #if IS_ULTIPANEL
#define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position" #define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position"
#define ULTIPANEL_FEEDMULTIPLY // Encoder sets the feedrate multiplier on the Status Screen #define ULTIPANEL_FEEDMULTIPLY // Encoder sets the feedrate multiplier on the Status Screen
//#define ULTIPANEL_FLOWPERCENT // Encoder sets the flow percentage on the Status Screen
#endif #endif
#endif #endif
@@ -1528,7 +1529,7 @@
#endif #endif
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
#define LCD_INFO_MENU //#define LCD_INFO_MENU
#if ENABLED(LCD_INFO_MENU) #if ENABLED(LCD_INFO_MENU)
//#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages
#endif #endif
@@ -1539,6 +1540,7 @@
* Axis moves <= 1/2 the axis length and Extruder moves <= EXTRUDE_MAXLENGTH * Axis moves <= 1/2 the axis length and Extruder moves <= EXTRUDE_MAXLENGTH
* will be shown in the move submenus. * will be shown in the move submenus.
*/ */
#define MANUAL_MOVE_DISTANCE_MM 10, 1.0, 0.1 // (mm) #define MANUAL_MOVE_DISTANCE_MM 10, 1.0, 0.1 // (mm)
//#define MANUAL_MOVE_DISTANCE_MM 100, 50, 10, 1.0, 0.1 // (mm) //#define MANUAL_MOVE_DISTANCE_MM 100, 50, 10, 1.0, 0.1 // (mm)
//#define MANUAL_MOVE_DISTANCE_MM 500, 100, 50, 10, 1.0, 0.1 // (mm) //#define MANUAL_MOVE_DISTANCE_MM 500, 100, 50, 10, 1.0, 0.1 // (mm)
@@ -1580,7 +1582,7 @@
#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving lots of flash) #define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving lots of flash)
#endif #endif
#if HAS_MARLINUI_U8GLIB #if HAS_MARLINUI_U8GLIB
#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of flash. //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of flash.
#endif #endif
#if ANY(HAS_MARLINUI_U8GLIB, TOUCH_UI_FTDI_EVE) #if ANY(HAS_MARLINUI_U8GLIB, TOUCH_UI_FTDI_EVE)
//#define SHOW_CUSTOM_BOOTSCREEN // Show the bitmap in Marlin/_Bootscreen.h on startup. //#define SHOW_CUSTOM_BOOTSCREEN // Show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -1599,10 +1601,10 @@
#endif #endif
// The timeout to return to the status screen from sub-menus // The timeout to return to the status screen from sub-menus
#define LCD_TIMEOUT_TO_STATUS 15000 // (ms) //#define LCD_TIMEOUT_TO_STATUS 15000 // (ms)
// Scroll a longer status message into view // Scroll a longer status message into view
#define STATUS_MESSAGE_SCROLLING //#define STATUS_MESSAGE_SCROLLING
// Apply a timeout to low-priority status messages // Apply a timeout to low-priority status messages
//#define STATUS_MESSAGE_TIMEOUT_SEC 30 // (seconds) //#define STATUS_MESSAGE_TIMEOUT_SEC 30 // (seconds)
@@ -1654,7 +1656,7 @@
#endif #endif
// Add 'M73' to set print job progress, overrides Marlin's built-in estimate // Add 'M73' to set print job progress, overrides Marlin's built-in estimate
#define SET_PROGRESS_MANUALLY //#define SET_PROGRESS_MANUALLY
#if ENABLED(SET_PROGRESS_MANUALLY) #if ENABLED(SET_PROGRESS_MANUALLY)
#define SET_PROGRESS_PERCENT // Add 'P' parameter to set percentage done #define SET_PROGRESS_PERCENT // Add 'P' parameter to set percentage done
#define SET_REMAINING_TIME // Add 'R' parameter to set remaining time #define SET_REMAINING_TIME // Add 'R' parameter to set remaining time
@@ -1743,19 +1745,25 @@
*/ */
//#define POWER_LOSS_RECOVERY //#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY) #if ENABLED(POWER_LOSS_RECOVERY)
#define PLR_ENABLED_DEFAULT false // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500) #define PLR_ENABLED_DEFAULT false // Power-Loss Recovery enabled by default. (Set with 'M413 Sn' & M500)
//#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss //#define PLR_BED_THRESHOLD BED_MAXTEMP // (°C) Skip user confirmation at or above this bed temperature (0 to disable)
//#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module. //#define POWER_LOSS_PIN 44 // Pin to detect power-loss. Set to -1 to disable default pin on boards without module, or comment to use board default.
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss //#define POWER_LOSS_STATE HIGH // State of pin indicating power-loss
//#define POWER_LOSS_PULLUP // Set pullup / pulldown as appropriate for your sensor //#define POWER_LOSS_PULLUP // Set pullup / pulldown as appropriate for your sensor
//#define POWER_LOSS_PULLDOWN //#define POWER_LOSS_PULLDOWN
//#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume
//#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. //#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power-loss with UPS)
//#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume
// Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
// especially with "vase mode" printing. Set too high and vases cannot be continued. // especially with "vase mode" printing. Set too high and vases cannot be continued.
#define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
//#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power-loss
#if ENABLED(BACKUP_POWER_SUPPLY)
//#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail
#endif
// Enable if Z homing is needed for proper recovery. 99.9% of the time this should be disabled! // Enable if Z homing is needed for proper recovery. 99.9% of the time this should be disabled!
//#define POWER_LOSS_RECOVER_ZHOME //#define POWER_LOSS_RECOVER_ZHOME
@@ -1805,13 +1813,13 @@
// Allow international symbols in long filenames. To display correctly, the // Allow international symbols in long filenames. To display correctly, the
// LCD's font must contain the characters. Check your selected LCD language. // LCD's font must contain the characters. Check your selected LCD language.
#define UTF_FILENAME_SUPPORT //#define UTF_FILENAME_SUPPORT
#define LONG_FILENAME_HOST_SUPPORT // Get the long filename of a file/folder with 'M33 <dosname>' and list long filenames with 'M20 L' //#define LONG_FILENAME_HOST_SUPPORT // Get the long filename of a file/folder with 'M33 <dosname>' and list long filenames with 'M20 L'
//#define LONG_FILENAME_WRITE_SUPPORT // Create / delete files with long filenames via M28, M30, and Binary Transfer Protocol //#define LONG_FILENAME_WRITE_SUPPORT // Create / delete files with long filenames via M28, M30, and Binary Transfer Protocol
//#define M20_TIMESTAMP_SUPPORT // Include timestamps by adding the 'T' flag to M20 commands //#define M20_TIMESTAMP_SUPPORT // Include timestamps by adding the 'T' flag to M20 commands
#define SCROLL_LONG_FILENAMES // Scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES // Scroll long filenames in the SD card menu
//#define SD_ABORT_NO_COOLDOWN // Leave the heaters on after Stop Print (not recommended!) //#define SD_ABORT_NO_COOLDOWN // Leave the heaters on after Stop Print (not recommended!)
@@ -1962,17 +1970,6 @@
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
//#define USE_SMALL_INFOFONT //#define USE_SMALL_INFOFONT
/**
* Graphical Display Sleep
*
* The U8G library provides sleep / wake functions for SH1106, SSD1306,
* SSD1309, and some other DOGM displays.
* Enable this option to save energy and prevent OLED pixel burn-in.
* Adds the menu item Configuration > LCD Timeout (m) to set a wait period
* from 0 (disabled) to 99 minutes.
*/
//#define DISPLAY_SLEEP_MINUTES 2 // (minutes) Timeout before turning off the screen. Set with M255 S.
/** /**
* ST7920-based LCDs can emulate a 16 x 4 character display using * ST7920-based LCDs can emulate a 16 x 4 character display using
* the ST7920 character-generator for very fast screen updates. * the ST7920 character-generator for very fast screen updates.
@@ -2221,13 +2218,20 @@
//#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan
#endif #endif
// /**
// LCD Backlight Timeout * Display Sleep
// Requires a display with a controllable backlight * Enable this option to save energy and prevent OLED pixel burn-in.
// */
//#define DISPLAY_SLEEP_MINUTES 2 // (minutes) Timeout before turning off the screen
/**
* LCD Backlight Timeout
* Requires a display with a controllable backlight
*/
//#define LCD_BACKLIGHT_TIMEOUT_MINS 1 // (minutes) Timeout before turning off the backlight //#define LCD_BACKLIGHT_TIMEOUT_MINS 1 // (minutes) Timeout before turning off the backlight
#if defined(DISPLAY_SLEEP_MINUTES) || defined(LCD_BACKLIGHT_TIMEOUT_MINS) #if defined(DISPLAY_SLEEP_MINUTES) || defined(LCD_BACKLIGHT_TIMEOUT_MINS)
#define EDITABLE_DISPLAY_TIMEOUT // Edit timeout with M255 S<minutes> and a menu item #define EDITABLE_DISPLAY_TIMEOUT // Edit sleep / backlight timeout with M255 S<minutes> and a menu item
#endif #endif
// //
@@ -2262,18 +2266,18 @@
* *
* Warning: Does not respect endstops! * Warning: Does not respect endstops!
*/ */
#define BABYSTEPPING //#define BABYSTEPPING
#if ENABLED(BABYSTEPPING) #if ENABLED(BABYSTEPPING)
//#define EP_BABYSTEPPING // M293/M294 babystepping with EMERGENCY_PARSER support //#define EP_BABYSTEPPING // M293/M294 babystepping with EMERGENCY_PARSER support
//#define BABYSTEP_WITHOUT_HOMING //#define BABYSTEP_WITHOUT_HOMING
#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement) //#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement)
//#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
//#define BABYSTEP_INVERT_Z // Enable if Z babysteps should go the other way //#define BABYSTEP_INVERT_Z // Enable if Z babysteps should go the other way
//#define BABYSTEP_MILLIMETER_UNITS // Specify BABYSTEP_MULTIPLICATOR_(XY|Z) in mm instead of micro-steps //#define BABYSTEP_MILLIMETER_UNITS // Specify BABYSTEP_MULTIPLICATOR_(XY|Z) in mm instead of micro-steps
#define BABYSTEP_MULTIPLICATOR_Z 25 // (steps or mm) Steps or millimeter distance for each Z babystep #define BABYSTEP_MULTIPLICATOR_Z 1 // (steps or mm) Steps or millimeter distance for each Z babystep
#define BABYSTEP_MULTIPLICATOR_XY 1 // (steps or mm) Steps or millimeter distance for each XY babystep #define BABYSTEP_MULTIPLICATOR_XY 1 // (steps or mm) Steps or millimeter distance for each XY babystep
#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
#if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)
#define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
// Note: Extra time may be added to mitigate controller latency. // Note: Extra time may be added to mitigate controller latency.
@@ -2285,10 +2289,10 @@
//#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28
#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
//#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
#define BABYSTEP_GFX_OVERLAY // Enable graphical overlay on Z-offset editor //#define BABYSTEP_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
#endif #endif
#endif #endif
@@ -2309,7 +2313,7 @@
* *
* See https://marlinfw.org/docs/features/lin_advance.html for full instructions. * See https://marlinfw.org/docs/features/lin_advance.html for full instructions.
*/ */
#define LIN_ADVANCE //#define LIN_ADVANCE
#if ENABLED(LIN_ADVANCE) #if ENABLED(LIN_ADVANCE)
#if ENABLED(DISTINCT_E_FACTORS) #if ENABLED(DISTINCT_E_FACTORS)
#define ADVANCE_K { 0.22 } // (mm) Compression length per 1mm/s extruder speed, per extruder #define ADVANCE_K { 0.22 } // (mm) Compression length per 1mm/s extruder speed, per extruder
@@ -2318,7 +2322,6 @@
#endif #endif
//#define ADVANCE_K_EXTRA // Add a second linear advance constant, configurable with M900 L. //#define ADVANCE_K_EXTRA // Add a second linear advance constant, configurable with M900 L.
//#define LA_DEBUG // Print debug information to serial during operation. Disable for production use. //#define LA_DEBUG // Print debug information to serial during operation. Disable for production use.
#define ALLOW_LOW_EJERK // Allow a DEFAULT_EJERK value of <10. Recommended for direct drive hotends.
//#define EXPERIMENTAL_I2S_LA // Allow I2S_STEPPER_STREAM to be used with LA. Performance degrades as the LA step rate reaches ~20kHz. //#define EXPERIMENTAL_I2S_LA // Allow I2S_STEPPER_STREAM to be used with LA. Performance degrades as the LA step rate reaches ~20kHz.
#endif #endif
@@ -2503,7 +2506,7 @@
#endif #endif
// G5 Bézier Curve Support with XYZE destination and IJPQ offsets // G5 Bézier Curve Support with XYZE destination and IJPQ offsets
#define BEZIER_CURVE_SUPPORT // Requires ~2666 bytes //#define BEZIER_CURVE_SUPPORT // Requires ~2666 bytes
#if ANY(ARC_SUPPORT, BEZIER_CURVE_SUPPORT) #if ANY(ARC_SUPPORT, BEZIER_CURVE_SUPPORT)
//#define CNC_WORKSPACE_PLANES // Allow G2/G3/G5 to operate in XY, ZX, or YZ planes //#define CNC_WORKSPACE_PLANES // Allow G2/G3/G5 to operate in XY, ZX, or YZ planes
@@ -2595,16 +2598,16 @@
#if ALL(HAS_MEDIA, DIRECT_STEPPING) #if ALL(HAS_MEDIA, DIRECT_STEPPING)
#define BLOCK_BUFFER_SIZE 8 #define BLOCK_BUFFER_SIZE 8
#elif HAS_MEDIA #elif HAS_MEDIA
#define BLOCK_BUFFER_SIZE 32 #define BLOCK_BUFFER_SIZE 16
#else #else
#define BLOCK_BUFFER_SIZE 32 #define BLOCK_BUFFER_SIZE 16
#endif #endif
// @section serial // @section serial
// The ASCII buffer for serial input // The ASCII buffer for serial input
#define MAX_CMD_SIZE 96 #define MAX_CMD_SIZE 96
#define BUFSIZE 16 #define BUFSIZE 4
// Transmission to Host Buffer Size // Transmission to Host Buffer Size
// To save 386 bytes of flash (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. // To save 386 bytes of flash (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
@@ -2651,7 +2654,7 @@
* Currently handles M108, M112, M410, M876 * Currently handles M108, M112, M410, M876
* NOTE: Not yet implemented for all platforms. * NOTE: Not yet implemented for all platforms.
*/ */
#define EMERGENCY_PARSER //#define EMERGENCY_PARSER
/** /**
* Realtime Reporting (requires EMERGENCY_PARSER) * Realtime Reporting (requires EMERGENCY_PARSER)
@@ -2682,7 +2685,7 @@
//#define NO_TIMEOUTS 1000 // (ms) //#define NO_TIMEOUTS 1000 // (ms)
// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
#define ADVANCED_OK //#define ADVANCED_OK
// Printrun may have trouble receiving long strings all at once. // Printrun may have trouble receiving long strings all at once.
// This option inserts short delays between lines of serial output. // This option inserts short delays between lines of serial output.
@@ -2884,7 +2887,7 @@
* *
* Enable PARK_HEAD_ON_PAUSE to add the G-code M125 Pause and Park. * Enable PARK_HEAD_ON_PAUSE to add the G-code M125 Pause and Park.
*/ */
#define ADVANCED_PAUSE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
#define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract. #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
@@ -2924,11 +2927,12 @@
//#define FILAMENT_CHANGE_RESUME_ON_INSERT // Automatically continue / load filament when runout sensor is triggered again. //#define FILAMENT_CHANGE_RESUME_ON_INSERT // Automatically continue / load filament when runout sensor is triggered again.
//#define PAUSE_REHEAT_FAST_RESUME // Reduce number of waits by not prompting again post-timeout before continuing. //#define PAUSE_REHEAT_FAST_RESUME // Reduce number of waits by not prompting again post-timeout before continuing.
#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
//#define HOME_BEFORE_FILAMENT_CHANGE // If needed, home before parking for filament change //#define HOME_BEFORE_FILAMENT_CHANGE // If needed, home before parking for filament change
#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu. //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#define CONFIGURE_FILAMENT_CHANGE // Add M603 G-code and menu items. Requires ~1.3K bytes of flash.
#endif #endif
// @section tmc_smart // @section tmc_smart
@@ -2949,15 +2953,12 @@
* Some boards have simple jumper connections! See your board's documentation. * Some boards have simple jumper connections! See your board's documentation.
* - These drivers can also be used with Hardware Serial. * - These drivers can also be used with Hardware Serial.
* *
* The TMC26XStepper library is required for TMC26X stepper drivers.
* https://github.com/MarlinFirmware/TMC26XStepper
*
* The TMCStepper library is required for other TMC stepper drivers. * The TMCStepper library is required for other TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper * https://github.com/teemuatlut/TMCStepper
* *
* @section tmc/config * @section tmc/config
*/ */
#if HAS_TRINAMIC_CONFIG || HAS_TMC26X #if HAS_TRINAMIC_CONFIG
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -2971,7 +2972,7 @@
#define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing #define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing
#define X_MICROSTEPS 16 // 0..256 #define X_MICROSTEPS 16 // 0..256
#define X_RSENSE 0.11 // Multiplied x1000 for TMC26X #define X_RSENSE 0.11
#define X_CHAIN_POS -1 // -1..0: Not chained. 1: MCU MOSI connected. 2: Next in chain, ... #define X_CHAIN_POS -1 // -1..0: Not chained. 1: MCU MOSI connected. 2: Next in chain, ...
//#define X_INTERPOLATE true // Enable to override 'INTERPOLATE' for the X axis //#define X_INTERPOLATE true // Enable to override 'INTERPOLATE' for the X axis
//#define X_HOLD_MULTIPLIER 0.5 // Enable to override 'HOLD_MULTIPLIER' for the X axis //#define X_HOLD_MULTIPLIER 0.5 // Enable to override 'HOLD_MULTIPLIER' for the X axis
@@ -3108,7 +3109,7 @@
#endif #endif
#if AXIS_IS_TMC_CONFIG(E0) #if AXIS_IS_TMC_CONFIG(E0)
#define E0_CURRENT 900 #define E0_CURRENT 800
#define E0_MICROSTEPS 16 #define E0_MICROSTEPS 16
#define E0_RSENSE 0.11 #define E0_RSENSE 0.11
#define E0_CHAIN_POS -1 #define E0_CHAIN_POS -1
@@ -3281,7 +3282,7 @@
#define STEALTHCHOP_U #define STEALTHCHOP_U
#define STEALTHCHOP_V #define STEALTHCHOP_V
#define STEALTHCHOP_W #define STEALTHCHOP_W
//#define STEALTHCHOP_E #define STEALTHCHOP_E
#endif #endif
/** /**
@@ -3299,7 +3300,7 @@
* Define your own with: * Define your own with:
* { <off_time[1..15]>, <hysteresis_end[-3..12]>, hysteresis_start[1..8] } * { <off_time[1..15]>, <hysteresis_end[-3..12]>, hysteresis_start[1..8] }
*/ */
#define CHOPPER_TIMING CHOPPER_DEFAULT_24V // All axes (override below) #define CHOPPER_TIMING CHOPPER_DEFAULT_12V // All axes (override below)
//#define CHOPPER_TIMING_X CHOPPER_TIMING // For X Axes (override below) //#define CHOPPER_TIMING_X CHOPPER_TIMING // For X Axes (override below)
//#define CHOPPER_TIMING_X2 CHOPPER_TIMING_X //#define CHOPPER_TIMING_X2 CHOPPER_TIMING_X
//#define CHOPPER_TIMING_Y CHOPPER_TIMING // For Y Axes (override below) //#define CHOPPER_TIMING_Y CHOPPER_TIMING // For Y Axes (override below)
@@ -3443,7 +3444,7 @@
/** /**
* Step on both rising and falling edge signals (as with a square wave). * Step on both rising and falling edge signals (as with a square wave).
*/ */
#define EDGE_STEPPING //#define EDGE_STEPPING
/** /**
* Enable M122 debugging command for TMC stepper drivers. * Enable M122 debugging command for TMC stepper drivers.
@@ -3464,7 +3465,7 @@
*/ */
#define TMC_ADV() { } #define TMC_ADV() { }
#endif // HAS_TRINAMIC_CONFIG || HAS_TMC26X #endif // HAS_TRINAMIC_CONFIG
// @section i2cbus // @section i2cbus
@@ -3557,7 +3558,7 @@
* Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and
* to set spindle speed, spindle direction, and laser power. * to set spindle speed, spindle direction, and laser power.
* *
* SuperPid is a router/spindle speed controller used in the CNC milling community. * SuperPID is a router/spindle speed controller used in the CNC milling community.
* Marlin can be used to turn the spindle on and off. It can also be used to set * Marlin can be used to turn the spindle on and off. It can also be used to set
* the spindle speed from 5,000 to 30,000 RPM. * the spindle speed from 5,000 to 30,000 RPM.
* *
@@ -3835,38 +3836,6 @@
*/ */
//#define CNC_COORDINATE_SYSTEMS //#define CNC_COORDINATE_SYSTEMS
// @section reporting
/**
* Auto-report fan speed with M123 S<seconds>
* Requires fans with tachometer pins
*/
//#define AUTO_REPORT_FANS
/**
* Auto-report temperatures with M155 S<seconds>
*/
#define AUTO_REPORT_TEMPERATURES
#if ENABLED(AUTO_REPORT_TEMPERATURES) && TEMP_SENSOR_REDUNDANT
//#define AUTO_REPORT_REDUNDANT // Include the "R" sensor in the auto-report
#endif
/**
* Auto-report position with M154 S<seconds>
*/
#define AUTO_REPORT_POSITION
#if ENABLED(AUTO_REPORT_POSITION)
//#define AUTO_REPORT_REAL_POSITION // Auto-report the real position
#endif
/**
* Include capabilities in M115 output
*/
#define EXTENDED_CAPABILITIES_REPORT
#if ENABLED(EXTENDED_CAPABILITIES_REPORT)
//#define M115_GEOMETRY_REPORT
#endif
// @section security // @section security
/** /**
@@ -3909,13 +3878,50 @@
// @section reporting // @section reporting
// Extra options for the M114 "Current Position" report /**
* Extra options for the M114 "Current Position" report
*/
//#define M114_DETAIL // Use 'M114` for details to check planner calculations //#define M114_DETAIL // Use 'M114` for details to check planner calculations
//#define M114_REALTIME // Real current position based on forward kinematics //#define M114_REALTIME // Real current position based on forward kinematics
//#define M114_LEGACY // M114 used to synchronize on every call. Enable if needed. //#define M114_LEGACY // M114 used to synchronize on every call. Enable if needed.
/**
* Auto-report fan speed with M123 S<seconds>
* Requires fans with tachometer pins
*/
//#define AUTO_REPORT_FANS
//#define REPORT_FAN_CHANGE // Report the new fan speed when changed by M106 (and others) //#define REPORT_FAN_CHANGE // Report the new fan speed when changed by M106 (and others)
/**
* Auto-report temperatures with M155 S<seconds>
*/
#define AUTO_REPORT_TEMPERATURES
#if ENABLED(AUTO_REPORT_TEMPERATURES) && TEMP_SENSOR_REDUNDANT
//#define AUTO_REPORT_REDUNDANT // Include the "R" sensor in the auto-report
#endif
/**
* Auto-report position with M154 S<seconds>
*/
//#define AUTO_REPORT_POSITION
#if ENABLED(AUTO_REPORT_POSITION)
//#define AUTO_REPORT_REAL_POSITION // Auto-report the real position
#endif
/**
* M115 - Report capabilites. Disable to save ~1150 bytes of flash.
* Some hosts (and serial TFT displays) rely on this feature.
*/
#define CAPABILITIES_REPORT
#if ENABLED(CAPABILITIES_REPORT)
// Include capabilities in M115 output
#define EXTENDED_CAPABILITIES_REPORT
#if ENABLED(EXTENDED_CAPABILITIES_REPORT)
//#define M115_GEOMETRY_REPORT
#endif
#endif
// @section gcode // @section gcode
/** /**
@@ -3927,7 +3933,9 @@
//#define GCODE_QUOTED_STRINGS // Support for quoted string parameters //#define GCODE_QUOTED_STRINGS // Support for quoted string parameters
#endif #endif
// Support for MeatPack G-code compression (https://github.com/scottmudge/OctoPrint-MeatPack) /**
* Support for MeatPack G-code compression (https://github.com/scottmudge/OctoPrint-MeatPack)
*/
//#define MEATPACK_ON_SERIAL_PORT_1 //#define MEATPACK_ON_SERIAL_PORT_1
//#define MEATPACK_ON_SERIAL_PORT_2 //#define MEATPACK_ON_SERIAL_PORT_2
@@ -3935,6 +3943,12 @@
//#define REPETIER_GCODE_M360 // Add commands originally from Repetier FW //#define REPETIER_GCODE_M360 // Add commands originally from Repetier FW
/**
* Enable M111 debug flags 1=ECHO, 2=INFO, 4=ERRORS (unimplemented).
* Disable to save some flash. Some hosts (Repetier Host) may rely on this feature.
*/
#define DEBUG_FLAGS_GCODE
/** /**
* Enable this option for a leaner build of Marlin that removes * Enable this option for a leaner build of Marlin that removes
* workspace offsets to slightly optimize performance. * workspace offsets to slightly optimize performance.
@@ -3962,8 +3976,6 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
// @section gcode
/** /**
* Startup commands * Startup commands
* *
@@ -4101,14 +4113,14 @@
* Host Prompt Support enables Marlin to use the host for user prompts so * Host Prompt Support enables Marlin to use the host for user prompts so
* filament runout and other processes can be managed from the host side. * filament runout and other processes can be managed from the host side.
*/ */
#define HOST_ACTION_COMMANDS //#define HOST_ACTION_COMMANDS
#if ENABLED(HOST_ACTION_COMMANDS) #if ENABLED(HOST_ACTION_COMMANDS)
//#define HOST_PAUSE_M76 // Tell the host to pause in response to M76 //#define HOST_PAUSE_M76 // Tell the host to pause in response to M76
#define HOST_PROMPT_SUPPORT // Initiate host prompts to get user feedback //#define HOST_PROMPT_SUPPORT // Initiate host prompts to get user feedback
#if ENABLED(HOST_PROMPT_SUPPORT) #if ENABLED(HOST_PROMPT_SUPPORT)
#define HOST_STATUS_NOTIFICATIONS // Send some status messages to the host as notifications //#define HOST_STATUS_NOTIFICATIONS // Send some status messages to the host as notifications
#endif #endif
#define HOST_START_MENU_ITEM // Add a menu item that tells the host to start //#define HOST_START_MENU_ITEM // Add a menu item that tells the host to start
//#define HOST_SHUTDOWN_MENU_ITEM // Add a menu item that tells the host to shut down //#define HOST_SHUTDOWN_MENU_ITEM // Add a menu item that tells the host to shut down
#endif #endif
@@ -4296,6 +4308,7 @@
// See class CodeProfiler. // See class CodeProfiler.
//#define MAX7219_DEBUG_MULTISTEPPING 6 // Show multi-stepping 1 to 128 on this LED matrix row. //#define MAX7219_DEBUG_MULTISTEPPING 6 // Show multi-stepping 1 to 128 on this LED matrix row.
//#define MAX7219_DEBUG_SLOWDOWN 6 // Count (mod 16) how many times SLOWDOWN has reduced print speed. //#define MAX7219_DEBUG_SLOWDOWN 6 // Count (mod 16) how many times SLOWDOWN has reduced print speed.
//#define MAX7219_REINIT_ON_POWERUP // Re-initialize MAX7129 when power supply turns on
#endif #endif
/** /**
@@ -4476,12 +4489,12 @@
// //
// M42 - Set pin states // M42 - Set pin states
// //
#define DIRECT_PIN_CONTROL //#define DIRECT_PIN_CONTROL
// //
// M43 - display pin status, toggle pins, watch pins, watch endstops & toggle LED, test servo probe // M43 - display pin status, toggle pins, watch pins, watch endstops & toggle LED, test servo probe
// //
#define PINS_DEBUGGING //#define PINS_DEBUGGING
// Enable Tests that will run at startup and produce a report // Enable Tests that will run at startup and produce a report
//#define MARLIN_TEST_BUILD //#define MARLIN_TEST_BUILD
@@ -4512,3 +4525,6 @@
// Report uncleaned reset reason from register r2 instead of MCUSR. Supported by Optiboot on AVR. // Report uncleaned reset reason from register r2 instead of MCUSR. Supported by Optiboot on AVR.
//#define OPTIBOOT_RESET_REASON //#define OPTIBOOT_RESET_REASON
// Shrink the build for smaller boards by sacrificing some serial feedback
//#define MARLIN_SMALL_BUILD
+1 -1
View File
@@ -2,7 +2,7 @@
Marlin Firmware Marlin Firmware
(c) 2011-2023 MarlinFirmware (c) 2011-2024 MarlinFirmware
Portions of Marlin are (c) by their respective authors. Portions of Marlin are (c) by their respective authors.
All code complies with GPLv2 and/or GPLv3 All code complies with GPLv2 and/or GPLv3
+1 -1
View File
@@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release * here we define this default string as the date where the latest release
* version was tagged. * version was tagged.
*/ */
//#define STRING_DISTRIBUTION_DATE "2024-01-01" //#define STRING_DISTRIBUTION_DATE "2024-04-07"
/** /**
* Defines a generic printer name to be output to the LCD after booting Marlin. * Defines a generic printer name to be output to the LCD after booting Marlin.
+6
View File
@@ -81,6 +81,12 @@ void MarlinHAL::init() {
#if HAS_SERVO_3 #if HAS_SERVO_3
OUT_WRITE(SERVO3_PIN, LOW); OUT_WRITE(SERVO3_PIN, LOW);
#endif #endif
#if HAS_SERVO_4
OUT_WRITE(SERVO4_PIN, LOW);
#endif
#if HAS_SERVO_5
OUT_WRITE(SERVO5_PIN, LOW);
#endif
init_pwm_timers(); // Init user timers to default frequency - 1000HZ init_pwm_timers(); // Init user timers to default frequency - 1000HZ
-2
View File
@@ -119,7 +119,6 @@ void spiBegin() {
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
} }
/** begin spi transaction */ /** begin spi transaction */
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) { void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
// Based on Arduino SPI library // Based on Arduino SPI library
@@ -175,7 +174,6 @@ void spiBegin() {
SPSR = clockDiv | 0x01; SPSR = clockDiv | 0x01;
} }
#else // SOFTWARE_SPI || FORCE_SOFT_SPI #else // SOFTWARE_SPI || FORCE_SOFT_SPI
// ------------------------ // ------------------------
-1
View File
@@ -63,7 +63,6 @@
static volatile int8_t Channel[_Nbr_16timers]; // counter for the servo being pulsed for each timer (or -1 if refresh interval) static volatile int8_t Channel[_Nbr_16timers]; // counter for the servo being pulsed for each timer (or -1 if refresh interval)
/************ static functions common to all instances ***********************/ /************ static functions common to all instances ***********************/
static inline void handle_interrupts(const timer16_Sequence_t timer, volatile uint16_t* TCNTn, volatile uint16_t* OCRnA) { static inline void handle_interrupts(const timer16_Sequence_t timer, volatile uint16_t* TCNTn, volatile uint16_t* OCRnA) {
+3 -3
View File
@@ -35,14 +35,14 @@
#ifndef MARLIN_EEPROM_SIZE #ifndef MARLIN_EEPROM_SIZE
#define MARLIN_EEPROM_SIZE size_t(E2END + 1) #define MARLIN_EEPROM_SIZE size_t(E2END + 1)
#endif #endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() { return true; } bool PersistentStore::access_start() { return true; }
bool PersistentStore::access_finish() { return true; } bool PersistentStore::access_finish() { return true; }
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
uint16_t written = 0; uint16_t written = 0;
while (size--) { while (size--) {
uint8_t * const p = (uint8_t * const)pos; uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
uint8_t v = *value; uint8_t v = *value;
if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
eeprom_write_byte(p, v); eeprom_write_byte(p, v);
@@ -61,7 +61,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do { do {
uint8_t c = eeprom_read_byte((uint8_t*)pos); const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos));
if (writing) *value = c; if (writing) *value = c;
crc16(crc, &c, 1); crc16(crc, &c, 1);
pos++; pos++;
-1
View File
@@ -91,7 +91,6 @@ void endstop_ISR() { endstops.update(); }
#endif #endif
// Install Pin change interrupt for a pin. Can be called multiple times. // Install Pin change interrupt for a pin. Can be called multiple times.
void pciSetup(const int8_t pin) { void pciSetup(const int8_t pin) {
if (digitalPinHasPCICR(pin)) { if (digitalPinHasPCICR(pin)) {
@@ -679,7 +679,6 @@
#define PF7_PWM 0 #define PF7_PWM 0
#define PF7_DDR DDRF #define PF7_DDR DDRF
/** /**
* Some of the pin mapping functions of the Teensduino extension to the Arduino IDE * Some of the pin mapping functions of the Teensduino extension to the Arduino IDE
* do not function the same as the other Arduino extensions. * do not function the same as the other Arduino extensions.
@@ -0,0 +1,22 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
-3
View File
@@ -163,7 +163,6 @@ bool pwm_status(uint8_t pin) {
SERIAL_ECHO_SP(2); SERIAL_ECHO_SP(2);
} // pwm_status } // pwm_status
const volatile uint8_t* const PWM_other[][3] PROGMEM = { const volatile uint8_t* const PWM_other[][3] PROGMEM = {
{ &TCCR0A, &TCCR0B, &TIMSK0 }, { &TCCR0A, &TCCR0B, &TIMSK0 },
{ &TCCR1A, &TCCR1B, &TIMSK1 }, { &TCCR1A, &TCCR1B, &TIMSK1 },
@@ -181,7 +180,6 @@ const volatile uint8_t* const PWM_other[][3] PROGMEM = {
#endif #endif
}; };
const volatile uint8_t* const PWM_OCR[][3] PROGMEM = { const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
#ifdef TIMER0A #ifdef TIMER0A
@@ -217,7 +215,6 @@ const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
#endif #endif
}; };
#define TCCR_A(T) pgm_read_word(&PWM_other[T][0]) #define TCCR_A(T) pgm_read_word(&PWM_other[T][0])
#define TCCR_B(T) pgm_read_word(&PWM_other[T][1]) #define TCCR_B(T) pgm_read_word(&PWM_other[T][1])
#define TIMSK(T) pgm_read_word(&PWM_other[T][2]) #define TIMSK(T) pgm_read_word(&PWM_other[T][2])
@@ -120,7 +120,6 @@ void u8g_spiSend_sw_AVR_mode_3(uint8_t val) {
U8G_ATOMIC_END(); U8G_ATOMIC_END();
} }
#if ENABLED(FYSETC_MINI_12864) #if ENABLED(FYSETC_MINI_12864)
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_3 #define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_3
#else #else
+1 -1
View File
@@ -42,7 +42,7 @@
// Public functions // Public functions
// ------------------------ // ------------------------
#if ANY(DUE_SOFTWARE_SPI, FORCE_SOFT_SPI) #if ANY(SOFTWARE_SPI, FORCE_SOFT_SPI)
// ------------------------ // ------------------------
// Software SPI // Software SPI
-1
View File
@@ -474,7 +474,6 @@ void MarlinSerial<Cfg>::flushTX() {
} }
} }
// If not using the USB port as serial port // If not using the USB port as serial port
#if defined(SERIAL_PORT) && SERIAL_PORT >= 0 #if defined(SERIAL_PORT) && SERIAL_PORT >= 0
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT> >; template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT> >;
+3 -3
View File
@@ -958,14 +958,14 @@ static void ee_Init() {
#ifndef MARLIN_EEPROM_SIZE #ifndef MARLIN_EEPROM_SIZE
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB #define MARLIN_EEPROM_SIZE 0x1000 // 4KB
#endif #endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() { ee_Init(); return true; } bool PersistentStore::access_start() { ee_Init(); return true; }
bool PersistentStore::access_finish() { ee_Flush(); return true; } bool PersistentStore::access_finish() { ee_Flush(); return true; }
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
uint16_t written = 0; uint16_t written = 0;
while (size--) { while (size--) {
uint8_t * const p = (uint8_t * const)pos; uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
uint8_t v = *value; uint8_t v = *value;
if (v != ee_Read(uint32_t(p))) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! if (v != ee_Read(uint32_t(p))) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
ee_Write(uint32_t(p), v); ee_Write(uint32_t(p), v);
@@ -984,7 +984,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do { do {
uint8_t c = ee_Read(uint32_t(pos)); uint8_t c = ee_Read(uint32_t(REAL_EEPROM_ADDR(pos)));
if (writing) *value = c; if (writing) *value = c;
crc16(crc, &c, 1); crc16(crc, &c, 1);
pos++; pos++;
+3 -3
View File
@@ -36,14 +36,14 @@
#ifndef MARLIN_EEPROM_SIZE #ifndef MARLIN_EEPROM_SIZE
#error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM." #error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM."
#endif #endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() { eeprom_init(); return true; } bool PersistentStore::access_start() { eeprom_init(); return true; }
bool PersistentStore::access_finish() { return true; } bool PersistentStore::access_finish() { return true; }
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
uint16_t written = 0; uint16_t written = 0;
while (size--) { while (size--) {
uint8_t * const p = (uint8_t * const)pos; uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
uint8_t v = *value; uint8_t v = *value;
if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
eeprom_write_byte(p, v); eeprom_write_byte(p, v);
@@ -62,7 +62,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do { do {
uint8_t c = eeprom_read_byte((uint8_t*)pos); const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos));
if (writing) *value = c; if (writing) *value = c;
crc16(crc, &c, 1); crc16(crc, &c, 1);
pos++; pos++;
-1
View File
@@ -49,7 +49,6 @@ extern volatile uint32_t *SODR_A, *SODR_B, *CODR_A, *CODR_B;
#define PWM_MAP_INIT_ROW(IO,ZZ) { ZZ == 'A' ? SODR_A : SODR_B, ZZ == 'A' ? CODR_A : CODR_B, 1 << _PIN(IO) } #define PWM_MAP_INIT_ROW(IO,ZZ) { ZZ == 'A' ? SODR_A : SODR_B, ZZ == 'A' ? CODR_A : CODR_B, 1 << _PIN(IO) }
#define PWM_MAP_INIT { PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_X_PIN, 'B'), \ #define PWM_MAP_INIT { PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_X_PIN, 'B'), \
PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Y_PIN, 'B'), \ PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Y_PIN, 'B'), \
PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Z_PIN, 'B'), \ PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Z_PIN, 'B'), \
-1
View File
@@ -168,7 +168,6 @@ const G2_PinDescription G2_g_APinDescription[] = {
{ PIOB, PIO_PB21, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 52 { PIOB, PIO_PB21, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 52
{ PIOB, PIO_PB14, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 53 { PIOB, PIO_PB14, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 53
// 54 .. 65 - Analog pins // 54 .. 65 - Analog pins
// ---------------------- // ----------------------
{ PIOA, PIO_PA16X1_AD7, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC0, ADC7, NOT_ON_PWM, NOT_ON_TIMER }, // AD0 { PIOA, PIO_PA16X1_AD7, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC0, ADC7, NOT_ON_PWM, NOT_ON_TIMER }, // AD0
@@ -0,0 +1,22 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
+2 -2
View File
@@ -72,10 +72,10 @@
#if HAS_MEDIA && HAS_DRIVER(TMC2130) #if HAS_MEDIA && HAS_DRIVER(TMC2130)
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#if DISABLED(DUE_SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK)) #if DISABLED(SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
#error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs." #error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."
#endif #endif
#elif ENABLED(DUE_SOFTWARE_SPI) #elif ENABLED(SOFTWARE_SPI)
#error "DUE software SPI is required but is incompatible with TMC2130 hardware SPI. Enable TMC_USE_SW_SPI to fix." #error "DUE software SPI is required but is incompatible with TMC2130 hardware SPI. Enable TMC_USE_SW_SPI to fix."
#endif #endif
#endif #endif
+1 -1
View File
@@ -48,7 +48,7 @@
#define SD_MOSI_PIN 75 #define SD_MOSI_PIN 75
#else #else
// defaults // defaults
#define DUE_SOFTWARE_SPI #define SOFTWARE_SPI
#ifndef SD_SCK_PIN #ifndef SD_SCK_PIN
#define SD_SCK_PIN 52 #define SD_SCK_PIN 52
#endif #endif
+29
View File
@@ -0,0 +1,29 @@
# USB Files Source Documentation
## Source
We sourced the USB files in Marlin from the Atmel ASF (Advanced Software Framework). The framework provides a variety of examples which were utilized in this project.
Atmel doesn't provide these files in a source repository but they can be extracted from ASF, which can be downloaded from Atmel.
[Advanced Software Framework](https://www.microchip.com/en-us/tools-resources/develop/libraries/advanced-software-framework)
## Modifications
The files are mostly unmodified except for minor cosmetic changes but some more significant changes were needed.
The changes that prompted the addition of this README file are listed below. Other changes may have been made prior to this.
1. Modified `uotghs_device_due.c` to resolve race conditions that could leave interrupts asserted when freezing the peripheral clock, resulting in hangs and watchdog resets due to the ensuing interrupt storm.
## Version Information
We don't know the exact version of ASF used as the source. However, the copyright information in the files indicates they are from 2015.
## Upgrade Considerations
We looked at the ASF 3.52.0 files released in 2022 but saw no immediate benefits to justify an upgrade. It's important to note that the files in Marlin don't follow the same folder structure as the files in ASF, which complicates the process of comparing and applying updated files.
When these files are updated it's important to carefully compare them to Marlin's versions so any improvements in the Marlin sources are brought forward.
It would be best to make Marlin's directory structure align with ASF or at least document the source of each file to ease future updates.
-11
View File
@@ -142,7 +142,6 @@
*/ */
#define COMPILER_PACK_RESET() COMPILER_PRAGMA(pack()) #define COMPILER_PACK_RESET() COMPILER_PRAGMA(pack())
/** /**
* \brief Set aligned boundary. * \brief Set aligned boundary.
*/ */
@@ -283,7 +282,6 @@ typedef double F64; //!< 64-bit floating-point number.
typedef uint32_t iram_size_t; typedef uint32_t iram_size_t;
//! @} //! @}
/*! \name Status Types /*! \name Status Types
*/ */
//! @{ //! @{
@@ -291,7 +289,6 @@ typedef bool Status_bool_t; //!< Boolean status.
typedef U8 Status_t; //!< 8-bit-coded status. typedef U8 Status_t; //!< 8-bit-coded status.
//! @} //! @}
/*! \name Aliasing Aggregate Types /*! \name Aliasing Aggregate Types
*/ */
//! @{ //! @{
@@ -462,7 +459,6 @@ typedef struct
#endif #endif
//! @} //! @}
#ifndef __ASSEMBLY__ // not for assembling. #ifndef __ASSEMBLY__ // not for assembling.
//! \name Optimization Control //! \name Optimization Control
@@ -581,7 +577,6 @@ typedef struct
//! @} //! @}
/*! \name Zero-Bit Counting /*! \name Zero-Bit Counting
* *
* Under GCC, __builtin_clz and __builtin_ctz behave like macros when * Under GCC, __builtin_clz and __builtin_ctz behave like macros when
@@ -692,7 +687,6 @@ typedef struct
//! @} //! @}
/*! \name Bit Reversing /*! \name Bit Reversing
*/ */
//! @{ //! @{
@@ -732,7 +726,6 @@ typedef struct
//! @} //! @}
/*! \name Alignment /*! \name Alignment
*/ */
//! @{ //! @{
@@ -798,7 +791,6 @@ typedef struct
*/ */
#define Long_call(addr) ((*(void (*)(void))(addr))()) #define Long_call(addr) ((*(void (*)(void))(addr))())
/*! \name MCU Endianism Handling /*! \name MCU Endianism Handling
* ARM is MCU little endianism. * ARM is MCU little endianism.
*/ */
@@ -868,7 +860,6 @@ typedef struct
#define CPU_TO_BE32(x) swap32(x) #define CPU_TO_BE32(x) swap32(x)
//! @} //! @}
/*! \name Endianism Conversion /*! \name Endianism Conversion
* *
* The same considerations as for clz and ctz apply here but GCC's * The same considerations as for clz and ctz apply here but GCC's
@@ -955,7 +946,6 @@ typedef struct
//! @} //! @}
/*! \name Target Abstraction /*! \name Target Abstraction
*/ */
//! @{ //! @{
@@ -997,7 +987,6 @@ typedef U8 Byte; //!< 8-bit unsigned integer.
#endif // #ifndef __ASSEMBLY__ #endif // #ifndef __ASSEMBLY__
#ifdef __ICCARM__ #ifdef __ICCARM__
#define SHORTENUM __packed #define SHORTENUM __packed
#elif defined(__GNUC__) #elif defined(__GNUC__)
-2
View File
@@ -81,7 +81,6 @@
#define LUN_0_NAME "\"SD/MMC Card\"" #define LUN_0_NAME "\"SD/MMC Card\""
//! @} //! @}
/*! \name Actions Associated with Memory Accesses /*! \name Actions Associated with Memory Accesses
* *
* Write here the action to associate with each memory access. * Write here the action to associate with each memory access.
@@ -112,5 +111,4 @@
#define GLOBAL_WR_PROTECT false //!< Management of a global write protection. #define GLOBAL_WR_PROTECT false //!< Management of a global write protection.
//! @} //! @}
#endif // _CONF_ACCESS_H_ #endif // _CONF_ACCESS_H_
-1
View File
@@ -96,5 +96,4 @@
// - UPLL frequency: 480MHz // - UPLL frequency: 480MHz
// - USB clock: 480 / 1 = 480MHz // - USB clock: 480 / 1 = 480MHz
#endif /* CONF_CLOCK_H_INCLUDED */ #endif /* CONF_CLOCK_H_INCLUDED */
-4
View File
@@ -88,7 +88,6 @@
#endif #endif
//@} //@}
/** /**
* USB Device Callbacks definitions (Optional) * USB Device Callbacks definitions (Optional)
* @{ * @{
@@ -150,7 +149,6 @@
//@} //@}
/** /**
* USB Interface Configuration * USB Interface Configuration
* @{ * @{
@@ -210,7 +208,6 @@
//@} //@}
//@} //@}
/** /**
* Configuration of MSC interface * Configuration of MSC interface
* @{ * @{
@@ -245,7 +242,6 @@
//@} //@}
/** /**
* Description of Composite Device * Description of Composite Device
* @{ * @{
-28
View File
@@ -68,7 +68,6 @@
#endif #endif
#include "ctrl_access.h" #include "ctrl_access.h"
//_____ D E F I N I T I O N S ______________________________________________ //_____ D E F I N I T I O N S ______________________________________________
#ifdef FREERTOS_USED #ifdef FREERTOS_USED
@@ -112,7 +111,6 @@ static xSemaphoreHandle ctrl_access_semphr = NULL;
#endif // FREERTOS_USED #endif // FREERTOS_USED
#if MAX_LUN #if MAX_LUN
/*! \brief Initializes an entry of the LUN descriptor table. /*! \brief Initializes an entry of the LUN descriptor table.
@@ -242,17 +240,14 @@ static const struct
#endif #endif
#if GLOBAL_WR_PROTECT == true #if GLOBAL_WR_PROTECT == true
bool g_wr_protect; bool g_wr_protect;
#endif #endif
/*! \name Control Interface /*! \name Control Interface
*/ */
//! @{ //! @{
#ifdef FREERTOS_USED #ifdef FREERTOS_USED
bool ctrl_access_init(void) bool ctrl_access_init(void)
@@ -270,7 +265,6 @@ bool ctrl_access_init(void)
return true; return true;
} }
/*! \brief Locks accesses to LUNs. /*! \brief Locks accesses to LUNs.
* *
* \return \c true if the access was successfully locked, else \c false. * \return \c true if the access was successfully locked, else \c false.
@@ -288,7 +282,6 @@ static bool ctrl_access_lock(void)
#endif // FREERTOS_USED #endif // FREERTOS_USED
U8 get_nb_lun(void) U8 get_nb_lun(void)
{ {
#if MEM_USB == ENABLE #if MEM_USB == ENABLE
@@ -309,13 +302,11 @@ U8 get_nb_lun(void)
#endif #endif
} }
U8 get_cur_lun(void) U8 get_cur_lun(void)
{ {
return LUN_ID_0; return LUN_ID_0;
} }
Ctrl_status mem_test_unit_ready(U8 lun) Ctrl_status mem_test_unit_ready(U8 lun)
{ {
Ctrl_status status; Ctrl_status status;
@@ -337,7 +328,6 @@ Ctrl_status mem_test_unit_ready(U8 lun)
return status; return status;
} }
Ctrl_status mem_read_capacity(U8 lun, U32 *u32_nb_sector) Ctrl_status mem_read_capacity(U8 lun, U32 *u32_nb_sector)
{ {
Ctrl_status status; Ctrl_status status;
@@ -359,7 +349,6 @@ Ctrl_status mem_read_capacity(U8 lun, U32 *u32_nb_sector)
return status; return status;
} }
U8 mem_sector_size(U8 lun) U8 mem_sector_size(U8 lun)
{ {
U8 sector_size; U8 sector_size;
@@ -381,7 +370,6 @@ U8 mem_sector_size(U8 lun)
return sector_size; return sector_size;
} }
bool mem_unload(U8 lun, bool unload) bool mem_unload(U8 lun, bool unload)
{ {
bool unloaded; bool unloaded;
@@ -433,7 +421,6 @@ bool mem_wr_protect(U8 lun)
return wr_protect; return wr_protect;
} }
bool mem_removal(U8 lun) bool mem_removal(U8 lun)
{ {
bool removal; bool removal;
@@ -458,7 +445,6 @@ bool mem_removal(U8 lun)
return removal; return removal;
} }
const char *mem_name(U8 lun) const char *mem_name(U8 lun)
{ {
#if MAX_LUN==0 #if MAX_LUN==0
@@ -475,17 +461,14 @@ const char *mem_name(U8 lun)
#endif #endif
} }
//! @} //! @}
#if ACCESS_USB == true #if ACCESS_USB == true
/*! \name MEM <-> USB Interface /*! \name MEM <-> USB Interface
*/ */
//! @{ //! @{
Ctrl_status memory_2_usb(U8 lun, U32 addr, U16 nb_sector) Ctrl_status memory_2_usb(U8 lun, U32 addr, U16 nb_sector)
{ {
Ctrl_status status; Ctrl_status status;
@@ -505,7 +488,6 @@ Ctrl_status memory_2_usb(U8 lun, U32 addr, U16 nb_sector)
return status; return status;
} }
Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector) Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector)
{ {
Ctrl_status status; Ctrl_status status;
@@ -525,19 +507,16 @@ Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector)
return status; return status;
} }
//! @} //! @}
#endif // ACCESS_USB == true #endif // ACCESS_USB == true
#if ACCESS_MEM_TO_RAM == true #if ACCESS_MEM_TO_RAM == true
/*! \name MEM <-> RAM Interface /*! \name MEM <-> RAM Interface
*/ */
//! @{ //! @{
Ctrl_status memory_2_ram(U8 lun, U32 addr, void *ram) Ctrl_status memory_2_ram(U8 lun, U32 addr, void *ram)
{ {
Ctrl_status status; Ctrl_status status;
@@ -564,7 +543,6 @@ Ctrl_status memory_2_ram(U8 lun, U32 addr, void *ram)
return status; return status;
} }
Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram) Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram)
{ {
Ctrl_status status; Ctrl_status status;
@@ -591,19 +569,16 @@ Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram)
return status; return status;
} }
//! @} //! @}
#endif // ACCESS_MEM_TO_RAM == true #endif // ACCESS_MEM_TO_RAM == true
#if ACCESS_STREAM == true #if ACCESS_STREAM == true
/*! \name Streaming MEM <-> MEM Interface /*! \name Streaming MEM <-> MEM Interface
*/ */
//! @{ //! @{
#if ACCESS_MEM_TO_MEM == true #if ACCESS_MEM_TO_MEM == true
#include "fat.h" #include "fat.h"
@@ -625,21 +600,18 @@ Ctrl_status stream_mem_to_mem(U8 src_lun, U32 src_addr, U8 dest_lun, U32 dest_ad
#endif // ACCESS_MEM_TO_MEM == true #endif // ACCESS_MEM_TO_MEM == true
Ctrl_status stream_state(U8 id) Ctrl_status stream_state(U8 id)
{ {
UNUSED(id); UNUSED(id);
return CTRL_GOOD; return CTRL_GOOD;
} }
U16 stream_stop(U8 id) U16 stream_stop(U8 id)
{ {
UNUSED(id); UNUSED(id);
return 0; return 0;
} }
//! @} //! @}
#endif // ACCESS_STREAM #endif // ACCESS_STREAM
-9
View File
@@ -56,7 +56,6 @@
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a> * Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
*/ */
#ifndef _CTRL_ACCESS_H_ #ifndef _CTRL_ACCESS_H_
#define _CTRL_ACCESS_H_ #define _CTRL_ACCESS_H_
@@ -89,7 +88,6 @@ typedef enum
CTRL_BUSY = FAIL + 2 //!< Memory not initialized or changed. CTRL_BUSY = FAIL + 2 //!< Memory not initialized or changed.
} Ctrl_status; } Ctrl_status;
// FYI: Each Logical Unit Number (LUN) corresponds to a memory. // FYI: Each Logical Unit Number (LUN) corresponds to a memory.
// Check LUN defines. // Check LUN defines.
@@ -136,7 +134,6 @@ typedef enum
#define LUN_ID_USB (MAX_LUN) //!< First dynamic LUN (USB host mass storage). #define LUN_ID_USB (MAX_LUN) //!< First dynamic LUN (USB host mass storage).
//! @} //! @}
// Include LUN header files. // Include LUN header files.
#if LUN_0 == ENABLE #if LUN_0 == ENABLE
#include LUN_0_INCLUDE #include LUN_0_INCLUDE
@@ -166,13 +163,11 @@ typedef enum
#include LUN_USB_INCLUDE #include LUN_USB_INCLUDE
#endif #endif
// Check the configuration of write protection in conf_access.h. // Check the configuration of write protection in conf_access.h.
#ifndef GLOBAL_WR_PROTECT #ifndef GLOBAL_WR_PROTECT
#error GLOBAL_WR_PROTECT must be defined as true or false in conf_access.h #error GLOBAL_WR_PROTECT must be defined as true or false in conf_access.h
#endif #endif
#if GLOBAL_WR_PROTECT == true #if GLOBAL_WR_PROTECT == true
//! Write protect. //! Write protect.
@@ -180,7 +175,6 @@ extern bool g_wr_protect;
#endif #endif
/*! \name Control Interface /*! \name Control Interface
*/ */
//! @{ //! @{
@@ -279,7 +273,6 @@ extern const char *mem_name(U8 lun);
//! @} //! @}
#if ACCESS_USB == true #if ACCESS_USB == true
/*! \name MEM <-> USB Interface /*! \name MEM <-> USB Interface
@@ -310,7 +303,6 @@ extern Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector);
#endif // ACCESS_USB == true #endif // ACCESS_USB == true
#if ACCESS_MEM_TO_RAM == true #if ACCESS_MEM_TO_RAM == true
/*! \name MEM <-> RAM Interface /*! \name MEM <-> RAM Interface
@@ -341,7 +333,6 @@ extern Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram);
#endif // ACCESS_MEM_TO_RAM == true #endif // ACCESS_MEM_TO_RAM == true
#if ACCESS_STREAM == true #if ACCESS_STREAM == true
/*! \name Streaming MEM <-> MEM Interface /*! \name Streaming MEM <-> MEM Interface
-1
View File
@@ -57,7 +57,6 @@
#include "preprocessor.h" #include "preprocessor.h"
//! Maximal number of repetitions supported by MREPEAT. //! Maximal number of repetitions supported by MREPEAT.
#define MREPEAT_LIMIT 256 #define MREPEAT_LIMIT 256
-2
View File
@@ -128,7 +128,6 @@ static inline void osc_enable(uint32_t ul_id) {
pmc_switch_sclk_to_32kxtal(PMC_OSC_BYPASS); pmc_switch_sclk_to_32kxtal(PMC_OSC_BYPASS);
break; break;
case OSC_MAINCK_4M_RC: case OSC_MAINCK_4M_RC:
pmc_switch_mainck_to_fastrc(CKGR_MOR_MOSCRCF_4_MHz); pmc_switch_mainck_to_fastrc(CKGR_MOR_MOSCRCF_4_MHz);
break; break;
@@ -141,7 +140,6 @@ static inline void osc_enable(uint32_t ul_id) {
pmc_switch_mainck_to_fastrc(CKGR_MOR_MOSCRCF_12_MHz); pmc_switch_mainck_to_fastrc(CKGR_MOR_MOSCRCF_12_MHz);
break; break;
case OSC_MAINCK_XTAL: case OSC_MAINCK_XTAL:
pmc_switch_mainck_to_xtal(PMC_OSC_XTAL/*, pmc_switch_mainck_to_xtal(PMC_OSC_XTAL/*,
pmc_us_to_moscxtst(BOARD_OSC_STARTUP_US, pmc_us_to_moscxtst(BOARD_OSC_STARTUP_US,
-1
View File
@@ -51,5 +51,4 @@
#include "stringz.h" #include "stringz.h"
#include "mrepeat.h" #include "mrepeat.h"
#endif // _PREPROCESSOR_H_ #endif // _PREPROCESSOR_H_
-1
View File
@@ -86,7 +86,6 @@ enum scsi_sbc_mode {
SCSI_MS_MODE_CACHING = 0x08, //!< Caching mode page SCSI_MS_MODE_CACHING = 0x08, //!< Caching mode page
}; };
//! \name SBC-2 Device-Specific Parameter //! \name SBC-2 Device-Specific Parameter
//@{ //@{
#define SCSI_MS_SBC_WP 0x80 //!< Write Protected #define SCSI_MS_SBC_WP 0x80 //!< Write Protected
-5
View File
@@ -45,7 +45,6 @@
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a> * Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
*/ */
#ifndef _SD_MMC_SPI_MEM_H_ #ifndef _SD_MMC_SPI_MEM_H_
#define _SD_MMC_SPI_MEM_H_ #define _SD_MMC_SPI_MEM_H_
@@ -63,17 +62,14 @@
#error sd_mmc_spi_mem.h is #included although SD_MMC_SPI_MEM is disabled #error sd_mmc_spi_mem.h is #included although SD_MMC_SPI_MEM is disabled
#endif #endif
#include "ctrl_access.h" #include "ctrl_access.h"
//_____ D E F I N I T I O N S ______________________________________________ //_____ D E F I N I T I O N S ______________________________________________
#define SD_MMC_REMOVED 0 #define SD_MMC_REMOVED 0
#define SD_MMC_INSERTED 1 #define SD_MMC_INSERTED 1
#define SD_MMC_REMOVING 2 #define SD_MMC_REMOVING 2
//---- CONTROL FUNCTIONS ---- //---- CONTROL FUNCTIONS ----
//! //!
//! @brief This function initializes the hw/sw resources required to drive the SD_MMC_SPI. //! @brief This function initializes the hw/sw resources required to drive the SD_MMC_SPI.
@@ -133,7 +129,6 @@ extern bool sd_mmc_spi_wr_protect(void);
//! //!
extern bool sd_mmc_spi_removal(void); extern bool sd_mmc_spi_removal(void);
//---- ACCESS DATA FUNCTIONS ---- //---- ACCESS DATA FUNCTIONS ----
#if ACCESS_USB == true #if ACCESS_USB == true
-1
View File
@@ -212,7 +212,6 @@ extern "C" {
#define CONFIG_USBCLK_DIV #define CONFIG_USBCLK_DIV
#endif #endif
extern void sysclk_enable_usb(void); extern void sysclk_enable_usb(void);
extern void sysclk_disable_usb(void); extern void sysclk_disable_usb(void);
-1
View File
@@ -83,7 +83,6 @@ static usb_iface_desc_t UDC_DESC_STORAGE *udc_ptr_iface;
//! @} //! @}
//! \name Internal structure to store the USB device main strings //! \name Internal structure to store the USB device main strings
//! @{ //! @{
-2
View File
@@ -685,6 +685,4 @@ usb_iface_desc_t UDC_DESC_STORAGE *udc_get_interface_desc(void);
} \endcode } \endcode
*/ */
#endif // _UDC_H_ #endif // _UDC_H_
-1
View File
@@ -213,7 +213,6 @@ void udd_send_remotewakeup(void);
*/ */
void udd_set_setup_payload( uint8_t *payload, uint16_t payload_size ); void udd_set_setup_payload( uint8_t *payload, uint16_t payload_size );
/** /**
* \name Endpoint Management * \name Endpoint Management
* *
-10
View File
@@ -457,7 +457,6 @@ void udi_cdc_data_sof_notify(void)
#endif #endif
} }
// ------------------------ // ------------------------
//------- Internal routines to control serial line //------- Internal routines to control serial line
@@ -520,7 +519,6 @@ static void udi_cdc_ctrl_state_change(uint8_t port, bool b_set, le16_t bit_mask)
udi_cdc_ctrl_state_notify(port, ep_comm); udi_cdc_ctrl_state_notify(port, ep_comm);
} }
static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep) static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep)
{ {
#if UDI_CDC_PORT_NB == 1 // To optimize code #if UDI_CDC_PORT_NB == 1 // To optimize code
@@ -542,7 +540,6 @@ static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep)
} }
} }
static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep) static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
{ {
uint8_t port; uint8_t port;
@@ -578,11 +575,9 @@ static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n,
udi_cdc_ctrl_state_notify(port, ep); udi_cdc_ctrl_state_notify(port, ep);
} }
// ------------------------ // ------------------------
//------- Internal routines to process data transfer //------- Internal routines to process data transfer
static bool udi_cdc_rx_start(uint8_t port) static bool udi_cdc_rx_start(uint8_t port)
{ {
irqflags_t flags; irqflags_t flags;
@@ -632,7 +627,6 @@ static bool udi_cdc_rx_start(uint8_t port)
udi_cdc_data_received); udi_cdc_data_received);
} }
static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep) static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
{ {
uint8_t buf_sel_trans; uint8_t buf_sel_trans;
@@ -668,7 +662,6 @@ static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_
udi_cdc_rx_start(port); udi_cdc_rx_start(port);
} }
static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep) static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
{ {
uint8_t port; uint8_t port;
@@ -700,7 +693,6 @@ static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t
udi_cdc_tx_send(port); udi_cdc_tx_send(port);
} }
static void udi_cdc_tx_send(uint8_t port) static void udi_cdc_tx_send(uint8_t port)
{ {
irqflags_t flags; irqflags_t flags;
@@ -780,11 +772,9 @@ static void udi_cdc_tx_send(uint8_t port)
udi_cdc_data_sent); udi_cdc_data_sent);
} }
// ------------------------ // ------------------------
//------- Application interface //------- Application interface
//------- Application interface //------- Application interface
void udi_cdc_ctrl_signal_dcd(bool b_set) void udi_cdc_ctrl_signal_dcd(bool b_set)
-2
View File
@@ -106,7 +106,6 @@ typedef struct {
usb_ep_desc_t ep_notify; usb_ep_desc_t ep_notify;
} udi_cdc_comm_desc_t; } udi_cdc_comm_desc_t;
/** /**
* \brief Data Class interface descriptor * \brief Data Class interface descriptor
* *
@@ -121,7 +120,6 @@ typedef struct {
usb_ep_desc_t ep_out; usb_ep_desc_t ep_out;
} udi_cdc_data_desc_t; } udi_cdc_data_desc_t;
//! CDC communication endpoints size for all speeds //! CDC communication endpoints size for all speeds
#define UDI_CDC_COMM_EP_SIZE 64 #define UDI_CDC_COMM_EP_SIZE 64
//! CDC data endpoints size for FS speed (8B, 16B, 32B, 64B) //! CDC data endpoints size for FS speed (8B, 16B, 32B, 64B)
-1
View File
@@ -109,7 +109,6 @@ UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
.bNumConfigurations = 1 .bNumConfigurations = 1
}; };
#ifdef USB_DEVICE_HS_SUPPORT #ifdef USB_DEVICE_HS_SUPPORT
//! USB Device Qualifier Descriptor for HS //! USB Device Qualifier Descriptor for HS
COMPILER_WORD_ALIGNED COMPILER_WORD_ALIGNED
@@ -93,7 +93,6 @@ UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
.bNumConfigurations = 1 .bNumConfigurations = 1
}; };
#ifdef USB_DEVICE_HS_SUPPORT #ifdef USB_DEVICE_HS_SUPPORT
//! USB Device Qualifier Descriptor for HS //! USB Device Qualifier Descriptor for HS
COMPILER_WORD_ALIGNED COMPILER_WORD_ALIGNED
@@ -147,7 +146,6 @@ UDC_DESC_STORAGE udc_desc_t udc_desc_hs = {
}; };
#endif #endif
/** /**
* \name UDC structures which contains all USB Device definitions * \name UDC structures which contains all USB Device definitions
*/ */
-6
View File
@@ -86,7 +86,6 @@ UDC_DESC_STORAGE udi_api_t udi_api_msc = {
}; };
//@} //@}
/** /**
* \ingroup udi_msc_group * \ingroup udi_msc_group
* \defgroup udi_msc_group_internal Implementation of UDI MSC * \defgroup udi_msc_group_internal Implementation of UDI MSC
@@ -137,7 +136,6 @@ volatile bool udi_msc_b_reset_trans = true;
//@} //@}
/** /**
* \name Internal routines * \name Internal routines
*/ */
@@ -190,7 +188,6 @@ static void udi_msc_cbw_received(udd_ep_status_t status,
static bool udi_msc_cbw_validate(uint32_t alloc_len, uint8_t dir_flag); static bool udi_msc_cbw_validate(uint32_t alloc_len, uint8_t dir_flag);
//@} //@}
/** /**
* \name Routines to process small data packet * \name Routines to process small data packet
*/ */
@@ -217,7 +214,6 @@ static void udi_msc_data_sent(udd_ep_status_t status, iram_size_t nb_sent,
udd_ep_id_t ep); udd_ep_id_t ep);
//@} //@}
/** /**
* \name Routines to process CSW packet * \name Routines to process CSW packet
*/ */
@@ -250,7 +246,6 @@ static void udi_msc_csw_sent(udd_ep_status_t status, iram_size_t nb_sent,
udd_ep_id_t ep); udd_ep_id_t ep);
//@} //@}
/** /**
* \name Routines manage sense data * \name Routines manage sense data
*/ */
@@ -307,7 +302,6 @@ static void udi_msc_sense_fail_cdb_invalid(void);
static void udi_msc_sense_command_invalid(void); static void udi_msc_sense_command_invalid(void);
//@} //@}
/** /**
* \name Routines manage SCSI Commands * \name Routines manage SCSI Commands
*/ */
+70 -54
View File
@@ -116,6 +116,23 @@
//#define dbg_print printf //#define dbg_print printf
#define dbg_print(...) #define dbg_print(...)
// Marlin modification: Redefine the otg_freeze_clock and otg_unfreeze_clock macros
// to add memory barriers to ensure that any accesses to USB registers aren't re-ordered
// to occur while the clock is frozen.
#undef otg_freeze_clock
#undef otg_unfreeze_clock
#define otg_freeze_clock() do { \
__DSB(); \
Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_FRZCLK); \
} while (0)
#define otg_unfreeze_clock() \
do { \
Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_FRZCLK); \
__DSB(); \
} while (0)
/** /**
* \ingroup udd_group * \ingroup udd_group
* \defgroup udd_udphs_group USB On-The-Go High-Speed Port for device mode (UOTGHS) * \defgroup udd_udphs_group USB On-The-Go High-Speed Port for device mode (UOTGHS)
@@ -276,7 +293,6 @@
# endif # endif
#endif #endif
/** /**
* \name Power management routine. * \name Power management routine.
*/ */
@@ -293,7 +309,6 @@ static bool udd_b_idle;
//! State of sleep manager //! State of sleep manager
static bool udd_b_sleep_initialized = false; static bool udd_b_sleep_initialized = false;
/*! \brief Authorize or not the CPU powerdown mode /*! \brief Authorize or not the CPU powerdown mode
* *
* \param b_enable true to authorize idle mode * \param b_enable true to authorize idle mode
@@ -321,7 +336,6 @@ static void udd_sleep_mode(bool b_idle)
//@} //@}
/** /**
* \name Control endpoint low level management routine. * \name Control endpoint low level management routine.
* *
@@ -393,7 +407,6 @@ static void udd_ctrl_send_zlp_out(void);
//! \brief Call callback associated to setup request //! \brief Call callback associated to setup request
static void udd_ctrl_endofrequest(void); static void udd_ctrl_endofrequest(void);
/** /**
* \brief Main interrupt routine for control endpoint * \brief Main interrupt routine for control endpoint
* *
@@ -405,7 +418,6 @@ static bool udd_ctrl_interrupt(void);
//@} //@}
/** /**
* \name Management of bulk/interrupt/isochronous endpoints * \name Management of bulk/interrupt/isochronous endpoints
* *
@@ -443,7 +455,6 @@ typedef struct {
uint8_t stall_requested:1; uint8_t stall_requested:1;
} udd_ep_job_t; } udd_ep_job_t;
//! Array to register a job on bulk/interrupt/isochronous endpoint //! Array to register a job on bulk/interrupt/isochronous endpoint
static udd_ep_job_t udd_ep_job[USB_DEVICE_MAX_EP]; static udd_ep_job_t udd_ep_job[USB_DEVICE_MAX_EP];
@@ -505,7 +516,6 @@ static bool udd_ep_interrupt(void);
#endif // (0!=USB_DEVICE_MAX_EP) #endif // (0!=USB_DEVICE_MAX_EP)
//@} //@}
// ------------------------ // ------------------------
//--- INTERNAL ROUTINES TO MANAGED GLOBAL EVENTS //--- INTERNAL ROUTINES TO MANAGED GLOBAL EVENTS
@@ -611,6 +621,18 @@ ISR(UDD_USB_INT_FUN)
// The wakeup interrupt is automatic acked when a suspend occur // The wakeup interrupt is automatic acked when a suspend occur
udd_disable_wake_up_interrupt(); udd_disable_wake_up_interrupt();
udd_enable_suspend_interrupt(); udd_enable_suspend_interrupt();
// Marlin modification: The RESET, SOF, and MSOF interrupts were previously
// enabled in udd_attach, which caused a race condition where they could
// be raised and unclearable with the clock is frozen. They are now
// enabled here, after the clock has been unfrozen in response to the wake
// interrupt.
udd_enable_reset_interrupt();
udd_enable_sof_interrupt();
#ifdef USB_DEVICE_HS_SUPPORT
udd_enable_msof_interrupt();
#endif
udd_sleep_mode(true); // Enter in IDLE mode udd_sleep_mode(true); // Enter in IDLE mode
#ifdef UDC_RESUME_EVENT #ifdef UDC_RESUME_EVENT
UDC_RESUME_EVENT(); UDC_RESUME_EVENT();
@@ -642,13 +664,11 @@ udd_interrupt_sof_end:
return; return;
} }
bool udd_include_vbus_monitoring(void) bool udd_include_vbus_monitoring(void)
{ {
return true; return true;
} }
void udd_enable(void) void udd_enable(void)
{ {
irqflags_t flags; irqflags_t flags;
@@ -735,7 +755,6 @@ void udd_enable(void)
cpu_irq_restore(flags); cpu_irq_restore(flags);
} }
void udd_disable(void) void udd_disable(void)
{ {
irqflags_t flags; irqflags_t flags;
@@ -776,6 +795,27 @@ void udd_disable(void)
cpu_irq_restore(flags); cpu_irq_restore(flags);
} }
// Marlin modification: The original implementation did not use a memory
// barrier between disabling and clearing interrupts. This sometimes
// allowed interrupts to remain raised and unclearable after the clock
// was frozen. This helper was added to ensure that memory barriers
// are used consistently from all places where interrupts are disabled.
static void disable_and_ack_sync_interrupts()
{
// Disable USB line events
udd_disable_reset_interrupt();
udd_disable_sof_interrupt();
#ifdef USB_DEVICE_HS_SUPPORT
udd_disable_msof_interrupt();
#endif
__DSB();
udd_ack_reset();
udd_ack_sof();
#ifdef USB_DEVICE_HS_SUPPORT
udd_ack_msof();
#endif
__DSB();
}
void udd_attach(void) void udd_attach(void)
{ {
@@ -796,17 +836,16 @@ void udd_attach(void)
udd_attach_device(); udd_attach_device();
// Enable USB line events // Enable USB line events
udd_enable_reset_interrupt();
udd_enable_suspend_interrupt(); udd_enable_suspend_interrupt();
udd_enable_wake_up_interrupt(); udd_enable_wake_up_interrupt();
udd_enable_sof_interrupt();
#ifdef USB_DEVICE_HS_SUPPORT // Marlin modification: The RESET, SOF, and MSOF interrupts were previously
udd_enable_msof_interrupt(); // enabled here, which caused a race condition where they could be raised
#endif // and unclearable with the clock is frozen. They are now enabled in the
// Reset following interrupts flag // wake interrupt handler, after the clock has been unfrozen. They are now
udd_ack_reset(); // explicitly disabled here to ensure that they cannot be raised before
udd_ack_sof(); // the clock is frozen.
udd_ack_msof(); disable_and_ack_sync_interrupts();
// The first suspend interrupt must be forced // The first suspend interrupt must be forced
// The first suspend interrupt is not detected else raise it // The first suspend interrupt is not detected else raise it
@@ -817,18 +856,22 @@ void udd_attach(void)
cpu_irq_restore(flags); cpu_irq_restore(flags);
} }
void udd_detach(void) void udd_detach(void)
{ {
otg_unfreeze_clock(); otg_unfreeze_clock();
// Detach device from the bus // Detach device from the bus
udd_detach_device(); udd_detach_device();
// Marlin modification: Added the explicit disabling of the RESET, SOF, and
// MSOF interrupts here, to ensure that they cannot be raised after the
// clock is frozen.
disable_and_ack_sync_interrupts();
otg_freeze_clock(); otg_freeze_clock();
udd_sleep_mode(false); udd_sleep_mode(false);
} }
bool udd_is_high_speed(void) bool udd_is_high_speed(void)
{ {
#ifdef USB_DEVICE_HS_SUPPORT #ifdef USB_DEVICE_HS_SUPPORT
@@ -838,7 +881,6 @@ bool udd_is_high_speed(void)
#endif #endif
} }
void udd_set_address(uint8_t address) void udd_set_address(uint8_t address)
{ {
udd_disable_address(); udd_disable_address();
@@ -846,13 +888,11 @@ void udd_set_address(uint8_t address)
udd_enable_address(); udd_enable_address();
} }
uint8_t udd_getaddress(void) uint8_t udd_getaddress(void)
{ {
return udd_get_configured_address(); return udd_get_configured_address();
} }
uint16_t udd_get_frame_number(void) uint16_t udd_get_frame_number(void)
{ {
return udd_frame_number(); return udd_frame_number();
@@ -875,14 +915,12 @@ void udd_send_remotewakeup(void)
} }
} }
void udd_set_setup_payload(uint8_t *payload, uint16_t payload_size) void udd_set_setup_payload(uint8_t *payload, uint16_t payload_size)
{ {
udd_g_ctrlreq.payload = payload; udd_g_ctrlreq.payload = payload;
udd_g_ctrlreq.payload_size = payload_size; udd_g_ctrlreq.payload_size = payload_size;
} }
#if (0 != USB_DEVICE_MAX_EP) #if (0 != USB_DEVICE_MAX_EP)
bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes, bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes,
uint16_t MaxEndpointSize) uint16_t MaxEndpointSize)
@@ -1006,7 +1044,6 @@ bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes,
return true; return true;
} }
void udd_ep_free(udd_ep_id_t ep) void udd_ep_free(udd_ep_id_t ep)
{ {
uint8_t ep_index = ep & USB_EP_ADDR_MASK; uint8_t ep_index = ep & USB_EP_ADDR_MASK;
@@ -1019,14 +1056,12 @@ void udd_ep_free(udd_ep_id_t ep)
udd_ep_job[ep_index - 1].stall_requested = false; udd_ep_job[ep_index - 1].stall_requested = false;
} }
bool udd_ep_is_halted(udd_ep_id_t ep) bool udd_ep_is_halted(udd_ep_id_t ep)
{ {
uint8_t ep_index = ep & USB_EP_ADDR_MASK; uint8_t ep_index = ep & USB_EP_ADDR_MASK;
return Is_udd_endpoint_stall_requested(ep_index); return Is_udd_endpoint_stall_requested(ep_index);
} }
bool udd_ep_set_halt(udd_ep_id_t ep) bool udd_ep_set_halt(udd_ep_id_t ep)
{ {
uint8_t ep_index = ep & USB_EP_ADDR_MASK; uint8_t ep_index = ep & USB_EP_ADDR_MASK;
@@ -1067,7 +1102,6 @@ bool udd_ep_set_halt(udd_ep_id_t ep)
return true; return true;
} }
bool udd_ep_clear_halt(udd_ep_id_t ep) bool udd_ep_clear_halt(udd_ep_id_t ep)
{ {
uint8_t ep_index = ep & USB_EP_ADDR_MASK; uint8_t ep_index = ep & USB_EP_ADDR_MASK;
@@ -1108,7 +1142,6 @@ bool udd_ep_clear_halt(udd_ep_id_t ep)
return true; return true;
} }
bool udd_ep_run(udd_ep_id_t ep, bool b_shortpacket, bool udd_ep_run(udd_ep_id_t ep, bool b_shortpacket,
uint8_t * buf, iram_size_t buf_size, uint8_t * buf, iram_size_t buf_size,
udd_callback_trans_t callback) udd_callback_trans_t callback)
@@ -1175,7 +1208,6 @@ bool udd_ep_run(udd_ep_id_t ep, bool b_shortpacket,
#endif #endif
} }
void udd_ep_abort(udd_ep_id_t ep) void udd_ep_abort(udd_ep_id_t ep)
{ {
uint8_t ep_index = ep & USB_EP_ADDR_MASK; uint8_t ep_index = ep & USB_EP_ADDR_MASK;
@@ -1204,7 +1236,6 @@ void udd_ep_abort(udd_ep_id_t ep)
udd_ep_abort_job(ep); udd_ep_abort_job(ep);
} }
bool udd_ep_wait_stall_clear(udd_ep_id_t ep, bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
udd_callback_halt_cleared_t callback) udd_callback_halt_cleared_t callback)
{ {
@@ -1239,7 +1270,6 @@ bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
} }
#endif // (0 != USB_DEVICE_MAX_EP) #endif // (0 != USB_DEVICE_MAX_EP)
#ifdef USB_DEVICE_HS_SUPPORT #ifdef USB_DEVICE_HS_SUPPORT
void udd_test_mode_j(void) void udd_test_mode_j(void)
@@ -1248,20 +1278,17 @@ void udd_test_mode_j(void)
udd_enable_hs_test_mode_j(); udd_enable_hs_test_mode_j();
} }
void udd_test_mode_k(void) void udd_test_mode_k(void)
{ {
udd_enable_hs_test_mode(); udd_enable_hs_test_mode();
udd_enable_hs_test_mode_k(); udd_enable_hs_test_mode_k();
} }
void udd_test_mode_se0_nak(void) void udd_test_mode_se0_nak(void)
{ {
udd_enable_hs_test_mode(); udd_enable_hs_test_mode();
} }
void udd_test_mode_packet(void) void udd_test_mode_packet(void)
{ {
uint8_t i; uint8_t i;
@@ -1305,8 +1332,6 @@ void udd_test_mode_packet(void)
} }
#endif // USB_DEVICE_HS_SUPPORT #endif // USB_DEVICE_HS_SUPPORT
// ------------------------ // ------------------------
//--- INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT //--- INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT
@@ -1356,7 +1381,6 @@ static void udd_ctrl_init(void)
udd_ep_control_state = UDD_EPCTRL_SETUP; udd_ep_control_state = UDD_EPCTRL_SETUP;
} }
static void udd_ctrl_setup_received(void) static void udd_ctrl_setup_received(void)
{ {
irqflags_t flags; irqflags_t flags;
@@ -1418,7 +1442,6 @@ static void udd_ctrl_setup_received(void)
} }
} }
static void udd_ctrl_in_sent(void) static void udd_ctrl_in_sent(void)
{ {
static bool b_shortpacket = false; static bool b_shortpacket = false;
@@ -1502,7 +1525,6 @@ static void udd_ctrl_in_sent(void)
cpu_irq_restore(flags); cpu_irq_restore(flags);
} }
static void udd_ctrl_out_received(void) static void udd_ctrl_out_received(void)
{ {
irqflags_t flags; irqflags_t flags;
@@ -1593,7 +1615,6 @@ static void udd_ctrl_out_received(void)
cpu_irq_restore(flags); cpu_irq_restore(flags);
} }
static void udd_ctrl_underflow(void) static void udd_ctrl_underflow(void)
{ {
if (Is_udd_out_received(0)) if (Is_udd_out_received(0))
@@ -1610,7 +1631,6 @@ static void udd_ctrl_underflow(void)
} }
} }
static void udd_ctrl_overflow(void) static void udd_ctrl_overflow(void)
{ {
if (Is_udd_in_send(0)) if (Is_udd_in_send(0))
@@ -1626,7 +1646,6 @@ static void udd_ctrl_overflow(void)
} }
} }
static void udd_ctrl_stall_data(void) static void udd_ctrl_stall_data(void)
{ {
// Stall all packets on IN & OUT control endpoint // Stall all packets on IN & OUT control endpoint
@@ -1634,7 +1653,6 @@ static void udd_ctrl_stall_data(void)
udd_enable_stall_handshake(0); udd_enable_stall_handshake(0);
} }
static void udd_ctrl_send_zlp_in(void) static void udd_ctrl_send_zlp_in(void)
{ {
irqflags_t flags; irqflags_t flags;
@@ -1652,7 +1670,6 @@ static void udd_ctrl_send_zlp_in(void)
cpu_irq_restore(flags); cpu_irq_restore(flags);
} }
static void udd_ctrl_send_zlp_out(void) static void udd_ctrl_send_zlp_out(void)
{ {
irqflags_t flags; irqflags_t flags;
@@ -1668,7 +1685,6 @@ static void udd_ctrl_send_zlp_out(void)
cpu_irq_restore(flags); cpu_irq_restore(flags);
} }
static void udd_ctrl_endofrequest(void) static void udd_ctrl_endofrequest(void)
{ {
// If a callback is registered then call it // If a callback is registered then call it
@@ -1677,7 +1693,6 @@ static void udd_ctrl_endofrequest(void)
} }
} }
static bool udd_ctrl_interrupt(void) static bool udd_ctrl_interrupt(void)
{ {
@@ -1728,7 +1743,6 @@ static bool udd_ctrl_interrupt(void)
return false; return false;
} }
// ------------------------ // ------------------------
//--- INTERNAL ROUTINES TO MANAGED THE BULK/INTERRUPT/ISOCHRONOUS ENDPOINTS //--- INTERNAL ROUTINES TO MANAGED THE BULK/INTERRUPT/ISOCHRONOUS ENDPOINTS
@@ -1743,7 +1757,6 @@ static void udd_ep_job_table_reset(void)
} }
} }
static void udd_ep_job_table_kill(void) static void udd_ep_job_table_kill(void)
{ {
uint8_t i; uint8_t i;
@@ -1754,7 +1767,6 @@ static void udd_ep_job_table_kill(void)
} }
} }
static void udd_ep_abort_job(udd_ep_id_t ep) static void udd_ep_abort_job(udd_ep_id_t ep)
{ {
ep &= USB_EP_ADDR_MASK; ep &= USB_EP_ADDR_MASK;
@@ -1763,7 +1775,6 @@ static void udd_ep_abort_job(udd_ep_id_t ep)
udd_ep_finish_job(&udd_ep_job[ep - 1], true, ep); udd_ep_finish_job(&udd_ep_job[ep - 1], true, ep);
} }
static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_num) static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_num)
{ {
if (ptr_job->busy == false) { if (ptr_job->busy == false) {
@@ -1834,7 +1845,6 @@ static void udd_ep_trans_done(udd_ep_id_t ep)
udd_dma_ctrl |= UOTGHS_DEVDMACONTROL_END_BUFFIT | udd_dma_ctrl |= UOTGHS_DEVDMACONTROL_END_BUFFIT |
UOTGHS_DEVDMACONTROL_CHANN_ENB; UOTGHS_DEVDMACONTROL_CHANN_ENB;
// Disable IRQs to have a short sequence // Disable IRQs to have a short sequence
// between read of EOT_STA and DMA enable // between read of EOT_STA and DMA enable
flags = cpu_irq_save(); flags = cpu_irq_save();
@@ -2043,6 +2053,12 @@ static bool udd_ep_interrupt(void)
dbg_print("I "); dbg_print("I ");
udd_disable_in_send_interrupt(ep); udd_disable_in_send_interrupt(ep);
// One bank is free then send a ZLP // One bank is free then send a ZLP
// Marlin modification: Add a barrier to ensure in_send is disabled
// before it is cleared. This was not an observed problem, but
// other interrupts were seen to misbehave without this barrier.
__DSB();
udd_ack_in_send(ep); udd_ack_in_send(ep);
udd_ack_fifocon(ep); udd_ack_fifocon(ep);
udd_ep_finish_job(ptr_job, false, ep); udd_ep_finish_job(ptr_job, false, ep);
@@ -129,7 +129,6 @@ extern "C" {
#define Is_udd_vbus_transition() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBUSTI)) #define Is_udd_vbus_transition() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBUSTI))
//! @} //! @}
//! @name UOTGHS device attach control //! @name UOTGHS device attach control
//! These macros manage the UOTGHS Device attach. //! These macros manage the UOTGHS Device attach.
//! @{ //! @{
@@ -141,7 +140,6 @@ extern "C" {
#define Is_udd_detached() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_DETACH)) #define Is_udd_detached() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_DETACH))
//! @} //! @}
//! @name UOTGHS device bus events control //! @name UOTGHS device bus events control
//! These macros manage the UOTGHS Device bus events. //! These macros manage the UOTGHS Device bus events.
//! @{ //! @{
@@ -246,7 +244,6 @@ extern "C" {
#define udd_get_configured_address() (Rd_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_UADD_Msk)) #define udd_get_configured_address() (Rd_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_UADD_Msk))
//! @} //! @}
//! @name UOTGHS Device endpoint drivers //! @name UOTGHS Device endpoint drivers
//! These macros manage the common features of the endpoints. //! These macros manage the common features of the endpoints.
//! @{ //! @{
@@ -330,7 +327,6 @@ extern "C" {
#define udd_data_toggle(ep) (Rd_bitfield(UOTGHS_ARRAY(UOTGHS_DEVEPTISR[0], ep), UOTGHS_DEVEPTISR_DTSEQ_Msk)) #define udd_data_toggle(ep) (Rd_bitfield(UOTGHS_ARRAY(UOTGHS_DEVEPTISR[0], ep), UOTGHS_DEVEPTISR_DTSEQ_Msk))
//! @} //! @}
//! @name UOTGHS Device control endpoint //! @name UOTGHS Device control endpoint
//! These macros control the endpoints. //! These macros control the endpoints.
//! @{ //! @{
@@ -530,7 +526,6 @@ extern "C" {
//! Tests if IN sending interrupt is enabled //! Tests if IN sending interrupt is enabled
#define Is_udd_in_send_interrupt_enabled(ep) (Tst_bits(UOTGHS_ARRAY(UOTGHS_DEVEPTIMR[0], ep), UOTGHS_DEVEPTIMR_TXINE)) #define Is_udd_in_send_interrupt_enabled(ep) (Tst_bits(UOTGHS_ARRAY(UOTGHS_DEVEPTIMR[0], ep), UOTGHS_DEVEPTIMR_TXINE))
//! Get 64-, 32-, 16- or 8-bit access to FIFO data register of selected endpoint. //! Get 64-, 32-, 16- or 8-bit access to FIFO data register of selected endpoint.
//! @param ep Endpoint of which to access FIFO data register //! @param ep Endpoint of which to access FIFO data register
//! @param scale Data scale in bits: 64, 32, 16 or 8 //! @param scale Data scale in bits: 64, 32, 16 or 8
@@ -652,7 +647,6 @@ typedef struct {
//! @} //! @}
//! @} //! @}
/// @cond 0 /// @cond 0
/**INDENT-OFF**/ /**INDENT-OFF**/
#ifdef __cplusplus #ifdef __cplusplus
-2
View File
@@ -53,7 +53,6 @@
extern "C" { extern "C" {
#endif #endif
//! \ingroup usb_group //! \ingroup usb_group
//! \defgroup otg_group UOTGHS OTG Driver //! \defgroup otg_group UOTGHS OTG Driver
//! UOTGHS low-level driver for OTG features //! UOTGHS low-level driver for OTG features
@@ -74,7 +73,6 @@ bool otg_dual_enable(void);
*/ */
void otg_dual_disable(void); void otg_dual_disable(void);
//! @name UOTGHS OTG ID pin management //! @name UOTGHS OTG ID pin management
//! The ID pin come from the USB OTG connector (A and B receptable) and //! The ID pin come from the USB OTG connector (A and B receptable) and
//! allows to select the USB mode host or device. //! allows to select the USB mode host or device.
-4
View File
@@ -374,7 +374,6 @@ typedef struct {
uint8_t bNumDeviceCaps; uint8_t bNumDeviceCaps;
} usb_dev_bos_desc_t; } usb_dev_bos_desc_t;
/** /**
* \brief USB Device Capabilities - USB 2.0 Extension Descriptor structure * \brief USB Device Capabilities - USB 2.0 Extension Descriptor structure
* *
@@ -411,7 +410,6 @@ typedef struct {
uint8_t iFunction; //!< Index of string descriptor uint8_t iFunction; //!< Index of string descriptor
} usb_association_desc_t; } usb_association_desc_t;
/** /**
* \brief Standard USB configuration descriptor structure * \brief Standard USB configuration descriptor structure
*/ */
@@ -426,7 +424,6 @@ typedef struct {
uint8_t bMaxPower; uint8_t bMaxPower;
} usb_conf_desc_t; } usb_conf_desc_t;
#define USB_CONFIG_ATTR_MUST_SET (1 << 7) //!< Must always be set #define USB_CONFIG_ATTR_MUST_SET (1 << 7) //!< Must always be set
#define USB_CONFIG_ATTR_BUS_POWERED (0 << 6) //!< Bus-powered #define USB_CONFIG_ATTR_BUS_POWERED (0 << 6) //!< Bus-powered
#define USB_CONFIG_ATTR_SELF_POWERED (1 << 6) //!< Self-powered #define USB_CONFIG_ATTR_SELF_POWERED (1 << 6) //!< Self-powered
@@ -475,7 +472,6 @@ typedef struct {
uint8_t bInterval; uint8_t bInterval;
} usb_ep_desc_t; } usb_ep_desc_t;
/** /**
* \brief A standard USB string descriptor structure * \brief A standard USB string descriptor structure
*/ */
@@ -168,7 +168,6 @@ COMPILER_PACK_SET(1)
//! \name USB CDC Descriptors //! \name USB CDC Descriptors
//@{ //@{
//! CDC Header Functional Descriptor //! CDC Header Functional Descriptor
typedef struct { typedef struct {
uint8_t bFunctionLength; uint8_t bFunctionLength;
@@ -203,7 +202,6 @@ typedef struct {
uint8_t bSlaveInterface0; uint8_t bSlaveInterface0;
} usb_cdc_union_desc_t; } usb_cdc_union_desc_t;
//! \name USB CDC Call Management Capabilities //! \name USB CDC Call Management Capabilities
//@{ //@{
//! Device handles call management itself //! Device handles call management itself
@@ -278,7 +276,6 @@ typedef struct {
//@} //@}
//@} //@}
//! \name USB CDC notification message //! \name USB CDC notification message
//@{ //@{
@@ -47,7 +47,6 @@
#ifndef _USB_PROTOCOL_MSC_H_ #ifndef _USB_PROTOCOL_MSC_H_
#define _USB_PROTOCOL_MSC_H_ #define _USB_PROTOCOL_MSC_H_
/** /**
* \ingroup usb_protocol_group * \ingroup usb_protocol_group
* \defgroup usb_msc_protocol USB Mass Storage Class (MSC) protocol definitions * \defgroup usb_msc_protocol USB Mass Storage Class (MSC) protocol definitions
@@ -89,7 +88,6 @@
#define MSC_PROTOCOL_BULK 0x50 //!< Bulk-only #define MSC_PROTOCOL_BULK 0x50 //!< Bulk-only
//@} //@}
/** /**
* \brief MSC USB requests (bRequest) * \brief MSC USB requests (bRequest)
*/ */
@@ -98,7 +96,6 @@ enum usb_reqid_msc {
USB_REQ_MSC_GET_MAX_LUN = 0xFE //!< Get Max LUN USB_REQ_MSC_GET_MAX_LUN = 0xFE //!< Get Max LUN
}; };
COMPILER_PACK_SET(1) COMPILER_PACK_SET(1)
/** /**
@@ -122,7 +119,6 @@ struct usb_msc_cbw {
#define USB_CBW_LEN_MASK 0x1F //!< Valid bits in bCBWCBLength #define USB_CBW_LEN_MASK 0x1F //!< Valid bits in bCBWCBLength
//@} //@}
/** /**
* \name A Command Status Wrapper (CSW). * \name A Command Status Wrapper (CSW).
*/ */
+7 -3
View File
@@ -31,24 +31,28 @@
#ifndef MARLIN_EEPROM_SIZE #ifndef MARLIN_EEPROM_SIZE
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB #define MARLIN_EEPROM_SIZE 0x1000 // 4KB
#endif #endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() { return EEPROM.begin(MARLIN_EEPROM_SIZE); } bool PersistentStore::access_start() { return EEPROM.begin(MARLIN_EEPROM_SIZE); }
bool PersistentStore::access_finish() { EEPROM.end(); return true; } bool PersistentStore::access_finish() { EEPROM.end(); return true; }
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
for (size_t i = 0; i < size; i++) { for (size_t i = 0; i < size; i++) {
EEPROM.write(pos++, value[i]); const int p = REAL_EEPROM_ADDR(pos);
EEPROM.write(p, value[i]);
crc16(crc, &value[i], 1); crc16(crc, &value[i], 1);
++pos;
} }
return false; return false;
} }
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
for (size_t i = 0; i < size; i++) { for (size_t i = 0; i < size; i++) {
uint8_t c = EEPROM.read(pos++); const int p = REAL_EEPROM_ADDR(pos);
uint8_t c = EEPROM.read(p);
if (writing) value[i] = c; if (writing) value[i] = c;
crc16(crc, &c, 1); crc16(crc, &c, 1);
++pos;
} }
return false; return false;
} }
+37 -19
View File
@@ -34,6 +34,10 @@
#include <freertos/queue.h> #include <freertos/queue.h>
#include "../../module/stepper.h" #include "../../module/stepper.h"
#if ENABLED(FT_MOTION)
#include "../../module/ft_motion.h"
#endif
#define DMA_BUF_COUNT 8 // number of DMA buffers to store data #define DMA_BUF_COUNT 8 // number of DMA buffers to store data
#define DMA_BUF_LEN 4092 // maximum size in bytes #define DMA_BUF_LEN 4092 // maximum size in bytes
#define I2S_SAMPLE_SIZE 4 // 4 bytes, 32 bits per sample #define I2S_SAMPLE_SIZE 4 // 4 bytes, 32 bits per sample
@@ -134,8 +138,8 @@ static void IRAM_ATTR i2s_intr_handler_default(void *arg) {
if (high_priority_task_awoken == pdTRUE) portYIELD_FROM_ISR(); if (high_priority_task_awoken == pdTRUE) portYIELD_FROM_ISR();
// clear interrupt // Clear pending interrupt
I2S0.int_clr.val = I2S0.int_st.val; //clear pending interrupt I2S0.int_clr.val = I2S0.int_st.val;
} }
void stepperTask(void *parameter) { void stepperTask(void *parameter) {
@@ -148,29 +152,43 @@ void stepperTask(void *parameter) {
xQueueReceive(dma.queue, &dma.current, portMAX_DELAY); xQueueReceive(dma.queue, &dma.current, portMAX_DELAY);
dma.rw_pos = 0; dma.rw_pos = 0;
const bool using_ftMotion = TERN0(FT_MOTION, ftMotion.cfg.mode);
while (dma.rw_pos < DMA_SAMPLE_COUNT) { while (dma.rw_pos < DMA_SAMPLE_COUNT) {
if (!nextMainISR) {
Stepper::pulse_phase_isr(); #if ENABLED(FT_MOTION)
nextMainISR = Stepper::block_phase_isr();
} if (using_ftMotion) {
#if ENABLED(LIN_ADVANCE) if (!nextMainISR) stepper.ftMotion_stepper();
else if (!nextAdvanceISR) { nextMainISR = 0;
Stepper::advance_isr();
nextAdvanceISR = Stepper::la_interval;
} }
#endif #endif
else
i2s_push_sample();
nextMainISR--; if (!using_ftMotion) {
if (!nextMainISR) {
Stepper::pulse_phase_isr();
nextMainISR = Stepper::block_phase_isr();
}
#if ENABLED(LIN_ADVANCE)
else if (!nextAdvanceISR) {
Stepper::advance_isr();
nextAdvanceISR = Stepper::la_interval;
}
#endif
else
i2s_push_sample();
#if ENABLED(LIN_ADVANCE) nextMainISR--;
if (nextAdvanceISR == Stepper::LA_ADV_NEVER)
nextAdvanceISR = Stepper::la_interval;
if (nextAdvanceISR && nextAdvanceISR != Stepper::LA_ADV_NEVER) #if ENABLED(LIN_ADVANCE)
nextAdvanceISR--; if (nextAdvanceISR == Stepper::LA_ADV_NEVER)
#endif nextAdvanceISR = Stepper::la_interval;
if (nextAdvanceISR && nextAdvanceISR != Stepper::LA_ADV_NEVER)
nextAdvanceISR--;
#endif
}
} }
} }
} }
@@ -0,0 +1,22 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
+1 -1
View File
@@ -27,7 +27,7 @@
/** /**
* Not every MarlinSerial instance should handle emergency parsing, as * Not every MarlinSerial instance should handle emergency parsing, as
* it would not make sense to parse GCode from TMC responses * it would not make sense to parse G-Code from TMC responses
*/ */
constexpr bool serial_handles_emergency(int port) { constexpr bool serial_handles_emergency(int port) {
return false return false
+5 -11
View File
@@ -37,7 +37,7 @@
#error "MARLIN_EEPROM_SIZE is required for IIC_BL24CXX_EEPROM." #error "MARLIN_EEPROM_SIZE is required for IIC_BL24CXX_EEPROM."
#endif #endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() { bool PersistentStore::access_start() {
eeprom_init(); eeprom_init();
@@ -49,7 +49,7 @@ bool PersistentStore::access_finish() { return true; }
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
while (size--) { while (size--) {
uint8_t v = *value; uint8_t v = *value;
uint8_t *const p = (uint8_t *const)pos; uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
// EEPROM has only ~100,000 write cycles, // EEPROM has only ~100,000 write cycles,
// so only write bytes that have changed! // so only write bytes that have changed!
@@ -70,16 +70,10 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false; return false;
} }
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing /*=true*/) {
uint16_t *crc, const bool writing /*=true*/) {
do { do {
uint8_t *const p = (uint8_t *const)pos; const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos));
uint8_t c = eeprom_read_byte(p); if (writing) *value = c;
if (writing)
{
*value = c;
}
crc16(crc, &c, 1); crc16(crc, &c, 1);
pos++; pos++;
value++; value++;
+2 -5
View File
@@ -38,9 +38,7 @@
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB #define MARLIN_EEPROM_SIZE 0x1000 // 4KB
#endif #endif
size_t PersistentStore::capacity() { size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
return MARLIN_EEPROM_SIZE;
}
#define _ALIGN(x) __attribute__((aligned(x))) #define _ALIGN(x) __attribute__((aligned(x)))
static char _ALIGN(4) HAL_eeprom_data[MARLIN_EEPROM_SIZE]; static char _ALIGN(4) HAL_eeprom_data[MARLIN_EEPROM_SIZE];
@@ -85,11 +83,10 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
bool PersistentStore::read_data(int &pos, uint8_t *value, const size_t size, uint16_t *crc, const bool writing /*=true*/) { bool PersistentStore::read_data(int &pos, uint8_t *value, const size_t size, uint16_t *crc, const bool writing /*=true*/) {
for (size_t i = 0; i < size; i++) { for (size_t i = 0; i < size; i++) {
uint8_t c = HAL_eeprom_data[pos + i]; const uint8_t c = HAL_eeprom_data[pos + i];
if (writing) value[i] = c; if (writing) value[i] = c;
crc16(crc, &c, 1); crc16(crc, &c, 1);
} }
pos += size; pos += size;
return false; return false;
} }
+4 -6
View File
@@ -35,7 +35,7 @@
#ifndef MARLIN_EEPROM_SIZE #ifndef MARLIN_EEPROM_SIZE
#error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM." #error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM."
#endif #endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_finish() { return true; } bool PersistentStore::access_finish() { return true; }
@@ -56,7 +56,7 @@ bool PersistentStore::access_start() {
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
while (size--) { while (size--) {
uint8_t *const p = (uint8_t *const)pos; uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
uint8_t v = *value; uint8_t v = *value;
// EEPROM has only ~100,000 write cycles, // EEPROM has only ~100,000 write cycles,
// so only write bytes that have changed! // so only write bytes that have changed!
@@ -77,10 +77,8 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing /*=true*/) { bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing /*=true*/) {
do { do {
uint8_t c = eeprom_read_byte((uint8_t *)pos); const uint8_t c = eeprom_read_byte((uint8_t *)REAL_EEPROM_ADDR(pos));
if (writing && value) { if (writing && value) *value = c;
*value = c;
}
crc16(crc, &c, 1); crc16(crc, &c, 1);
pos++; pos++;
+19 -1
View File
@@ -40,9 +40,15 @@ void endstopIRQHandler() {
CHECK(X_MAX); CHECK(X_MAX);
CHECK(X_MIN); CHECK(X_MIN);
CHECK(X2_MAX);
CHECK(X2_MIN);
CHECK(Y_MAX); CHECK(Y_MAX);
CHECK(Y_MIN); CHECK(Y_MIN);
CHECK(Y2_MAX);
CHECK(Y2_MIN);
CHECK(Z_MAX); CHECK(Z_MAX);
CHECK(Z_MIN); CHECK(Z_MIN);
@@ -52,6 +58,9 @@ void endstopIRQHandler() {
CHECK(Z3_MAX); CHECK(Z3_MAX);
CHECK(Z3_MIN); CHECK(Z3_MIN);
CHECK(Z4_MAX);
CHECK(Z4_MIN);
CHECK(Z_MIN_PROBE); CHECK(Z_MIN_PROBE);
// Update endstops // Update endstops
@@ -69,9 +78,15 @@ void setup_endstop_interrupts() {
SETUP(X_MAX); SETUP(X_MAX);
SETUP(X_MIN); SETUP(X_MIN);
SETUP(X2_MAX);
SETUP(X2_MIN);
SETUP(Y_MAX); SETUP(Y_MAX);
SETUP(Y_MIN); SETUP(Y_MIN);
SETUP(Y2_MAX);
SETUP(Y2_MIN);
SETUP(Z_MAX); SETUP(Z_MAX);
SETUP(Z_MIN); SETUP(Z_MIN);
@@ -81,6 +96,9 @@ void setup_endstop_interrupts() {
SETUP(Z3_MAX); SETUP(Z3_MAX);
SETUP(Z3_MIN); SETUP(Z3_MIN);
SETUP(Z4_MAX);
SETUP(Z4_MIN);
SETUP(Z_MIN_PROBE); SETUP(Z_MIN_PROBE);
#undef SETUP #undef SETUP
@@ -88,7 +106,7 @@ void setup_endstop_interrupts() {
// Ensure 1 - 10 IRQs are registered // Ensure 1 - 10 IRQs are registered
// Disable some endstops if you encounter this error // Disable some endstops if you encounter this error
#define ENDSTOPS_INTERRUPTS_COUNT COUNT_ENABLED(USE_X_MAX, USE_X_MIN, USE_Y_MAX, USE_Y_MIN, USE_Z_MAX, USE_Z_MIN, USE_Z2_MAX, USE_Z2_MIN, USE_Z3_MAX, USE_Z3_MIN, USE_Z_MIN_PROBE) #define ENDSTOPS_INTERRUPTS_COUNT COUNT_ENABLED(USE_X_MAX, USE_X_MIN, USE_X2_MAX, USE_X2_MIN, USE_Y_MAX, USE_Y_MIN, USE_Y2_MAX, USE_Y2_MIN, USE_Z_MAX, USE_Z_MIN, USE_Z2_MAX, USE_Z2_MIN, USE_Z3_MAX, USE_Z3_MIN, USE_Z4_MAX, USE_Z4_MIN, USE_Z_MIN_PROBE)
#if ENDSTOPS_INTERRUPTS_COUNT > 10 #if ENDSTOPS_INTERRUPTS_COUNT > 10
#error "Too many endstop interrupts! HC32F460 only supports 10 endstop interrupts." #error "Too many endstop interrupts! HC32F460 only supports 10 endstop interrupts."
#elif ENDSTOPS_INTERRUPTS_COUNT == 0 #elif ENDSTOPS_INTERRUPTS_COUNT == 0
@@ -0,0 +1,22 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
+2 -4
View File
@@ -58,11 +58,9 @@
#endif #endif
#if TEMP_SENSOR_SOC #if TEMP_SENSOR_SOC
#if !defined(TEMP_SOC_PIN) #ifndef TEMP_SOC_PIN
#error "TEMP_SOC_PIN must be defined to use TEMP_SENSOR_SOC." #error "TEMP_SOC_PIN must be defined to use TEMP_SENSOR_SOC."
#endif #elif IS_GPIO_PIN(TEMP_SOC_PIN)
#if defined(TEMP_SOC_PIN) && IS_GPIO_PIN(TEMP_SOC_PIN)
#error "TEMP_SOC_PIN must not be a valid GPIO pin to avoid conflicts." #error "TEMP_SOC_PIN must not be a valid GPIO pin to avoid conflicts."
#endif #endif
#endif #endif
+1 -1
View File
@@ -23,7 +23,7 @@
#ifdef ARDUINO_ARCH_HC32 #ifdef ARDUINO_ARCH_HC32
#ifdef REDIRECT_PRINTF_TO_SERIAL #ifdef REDIRECT_PRINTF_TO_SERIAL
#if !defined(__GNUC__) #ifndef __GNUC__
#error "only GCC is supported" #error "only GCC is supported"
#endif #endif
+46
View File
@@ -19,6 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
* *
*/ */
#ifdef __PLAT_LINUX__ #ifdef __PLAT_LINUX__
#include "../../inc/MarlinConfig.h" #include "../../inc/MarlinConfig.h"
@@ -57,4 +58,49 @@ uint16_t MarlinHAL::adc_value() {
void MarlinHAL::reboot() { /* Reset the application state and GPIO */ } void MarlinHAL::reboot() { /* Reset the application state and GPIO */ }
// ------------------------
// BSD String
// ------------------------
/**
* Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef HAS_LIBBSD
/**
* Copy string src to buffer dst of size dsize. At most dsize-1
* chars will be copied. Always NUL terminates (unless dsize == 0).
* Returns strlen(src); if retval >= dsize, truncation occurred.
*/
size_t MarlinHAL::_strlcpy(char *dst, const char *src, size_t dsize) {
const char *osrc = src;
size_t nleft = dsize;
// Copy as many bytes as will fit.
if (nleft != 0) while (--nleft != 0) if ((*dst++ = *src++) == '\0') break;
// Not enough room in dst, add NUL and traverse rest of src.
if (nleft == 0) {
if (dsize != 0) *dst = '\0'; // NUL-terminate dst
while (*src++) { /* nada */ }
}
return (src - osrc - 1); // count does not include NUL
}
#endif // HAS_LIBBSD
#endif // __PLAT_LINUX__ #endif // __PLAT_LINUX__
+14
View File
@@ -26,6 +26,11 @@
#include <iostream> #include <iostream>
#include <stdint.h> #include <stdint.h>
#include <stdarg.h> #include <stdarg.h>
#ifdef HAS_LIBBSD
#include <bsd/string.h>
#endif
#undef min #undef min
#undef max #undef max
#include <algorithm> #include <algorithm>
@@ -162,4 +167,13 @@ public:
} }
static void set_pwm_frequency(const pin_t, int) {} static void set_pwm_frequency(const pin_t, int) {}
#ifndef HAS_LIBBSD
/**
* Redirect missing strlcpy here
*/
static size_t _strlcpy(char *dst, const char *src, size_t dsize);
#define strlcpy hal._strlcpy
#endif
}; };
+1 -1
View File
@@ -35,7 +35,7 @@
uint8_t buffer[MARLIN_EEPROM_SIZE]; uint8_t buffer[MARLIN_EEPROM_SIZE];
char filename[] = "eeprom.dat"; char filename[] = "eeprom.dat";
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() { bool PersistentStore::access_start() {
const char eeprom_erase_value = 0xFF; const char eeprom_erase_value = 0xFF;
@@ -0,0 +1,22 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
-3
View File
@@ -28,9 +28,6 @@
#include <pinmapping.h> #include <pinmapping.h>
#define strlcpy(A, B, C) strncpy(A, B, (C) - 1)
#define strlcpy_P(A, B, C) strncpy_P(A, B, (C) - 1)
#define HIGH 0x01 #define HIGH 0x01
#define LOW 0x00 #define LOW 0x00
-1
View File
@@ -60,7 +60,6 @@
#define INVALID_SERVO 255 // flag indicating an invalid servo index #define INVALID_SERVO 255 // flag indicating an invalid servo index
// Types // Types
typedef struct { typedef struct {
-3
View File
@@ -21,9 +21,6 @@
*/ */
#pragma once #pragma once
#include "../../core/macros.h"
#include "../../inc/MarlinConfigPre.h"
#if ALL(HAS_MARLINUI_U8GLIB, HAS_MEDIA) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #if ALL(HAS_MARLINUI_U8GLIB, HAS_MEDIA) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
// needed due to the speed and mode required for communicating with each device being different. // needed due to the speed and mode required for communicating with each device being different.
+6
View File
@@ -111,6 +111,12 @@ void MarlinHAL::init() {
#if HAS_SERVO_3 #if HAS_SERVO_3
INIT_SERVO(3); INIT_SERVO(3);
#endif #endif
#if HAS_SERVO_4
INIT_SERVO(4);
#endif
#if HAS_SERVO_5
INIT_SERVO(5);
#endif
//debug_frmwrk_init(); //debug_frmwrk_init();
//_DBG("\n\nDebug running\n"); //_DBG("\n\nDebug running\n");
+5 -3
View File
@@ -61,7 +61,7 @@ static uint8_t ram_eeprom[MARLIN_EEPROM_SIZE] __attribute__((aligned(4))) = {0};
static bool eeprom_dirty = false; static bool eeprom_dirty = false;
static int current_slot = 0; static int current_slot = 0;
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() { bool PersistentStore::access_start() {
uint32_t first_nblank_loc, first_nblank_val; uint32_t first_nblank_loc, first_nblank_val;
@@ -112,7 +112,8 @@ bool PersistentStore::access_finish() {
} }
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
for (size_t i = 0; i < size; i++) ram_eeprom[pos + i] = value[i]; const int p = REAL_EEPROM_ADDR(pos);
for (size_t i = 0; i < size; i++) ram_eeprom[p + i] = value[i];
eeprom_dirty = true; eeprom_dirty = true;
crc16(crc, value, size); crc16(crc, value, size);
pos += size; pos += size;
@@ -120,8 +121,9 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
} }
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
const int p = REAL_EEPROM_ADDR(pos);
const uint8_t * const buff = writing ? &value[0] : &ram_eeprom[pos]; const uint8_t * const buff = writing ? &value[0] : &ram_eeprom[pos];
if (writing) for (size_t i = 0; i < size; i++) value[i] = ram_eeprom[pos + i]; if (writing) for (size_t i = 0; i < size; i++) value[i] = ram_eeprom[p + i];
crc16(crc, buff, size); crc16(crc, buff, size);
pos += size; pos += size;
return false; // return true for any error return false; // return true for any error
+1 -1
View File
@@ -49,7 +49,7 @@ bool eeprom_file_open = false;
#define MARLIN_EEPROM_SIZE size_t(0x1000) // 4KiB of Emulated EEPROM #define MARLIN_EEPROM_SIZE size_t(0x1000) // 4KiB of Emulated EEPROM
#endif #endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() { bool PersistentStore::access_start() {
const char eeprom_erase_value = 0xFF; const char eeprom_erase_value = 0xFF;
+3 -3
View File
@@ -36,7 +36,7 @@
#ifndef MARLIN_EEPROM_SIZE #ifndef MARLIN_EEPROM_SIZE
#define MARLIN_EEPROM_SIZE 0x8000 // 32K #define MARLIN_EEPROM_SIZE 0x8000 // 32K
#endif #endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() { eeprom_init(); return true; } bool PersistentStore::access_start() { eeprom_init(); return true; }
bool PersistentStore::access_finish() { return true; } bool PersistentStore::access_finish() { return true; }
@@ -45,7 +45,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
uint16_t written = 0; uint16_t written = 0;
while (size--) { while (size--) {
uint8_t v = *value; uint8_t v = *value;
uint8_t * const p = (uint8_t * const)pos; uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
eeprom_write_byte(p, v); eeprom_write_byte(p, v);
if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes
@@ -64,7 +64,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do { do {
// Read from external EEPROM // Read from external EEPROM
const uint8_t c = eeprom_read_byte((uint8_t*)pos); const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos));
if (writing) *value = c; if (writing) *value = c;
crc16(crc, &c, 1); crc16(crc, &c, 1);
pos++; pos++;
@@ -0,0 +1,22 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
+1 -3
View File
@@ -21,9 +21,7 @@
*/ */
#pragma once #pragma once
#include "../../core/macros.h" #if ALL(HAS_MARLINUI_U8GLIB, HAS_MEDIA) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#if ALL(HAS_MEDIA, HAS_MARLINUI_U8GLIB) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
// needed due to the speed and mode required for communicating with each device being different. // needed due to the speed and mode required for communicating with each device being different.
// This requirement can be removed if the SPI access to these devices is updated to use // This requirement can be removed if the SPI access to these devices is updated to use
@@ -8,14 +8,12 @@ DriverVer =04/14/2008, 5.1.2600.5512
[Manufacturer] [Manufacturer]
%PROVIDER%=DeviceList,ntamd64 %PROVIDER%=DeviceList,ntamd64
[DeviceList] [DeviceList]
%DESCRIPTION%=LPC1768USB, USB\VID_1D50&PID_6029&MI_00 %DESCRIPTION%=LPC1768USB, USB\VID_1D50&PID_6029&MI_00
[DeviceList.ntamd64] [DeviceList.ntamd64]
%DESCRIPTION%=LPC1768USB, USB\VID_1D50&PID_6029&MI_00 %DESCRIPTION%=LPC1768USB, USB\VID_1D50&PID_6029&MI_00
[LPC1768USB] [LPC1768USB]
include=mdmcpq.inf include=mdmcpq.inf
CopyFiles=FakeModemCopyFileSection CopyFiles=FakeModemCopyFileSection
@@ -28,7 +26,6 @@ AddService=usbser, 0x00000002, LowerFilter_Service_Inst
[SerialPropPageAddReg] [SerialPropPageAddReg]
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
[Strings] [Strings]
PROVIDER = "marlinfw.org" PROVIDER = "marlinfw.org"
DRIVER.SVC = "Marlin USB Driver" DRIVER.SVC = "Marlin USB Driver"
+67
View File
@@ -0,0 +1,67 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef __PLAT_NATIVE_SIM__
#ifndef HAS_LIBBSD
#include "HAL.h"
/**
* Copy string src to buffer dst of size dsize. At most dsize-1
* chars will be copied. Always NUL terminates (unless dsize == 0).
* Returns strlen(src); if retval >= dsize, truncation occurred.
*/
size_t MarlinHAL::_strlcpy(char *dst, const char *src, size_t dsize) {
const char *osrc = src;
size_t nleft = dsize;
// Copy as many bytes as will fit.
if (nleft != 0) while (--nleft != 0) if ((*dst++ = *src++) == '\0') break;
// Not enough room in dst, add NUL and traverse rest of src.
if (nleft == 0) {
if (dsize != 0) *dst = '\0'; // NUL-terminate dst
while (*src++) { /* nada */ }
}
return (src - osrc - 1); // count does not include NUL
}
#endif // HAS_LIBBSD
#endif // __PLAT_NATIVE_SIM__
+10
View File
@@ -263,4 +263,14 @@ public:
analogWrite(pin, v); analogWrite(pin, v);
} }
static void set_pwm_frequency(const pin_t, int) {}
#ifndef HAS_LIBBSD
/**
* Redirect missing strlcpy here
*/
static size_t _strlcpy(char *dst, const char *src, size_t dsize);
#define strlcpy hal._strlcpy
#endif
}; };
@@ -0,0 +1,22 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
@@ -61,7 +61,6 @@
#define INVALID_SERVO 255 // flag indicating an invalid servo index #define INVALID_SERVO 255 // flag indicating an invalid servo index
// Types // Types
typedef struct { typedef struct {
-3
View File
@@ -21,9 +21,6 @@
*/ */
#pragma once #pragma once
#include "../../core/macros.h"
#include "../../inc/MarlinConfigPre.h"
#if ALL(HAS_MARLINUI_U8GLIB, HAS_MEDIA) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #if ALL(HAS_MARLINUI_U8GLIB, HAS_MEDIA) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
// needed due to the speed and mode required for communicating with each device being different. // needed due to the speed and mode required for communicating with each device being different.
@@ -31,7 +31,6 @@
* resulted in using about about 25% of the CPU's time. * resulted in using about about 25% of the CPU's time.
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
-3
View File
@@ -40,8 +40,6 @@
DefaultSerial3 MSerial2(false, Serial2); DefaultSerial3 MSerial2(false, Serial2);
#endif #endif
#define WDT_CONFIG_PER_7_Val 0x9u #define WDT_CONFIG_PER_7_Val 0x9u
#define WDT_CONFIG_PER_Pos 0 #define WDT_CONFIG_PER_Pos 0
#define WDT_CONFIG_PER_7 (WDT_CONFIG_PER_7_Val << WDT_CONFIG_PER_Pos) #define WDT_CONFIG_PER_7 (WDT_CONFIG_PER_7_Val << WDT_CONFIG_PER_Pos)
@@ -165,7 +163,6 @@ void MarlinHAL::adc_init() {
ADC->REFCTRL.reg = ADC_REFCTRL_REFSEL_INTVCC1; ADC->REFCTRL.reg = ADC_REFCTRL_REFSEL_INTVCC1;
ADC->AVGCTRL.reg = ADC_AVGCTRL_SAMPLENUM_32| ADC_AVGCTRL_ADJRES(4);; ADC->AVGCTRL.reg = ADC_AVGCTRL_SAMPLENUM_32| ADC_AVGCTRL_ADJRES(4);;
ADC->CTRLB.reg = ADC_CTRLB_PRESCALER_DIV128 | ADC->CTRLB.reg = ADC_CTRLB_PRESCALER_DIV128 |
ADC_CTRLB_RESSEL_16BIT | ADC_CTRLB_RESSEL_16BIT |
ADC_CTRLB_FREERUN; ADC_CTRLB_FREERUN;
-1
View File
@@ -47,7 +47,6 @@ typedef ForwardSerial1Class< decltype(Serial2) > DefaultSerial3;
extern DefaultSerial2 MSerial0; extern DefaultSerial2 MSerial0;
extern DefaultSerial3 MSerial1; extern DefaultSerial3 MSerial1;
#define __MSERIAL(X) MSerial##X #define __MSERIAL(X) MSerial##X
#define _MSERIAL(X) __MSERIAL(X) #define _MSERIAL(X) __MSERIAL(X)
#define MSERIAL(X) _MSERIAL(INCREMENT(X)) #define MSERIAL(X) _MSERIAL(INCREMENT(X))
-2
View File
@@ -57,8 +57,6 @@
: (P == 3 && WITHIN(B, 20, 21)) ? 10 + (B) - 20 \ : (P == 3 && WITHIN(B, 20, 21)) ? 10 + (B) - 20 \
: -1) : -1)
#define A2_AIN 3 #define A2_AIN 3
#define A3_AIN 4 #define A3_AIN 4
#define A4_AIN 5 #define A4_AIN 5
-1
View File
@@ -55,7 +55,6 @@
#define TIMER_TCCHANNEL(t) ((t) & 1) #define TIMER_TCCHANNEL(t) ((t) & 1)
#define TC_COUNTER_START_VAL 0xFFFF #define TC_COUNTER_START_VAL 0xFFFF
static volatile int8_t currentServoIndex[_Nbr_16timers]; // index for the servo being pulsed for each timer (or -1 if refresh interval) static volatile int8_t currentServoIndex[_Nbr_16timers]; // index for the servo being pulsed for each timer (or -1 if refresh interval)
FORCE_INLINE static uint16_t getTimerCount() { FORCE_INLINE static uint16_t getTimerCount() {
+21 -17
View File
@@ -37,19 +37,24 @@ static const uint8_t flashdata[TOTAL_FLASH_SIZE] __attribute__((__aligned__(256
#include "../shared/eeprom_api.h" #include "../shared/eeprom_api.h"
size_t PersistentStore::capacity() { size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
return MARLIN_EEPROM_SIZE;
/* const uint8_t psz = NVMCTRL->SEESTAT.bit.PSZ, /*
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
const uint8_t psz = NVMCTRL->SEESTAT.bit.PSZ,
sblk = NVMCTRL->SEESTAT.bit.SBLK; sblk = NVMCTRL->SEESTAT.bit.SBLK;
return (!psz && !sblk) ? 0 return (
: (psz <= 2) ? (0x200 << psz) (!psz && !sblk) ? 0
: (sblk == 1 || psz == 3) ? 4096 : (psz <= 2) ? (0x200 << psz)
: (sblk == 2 || psz == 4) ? 8192 : (sblk == 1 || psz == 3) ? 4096
: (sblk <= 4 || psz == 5) ? 16384 : (sblk == 2 || psz == 4) ? 8192
: (sblk >= 9 && psz == 7) ? 65536 : (sblk <= 4 || psz == 5) ? 16384
: 32768;*/ : (sblk >= 9 && psz == 7) ? 65536
: 32768
) - eeprom_exclude_size;
} }
*/
uint32_t PAGE_SIZE; uint32_t PAGE_SIZE;
uint32_t ROW_SIZE; uint32_t ROW_SIZE;
@@ -99,8 +104,7 @@ bool PersistentStore::access_finish() {
volatile uint32_t *dst_addr = (volatile uint32_t *) &flashdata; volatile uint32_t *dst_addr = (volatile uint32_t *) &flashdata;
uint32_t *pointer = (uint32_t *) buffer; uint32_t *pointer = (uint32_t *) buffer;
for (uint32_t i = 0; i < TOTAL_FLASH_SIZE; i+=4) { for (uint32_t i = 0; i < TOTAL_FLASH_SIZE; i += 4) {
*dst_addr = (uint32_t) *pointer; *dst_addr = (uint32_t) *pointer;
pointer++; pointer++;
dst_addr ++; dst_addr ++;
@@ -120,19 +124,19 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
if (!hasWritten) { if (!hasWritten) {
// init temp buffer // init temp buffer
buffer = (uint8_t *) malloc(MARLIN_EEPROM_SIZE); buffer = (uint8_t *) malloc(MARLIN_EEPROM_SIZE);
hasWritten=true; hasWritten = true;
} }
memcpy(buffer+pos,value,size); memcpy(buffer + REAL_EEPROM_ADDR(pos), value, size);
pos += size; pos += size;
return false; return false;
} }
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
volatile uint8_t *dst_addr = (volatile uint8_t *) &flashdata; volatile uint8_t *dst_addr = (volatile uint8_t *) &flashdata;
dst_addr += pos; dst_addr += REAL_EEPROM_ADDR(pos);
memcpy(value,(const void *) dst_addr,size); memcpy(value, (const void *)dst_addr, size);
pos += size; pos += size;
return false; return false;
} }
+3 -3
View File
@@ -38,7 +38,7 @@
static bool initialized; static bool initialized;
size_t PersistentStore::capacity() { return qspi.size(); } size_t PersistentStore::capacity() { return qspi.size() - eeprom_exclude_size; }
bool PersistentStore::access_start() { bool PersistentStore::access_start() {
if (!initialized) { if (!initialized) {
@@ -56,7 +56,7 @@ bool PersistentStore::access_finish() {
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
while (size--) { while (size--) {
const uint8_t v = *value; const uint8_t v = *value;
qspi.writeByte(pos, v); qspi.writeByte(REAL_EEPROM_ADDR(pos), v);
crc16(crc, &v, 1); crc16(crc, &v, 1);
pos++; pos++;
value++; value++;
@@ -66,7 +66,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
while (size--) { while (size--) {
uint8_t c = qspi.readByte(pos); const uint8_t c = qspi.readByte(REAL_EEPROM_ADDR(pos));
if (writing) *value = c; if (writing) *value = c;
crc16(crc, &c, 1); crc16(crc, &c, 1);
pos++; pos++;
+3 -3
View File
@@ -42,7 +42,7 @@
#ifndef MARLIN_EEPROM_SIZE #ifndef MARLIN_EEPROM_SIZE
#error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM." #error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM."
#endif #endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() { eeprom_init(); return true; } bool PersistentStore::access_start() { eeprom_init(); return true; }
bool PersistentStore::access_finish() { return true; } bool PersistentStore::access_finish() { return true; }
@@ -51,7 +51,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
uint16_t written = 0; uint16_t written = 0;
while (size--) { while (size--) {
const uint8_t v = *value; const uint8_t v = *value;
uint8_t * const p = (uint8_t * const)pos; uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
eeprom_write_byte(p, v); eeprom_write_byte(p, v);
if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes
@@ -69,7 +69,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
while (size--) { while (size--) {
uint8_t c = eeprom_read_byte((uint8_t*)pos); const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos));
if (writing) *value = c; if (writing) *value = c;
crc16(crc, &c, 1); crc16(crc, &c, 1);
pos++; pos++;
@@ -0,0 +1,22 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
@@ -85,7 +85,6 @@ void u8g_SetPILevel(u8g_t *u8g, uint8_t pin_index, uint8_t level) {
uint8_t u8g_com_samd21_st7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) { uint8_t u8g_com_samd21_st7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
switch (msg) { switch (msg) {
case U8G_COM_MSG_STOP: case U8G_COM_MSG_STOP:
break; break;
-1
View File
@@ -54,7 +54,6 @@
#define TIMER_TCCHANNEL(t) ((t) & 1) #define TIMER_TCCHANNEL(t) ((t) & 1)
#define TC_COUNTER_START_VAL 0xFFFF #define TC_COUNTER_START_VAL 0xFFFF
static volatile int8_t currentServoIndex[_Nbr_16timers]; // index for the servo being pulsed for each timer (or -1 if refresh interval) static volatile int8_t currentServoIndex[_Nbr_16timers]; // index for the servo being pulsed for each timer (or -1 if refresh interval)
FORCE_INLINE static uint16_t getTimerCount() { FORCE_INLINE static uint16_t getTimerCount() {
+3 -3
View File
@@ -35,7 +35,7 @@
static bool initialized; static bool initialized;
size_t PersistentStore::capacity() { return qspi.size(); } size_t PersistentStore::capacity() { return qspi.size() - eeprom_exclude_size; }
bool PersistentStore::access_start() { bool PersistentStore::access_start() {
if (!initialized) { if (!initialized) {
@@ -53,7 +53,7 @@ bool PersistentStore::access_finish() {
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
while (size--) { while (size--) {
const uint8_t v = *value; const uint8_t v = *value;
qspi.writeByte(pos, v); qspi.writeByte(REAL_EEPROM_ADDR(pos), v);
crc16(crc, &v, 1); crc16(crc, &v, 1);
pos++; pos++;
value++; value++;
@@ -63,7 +63,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
while (size--) { while (size--) {
uint8_t c = qspi.readByte(pos); const uint8_t c = qspi.readByte(REAL_EEPROM_ADDR(pos));
if (writing) *value = c; if (writing) *value = c;
crc16(crc, &c, 1); crc16(crc, &c, 1);
pos++; pos++;
+3 -3
View File
@@ -40,7 +40,7 @@
#ifndef MARLIN_EEPROM_SIZE #ifndef MARLIN_EEPROM_SIZE
#error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM." #error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM."
#endif #endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() { eeprom_init(); return true; } bool PersistentStore::access_start() { eeprom_init(); return true; }
bool PersistentStore::access_finish() { return true; } bool PersistentStore::access_finish() { return true; }
@@ -49,7 +49,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
uint16_t written = 0; uint16_t written = 0;
while (size--) { while (size--) {
const uint8_t v = *value; const uint8_t v = *value;
uint8_t * const p = (uint8_t * const)pos; uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
eeprom_write_byte(p, v); eeprom_write_byte(p, v);
if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes
@@ -67,7 +67,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
while (size--) { while (size--) {
uint8_t c = eeprom_read_byte((uint8_t*)pos); const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos));
if (writing) *value = c; if (writing) *value = c;
crc16(crc, &c, 1); crc16(crc, &c, 1);
pos++; pos++;
@@ -0,0 +1,22 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

Some files were not shown because too many files have changed in this diff Show More