Compare commits

..

563 Commits

Author SHA1 Message Date
Scott Lahteine e9dda85ddd focus on affective changes 2024-10-19 14:30:44 -05:00
Scott Lahteine beea1f1d14 test this change to see if it breaks anything 2024-10-19 14:13:53 -05:00
Scott Lahteine a9072b00e8 Merge 'bugfix-2.1.x' into pr/27480 2024-10-19 06:01:58 -05:00
Scott Lahteine 4e41ff32e1 🔨 Python config helpers (#27483) 2024-10-19 04:55:04 -05:00
thinkyhead cf137cb73a [cron] Bump distribution date (2024-10-17) 2024-10-17 00:27:08 +00:00
Scott Lahteine d5cc11d996 🧑‍💻 Fix Zed LSP setting 2024-10-16 16:23:57 -05:00
InsanityAutomation a530446b62 Partially revert changes from #27392
Changes to SPI in #27392 break Lulzbot TFT SPI communication. Reverting the changes to this file restore operation.

Cardreader changes need investigation, as with these changes machine will boot loop with USB inserted.  Removing the usb at boot, then inserting after init allows it to complete. Does not occur with all changes from this the origin PR reverted.
2024-10-15 18:04:28 -04:00
thinkyhead d62a631467 [cron] Bump distribution date (2024-10-14) 2024-10-14 12:10:36 +00:00
Scott Lahteine d6c3f45bda 🚸 LED menu tweaks 2024-10-14 02:03:41 -05:00
Scott Lahteine 81760d6818 🚸 EEPROM reset messages 2024-10-14 02:03:41 -05:00
Scott Lahteine 282f90c1b3 🚸 Ignore first click on asleep LCD 2024-10-14 02:03:41 -05:00
Scott Lahteine 5de9fc556f 🚸 Strings MSG_ZPROBE_[XYZ[OFFSET 2024-10-14 02:03:41 -05:00
Scott Lahteine 3482e9632c 🎨 Outdent, adjust comments 2024-10-14 02:03:41 -05:00
thinkyhead a6493e0cc8 [cron] Bump distribution date (2024-10-12) 2024-10-12 00:26:11 +00:00
Scott Lahteine a08a7b3459 📝 Clarify STRING_CONFIG_H_AUTHOR 2024-10-11 14:27:01 -05:00
Scott Lahteine bd4936330b 🧑‍💻 Language import adjustments 2024-10-11 13:47:28 -05:00
Scott Lahteine 4bb33a0cb9 🔨 Update legacy Makefile 2024-10-11 13:44:51 -05:00
thinkyhead 83e38b3625 [cron] Bump distribution date (2024-10-11) 2024-10-11 06:08:29 +00:00
Scott Lahteine 5b7bb3ea64 📝 Star History 2024-10-10 22:17:12 -05:00
thinkyhead f0b115a999 [cron] Bump distribution date (2024-10-09) 2024-10-09 00:26:50 +00:00
Vovodroid cebed347f5 🔧 Fix LIN_ADVANCE + Extra Axes sanity check (#27110) 2024-10-07 23:32:09 -05:00
Scott Lahteine a66b22c4f1 ♻️ BTT_SKR_3 => BTT_SKR_V3_0
Reverting 3a6bd6920e
2024-10-07 21:09:00 -05:00
thinkyhead fadaa2db09 [cron] Bump distribution date (2024-10-08) 2024-10-08 00:26:43 +00:00
Andrew f8954ca79b 📝 Fix comment missing ')' (#27325) 2024-10-07 13:00:29 -05:00
Scott Lahteine 4a3f69ad6d 🐛 Keep DMA2_Channel1 for STM32F1xx
Followup to #27385
2024-10-07 12:51:32 -05:00
Scott Lahteine 4bf13bea42 🎨 Apply some #ifndef 2024-10-06 20:06:35 -05:00
Scott Lahteine 3a6bd6920e ♻️ BTT_SKR_V3_0 => BTT_SKR_3 2024-10-06 20:06:35 -05:00
thinkyhead 70ef7978b4 [cron] Bump distribution date (2024-10-07) 2024-10-07 00:28:26 +00:00
pbmgit 37bc552f3b PELTIER_BED (#27334)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-10-06 11:14:53 -05:00
thinkyhead e310f20279 [cron] Bump distribution date (2024-10-06) 2024-10-06 00:29:36 +00:00
Scott Lahteine 4708635f4f 🔧 Fix Z3_USE_ENDSTOP check 2024-10-05 15:51:48 -05:00
Scott Lahteine f5d5b0a881 EDITABLE_HOMING_FEEDRATE / M210 (#27456) 2024-10-04 20:41:47 -05:00
thinkyhead 30f5dd339d [cron] Bump distribution date (2024-10-05) 2024-10-05 00:38:56 +00:00
Scott Lahteine 556d716919 Rename @ strings _A => _N 2024-10-04 18:53:15 -05:00
thinkyhead 76afd5afc1 [cron] Bump distribution date (2024-10-04) 2024-10-04 00:48:19 +00:00
rondlh 5c3bc2194a CONTROLLER_FAN_BED_HEATING (#27409) 2024-10-03 19:24:59 -05:00
Scott Lahteine 763cd7c5f2 🔧 Sort out MMU2 / MMU3 (#27455)
Followup to #26635
2024-10-03 19:21:50 -05:00
narno2202 11046b23a9 🔧 FT Motion Linear Advance K factor nnnn.nn (#27416)
Lost part of #26785
2024-10-03 18:32:05 -05:00
Keith Bennett 36b72926f3 BigTreeTech SKRat V1.0 (STM32G0B1VE) (#27361) 2024-10-03 13:44:14 -05:00
Scott Lahteine b35e16b1d8 Remove extra config restore 2024-10-03 13:41:49 -05:00
ellensp 767c87810b 🚸 GCODE_CASE_INSENSITIVE for Emergency Parser (#27449) 2024-10-03 13:19:42 -05:00
thinkyhead 52b6c45451 [cron] Bump distribution date (2024-10-03) 2024-10-03 18:07:32 +00:00
ellensp df5d08aec0 🔧 Retain LCD_LANGUAGE for TFT_COLOR_UI (#27454) 2024-10-03 12:16:53 -05:00
thinkyhead 8c61606691 [cron] Bump distribution date (2024-09-29) 2024-09-29 00:30:05 +00:00
David Fries e70bd3c785 🚸 G28 / G30 return for failed probe deploy (#25652)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-09-28 12:21:37 -05:00
thinkyhead 83cc983276 [cron] Bump distribution date (2024-09-28) 2024-09-28 06:07:33 +00:00
saddfox bbb8275d66 Sovol SV06 Plus Touchscreen (#25864)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-09-27 23:49:28 -05:00
Scott Lahteine 2afc2f268a 🧑‍💻 Remove CREALITY_RTS refs 2024-09-27 21:47:15 -05:00
Scott Lahteine aa44542f76 🔨 Suppress variant build warnings 2024-09-27 20:08:18 -05:00
thinkyhead 248648708f [cron] Bump distribution date (2024-09-25) 2024-09-25 06:08:29 +00:00
Scott Lahteine e2c0150fa8 🔨 Use env[PLATFORM]
Followup to f2d585ac7f
2024-09-24 20:31:41 -05:00
Scott Lahteine 4ef5372151 🔨 Update platform for MKS Tinybee and others (#27433)
* 🔨 Update ESP32 env for MKS Tinybee
* 🔨 Updated LPC common env
* 🔨 Other env improvements

Co-Authored-By: Martin Turski <turningtides@outlook.de>
2024-09-24 20:31:16 -05:00
Scott Lahteine a923771611 🩹 Fix missing _lcd_toggle_bed_leveling (#27439) 2024-09-23 23:52:14 -05:00
Scott Lahteine 74ffa0cc3e 🧑‍💻 More compatible opt helpers 2024-09-23 19:50:07 -05:00
Scott Lahteine f2d585ac7f 🔨 Skip bad compilers 2024-09-23 19:48:31 -05:00
thinkyhead 80cfdb182c [cron] Bump distribution date (2024-09-24) 2024-09-24 00:38:01 +00:00
ellensp 39463268fb ✏️ Assisted Tramming threads followup (#27437)
Followup to 45b9680c57
2024-09-23 19:16:56 -05:00
thinkyhead a7b3989bca [cron] Bump distribution date (2024-09-22) 2024-09-22 00:29:23 +00:00
Scott Lahteine 829212d76a 🎨 MMU2 const types 2024-09-21 17:24:15 -05:00
thinkyhead 0de4a70203 [cron] Bump distribution date (2024-09-19) 2024-09-19 00:25:59 +00:00
Scott Lahteine febfb3218e 🧑‍💻 Make sha256sum for archived binary 2024-09-18 10:39:19 -05:00
thinkyhead 4da46c5dd2 [cron] Bump distribution date (2024-09-18) 2024-09-18 00:25:46 +00:00
Scott Lahteine 353ede8208 🧑‍💻 Fix mftest using disabled MOTHERBOARD 2024-09-17 11:53:32 -05:00
thinkyhead 09de5e76a7 [cron] Bump distribution date (2024-09-17) 2024-09-17 00:21:48 +00:00
Scott Lahteine 73b6ba8fe3 🧑‍💻 More compatible Build Scripts
Followup to d36d9cb506
2024-09-16 17:45:55 -05:00
thinkyhead 72b09fe4cb [cron] Bump distribution date (2024-09-15) 2024-09-15 00:29:15 +00:00
Scott Lahteine e5ad13a8e2 📝 README shorten links, logo credit 2024-09-14 18:38:53 -05:00
thinkyhead b122e46adb [cron] Bump distribution date (2024-09-13) 2024-09-13 00:25:28 +00:00
ellensp 1a5866f5c6 🩹 Fix E3V2 non-TJC font size (#27375) 2024-09-12 17:29:46 -05:00
Scott Lahteine c7e62b33d1 🚸 Probe / Level Menu (#27393)
* 🎨 Housekeeping
* 🚸 Tweak UBL menu
* 🚸 Babystep Probe specific titles
* 🚸 Probe / Level Menu
2024-09-12 17:27:14 -05:00
thinkyhead 1916d4e27f [cron] Bump distribution date (2024-09-10) 2024-09-10 12:10:15 +00:00
Chris ce55a7bd9b 🩹 HC32: pin package versions (#27289) 2024-09-10 04:15:59 -05:00
InsanityAutomation 540120f863 🚸 G425 - Compute primary axes (Y..X) before others (#27382) 2024-09-10 03:16:28 -05:00
InsanityAutomation b99a26d6ab 🐛 Fix Dual Servo Toolchange Z Creep (#27381) 2024-09-10 03:07:44 -05:00
Scott Lahteine 6528109176 CI check boards.h, pins.h (#27415) 2024-09-10 01:11:26 -05:00
thinkyhead b94a0d036c [cron] Bump distribution date (2024-09-09) 2024-09-09 06:08:58 +00:00
David 7634ffe8e5 🚸 Fix alert level after Stow Z-Probe (#27404) 2024-09-08 22:29:35 -05:00
thinkyhead 8bae8bbf7a [cron] Bump distribution date (2024-09-08) 2024-09-08 12:08:37 +00:00
Scott Lahteine 5ce013f414 mfconfig => Configurations repo 2024-09-08 02:35:13 -05:00
Scott Lahteine da4a374b49 🎨 LCD pins cleanup - Sept 8 2024-09-08 01:01:59 -05:00
thinkyhead 81b13456b1 [cron] Bump distribution date (2024-09-07) 2024-09-07 06:07:08 +00:00
Scott Lahteine ee35fb07b0 🔨 Put Tronxy CXY products in build folder (#27353) 2024-09-06 21:31:16 -05:00
Scott Lahteine 99c991755a 🔧 No "base" needed for minimal config (2)
Followup to 90e5826256
2024-09-06 20:40:40 -05:00
thinkyhead a96ae85d88 [cron] Bump distribution date (2024-09-06) 2024-09-06 00:25:23 +00:00
Scott Lahteine 45b9680c57 🔧 Tramming screw threads 2024-09-05 15:21:07 -05:00
Scott Lahteine 83cbed8527 🔧 Config adjustments 2024-09-05 15:21:07 -05:00
Scott Lahteine d36d9cb506 🔧 Use string manglers in scripts 2024-09-05 15:12:24 -05:00
thinkyhead 9e6981ea60 [cron] Bump distribution date (2024-09-05) 2024-09-05 18:06:40 +00:00
Scott Lahteine 2c6f8a30f3 🚸 Fix extra Z raises (#27395) 2024-09-05 12:07:17 -05:00
konradmb 17a5a1f97d 🐛 Fix STM32 SDIO/FSMC DMA overlap (#27385)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-09-05 12:06:59 -05:00
thinkyhead a0815deb9a [cron] Bump distribution date (2024-09-04) 2024-09-04 00:25:26 +00:00
marbocub 76a7ab6893 🩹 Fix FT_MOTION_MENU lambda (#27401) 2024-09-03 14:38:04 -05:00
Scott Lahteine 7cd56a57f9 🎨 Misc. code format (2) 2024-09-03 14:01:30 -05:00
Scott Lahteine 56e2b60e6d 🧑‍💻 Quieter AUTO_REPORT_SD_STATUS option (#27391) 2024-09-03 01:08:49 -05:00
Scott Lahteine 8c15a093fd 🩹 Fix some kinematic conditions (2) 2024-09-02 20:19:31 -05:00
Scott Lahteine 7901eb97ad ️ G30 optimize and comment 2024-09-02 20:07:51 -05:00
Scott Lahteine 7aaba66d4d 🩹 Fix some kinematic conditions 2024-09-02 19:46:29 -05:00
Scott Lahteine 5f0b9d429f 🎨 Misc. code format 2024-09-02 19:46:29 -05:00
thinkyhead d34b62eafa [cron] Bump distribution date (2024-09-03) 2024-09-03 00:24:58 +00:00
DerAndere 3743980192 🔧 Assert zero Z homing clearance for some (#27370) 2024-09-02 18:48:00 -05:00
Scott Lahteine 41d53a15f2 🪠 Granular sub-options (2)
Followup to #27373
2024-09-02 16:02:03 -05:00
Scott Lahteine f234fbf87f 🧑‍💻 Refactor PROGMEM strings (#27390) 2024-09-02 04:28:50 -05:00
Scott Lahteine 5c728d1fb1 🧑‍💻 CardReader::isStillPrinting (#27392) 2024-09-02 01:34:48 -05:00
Scott Lahteine 162ea81894 🧑‍💻 Includes in Conditionals (for code dimming) (#27387) 2024-09-02 00:38:13 -05:00
thinkyhead 97b9fe83ee [cron] Bump distribution date (2024-09-02) 2024-09-02 00:26:20 +00:00
Scott Lahteine 9953230550 🧑‍💻 Build examples --output option (#27389) 2024-09-01 16:34:35 -05:00
Scott Lahteine 80bd10025b 🚸 More TFT Color UI fixes (#27388) 2024-09-01 14:02:03 -05:00
thinkyhead 0876bcd027 [cron] Bump distribution date (2024-08-31) 2024-08-31 00:24:54 +00:00
Scott Lahteine 3d7ac162fb 🧑‍💻 image2bin --transparency flag 2024-08-30 13:06:19 -05:00
Scott Lahteine 68a2459808 🚸 Fix / improve Marlin UI and Color UI 2024-08-29 21:52:14 -05:00
Scott Lahteine 21fddc1cc8 🧑‍💻 Update image2bin with "transparency" color 2024-08-29 21:41:14 -05:00
Scott Lahteine 528a1ad3e0 🧑‍💻 Move Uncrustify config 2024-08-29 21:38:57 -05:00
thinkyhead dabe374983 [cron] Bump distribution date (2024-08-30) 2024-08-30 00:25:03 +00:00
Scott Lahteine 8ac0f14796 🪠 More granular sub-options undef (#27373) 2024-08-28 20:41:12 -05:00
thinkyhead 934fc52d06 [cron] Bump distribution date (2024-08-29) 2024-08-29 00:25:00 +00:00
Scott Lahteine cf46d1880c 🚸 Purge PLR on power-off (2) 2024-08-28 15:46:53 -05:00
thinkyhead 4f159a94cd [cron] Bump distribution date (2024-08-28) 2024-08-28 06:08:14 +00:00
Scott Lahteine b53e14c7f8 🧑‍💻 Guard queue advance_r 2024-08-28 00:42:25 -05:00
Scott Lahteine 94e9f26544 🚸 Purge PLR on power-off 2024-08-28 00:42:25 -05:00
thinkyhead 9e87af70b7 [cron] Bump distribution date (2024-08-27) 2024-08-27 00:24:38 +00:00
Scott Lahteine fe56f5d3a6 🧑‍💻 Improve build_example 2024-08-26 16:11:47 -05:00
Scott Lahteine 90e5826256 🔧 No "base" needed for minimal config 2024-08-26 16:11:13 -05:00
Scott Lahteine bb73c335a5 🩹 Fix Ender-3 S1 Plus build 2024-08-26 16:11:13 -05:00
Scott Lahteine 4c1f76567c 🧑‍💻 build_all_examples --base --archive 2024-08-26 10:50:13 -05:00
Scott Lahteine d193c814d3 🩹 Fix misc warnings 2024-08-26 10:50:13 -05:00
narno2202 2cb252da4a 🩹 Fix FT_MOTION compile (#27367) 2024-08-25 23:20:11 -05:00
thinkyhead 9a04c32f7f [cron] Bump distribution date (2024-08-26) 2024-08-26 00:24:58 +00:00
Scott Lahteine 3b8e9fdd25 🔧 Reduce / update base configs 2024-08-25 00:16:04 -05:00
Scott Lahteine e0b045da49 🧑‍💻 Enhance build example scripts 2024-08-24 20:03:12 -05:00
thinkyhead 4220491a23 [cron] Bump distribution date (2024-08-25) 2024-08-25 00:26:53 +00:00
narno2202 3abe1fcf20 🔧🚸 FT_MOTION adjustments (#27359)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-08-23 23:58:31 -05:00
marbocub 02ed020f3f 🩹 Fix shaping init (#27365) 2024-08-23 23:45:46 -05:00
Scott Lahteine 934ac24ad8 🐛 FT Motion time-based endstop (#27349)
Co-authored-by: ulendoalex <111143418+ulendoalex@users.noreply.github.com>
2024-08-23 23:42:02 -05:00
Scott Lahteine e2d8b2fc26 🚸 Prefer probe XY feedrate for "blocking move"
Reverting part of 89b0143b
2024-08-23 23:32:14 -05:00
thinkyhead 3e8483d389 [cron] Bump distribution date (2024-08-24) 2024-08-24 00:23:23 +00:00
Erkan Ozgur Yilmaz a9c529f004 Prusa MMU3 (#26635)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-08-23 18:33:13 -05:00
Keith Bennett a664587219 🩹 Fix Sensorless Homing Current Warning (#27366) 2024-08-23 17:25:09 -05:00
thinkyhead 1619838592 [cron] Bump distribution date (2024-08-23) 2024-08-23 00:24:05 +00:00
Lubomir Rintel 98a33d37c7 🩹 Fix MINITRONICS v1 pins (#27150) 2024-08-22 11:01:42 -05:00
thinkyhead 12a2e5ae1b [cron] Bump distribution date (2024-08-22) 2024-08-22 00:24:06 +00:00
Scott Lahteine 9b472a02e9 PROBE_TARE_MENU 2024-08-21 18:36:49 -05:00
Scott Lahteine c84bea7110 🚸 LED Default may toggle On 2024-08-21 18:36:49 -05:00
ellensp 20f71fafa7 🧑‍💻 Use sim env for BOARD_SIMULATED in mftest (#27299) 2024-08-21 18:33:58 -05:00
ellensp 056e5a430e 🔧 Azteeg X3 Pro doesn't need DIGIPOTS_I2C_SDA_* (#27337) 2024-08-21 18:25:25 -05:00
Scott Lahteine 21a604407d 🚸 Move solo Case Light menu up 2024-08-21 17:46:27 -05:00
thinkyhead deb076b9cd [cron] Bump distribution date (2024-08-21) 2024-08-21 00:23:53 +00:00
Scott Lahteine b8e2ad9d8f 👷 resume_print params for timeout, filament load
Co-Authored-By: Erkan Ozgur Yilmaz <1786804+eoyilmaz@users.noreply.github.com>
2024-08-20 16:38:10 -05:00
Scott Lahteine 0cd9643957 🎨 Misc. cleanup (from MMU3 PR)
Co-Authored-By: Erkan Ozgur Yilmaz <1786804+eoyilmaz@users.noreply.github.com>
2024-08-20 16:38:10 -05:00
thinkyhead 8c78315f71 [cron] Bump distribution date (2024-08-20) 2024-08-20 00:24:02 +00:00
Scott Lahteine 35dad3fdfe 📝 BIQU MicroProbe followup 2024-08-19 15:00:15 -05:00
Scott Lahteine bebf5dc6ab GENERIC_BACK_MENU_ITEM 2024-08-19 14:50:26 -05:00
Scott Lahteine 2fd1c48e1a 👷 Prefer has_blocks_queued over movesplanned 2024-08-19 14:50:23 -05:00
thinkyhead 301727defc [cron] Bump distribution date (2024-08-18) 2024-08-18 00:26:18 +00:00
Scott Lahteine 1afd53a933 🔨 Suppress some Maple warnings 2024-08-17 18:02:23 -05:00
narno2202 381aeb94c6 🩹 Fix FT Motion toggle in active job (#27335)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-08-17 13:02:05 -05:00
thinkyhead 4a36520820 [cron] Bump distribution date (2024-08-17) 2024-08-17 00:23:13 +00:00
Scott Lahteine 430eedf5c0 👷 Optional IJKUVW endstops 2024-08-16 14:35:29 -05:00
Scott Lahteine 793a851d10 👷 !ELAPSED => PENDING 2024-08-16 14:34:05 -05:00
Scott Lahteine 2d609487ac 👷 FT Motion refactor, minor fix 2024-08-16 14:33:38 -05:00
Scott Lahteine 295f50379f 👷 Add UC elements to axis types 2024-08-16 14:31:51 -05:00
Scott Lahteine ecfff5099a 🎨 Misc. format, cleanup 2024-08-16 00:18:33 -05:00
Scott Lahteine 986344640f 🔧 Minimal configuration with Config.h (#27338) 2024-08-15 23:08:26 -05:00
thinkyhead 69f69606e6 [cron] Bump distribution date (2024-08-16) 2024-08-16 00:23:58 +00:00
sargonphin 2aa2e5487a ️ Improve Homing / Probing Current (#26714)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-08-15 18:30:55 -05:00
John Robertson 23d9020a65 M3 / M4 O for laser/spindle (#26883) 2024-08-15 16:09:41 -05:00
Scott Lahteine 43d9d1ce1b 🩹 Config-related preparations (2) 2024-08-15 15:37:30 -05:00
thinkyhead ed7f3b21c0 [cron] Bump distribution date (2024-08-13) 2024-08-13 00:33:32 +00:00
Scott Lahteine b062a3b226 🎨 FT Motion, axis cleanup 2024-08-12 17:48:41 -05:00
Scott Lahteine 89b0143b09 🔧 Config-related preparations 2024-08-11 20:35:23 -05:00
Scott Lahteine 0790a9d5df 🔧 Fix some LCD probing margins 2024-08-11 20:35:23 -05:00
Scott Lahteine e05ac66561 🔧 Fix extra endstop auto-assignment 2024-08-11 20:35:23 -05:00
Scott Lahteine 3b33f7ec03 🔨 Build script improvements 2024-08-11 20:35:23 -05:00
Scott Lahteine b94c75bcda 🎨 ProUI / MKS UI code cleanup 2024-08-11 20:35:23 -05:00
Scott Lahteine 8dc8906d78 🎨 Conditional probe.h 2024-08-11 20:35:23 -05:00
Keith Bennett ab684dc484 📝 New Discord link (#27330) 2024-08-11 20:02:00 -05:00
Scott Lahteine 37fb26b557 🩹 Fix W axis blocking move
Fixes #27332

Co-Authored-By: thebjtfellow <110046297+thebjtfellow@users.noreply.github.com>
Co-Authored-By: DerAndere <26200979+DerAndere1@users.noreply.github.com>
2024-08-11 20:00:54 -05:00
thinkyhead 7397e5a41d [cron] Bump distribution date (2024-08-12) 2024-08-12 00:25:11 +00:00
Keith Bennett 4a9d380117 🩹 Fix MKS Gen-L V1 PWM pins (#26974)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-08-11 15:45:37 -05:00
thinkyhead 0ec1a54309 [cron] Bump distribution date (2024-08-07) 2024-08-07 00:24:00 +00:00
Bkahl ab6e68c312 🎨 Improve LulzBot FTDI Eve Touch UI (#27275)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-08-06 14:52:17 -05:00
thinkyhead c509603530 [cron] Bump distribution date (2024-08-06) 2024-08-06 00:23:52 +00:00
narno2202 e5ce65c32b 🔧 BIQU MicroProbe + FT_MOTION sanity-check (#27302) 2024-08-05 17:54:18 -05:00
tombrazier 851257c44b 🐛 Fix MPC differential tuning (#27274) 2024-08-05 17:44:15 -05:00
thinkyhead 1662e953fc [cron] Bump distribution date (2024-07-30) 2024-07-30 00:23:59 +00:00
Scott Lahteine dde89795c9 🔨 Rename "BTT" things, MCU-based SKR 2 (#27319)
Co-authored-by: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com>
2024-07-29 13:25:17 -05:00
thinkyhead 6e69ff93ef [cron] Bump distribution date (2024-07-29) 2024-07-29 18:06:59 +00:00
Keith Bennett 01b7d6c413 ️ Hold BTT renaming for later (#27307)
This reverts #27301
2024-07-29 11:25:31 -05:00
Andrew 58398832a1 📝 Tweak G26 O description (#27310)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-29 10:59:12 -05:00
dmitrygribenchuk 29469a0615 🎨 Python style tweaks (#27312) 2024-07-29 10:41:50 -05:00
Andrew b4dd20c0eb 🔨 Use Adafruit NeoPixel 1.12.3 (#27314) 2024-07-29 10:39:21 -05:00
thinkyhead eab13752dd [cron] Bump distribution date (2024-07-27) 2024-07-27 00:23:08 +00:00
Scott Lahteine ad60cdd030 🚸 G42 P as flag (not bool) 2024-07-26 02:40:35 -05:00
Evan Felix 78e111a4d0 🚸 Implement G60 / G61 to spec (#27281)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-26 00:13:52 -05:00
thinkyhead 5558729562 [cron] Bump distribution date (2024-07-26) 2024-07-26 00:23:28 +00:00
Scott Lahteine 2d32f7c377 👷 Smarter Flags<N> templates (#27309) 2024-07-25 15:36:20 -05:00
thinkyhead bcbdac6f6c [cron] Bump distribution date (2024-07-25) 2024-07-25 00:23:35 +00:00
Scott Lahteine acc8bf1c79 👷 Use char in binary send 2024-07-24 03:04:29 -05:00
Scott Lahteine 4f107e9fee 🔨 Suggest gcc14 for macOS Sim 2024-07-24 02:25:56 -05:00
Scott Lahteine 7844f3fa4f 🔨 Use -g2 for macOS Sim build to fix warnings 2024-07-24 01:02:31 -05:00
Keith Bennett 2f3af438ee 🔨 Rename BTT SKR V2.0 PIO envs (#27301) 2024-07-23 21:19:18 -05:00
thinkyhead 4483aa5b45 [cron] Bump distribution date (2024-07-24) 2024-07-24 00:24:31 +00:00
Scott Lahteine 20e6b6315e 📝 Config section reorganization 2024-07-23 17:59:14 -05:00
ellensp ca4248bdd5 🚸 Optional thermistors in Info Menu (#27303) 2024-07-23 16:47:22 -05:00
Scott Lahteine 4a5d8ba87e 👷 Local URL checking script (#26975) 2024-07-23 15:41:29 -05:00
Scott Lahteine 7a5d849857 🔨 No CONFIG_EXAMPLES_DIR in config signature 2024-07-23 15:18:06 -05:00
thinkyhead 95c23e55a4 [cron] Bump distribution date (2024-07-23) 2024-07-23 00:23:49 +00:00
Andrew 94ce0d24d6 👷 Add optimal stepper.set_e_position() (#27293)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-22 15:33:37 -05:00
Scott Lahteine cdea1b8460 👷 ATOMIC_SECTION macros 2024-07-22 14:54:17 -05:00
thinkyhead cc122bec82 [cron] Bump distribution date (2024-07-22) 2024-07-22 06:07:44 +00:00
Keith Bennett 6afaf0034c 🔧 Assert EDGE_STEPPING with TMC drivers (#27292)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-21 20:53:51 -05:00
thinkyhead 7f0d7e760b [cron] Bump distribution date (2024-07-20) 2024-07-20 12:07:55 +00:00
Keith Bennett 69004322f6 👷 Add Simulator CI test (#27288) 2024-07-20 01:47:23 -05:00
thinkyhead 7441094a41 [cron] Bump distribution date (2024-07-19) 2024-07-19 00:24:14 +00:00
Chris 29a5006df9 🧑‍💻 Update HC32 CRITICAL_SECTION macros (#27283)
Fixes #27282
2024-07-17 21:03:35 -05:00
thinkyhead 1aca038daf [cron] Bump distribution date (2024-07-18) 2024-07-18 00:23:29 +00:00
ellensp ce92eb46ec 🔧 Prevent LCD_PINS_EN false pin conflict (#27284) 2024-07-17 18:07:06 -05:00
ellensp c852e9c6a1 🔨 Fix preflight checks order (#27285)
Followup to #27249
2024-07-17 18:01:10 -05:00
ellensp 2b8db0c2e2 🎨 fix endif comment (#27286) 2024-07-17 17:58:55 -05:00
Scott Lahteine 74f297c871 🚸 FT Motion tune menu (#27279)
Co-authored-by: narno2202 <130909513+narno2202@users.noreply.github.com>
2024-07-17 12:05:53 -05:00
thinkyhead 76411392b7 [cron] Bump distribution date (2024-07-17) 2024-07-17 00:23:52 +00:00
Keith Bennett 74c81117c3 🔨 MarlinSimUI updates (#27276) 2024-07-16 14:31:42 -05:00
thinkyhead 6f04d8dc77 [cron] Bump distribution date (2024-07-16) 2024-07-16 00:23:45 +00:00
Scott Lahteine ade05c045e 🚸 Revert FT Motion tune menu 2024-07-15 15:28:03 -05:00
ellensp 5140726c70 🩹 Fix _MAX type warning (#27272) 2024-07-15 14:01:32 -05:00
Scott Lahteine 5334a8f0ed 🚸 Fix UI behavior for G29 with retry (#27146) 2024-07-15 13:59:19 -05:00
Mihai ee99eed3bf 🚸 Improved menu responsiveness with MarlinUI + U8Glib. (#26555)
Co-authored-by: Jason Smith <jason.inet@gmail.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-15 13:57:25 -05:00
narno2202 9a5f1d2f51 🚸 FT Motion: Linear Advance adjustments (#26785)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-15 13:30:42 -05:00
narno2202 170df9040b 🚸 FT_MOTION Menu available in situ (#26670) 2024-07-15 13:27:10 -05:00
narno2202 f0bc4274f8 🧑‍💻 FT Motion: Individual axis shaping, new buffer management (#26848)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-15 13:13:00 -05:00
thinkyhead 20a704b154 [cron] Bump distribution date (2024-07-15) 2024-07-15 00:24:44 +00:00
ellensp 30a70c480c XTLW boards (#27260) 2024-07-14 12:57:17 -05:00
thinkyhead 1d5e9c7dee [cron] Bump distribution date (2024-07-14) 2024-07-14 06:08:19 +00:00
Scott Lahteine b8ab2d4987 🩹 Fix PINS_EXIST usage 2024-07-13 23:39:27 -05:00
ellensp ce796cec97 🧑‍💻 Fix pins debug / FastIO issues (#27261)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-13 23:33:11 -05:00
thinkyhead ad4de747ad [cron] Bump distribution date (2024-07-13) 2024-07-13 18:05:54 +00:00
Keith Bennett 95c1b7fb31 🔧 USART6 for STM32, expand port range (#27262) 2024-07-13 12:18:47 -05:00
ellensp 29b742cfc4 🔧 Fix MKS Base default 1.4 RGB pins (#27263) 2024-07-13 11:55:40 -05:00
tombrazier 57bda2ff3b 🐛 Fix NUM_ENDSTOP_STATES with Z_MIN_PROBE = Z_MIN (#27190)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-13 11:50:25 -05:00
John Robertson 228179e09b 🩹 Clock-based planner trapezoidal nominal_rate (#26881) 2024-07-13 11:47:46 -05:00
thinkyhead c961f3ab2b [cron] Bump distribution date (2024-07-12) 2024-07-12 00:23:21 +00:00
Scott Lahteine 3469cb9d24 🔧 Fallback STRING_CONFIG_H_AUTHOR 2024-07-11 16:27:52 -05:00
thinkyhead 6c09b83f30 [cron] Bump distribution date (2024-07-11) 2024-07-11 00:23:57 +00:00
ellensp 17a1363f4d 🐛 Fix ERR_EEPROM_NOPROM result (#27255)
Followup to #27199
2024-07-09 21:15:34 -05:00
thinkyhead 115350317c [cron] Bump distribution date (2024-07-10) 2024-07-10 00:23:49 +00:00
Justin Nesselrotte 44c2682168 RS485 support with G-code M485 (#25680)
Co-authored-by: Stephen Hawes <sphawes@gmail.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-09 17:00:14 -05:00
ellensp 8b81aae870 Update preflight-checks.py for windows 2024-07-09 18:55:36 +12:00
thinkyhead 72a2699b10 [cron] Bump distribution date (2024-07-09) 2024-07-09 00:23:05 +00:00
Keith Bennett b7c07f1329 🚸 Fix G33 display precision (3 digits) (#27186) 2024-07-08 19:13:21 -05:00
Vovodroid 2b9a62093a 🚸 Edit IS frequency while moving (#27248) 2024-07-08 19:03:20 -05:00
ellensp 3385b4c280 🔨 Auto-replace BOTH / EITHER in configs (#27249)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-08 18:46:03 -05:00
thinkyhead 7c1f82cd96 [cron] Bump distribution date (2024-07-08) 2024-07-08 18:06:51 +00:00
Roxy-3D 9ebfdc4a86 Update README.md with hotlink to all supported boards 2024-07-08 10:35:41 -05:00
thinkyhead 586313c2fb [cron] Bump distribution date (2024-07-07) 2024-07-07 00:25:40 +00:00
David Buezas 571783fc04 🚸 SD card wake on insert, status screen on remove (#27197)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-06 17:41:02 -05:00
Scott Lahteine 4af5229cee 🧑‍💻 Conditional HAS_LED_POWEROFF_TIMEOUT 2024-07-05 20:08:07 -05:00
thinkyhead e0dcc610da [cron] Bump distribution date (2024-07-06) 2024-07-06 00:22:12 +00:00
Scott Lahteine 4aff10785e 🧑‍💻 Use "enum class" 2024-07-05 18:48:41 -05:00
thinkyhead d0e110d666 [cron] Bump distribution date (2024-07-05) 2024-07-05 06:08:13 +00:00
Vovodroid 10ffb9cb68 FAN_KICKSTART_LINEAR (#27072) 2024-07-04 21:22:16 -05:00
Keith Bennett b303bb1e56 🔧 English as default on MKS H43 (#27218) 2024-07-04 20:57:21 -05:00
Keith Bennett e6a61b182f 🐛 Fix E3S1PRO DGUS builds (#27211)
Partially reverts #26261
2024-07-04 20:37:43 -05:00
Keith Bennett 785b1da021 🐛 Fix YHCB2004 builds (#27210)
Co-authored-by: ellensp <530024+ellensp@users.noreply.github.com>
2024-07-04 20:36:17 -05:00
tombrazier a4d20031ec 🐛 Fix backlash intial direction (#27208)
Fix regression from #25791
2024-07-04 20:33:45 -05:00
tombrazier 3c60145792 🩹 Fix "calibration" endstop report (#27207)
Followup to #27204
2024-07-04 20:31:25 -05:00
Keith Bennett f2940adcf1 🔥 Drop BTT Manta XFER environments (#27240)
USB is connected to SoC (CM4/CB1/CB2), not MCU
2024-07-04 19:50:34 -05:00
Keith Bennett b5b9cc0b79 🔥 Drop BOARD_BIGTREE_SKR_V1_2 "renamed" reference (#27230) 2024-07-04 19:48:48 -05:00
ellensp 1d1eb97567 🚸 Update Zonestar OLEDs to SPI (#27220)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-04 19:43:17 -05:00
thinkyhead 0103cffcd0 [cron] Bump distribution date (2024-07-02) 2024-07-02 00:23:05 +00:00
Mihai 6fed66dd42 🩹️ Fix judder, optimize planner (#27035) 2024-07-01 13:56:06 -05:00
thinkyhead c81416438d [cron] Bump distribution date (2024-06-30) 2024-06-30 00:25:29 +00:00
Scott Lahteine c95825a0ff 🔧 Simplify sensitive pins (#27219) 2024-06-29 15:50:35 -05:00
David Buezas b6284c9f01 🚸 Skip REINIT_NOISY_LCD for I2C OLED (#27222) 2024-06-29 15:43:08 -05:00
thinkyhead f84a97f51c [cron] Bump distribution date (2024-06-29) 2024-06-29 00:22:24 +00:00
Scott Lahteine 563296fc8b 🩹 LCD_CONTRAST => LCD_CONTRAST_INIT 2024-06-28 12:52:36 -05:00
thinkyhead 13290e798b [cron] Bump distribution date (2024-06-28) 2024-06-28 00:22:46 +00:00
thisiskeithb 96e3dfed46 🩹 Fix/Add Malyan M300 E0_AUTO_FAN_PIN 2024-06-27 19:00:20 -05:00
David Buezas cb6fd130ba ️ Load/init (most) settings after showing boot-screen (#27199)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Peter Ellens <ellensp@users.noreply.github.com>
2024-06-27 18:37:35 -05:00
Scott Lahteine 11f90de873 🩹 Set color 1 on DOGM clear
Followup to `clear_for_drawing`
2024-06-27 18:35:00 -05:00
Keith Bennett 9240ec89d0 Add fail-fast: true default strategy to build test CI (#27215) 2024-06-27 11:50:26 -05:00
thinkyhead 8cf2a41f81 [cron] Bump distribution date (2024-06-27) 2024-06-27 00:22:45 +00:00
Scott Lahteine 1f9fc665ec 🚸 MarlinUI:: clear_for_drawing 2024-06-26 18:27:05 -05:00
Keith Bennett bf1995140a 🔨 TMC2100 is STANDALONE (#27209) 2024-06-26 16:26:42 -05:00
David Buezas 7b21cd5d72 🩹 Don't reinit i2c LCDs (#27194)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-06-26 16:04:58 -05:00
thinkyhead 37fc32d972 [cron] Bump distribution date (2024-06-26) 2024-06-26 06:07:26 +00:00
Ben 9a6d4b5e56 🚸 PLR: Add FR and Flow (#27201)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-06-25 22:34:33 -05:00
thinkyhead 1e0719dac5 [cron] Bump distribution date (2024-06-25) 2024-06-25 00:22:37 +00:00
Jonathan Brazier f2248f79d3 ️ Implement CALIBRATION_GCODE as endstop (#27204) 2024-06-24 14:52:49 -05:00
thinkyhead 60d843b540 [cron] Bump distribution date (2024-06-22) 2024-06-22 06:07:24 +00:00
Keith Bennett 6d7d281559 🔧 Warning for ZV Shaping on CoreQZ (#27200) 2024-06-21 19:38:11 -05:00
thinkyhead b3d462b890 [cron] Bump distribution date (2024-06-20) 2024-06-20 18:07:46 +00:00
Scott Lahteine a7444021c6 🔨 Fatal error for wrong GCC on macOS Native Sim 2024-06-20 12:53:58 -05:00
thinkyhead a93acbd35c [cron] Bump distribution date (2024-06-17) 2024-06-17 00:24:05 +00:00
Vovodroid d978123289 🔧 Nonlinear Extrusion optional Adaptive Smoothing (#27175) 2024-06-16 16:21:57 -05:00
Keith Bennett ee8dada752 ♻️ DISABLE_ENCODER => NO_BACK_MENU_ITEM (#27180) 2024-06-16 16:10:12 -05:00
ellensp 7bc6261d2a 🐛 Mount media early for POWER_LOSS_RECOVERY (#27177) 2024-06-15 20:14:46 -05:00
thinkyhead 013c3bcd82 [cron] Bump distribution date (2024-06-16) 2024-06-16 00:31:38 +00:00
Scott Lahteine 2fc86ad836 🐛 Fix homing when FT Motion exists (#27179) 2024-06-15 19:11:19 -05:00
Mihai 082dc24865 🧑‍💻 Adjust pulse_phase_isr code guards (#27112) 2024-06-15 18:01:36 -05:00
Mihai d7b6acc03d ️ Optimize LPC176x set_pwm_duty (#27178) 2024-06-15 17:55:45 -05:00
thinkyhead a1dc2856de [cron] Bump distribution date (2024-06-15) 2024-06-15 00:22:26 +00:00
Andrew 959be66cc2 🔨 Build scripts cleanup (#27157)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-06-14 16:01:34 -05:00
thinkyhead ae2843940f [cron] Bump distribution date (2024-06-14) 2024-06-14 06:07:52 +00:00
Mihai 611ceedc1d 🐛 Fix step oversampling with NONLINEAR_EXTRUSION (#27171)
Followup to #27113
2024-06-13 23:05:05 -05:00
thinkyhead 38298076d6 [cron] Bump distribution date (2024-06-13) 2024-06-13 18:06:44 +00:00
Nicolas Graziano 1f0b8d6cd8 🚸 AnyCubic Vyper LCD improvements (#27158)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-06-13 11:50:16 -05:00
thinkyhead e0d683baed [cron] Bump distribution date (2024-06-12) 2024-06-12 00:22:43 +00:00
Nicolas Graziano f4f75b6b12 🔨 Rename AnyCubic Vyper binary (#27167)
The vyper board need a file name which begin with 'main_board_'
2024-06-11 14:31:57 -05:00
thinkyhead fb6dc90a85 [cron] Bump distribution date (2024-06-11) 2024-06-11 00:22:36 +00:00
Bob Kuhn b99391c810 🚸🐛 Anycubic Vyper fixes (1) (#26261) 2024-06-10 14:20:03 -05:00
Vovodroid d9fc4f3a99 🚸 Nonlinear Extrusion polynomial Av^2+Bv+C (#27162) 2024-06-10 13:42:28 -05:00
Scott Lahteine daeffbc944 🚸 Prefer friendly Power Off over Auto-unalive 2024-06-10 12:51:21 -05:00
Scott Lahteine 87dde46fb0 🔧 Assume RAMPS_CREALITY is not CR2020 2024-06-10 12:51:21 -05:00
thinkyhead d96c6f867d [cron] Bump distribution date (2024-06-10) 2024-06-10 06:07:31 +00:00
Scott Lahteine 1f2e6d5434 📝 "Boards Manager" 2024-06-09 17:38:55 -05:00
thinkyhead 232b989d50 [cron] Bump distribution date (2024-06-09) 2024-06-09 00:25:46 +00:00
TheRaf974 d38261c908 🔧 Overridable SUICIDE_PIN for RAMPS_CREALITY (#27143) 2024-06-08 16:45:51 -05:00
Ryan P 3075bc3b7b 🚸🐛 SW SPI Mode 3 for U8G on STM32 (#27111) 2024-06-08 16:03:21 -05:00
Scott Lahteine 842d0b1c9f 🎨 Misc. SPI cleanup 2024-06-08 15:55:36 -05:00
Scott Lahteine 042b238dd8 🧑‍💻 USE_SOFTWARE_SPI => SDFAT_USE_SOFTWARE_SPI 2024-06-08 15:55:36 -05:00
Scott Lahteine c30904b631 🧑‍💻 U8G_SPI_USE_MODE_3 for *_MINI_12864 2024-06-08 15:55:36 -05:00
Mihai 225a71f4cd ️ Optimize LPC176x pin toggle (#27149) 2024-06-08 13:33:08 -05:00
ellensp 1d29a56344 🔧 Fix Z_MULTI_ENDSTOPS pin post-process (#27137) 2024-06-08 13:27:13 -05:00
ellensp 320e00267d ✏️ Fix comma typo (#27138) 2024-06-07 20:38:44 -05:00
thinkyhead 9869629b67 [cron] Bump distribution date (2024-06-08) 2024-06-08 00:23:12 +00:00
Scott Lahteine 3da78e85bf 📝 Remove dead video links 2024-06-07 17:25:42 -05:00
thinkyhead 11a4314261 [cron] Bump distribution date (2024-06-06) 2024-06-06 06:07:15 +00:00
Mihai 65c19f82b9 🔧 Minimum Stepper Pulse in Nanoseconds (#27113) 2024-06-05 21:26:09 -05:00
thinkyhead 0169cde8a4 [cron] Bump distribution date (2024-06-03) 2024-06-03 00:23:09 +00:00
InsanityAutomation ab0173b7e6 🚸 ExtUI: Shaping, Probing limits (#26754) 2024-06-02 14:45:19 -05:00
thinkyhead 95f81d2565 [cron] Bump distribution date (2024-05-29) 2024-05-29 00:26:13 +00:00
Scott Lahteine 9c922f0eab 🧑‍💻 Fix test STM32F103RC_btt_USB 2024-05-28 19:05:03 -05:00
Scott Lahteine 35a03d66e5 🔨 Update SAMD51 build deps 2024-05-28 18:49:39 -05:00
Mihai a4a0887fa7 🐛 Fix NONE, ALL, EVAL macro collision (#27132) 2024-05-28 18:22:39 -05:00
thinkyhead e7c9cf3e1d [cron] Bump distribution date (2024-05-27) 2024-05-27 00:22:53 +00:00
ellensp 6710616a09 🩹 Longer3D LK has ONBOARD_SDIO (#27129) 2024-05-26 12:09:18 -05:00
Scott Lahteine 2064c83c66 🚸 Fix SD nav after "one click print" (2) 2024-05-26 12:04:14 -05:00
thinkyhead 2e97ad1f4b [cron] Bump distribution date (2024-05-26) 2024-05-26 12:07:31 +00:00
Scott Lahteine 4f85f88ae3 🚸 Fix SD nav after "one click print" 2024-05-26 02:18:37 -05:00
thinkyhead 181a57ae9b [cron] Bump distribution date (2024-05-24) 2024-05-24 00:22:18 +00:00
Keith Bennett 3ee1248cf2 🩹 Even more Z input shaper followup (#27119)
Followup to #27118
2024-05-23 14:58:22 +12:00
thinkyhead 68c3916d46 [cron] Bump distribution date (2024-05-23) 2024-05-23 00:21:53 +00:00
Keith Bennett e3bbacd8b9 📝 Update Input Shaping comments (#27116)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-05-22 18:30:44 -05:00
Scott Lahteine f915371248 🧑‍💻 More language cleanup 2024-05-22 17:37:13 -05:00
Andrew ea848aa891 🩹 Z input shaper followup (#27118)
Followup to #27073
2024-05-22 14:07:04 -05:00
Scott Lahteine 5157849c60 🧑‍💻 Remove unused strings, label some 2024-05-22 13:07:33 -05:00
Scott Lahteine ca31f9789e 🩹 Fix LCD getFreeTxBuffer typo 2024-05-21 19:26:18 -05:00
Scott Lahteine 78d3cf1de1 🎨 PGM => _P rename 2024-05-21 19:26:18 -05:00
Scott Lahteine 521e7eafce 🧑‍💻 Clarify media "mounted" 2024-05-21 19:26:18 -05:00
thinkyhead 2d78a80cf6 [cron] Bump distribution date (2024-05-22) 2024-05-22 00:21:43 +00:00
Miguel Risco-Castillo 5f32698da5 Ender-3 V3 board CR4NS200320C13 (#27003) 2024-05-21 15:20:12 -05:00
thinkyhead 1845056014 [cron] Bump distribution date (2024-05-21) 2024-05-21 00:22:16 +00:00
Jason Smith 0b8ec2aa74 🎨 Decimal TMC address (#27028) 2024-05-20 17:16:49 -05:00
ellensp 578bdd4b20 🧑‍💻 Address trailing spaces (#27108) 2024-05-20 00:04:51 -05:00
Jonathan Brazier 6b6865d068 INPUT_SHAPING_Z (#27073) 2024-05-20 00:03:03 -05:00
Andrew 6c018eb770 📝 Update some G-code and other comments (#27034) 2024-05-20 00:01:05 -05:00
ellensp 5561bafbe6 M110 Get Command Line Number (#27090)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-05-19 23:11:30 -05:00
ellensp 75eee04972 🩹 Return 0 for bad index in Temperature::getHeaterPower (#27037)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-05-19 23:10:15 -05:00
ellensp ee1d1faa52 🔨 Sim pins / INI cleanup 2024-05-19 23:07:24 -05:00
Chris dbd3e10959 🩹 Solid background for DWIN_MARLINUI text (#27029) 2024-05-19 22:53:45 -05:00
Andrew fde330af5a 🎨 Fix MarlinUI "untyped" string args (#27046) 2024-05-19 21:50:24 -05:00
Keith Bennett e8d953257e 🔨 Warn about Input Shaping + I2S_STEPPER_STREAM (#27051) 2024-05-19 21:45:57 -05:00
Keith Bennett cc86e9ecce Fix CI badge (#27060) 2024-05-19 21:44:22 -05:00
vrooze 5a6db519d6 Ender-3 V2 LCD with SKR 3[EZ] (#27061) 2024-05-19 20:31:53 -05:00
thinkyhead 98d09e5304 [cron] Bump distribution date (2024-05-20) 2024-05-20 00:35:32 +00:00
Vovodroid d87a0ea7f7 🚸 Quickly apply touch screen fan/laser edit (#27064) 2024-05-19 19:32:43 -05:00
Dave Gateman 0e2bd069d4 🩹 Fix cutter power extra '%' (#27105) 2024-05-19 18:53:38 -05:00
ellensp feca9a33d5 SHOW_CUSTOM_BOOTSCREEN for HD44780 (#26793)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-05-19 18:51:52 -05:00
Scott Lahteine eec1aec071 🐛 Fix multi-byte menu string buffer overrun (#27100) 2024-05-19 18:43:04 -05:00
Scott Lahteine a97d1088f0 🔧 Ensure distinct languages (#27107) 2024-05-19 18:42:07 -05:00
Scott Lahteine a7317de3b4 🔨 Sim needs GLM_ENABLE_EXPERIMENTAL 2024-05-19 14:12:17 -05:00
thinkyhead 06762db050 [cron] Bump distribution date (2024-05-18) 2024-05-18 00:22:00 +00:00
Vovodroid 4f3ebea3a6 🐛 Fix FT_MOTION block reference (#27063) 2024-05-17 16:47:44 -05:00
ellensp fa88e0f054 🔨 Windows Simulator needs -DGLM_ENABLE_EXPERIMENTAL (#27092) 2024-05-17 16:04:36 -05:00
Mihai 2fd7c2b865 ️ Fix motion smoothness (#27013) 2024-05-16 20:48:21 -05:00
jam-berg ef0bd975cf 🩹 Fix Ender 2 Pro EXP1-7 pin (PB15 / LCD_RS) (#27074) 2024-05-16 20:23:17 -05:00
Keith Bennett bdc14ddbd7 ️ Revert DELTA Z endstop homing patch (#27088)
Reverts #26297 f7a3172c20
2024-05-16 20:18:41 -05:00
Mihai 383e6f4646 🐛 Move LASER_POWER_TRAP cruise to cruise block (#27031) 2024-05-16 20:05:27 -05:00
thinkyhead e37415c95b [cron] Bump distribution date (2024-05-17) 2024-05-17 00:22:14 +00:00
Scott Lahteine a33112a4c0 🐛 Reorder FLOAT_SQ
Followup to 5f96dffb
2024-05-15 20:30:14 -05:00
thinkyhead 7e8007f024 [cron] Bump distribution date (2024-05-16) 2024-05-16 00:21:28 +00:00
Chris f320c2a455 🧑‍💻 Define, apply F_CPU on HC32 (#27086)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-05-15 18:10:04 -05:00
Chris 6eedeaedaf 🐛 Fix HC32 temperature ADC (#27085) 2024-05-15 15:49:40 -05:00
Chris 6b5e19cfc4 🐛 Fix HC32 watchdog timeout (#27084)
by reducing PCLK3 clock
2024-05-15 15:45:52 -05:00
ellensp 3dc437add4 🎨 Apply TERN0/1 for some contexts (#27036) 2024-05-15 15:42:19 -05:00
Scott Lahteine 5f96dffb9b 🧑‍💻 FLOAT_SQ macro 2024-05-15 15:21:39 -05:00
Mihai 6423b8031d ️ Add / enforce min_entry_speed_sqr (#27089) 2024-05-15 15:01:56 -05:00
thinkyhead bbdad79ce5 [cron] Bump distribution date (2024-05-13) 2024-05-13 00:22:55 +00:00
Keith Bennett a2daee8f7a 📝 MPCTEMP is tested (#27075) 2024-05-12 17:39:58 -05:00
ellensp 909e3ad116 🩹 Motor PWM followup (#27087)
Followup to 08fe8a3076
2024-05-12 17:31:02 -05:00
Scott Lahteine 556616c4f0 🧑‍💻 Controller warning as macro 2024-05-12 14:37:27 -05:00
Miguel Risco-Castillo 46e426ce96 📝 Use "based on" for partial ProUI (#26998) 2024-05-12 13:28:38 -05:00
Alexander Thomas Julian f5f6c37c17 🐛 LCD Bed Tramming fixes (#26962)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-05-12 13:25:14 -05:00
Scott Lahteine 08fe8a3076 🔧 Undef motor current PWM for unused axes 2024-05-12 13:21:32 -05:00
thinkyhead dabcea991f [cron] Bump distribution date (2024-05-12) 2024-05-12 00:24:03 +00:00
Scott Lahteine 4a5bd47b6a 🎨 Apply MUL_TERN 2024-05-11 13:41:15 -05:00
thinkyhead e5742a98df [cron] Bump distribution date (2024-05-11) 2024-05-11 18:06:35 +00:00
Keith Bennett 774cecc3b4 🩹 Fix AT90USB1286 PIO upload (#27070) 2024-05-11 12:03:04 -05:00
Keith Bennett 83b7e32ec4 🩹 Fix Nextion cstr/fstr typo (#27071) 2024-05-11 12:02:17 -05:00
thinkyhead a22155bd96 [cron] Bump distribution date (2024-05-10) 2024-05-10 00:21:41 +00:00
narno2202 1da947f548 ️ FT_MOTION : Core and other refinements (#26720)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Ulendo Alex <alex@ulendo.io>
2024-05-09 16:57:23 -05:00
David Buezas a3960dfa53 🚸 New encoder logic & debounce (#26723)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-05-09 16:20:57 -05:00
thinkyhead bab1917311 [cron] Bump distribution date (2024-05-07) 2024-05-07 01:00:35 +00:00
Andrew 49348716f5 🩹 Fix printf et.al. expecting F-strings (#27032) 2024-05-06 18:58:00 -05:00
thinkyhead eb781afe7b [cron] Bump distribution date (2024-05-03) 2024-05-03 00:21:23 +00:00
Jason Smith 39f53c3f8c 🧑‍💻Improve make tests-all-local (#27040)
* Sleep 5 seconds between platforms

* Inform users if they need to install pyyaml

* Fix old workflow name

* Skip linux_native on Darwin
2024-05-02 06:36:24 -07:00
thinkyhead b5307aaaad [cron] Bump distribution date (2024-05-02) 2024-05-02 00:21:16 +00:00
Andrew f5cf667c95 🎨 Clarify some string parameters (#26949)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-05-01 15:08:15 -05:00
thinkyhead 737095f852 [cron] Bump distribution date (2024-04-30) 2024-04-30 00:20:48 +00:00
Keith Bennett f56952c9e6 🔧 Assert TMC slave addresses, minor pins cleanup (#26842) 2024-04-28 22:17:02 -07:00
Keith Bennett ca5a7be5e8 🔧 More suppressible warnings (#27009)
* 🔧 Suppressible LCD contrast warning

* 🔧 Suppressible Z_SAFE_HOMING warning

* 🔧 Suppressible user feedback warning
2024-04-28 18:15:07 -07:00
thinkyhead 582c5a36d7 [cron] Bump distribution date (2024-04-29) 2024-04-29 00:21:47 +00:00
Chris a8058729cc 🩹Free debug pins in HC32 HAL (#26985)
implements DISABLE_DEBUG and DISABLE_JTAG in HAL
2024-04-28 15:59:28 -07:00
Keith Bennett a2f024ffe3 🔧 Rework MKS Monster8 pins (#26988) 2024-04-28 15:53:48 -07:00
thinkyhead e1d65cc5e0 [cron] Bump distribution date (2024-04-28) 2024-04-28 00:23:55 +00:00
ellensp 75cda8d191 📝Update comments to match board labeling (#27016) 2024-04-27 13:13:00 -07:00
thinkyhead af8dcc6ee8 [cron] Bump distribution date (2024-04-25) 2024-04-25 00:29:51 +00:00
Scott Lahteine 2270bf41d7 🩹 IA-Creality minor cleanup 2024-04-24 18:09:32 -05:00
Scott Lahteine 489ef6e5e1 🩹 Simple IA-Creality babystep patch
See https://github.com/MarlinFirmware/Marlin/issues/26896#issuecomment-2015630458

Co-Authored-By: ellensp <530024+ellensp@users.noreply.github.com>
2024-04-24 17:58:51 -05:00
InsanityAutomation cecc745844 🚸 Fix duplicate temperature report (#26952) 2024-04-24 17:51:08 -05:00
thinkyhead 5366362e47 [cron] Bump distribution date (2024-04-24) 2024-04-24 00:46:36 +00:00
ellensp a1ecea60fd ✏️ MPCTEMP_START => MPC_STARTED (#27002) 2024-04-23 19:35:11 -05:00
Keith Bennett 882421a03e 🔧 BIQU MicroProbe V2 pull-up warning (#27008) 2024-04-23 19:19:02 -05:00
Jason Smith a36f72e886 🎨 Format pins which fail validation (#27007) 2024-04-23 14:19:14 -07:00
Jason Smith 247e989377 CI - Validate Pins Formatting (#26996) 2024-04-22 21:10:35 -05:00
thinkyhead 91ae676b9b [cron] Bump distribution date (2024-04-23) 2024-04-23 00:21:36 +00:00
Scott Lahteine a955e06259 🎨 Clean up after recent PRs 2024-04-22 18:59:18 -05:00
thinkyhead 31683ce35b [cron] Bump distribution date (2024-04-22) 2024-04-22 00:22:27 +00:00
Jason Smith d773570cd6 🐛 Fix Flags<N> data storage width (#26995)
* Fix Flags and associated unit tests
2024-04-21 00:24:57 -07:00
Jason Smith 556da2b3fc Add additional unit tests for types.h (#26994)
* Add more XYval (and similar) unit tests

* Add  Flags tests, with multiple BUGs identified
2024-04-20 23:59:43 -07:00
Jason Smith 9e19a6efe1 Unit test improvements (#26993)
- Reset config.ini in restore_configs
- Allow running a single configuration of unit tests locally
2024-04-20 23:40:26 -07:00
InsanityAutomation f433b2c433 🔧 Add RAMPS TMC SPI pins when !TMC_USE_SW_SPI (#26960)
* Allows RAMPS to auto assign HW SPI Pins for TMC
2024-04-20 18:27:56 -07:00
Aron List bc0d7d7140 🐛 Fix PID upon entering PID_FUNCTIONAL_RANGE (#26926)
The PID algorithm did not cache the last seen temperature until it entered the PID_FUNCTIONAL_RANGE. This caused an incorrect output power to be calculated temporarily while the algorithm caught up.

This has likely always been a problem for bed and chamber PID. For the hotend this error was introduced in refactoring in commit 54e7b933cd.
2024-04-20 18:18:49 -07:00
thinkyhead 24f8831021 [cron] Bump distribution date (2024-04-21) 2024-04-21 00:23:15 +00:00
Jason Smith 9a8fb80eed 🎨Match unit test folder structure to code (#26990) 2024-04-20 17:00:07 -07:00
Jason Smith ca12459b9c Skip compile tests when editing unit tests (#26991) 2024-04-20 15:55:30 -07:00
InsanityAutomation e1ab911c35 📝Improve Freeze Feature comment (#26959)
* Fix and Improve Freeze Feature comment
2024-04-20 14:58:13 -07:00
ellensp 58d4494365 add ui_api.h include (#26977) 2024-04-20 14:48:31 -07:00
ellensp d502e5beaa 🐛 Fix auto-assignment errors for J and U axis (#26979) 2024-04-20 14:46:48 -07:00
Chris b4a95db7da 🚨Fix buffer overrun warning in UBL (#26984)
to account for null terminator
2024-04-20 14:43:31 -07:00
thinkyhead 02ba6f9f3a [cron] Bump distribution date (2024-04-19) 2024-04-19 00:21:25 +00:00
Andrew dba0010607 🎨 Rename some G-code files (#26981) 2024-04-18 18:04:03 -05:00
I3DBeeTech 90667f6114 🐛 Fix BLACKBEEZMINI fan, info (#26983) 2024-04-18 15:54:17 -05:00
thinkyhead d6961b2626 [cron] Bump distribution date (2024-04-17) 2024-04-17 06:06:51 +00:00
Javlon Sodikov 07ebb8171f 🩹Fix ProUI error when !CASELIGHT_USES_BRIGHTNESS (#26976)
* Fix the compile error with the case light menu

Fix the compile error with the case light menu

* Add failing test

---------

Co-authored-by: Jason Smith <jason.inet@gmail.com>
2024-04-16 22:25:22 -07:00
thinkyhead 245db73929 [cron] Bump distribution date (2024-04-16) 2024-04-16 18:06:16 +00:00
Scott Lahteine 9342dae8f0 📝 Remove dead PDF links 2024-04-16 12:18:26 -05:00
thinkyhead 1f84f50fd8 [cron] Bump distribution date (2024-04-15) 2024-04-15 02:38:10 +00:00
Scott Lahteine 3326c749f8 📝 Minor README changes 2024-04-14 16:36:56 -05:00
Scott Lahteine 0269106066 🎨 Dagoma D6 followup 2024-04-14 16:24:51 -05:00
Sophist 95d38a8e54 Add Dagoma D6 as found in DiscoUltimate v2 TMC (#26874)
* Add Dagoma D6 board as used in their DiscoUltimate v2 TMC.

Taken from the Dagoma fork of Marlin DU_MC branch where it is called FYSETC_DAGOMA_F5 and explicitly confirmed by Dagoma as being the D6:

"the BOARD_FYSETC_DAGOMA_F5 is effectively the definition for the D6"

---------

Co-authored-by: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com>
Co-authored-by: Orel <37673727+0r31@users.noreply.github.com>
2024-04-14 13:04:52 -07:00
Chris dca6afc26e 🐛 HC32 - Add SERIAL_DMA, fix SDIO and MEATPACK (#26845)
* fix meatpack on hc32

* add support for SERIAL_DMA on HC32

* add additional checks in HC32 HAL

* migrate HC32 HAL to use app_config.h

* fix memory leak in HC32 sdio HAL
https://github.com/MarlinFirmware/Marlin/pull/26845#issuecomment-1980218771

* hc32: fail if both EMERGENCY_PARSER and SERIAL_DMA are enabled
2024-04-14 11:42:57 -07:00
Jason Smith 19684f23bc Add unit tests for macros.h (#26968) 2024-04-13 17:49:08 -07:00
Keith Bennett 52a561399e ️ Revert unintended README changes (#26967)
* Revert all the changes that went in with the unit test framework
This restored broken links and other changes. Restoring to the prior revision seems the most appropriate action until the intentions of those file changes are known.
---------

Co-authored-by: Jason Smith <jason.inet@gmail.com>
2024-04-13 17:47:16 -07:00
thinkyhead 0683e8a9a3 [cron] Bump distribution date (2024-04-14) 2024-04-14 00:24:15 +00:00
Jason Smith 1bb4a042e2 Unit test improvements (#26965)
* Do not warn about display in unit tests

* Treat warnings as errors in unit tests

* Report actual filenames with unit tests
2024-04-13 14:11:51 -07:00
Jason Smith d10861e478 Add unit testing framework (#26948)
- Add a framework to build and execute unit tests for Marlin.
- Enable unit test execution as part of PR checks.

---------

Co-authored-by: Costas Basdekis <costas.basdekis@gmail.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-04-13 12:06:08 -07:00
Andrew cf7c86d581 🔧Fix M936 in features.ini (#26957) 2024-04-13 11:59:59 -07:00
David Buezas d99e150097 ️Reduce DISPLAY_SLEEP_MINUTES overhead (#26964) 2024-04-13 09:54:25 -07:00
thinkyhead 9e88eb6100 [cron] Bump distribution date (2024-04-13) 2024-04-13 12:06:36 +00:00
Vovodroid 71d9a3e1df 🩹 Fix M413 report (#26846) 2024-04-13 00:04:34 -07:00
InsanityAutomation 6575dcc803 🩹 Reduce Kill Pin Wait (#26945)
Reduce kill pin wait time, and allow override by setting KILL_DELAY
2024-04-12 23:40:59 -07:00
InsanityAutomation 2715e5ba1b 🐛Fix IDEX X2 Direction (#26958)
* Fix IDEX X2 Direction

* Sanity Check IDEX X1_MAX_POS
2024-04-12 23:29:59 -07:00
thinkyhead 9a570b23a3 [cron] Bump distribution date (2024-04-11) 2024-04-11 12:07:54 +00:00
Andrew 1b091ecb87 ✏️Minor style and typo fixups (#26947)
* tweaks from PR, whitespace, wording in pause.h

* Update Marlin/src/feature/pause.h
2024-04-10 23:13:54 -07:00
thinkyhead a75a5f8b2a [cron] Bump distribution date (2024-04-10) 2024-04-10 06:13:36 +00:00
ellensp 80dd02fbdb 📝 Update RGB565 color picker url (#26951) 2024-04-09 23:02:32 -07:00
Keith Bennett e6755450df 🩹 Fix ESP3D WiFi Support (#26822) 2024-04-09 22:58:13 -07:00
ellensp 9215bf791b 🔨 MarlinSimUI updates (#26955) 2024-04-09 22:50:21 -07:00
thinkyhead 311bfc99f3 [cron] Bump distribution date (2024-04-08) 2024-04-08 00:21:49 +00: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
1087 changed files with 41094 additions and 20264 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ contact_links:
url: https://www.facebook.com/groups/1049718498464482 url: https://www.facebook.com/groups/1049718498464482
about: Please ask and answer questions here. about: Please ask and answer questions here.
- name: 🕹 Marlin on Discord - name: 🕹 Marlin on Discord
url: https://discord.gg/n5NJ59y url: https://discord.com/servers/marlin-firmware-461605380783472640
about: Join the Discord server for support and discussion. about: Join the Discord server for support and discussion.
- name: 🔗 Marlin Discussion Forum - name: 🔗 Marlin Discussion Forum
url: https://reprap.org/forum/list.php?415 url: https://reprap.org/forum/list.php?415
+1 -1
View File
@@ -43,7 +43,7 @@ We have a Message Board and a Facebook group where our knowledgable user communi
If chat is more your speed, you can join the MarlinFirmware Discord server: If chat is more your speed, you can join the MarlinFirmware Discord server:
* Use the link https://discord.gg/n5NJ59y to join up as a General User. * Use the link https://discord.com/servers/marlin-firmware-461605380783472640 to join up as a General User.
* Even though our Discord is pretty active, it may take a while for community members to respond &mdash; please be patient! * Even though our Discord is pretty active, it may take a while for community members to respond &mdash; please be patient!
* Use the `#general` channel for general questions or discussion about Marlin. * Use the `#general` channel for general questions or discussion about Marlin.
* Other channels exist for certain topics or are limited to Patrons. Check the channel list. * Other channels exist for certain topics or are limited to Patrons. Check the channel list.
-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,9 +1,9 @@
# #
# test-builds.yml # ci-build-tests.yml
# Do test builds to catch compile errors # Do test builds to catch compile errors
# #
name: CI name: CI - Build Tests
on: on:
pull_request: pull_request:
@@ -14,6 +14,8 @@ on:
- config/** - config/**
- data/** - data/**
- docs/** - docs/**
- test/**
- Marlin/tests/**
- '**/*.md' - '**/*.md'
push: push:
branches: branches:
@@ -23,21 +25,25 @@ on:
- config/** - config/**
- data/** - data/**
- docs/** - docs/**
- test/**
- Marlin/tests/**
- '**/*.md' - '**/*.md'
jobs: jobs:
test_builds: test_builds:
name: Run All Tests name: Build Test
if: github.repository == 'MarlinFirmware/Marlin' if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: true
matrix: matrix:
test-platform: test-platform:
# Native # Native
- linux_native - linux_native
- simulator_linux_release
# AVR # AVR
- mega2560 - mega2560
@@ -100,9 +106,9 @@ jobs:
# STM32F4 # STM32F4
- ARMED - ARMED
- BIGTREE_BTT002 - BTT_BTT002
- BIGTREE_GTR_V1_0 - BTT_GTR_V1_0
- BIGTREE_SKR_PRO - BTT_SKR_PRO
- FLYF407ZG - FLYF407ZG
- FYSETC_S6 - FYSETC_S6
- LERDGEK - LERDGEK
@@ -152,7 +158,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 +166,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'
@@ -177,6 +183,13 @@ jobs:
pio upgrade --dev pio upgrade --dev
pio pkg update --global pio pkg update --global
- name: Install Simulator dependencies
run: |
sudo apt-get install build-essential
sudo apt-get install libsdl2-dev
sudo apt-get install libsdl2-net-dev
sudo apt-get install libglm-dev
- name: Run ${{ matrix.test-platform }} Tests - name: Run ${{ matrix.test-platform }} Tests
run: | run: |
make tests-single-ci TEST_TARGET=${{ matrix.test-platform }} make tests-single-ci TEST_TARGET=${{ matrix.test-platform }}
+73
View File
@@ -0,0 +1,73 @@
#
# ci-unit-tests.yml
# Build and execute unit tests to catch functional issues in code
#
name: CI - Unit Tests
on:
pull_request:
branches:
- bugfix-2.1.x
# Cannot be enabled on 2.1.x until it contains the unit test framework
#- 2.1.x
paths-ignore:
- config/**
- data/**
- docs/**
- '**/*.md'
push:
branches:
- bugfix-2.1.x
# Cannot be enabled on 2.1.x until it contains the unit test framework
#- 2.1.x
paths-ignore:
- config/**
- data/**
- docs/**
- '**/*.md'
jobs:
# This runs all unit tests as a single job. While it should be possible to break this up into
# multiple jobs, they currently run quickly and finish long before the compilation tests.
run_unit_tests:
name: Unit Test
# These tests will only be able to run on the bugfix-2.1.x branch, until the next release
# pulls them into additional branches.
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- name: Check out the PR
uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Select Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: 'x64'
- name: Install PlatformIO
run: |
pip install -U platformio
pio upgrade --dev
pio pkg update --global
- name: Run All Unit Tests
run: |
make unit-test-all-local
+48
View File
@@ -0,0 +1,48 @@
#
# ci-validate-boards.yml
# Validate boards.h to make sure it's all set up correctly
#
name: CI - Validate boards.h
# We can do the on: section as two items, one for pull requests and one for pushes...
on:
pull_request:
branches:
- bugfix-2.1.x
paths:
- 'Marlin/src/core/boards.h'
push:
branches:
- bugfix-2.1.x
paths:
- 'Marlin/src/core/boards.h'
jobs:
validate_pins_files:
name: Validate boards.h
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- name: Check out the PR
uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Select Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: 'x64'
- name: Validate core/boards.h
run: |
make validate-boards -j
+51
View File
@@ -0,0 +1,51 @@
#
# ci-validate-pins.yml
# Validate that all of the pins files are unchanged by pinsformat.py
#
name: CI - Validate Pins Files
on:
pull_request:
branches:
- bugfix-2.1.x
# Cannot be enabled on 2.1.x until it contains the unit test framework
#- 2.1.x
paths:
- 'Marlin/src/pins/*/**'
push:
branches:
- bugfix-2.1.x
# Cannot be enabled on 2.1.x until it contains the unit test framework
#- 2.1.x
paths:
- 'Marlin/src/pins/*/**'
jobs:
validate_pins_files:
name: Validate Pins Files
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- name: Check out the PR
uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Select Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: 'x64'
- name: Validate all pins files
run: |
make validate-pins -j
+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.
+1
View File
@@ -125,6 +125,7 @@ vc-fileutils.settings
# Visual Studio Code # Visual Studio Code
.vscode/* .vscode/*
!.vscode/extensions.json !.vscode/extensions.json
*.code-workspace
# Simulation files # Simulation files
imgui.ini imgui.ini
+16
View File
@@ -0,0 +1,16 @@
/**
* Marlin-specific settings for Zed
*
* For a full list of overridable settings, and general information on folder-specific settings,
* see the documentation: https://zed.dev/docs/configuring-zed#settings-files
*/
{
"languages": {
"C": {
"enable_language_server": false
},
"C++": {
"enable_language_server": false
}
}
}
+56 -8
View File
@@ -2,17 +2,24 @@ SCRIPTS_DIR := buildroot/share/scripts
CONTAINER_RT_BIN := docker CONTAINER_RT_BIN := docker
CONTAINER_RT_OPTS := --rm -v $(PWD):/code -v platformio-cache:/root/.platformio CONTAINER_RT_OPTS := --rm -v $(PWD):/code -v platformio-cache:/root/.platformio
CONTAINER_IMAGE := marlin-dev CONTAINER_IMAGE := marlin-dev
UNIT_TEST_CONFIG ?= default
help: help:
@echo "Tasks for local development:" @echo "Tasks for local development:"
@echo "make marlin : Build marlin for the configured board" @echo "make marlin : Build Marlin for the configured board"
@echo "make format-pins : Reformat all pins files" @echo "make format-pins -j : Reformat all pins files (-j for parallel execution)"
@echo "make validate-pins -j : Validate all pins files, fails if any require reformatting"
@echo "make validate-boards -j : Validate boards.h and pins.h for standards compliance"
@echo "make tests-single-ci : Run a single test from inside the CI" @echo "make tests-single-ci : Run a single test from inside the CI"
@echo "make tests-single-local : Run a single test locally" @echo "make tests-single-local : Run a single test locally"
@echo "make tests-single-local-docker : Run a single test locally, using docker" @echo "make tests-single-local-docker : Run a single test locally, using docker"
@echo "make tests-all-local : Run all tests locally" @echo "make tests-all-local : Run all tests locally"
@echo "make tests-all-local-docker : Run all tests locally, using docker" @echo "make tests-all-local-docker : Run all tests locally, using docker"
@echo "make setup-local-docker : Build the local docker image" @echo "make unit-test-single-local : Run unit tests for a single config locally"
@echo "make unit-test-single-local-docker : Run unit tests for a single config locally, using docker"
@echo "make unit-test-all-local : Run all code tests locally"
@echo "make unit-test-all-local-docker : Run all code tests locally, using docker"
@echo "make setup-local-docker : Setup local docker using buildx"
@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"
@@ -22,6 +29,9 @@ help:
@echo " run on GitHub CI" @echo " run on GitHub CI"
@echo " ONLY_TEST Limit tests to only those that contain this, or" @echo " ONLY_TEST Limit tests to only those that contain this, or"
@echo " the index of the test (1-based)" @echo " the index of the test (1-based)"
@echo " UNIT_TEST_CONFIG Set the name of the config from the test folder, without"
@echo " the leading number. Default is 'default'". Used with the
@echo " unit-test-single-* tasks"
@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!"
@@ -43,23 +53,61 @@ 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)"
tests-all-local: tests-all-local:
@python -c "import yaml" 2>/dev/null || (echo 'pyyaml module is not installed. Install it with "python -m pip install pyyaml"' && exit 1)
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 $$(python $(SCRIPTS_DIR)/get_test_targets.py) ; do \
if [ "$$TEST_TARGET" = "linux_native" ] && [ "$$(uname)" = "Darwin" ]; then \
echo "Skipping tests for $$TEST_TARGET on macOS" ; \
continue ; \
fi ; \
echo "Running tests for $$TEST_TARGET" ; \
run_tests . $$TEST_TARGET || exit 1 ; \
sleep 5; \
done
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)
unit-test-single-local:
platformio run -t marlin_$(UNIT_TEST_CONFIG) -e linux_native_test
unit-test-single-local-docker:
@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 unit-test-single-local UNIT_TEST_CONFIG=$(UNIT_TEST_CONFIG)
unit-test-all-local:
platformio run -t test-marlin -e linux_native_test
unit-test-all-local-docker:
@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 unit-test-all-local
setup-local-docker: setup-local-docker:
$(CONTAINER_RT_BIN) build -t $(CONTAINER_IMAGE) -f docker/Dockerfile . $(CONTAINER_RT_BIN) buildx build -t $(CONTAINER_IMAGE) -f docker/Dockerfile .
PINS := $(shell find Marlin/src/pins -mindepth 2 -name '*.h') PINS := $(shell find Marlin/src/pins -mindepth 2 -name '*.h')
.PHONY: $(PINS) format-pins validate-pins
$(PINS): %: $(PINS): %:
@echo "Formatting $@" && node $(SCRIPTS_DIR)/pinsformat.js $@ @echo "Formatting $@"
@python $(SCRIPTS_DIR)/pinsformat.py $< $@
format-pins: $(PINS) format-pins: $(PINS)
validate-pins: format-pins
@echo "Validating pins files"
@git diff --exit-code || (git status && echo "\nError: Pins files are not formatted correctly. Run \"make format-pins\" to fix.\n" && exit 1)
BOARDS_FILE := Marlin/src/core/boards.h
.PHONY: validate-boards
validate-boards:
@echo "Validating boards.h file"
@python $(SCRIPTS_DIR)/validate_boards.py $(BOARDS_FILE) || (echo "\nError: boards.h file is not valid. Please check and correct it.\n" && exit 1)
+123 -53
View File
@@ -50,7 +50,7 @@
* *
* Calibration Guides: https://reprap.org/wiki/Calibration * Calibration Guides: https://reprap.org/wiki/Calibration
* https://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide * https://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
* https://web.archive.org/web/20220907014303/https://sites.google.com/site/repraplogphase/calibration-of-your-reprap * https://web.archive.org/web/20220907014303/sites.google.com/site/repraplogphase/calibration-of-your-reprap
* https://youtu.be/wAL9d7FgInk * https://youtu.be/wAL9d7FgInk
* https://teachingtechyt.github.io/calibration.html * https://teachingtechyt.github.io/calibration.html
* *
@@ -61,7 +61,7 @@
// @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 "(none, default config)" // Who made the changes. #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Original author or contributor.
//#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
@@ -77,7 +77,7 @@
* Serial port -1 is the USB emulated serial port, if available. * Serial port -1 is the USB emulated serial port, if available.
* Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader. * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
* *
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7] * :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
*/ */
#define SERIAL_PORT 0 #define SERIAL_PORT 0
@@ -99,19 +99,29 @@
/** /**
* Select a secondary serial port on the board to use for communication with the host. * Select a secondary serial port on the board to use for communication with the host.
* 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, 8, 9]
*/ */
//#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
/** /**
* Select a third serial port on the board to use for communication with the host. * Select a third serial port on the board to use for communication with the host.
* Currently only supported for AVR, DUE, LPC1768/9 and STM32/STM32F1 * Currently supported for AVR, DUE, SAMD51, LPC1768/9, STM32/STM32F1/HC32, and Teensy 4.x
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7] * :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
*/ */
//#define SERIAL_PORT_3 1 //#define SERIAL_PORT_3 1
//#define BAUDRATE_3 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE //#define BAUDRATE_3 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
/**
* Select a serial port to communicate with RS485 protocol
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
*/
//#define RS485_SERIAL_PORT 1
#ifdef RS485_SERIAL_PORT
//#define M485_PROTOCOL 1 // Check your host for protocol compatibility
//#define RS485_BUS_BUFFER_SIZE 128
#endif
// Enable the Bluetooth serial interface on AT90USB devices // Enable the Bluetooth serial interface on AT90USB devices
//#define BLUETOOTH //#define BLUETOOTH
@@ -135,9 +145,9 @@
* 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 A4988 #define X_DRIVER_TYPE A4988
#define Y_DRIVER_TYPE A4988 #define Y_DRIVER_TYPE A4988
@@ -375,14 +385,15 @@
* PRUSA_MMU1 : Průša MMU1 (The "multiplexer" version) * PRUSA_MMU1 : Průša MMU1 (The "multiplexer" version)
* PRUSA_MMU2 : Průša MMU2 * PRUSA_MMU2 : Průša MMU2
* PRUSA_MMU2S : Průša MMU2S (Requires MK3S extruder with motion sensor, EXTRUDERS = 5) * PRUSA_MMU2S : Průša MMU2S (Requires MK3S extruder with motion sensor, EXTRUDERS = 5)
* PRUSA_MMU3 : Průša MMU3 (Requires MK3S extruder with motion sensor and MMU firmware version 3.x.x, EXTRUDERS = 5)
* EXTENDABLE_EMU_MMU2 : MMU with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware) * EXTENDABLE_EMU_MMU2 : MMU with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware)
* EXTENDABLE_EMU_MMU2S : MMUS with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware) * EXTENDABLE_EMU_MMU2S : MMUS with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware)
* *
* Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails. * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
* See additional options in Configuration_adv.h. * See additional options in Configuration_adv.h.
* :["PRUSA_MMU1", "PRUSA_MMU2", "PRUSA_MMU2S", "EXTENDABLE_EMU_MMU2", "EXTENDABLE_EMU_MMU2S"] * :["PRUSA_MMU1", "PRUSA_MMU2", "PRUSA_MMU2S", "PRUSA_MMU3", "EXTENDABLE_EMU_MMU2", "EXTENDABLE_EMU_MMU2S"]
*/ */
//#define MMU_MODEL PRUSA_MMU2 //#define MMU_MODEL PRUSA_MMU3
// @section psu control // @section psu control
@@ -405,6 +416,15 @@
//#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
@@ -663,7 +683,7 @@
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune) * MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/ */
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning #define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
//#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html //#define MPCTEMP // See https://marlinfw.org/docs/features/model_predictive_control.html
#define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop #define PID_K1 0.95 // Smoothing factor within any PID loop
@@ -698,6 +718,9 @@
*/ */
#if ENABLED(MPCTEMP) #if ENABLED(MPCTEMP)
#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash) #define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
#if ENABLED(MPC_AUTOTUNE)
//#define MPC_AUTOTUNE_DEBUG // Enable MPC debug logging (~870 bytes of flash)
#endif
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
@@ -779,6 +802,40 @@
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target //#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
#endif #endif
/**
* Peltier Bed - Heating and Cooling
*
* A Peltier device transfers heat from one side to the other in proportion to the amount of
* current flowing through the device and the direction of current flow. So the same device
* can both heat and cool.
*
* When "cooling" in addition to rejecting the heat transferred from the hot side to the cold
* side, the dissipated power (voltage * current) must also be rejected. Be sure to set up a
* fan that can be powered in sync with the Peltier unit.
*
* This feature is only set up to run in bang-bang mode because Peltiers don't handle PWM
* well without filter circuitry.
*
* Since existing 3D printers are made to handle relatively high current for the heated bed,
* we can use the heated bed power pins to control the Peltier power using the same G-codes
* as the heated bed (M140, M190, etc.).
*
* A second GPIO pin is required to control current direction.
* Two configurations are possible: Relay and H-Bridge
*
* (At this time only relay is supported. H-bridge requires 4 MOS switches configured in H-Bridge.)
*
* Power is handled by the bang-bang control loop: 0 or 255.
* Cooling applications are more common than heating, so the pin states are commonly:
* LOW = Heating = Relay Energized
* HIGH = Cooling = Relay in "Normal" state
*/
//#define PELTIER_BED
#if ENABLED(PELTIER_BED)
#define PELTIER_DIR_PIN -1 // Relay control pin for Peltier
#define PELTIER_DIR_HEAT_STATE LOW // The relay pin state that causes the Peltier to heat
#endif
// Add 'M190 R T' for more gradual M190 R bed cooling. // Add 'M190 R T' for more gradual M190 R bed cooling.
//#define BED_ANNEALING_GCODE //#define BED_ANNEALING_GCODE
@@ -827,6 +884,8 @@
// FIND YOUR OWN: "M303 E-2 C8 S50" to run autotune on the chamber at 50 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-2 C8 S50" to run autotune on the chamber at 50 degreesC for 8 cycles.
#endif // PIDTEMPCHAMBER #endif // PIDTEMPCHAMBER
// @section pid temp
#if ANY(PIDTEMP, PIDTEMPBED, PIDTEMPCHAMBER) #if ANY(PIDTEMP, PIDTEMPBED, PIDTEMPCHAMBER)
//#define PID_OPENLOOP // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX //#define PID_OPENLOOP // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -1006,9 +1065,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
@@ -1030,8 +1086,8 @@
#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)
@@ -1040,10 +1096,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)
// 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
@@ -1452,7 +1504,8 @@
* A lightweight, solenoid-driven probe. * A lightweight, solenoid-driven probe.
* For information about this sensor https://github.com/bigtreetech/MicroProbe * For information about this sensor https://github.com/bigtreetech/MicroProbe
* *
* Also requires: PROBE_ENABLE_DISABLE * Also requires PROBE_ENABLE_DISABLE
* With FT_MOTION requires ENDSTOP_INTERRUPTS_FEATURE
*/ */
//#define BIQU_MICROPROBE_V1 // Triggers HIGH //#define BIQU_MICROPROBE_V1 // Triggers HIGH
//#define BIQU_MICROPROBE_V2 // Triggers LOW //#define BIQU_MICROPROBE_V2 // Triggers LOW
@@ -1591,7 +1644,8 @@
// with NOZZLE_AS_PROBE this can be negative for a wider probing area. // with NOZZLE_AS_PROBE this can be negative for a wider probing area.
#define PROBING_MARGIN 10 #define PROBING_MARGIN 10
// X and Y axis travel speed (mm/min) between probes // X and Y axis travel speed (mm/min) between probes.
// Leave undefined to use the average of the current XY homing feedrate.
#define XY_PROBE_FEEDRATE (133*60) #define XY_PROBE_FEEDRATE (133*60)
// Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2) // Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2)
@@ -1622,6 +1676,7 @@
#define PROBE_TARE_DELAY 200 // (ms) Delay after tare before #define PROBE_TARE_DELAY 200 // (ms) Delay after tare before
#define PROBE_TARE_STATE HIGH // State to write pin for tare #define PROBE_TARE_STATE HIGH // State to write pin for tare
//#define PROBE_TARE_PIN PA5 // Override default pin //#define PROBE_TARE_PIN PA5 // Override default pin
//#define PROBE_TARE_MENU // Display a menu item to tare the probe
#if ENABLED(PROBE_ACTIVATION_SWITCH) #if ENABLED(PROBE_ACTIVATION_SWITCH)
//#define PROBE_TARE_ONLY_WHILE_INACTIVE // Fail to tare/probe if PROBE_ACTIVATION_SWITCH is active //#define PROBE_TARE_ONLY_WHILE_INACTIVE // Fail to tare/probe if PROBE_ACTIVATION_SWITCH is active
#endif #endif
@@ -1659,8 +1714,8 @@
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD. * probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
* Only integer values >= 1 are valid here. * Only integer values >= 1 are valid here.
* *
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle. * Example: 'M851 Z-5' with a CLEARANCE of 4 => 9mm from bed to nozzle.
* But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle. * But: 'M851 Z+1' with a CLEARANCE of 2 => 2mm from bed to nozzle.
*/ */
#define Z_CLEARANCE_DEPLOY_PROBE 10 // (mm) Z Clearance for Deploy/Stow #define Z_CLEARANCE_DEPLOY_PROBE 10 // (mm) Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // (mm) Z Clearance between probe points #define Z_CLEARANCE_BETWEEN_PROBES 5 // (mm) Z Clearance between probe points
@@ -1711,6 +1766,8 @@
#define PROBING_BED_TEMP 50 #define PROBING_BED_TEMP 50
#endif #endif
// @section stepper drivers
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
// :{ 0:'Low', 1:'High' } // :{ 0:'Low', 1:'High' }
#define X_ENABLE_ON 0 #define X_ENABLE_ON 0
@@ -1884,6 +1941,8 @@
#endif #endif
/** /**
* @section filament runout sensors
*
* Filament Runout Sensors * Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament. * Mechanical or opto endstops are used to check for the presence of filament.
* *
@@ -2216,7 +2275,7 @@
#if ENABLED(LCD_BED_TRAMMING) #if ENABLED(LCD_BED_TRAMMING)
#define BED_TRAMMING_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets #define BED_TRAMMING_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets
#define BED_TRAMMING_HEIGHT 0.0 // (mm) Z height of nozzle at tramming points #define BED_TRAMMING_HEIGHT 0.0 // (mm) Z height of nozzle at tramming points
#define BED_TRAMMING_Z_HOP 4.0 // (mm) Z height of nozzle between tramming points #define BED_TRAMMING_Z_HOP 4.0 // (mm) Z raise between tramming points
//#define BED_TRAMMING_INCLUDE_CENTER // Move to the center after the last corner //#define BED_TRAMMING_INCLUDE_CENTER // Move to the center after the last corner
//#define BED_TRAMMING_USE_PROBE //#define BED_TRAMMING_USE_PROBE
#if ENABLED(BED_TRAMMING_USE_PROBE) #if ENABLED(BED_TRAMMING_USE_PROBE)
@@ -2280,6 +2339,9 @@
// Homing speeds (linear=mm/min, rotational=°/min) // Homing speeds (linear=mm/min, rotational=°/min)
#define HOMING_FEEDRATE_MM_M { (50*60), (50*60), (4*60) } #define HOMING_FEEDRATE_MM_M { (50*60), (50*60), (4*60) }
// Edit homing feedrates with M210 and MarlinUI menu items
//#define EDITABLE_HOMING_FEEDRATE
// Validate that endstops are triggered on homing moves // Validate that endstops are triggered on homing moves
#define VALIDATE_HOMING_ENDSTOPS #define VALIDATE_HOMING_ENDSTOPS
@@ -2406,9 +2468,9 @@
#define PREHEAT_2_TEMP_CHAMBER 35 #define PREHEAT_2_TEMP_CHAMBER 35
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 #define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
// @section motion
/** /**
* @section nozzle park
*
* Nozzle Park * Nozzle Park
* *
* Park the nozzle at the given XYZ position on idle or G27. * Park the nozzle at the given XYZ position on idle or G27.
@@ -2431,6 +2493,8 @@
#endif #endif
/** /**
* @section nozzle clean
*
* Clean Nozzle Feature * Clean Nozzle Feature
* *
* Adds the G12 command to perform a nozzle cleaning process. * Adds the G12 command to perform a nozzle cleaning process.
@@ -2591,9 +2655,24 @@
//#include "Configuration_Secure.h" // External file with PASSWORD_DEFAULT_VALUE //#include "Configuration_Secure.h" // External file with PASSWORD_DEFAULT_VALUE
#endif #endif
//============================================================================= // @section media
//============================= LCD and SD support ============================
//============================================================================= /**
* SD CARD
*
* 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.
*/
//#define SDSUPPORT
/**
* SD CARD: ENABLE CRC
*
* Use CRC checks and retries on the SD communication.
*/
#if ENABLED(SDSUPPORT)
//#define SD_CHECK_AND_RETRY
#endif
// @section interface // @section interface
@@ -2634,27 +2713,12 @@
#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
/**
* SD CARD
*
* 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.
*/
//#define SDSUPPORT
/**
* SD CARD: ENABLE CRC
*
* Use CRC checks and retries on the SD communication.
*/
//#define SD_CHECK_AND_RETRY
/** /**
* LCD Menu Items * LCD Menu Items
* *
@@ -2783,7 +2847,7 @@
// //
// Original RADDS LCD Display+Encoder+SDCardReader // Original RADDS LCD Display+Encoder+SDCardReader
// https://web.archive.org/web/20200719145306/http://doku.radds.org/dokumentation/lcd-display/ // https://web.archive.org/web/20200719145306/doku.radds.org/dokumentation/lcd-display/
// //
//#define RADDS_DISPLAY //#define RADDS_DISPLAY
@@ -2849,7 +2913,7 @@
// //
// Elefu RA Board Control Panel // Elefu RA Board Control Panel
// https://web.archive.org/web/20140823033947/http://www.elefu.com/index.php?route=product/product&product_id=53 // https://web.archive.org/web/20140823033947/www.elefu.com/index.php?route=product/product&product_id=53
// //
//#define RA_CONTROL_PANEL //#define RA_CONTROL_PANEL
@@ -2981,7 +3045,7 @@
// //
// Cartesio UI // Cartesio UI
// https://web.archive.org/web/20180605050442/http://mauk.cc/webshop/cartesio-shop/electronics/user-interface // https://web.archive.org/web/20180605050442/mauk.cc/webshop/cartesio-shop/electronics/user-interface
// //
//#define CARTESIO_UI //#define CARTESIO_UI
@@ -3218,6 +3282,11 @@
// //
//#define ANYCUBIC_LCD_VYPER //#define ANYCUBIC_LCD_VYPER
//
// Sovol SV-06 Resistive Touch Screen
//
//#define SOVOL_SV06_RTS
// //
// 320x240 Nextion 2.8" serial TFT Resistive Touch Screen NX3224T028 // 320x240 Nextion 2.8" serial TFT Resistive Touch Screen NX3224T028
// //
@@ -3413,8 +3482,9 @@
#define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens #define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens
#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 #if ANY(TFT_CLASSIC_UI, TFT_COLOR_UI)
//#define TOUCH_IDLE_SLEEP_MINS 5 // (minutes) Display Sleep after a period of inactivity. Set with M255 S. //#define NO_BACK_MENU_ITEM // Don't display a top menu item to go back to the parent menu
#endif
#define TOUCH_SCREEN_CALIBRATION #define TOUCH_SCREEN_CALIBRATION
+244 -117
View File
@@ -47,8 +47,9 @@
* 2 = config.ini - File format for PlatformIO preprocessing. * 2 = config.ini - File format for PlatformIO preprocessing.
* 3 = schema.json - The entire configuration schema. (13 = pattern groups) * 3 = schema.json - The entire configuration schema. (13 = pattern groups)
* 4 = schema.yml - The entire configuration schema. * 4 = schema.yml - The entire configuration schema.
* 5 = Config.h - Minimal configuration by popular demand.
*/ */
//#define CONFIG_EXPORT 2 // :[1:'JSON', 2:'config.ini', 3:'schema.json', 4:'schema.yml'] //#define CONFIG_EXPORT 105 // :[1:'JSON', 2:'config.ini', 3:'schema.json', 4:'schema.yml', 5:'Config.h']
//=========================================================================== //===========================================================================
//============================= Thermal Settings ============================ //============================= Thermal Settings ============================
@@ -202,7 +203,7 @@
// //
#if DISABLED(PIDTEMPBED) #if DISABLED(PIDTEMPBED)
#define BED_CHECK_INTERVAL 5000 // (ms) Interval between checks in bang-bang control #define BED_CHECK_INTERVAL 5000 // (ms) Interval between checks in bang-bang control
#if ENABLED(BED_LIMIT_SWITCHING) #if ANY(BED_LIMIT_SWITCHING, PELTIER_BED)
#define BED_HYSTERESIS 2 // (°C) Only set the relevant heater state when ABS(T-target) > BED_HYSTERESIS #define BED_HYSTERESIS 2 // (°C) Only set the relevant heater state when ABS(T-target) > BED_HYSTERESIS
#endif #endif
#endif #endif
@@ -303,7 +304,7 @@
* If you get false positives for "Thermal Runaway", increase * If you get false positives for "Thermal Runaway", increase
* THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
*/ */
#if ENABLED(THERMAL_PROTECTION_HOTENDS) #if ALL(HAS_HOTEND, THERMAL_PROTECTION_HOTENDS)
#define THERMAL_PROTECTION_PERIOD 40 // (seconds) #define THERMAL_PROTECTION_PERIOD 40 // (seconds)
#define THERMAL_PROTECTION_HYSTERESIS 4 // (°C) #define THERMAL_PROTECTION_HYSTERESIS 4 // (°C)
@@ -334,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 TEMP_SENSOR_BED && ENABLED(THERMAL_PROTECTION_BED)
#define THERMAL_PROTECTION_BED_PERIOD 20 // (seconds) #define THERMAL_PROTECTION_BED_PERIOD 20 // (seconds)
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // (°C) #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // (°C)
@@ -348,7 +349,7 @@
/** /**
* Thermal Protection parameters for the heated chamber. * Thermal Protection parameters for the heated chamber.
*/ */
#if ENABLED(THERMAL_PROTECTION_CHAMBER) #if TEMP_SENSOR_CHAMBER && ENABLED(THERMAL_PROTECTION_CHAMBER)
#define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // (seconds) #define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // (seconds)
#define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // (°C) #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // (°C)
@@ -362,7 +363,7 @@
/** /**
* Thermal Protection parameters for the laser cooler. * Thermal Protection parameters for the laser cooler.
*/ */
#if ENABLED(THERMAL_PROTECTION_COOLER) #if TEMP_SENSOR_COOLER && ENABLED(THERMAL_PROTECTION_COOLER)
#define THERMAL_PROTECTION_COOLER_PERIOD 10 // (seconds) #define THERMAL_PROTECTION_COOLER_PERIOD 10 // (seconds)
#define THERMAL_PROTECTION_COOLER_HYSTERESIS 3 // (°C) #define THERMAL_PROTECTION_COOLER_HYSTERESIS 3 // (°C)
@@ -590,6 +591,8 @@
// Use TEMP_SENSOR_SOC as a trigger for enabling the controller fan // Use TEMP_SENSOR_SOC as a trigger for enabling the controller fan
//#define CONTROLLER_FAN_MIN_SOC_TEMP 40 // (°C) Turn on the fan if the SoC reaches this temperature //#define CONTROLLER_FAN_MIN_SOC_TEMP 40 // (°C) Turn on the fan if the SoC reaches this temperature
#define CONTROLLER_FAN_BED_HEATING // Turn on the fan when heating the bed
//#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings //#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings
#if ENABLED(CONTROLLER_FAN_EDITABLE) #if ENABLED(CONTROLLER_FAN_EDITABLE)
#define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu #define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu
@@ -604,6 +607,8 @@
*/ */
//#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
//#define FAN_KICKSTART_LINEAR // Set kickstart time linearly based on the speed, e.g., for 20% (51) it will be FAN_KICKSTART_TIME * 0.2.
// Useful for quick speed up to low speed. Kickstart power must be set to 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
@@ -1079,9 +1084,11 @@
#define HOME_AFTER_G34 #define HOME_AFTER_G34
#endif #endif
// /**
// Add the G35 command to read bed corners to help adjust screws. Requires a bed probe. * Assisted Tramming
// *
* Add the G35 command to measure bed corners and help adjust screws. Requires a bed probe.
*/
//#define ASSISTED_TRAMMING //#define ASSISTED_TRAMMING
#if ENABLED(ASSISTED_TRAMMING) #if ENABLED(ASSISTED_TRAMMING)
@@ -1102,29 +1109,35 @@
//#define ASSISTED_TRAMMING_WAIT_POSITION { X_CENTER, Y_CENTER, 30 } // Move the nozzle out of the way for adjustment //#define ASSISTED_TRAMMING_WAIT_POSITION { X_CENTER, Y_CENTER, 30 } // Move the nozzle out of the way for adjustment
/** /**
* Screw thread: * Screw Thread. Use one of the following defines:
* M3: 30 = Clockwise, 31 = Counter-Clockwise *
* M4: 40 = Clockwise, 41 = Counter-Clockwise * M3_CW = M3 Clockwise, M3_CCW = M3 Counter-Clockwise
* M5: 50 = Clockwise, 51 = Counter-Clockwise * M4_CW = M4 Clockwise, M4_CCW = M4 Counter-Clockwise
* M5_CW = M5 Clockwise, M5_CCW = M5 Counter-Clockwise
*
* :{'M3_CW':'M3 Clockwise','M3_CCW':'M3 Counter-Clockwise','M4_CW':'M4 Clockwise','M4_CCW':'M4 Counter-Clockwise','M5_CW':'M5 Clockwise','M5_CCW':'M5 Counter-Clockwise'}
*/ */
#define TRAMMING_SCREW_THREAD 30 #define TRAMMING_SCREW_THREAD M3_CW
#endif #endif
// @section motion control // @section motion control
/** /**
* Fixed-time-based Motion Control -- EXPERIMENTAL * Fixed-time-based Motion Control -- BETA FEATURE
* Enable/disable and set parameters with G-code M493. * Enable/disable and set parameters with G-code M493.
* See ft_types.h for named values used by FTM options.
*/ */
//#define FT_MOTION //#define FT_MOTION
#if ENABLED(FT_MOTION) #if ENABLED(FT_MOTION)
#define FTM_DEFAULT_MODE ftMotionMode_DISABLED // Default mode of fixed time control. (Enums in ft_types.h) //#define FTM_IS_DEFAULT_MOTION // Use FT Motion as the factory default?
#define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (DISABLED, Z_BASED, MASS_BASED)
#define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers #define FTM_DEFAULT_SHAPER_X ftMotionShaper_NONE // Default shaper mode on X axis (NONE, ZV, ZVD, ZVDD, ZVDDD, EI, 2HEI, 3HEI, MZV)
#define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers #define FTM_DEFAULT_SHAPER_Y ftMotionShaper_NONE // Default shaper mode on Y axis
#define FTM_SHAPING_DEFAULT_FREQ_X 37.0f // (Hz) Default peak frequency used by input shapers
#define FTM_SHAPING_DEFAULT_FREQ_Y 37.0f // (Hz) Default peak frequency used by input shapers
#define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false) #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false)
#define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. (Acceleration-based scaling factor.)
#define FTM_SHAPING_ZETA_X 0.1f // Zeta used by input shapers for X axis #define FTM_SHAPING_ZETA_X 0.1f // Zeta used by input shapers for X axis
#define FTM_SHAPING_ZETA_Y 0.1f // Zeta used by input shapers for Y axis #define FTM_SHAPING_ZETA_Y 0.1f // Zeta used by input shapers for Y axis
@@ -1147,18 +1160,13 @@
#define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (Reciprocal of FTM_TS) #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (Reciprocal of FTM_TS)
#define FTM_TS 0.001f // (s) Time step for trajectory generation. (Reciprocal of FTM_FS) #define FTM_TS 0.001f // (s) Time step for trajectory generation. (Reciprocal of FTM_FS)
// These values may be configured to adjust the duration of loop().
#define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop()
#define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop()
#if DISABLED(COREXY) #if DISABLED(COREXY)
#define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update
// Use this to adjust the time required to consume the command buffer. // Use this to adjust the time required to consume the command buffer.
// Try increasing this value if stepper motion is choppy. // Try increasing this value if stepper motion is choppy.
#define FTM_STEPPERCMD_BUFF_SIZE 3000 // Size of the stepper command buffers #define FTM_STEPPERCMD_BUFF_SIZE 3000 // Size of the stepper command buffers
// (FTM_STEPS_PER_LOOP * FTM_POINTS_PER_LOOP) is a good start
// If you run out of memory, fall back to 3000 and increase progressively
#else #else
// CoreXY motion needs a larger buffer size. These values are based on our testing. // CoreXY motion needs a larger buffer size. These values are based on our testing.
#define FTM_STEPPER_FS 30000 #define FTM_STEPPER_FS 30000
@@ -1180,38 +1188,37 @@
#endif #endif
/** /**
* Input Shaping -- EXPERIMENTAL * Input Shaping
* *
* Zero Vibration (ZV) Input Shaping for X and/or Y movements. * Zero Vibration (ZV) Input Shaping for X and/or Y movements.
* *
* This option uses a lot of SRAM for the step buffer. The buffer size is * This option uses a lot of SRAM for the step buffer. The buffer size is
* calculated automatically from SHAPING_FREQ_[XY], DEFAULT_AXIS_STEPS_PER_UNIT, * calculated automatically from SHAPING_FREQ_[XYZ], DEFAULT_AXIS_STEPS_PER_UNIT,
* DEFAULT_MAX_FEEDRATE and ADAPTIVE_STEP_SMOOTHING. The default calculation can * DEFAULT_MAX_FEEDRATE and ADAPTIVE_STEP_SMOOTHING. The default calculation can
* be overridden by setting SHAPING_MIN_FREQ and/or SHAPING_MAX_FEEDRATE. * be overridden by setting SHAPING_MIN_FREQ and/or SHAPING_MAX_FEEDRATE.
* The higher the frequency and the lower the feedrate, the smaller the buffer. * The higher the frequency and the lower the feedrate, the smaller the buffer.
* If the buffer is too small at runtime, input shaping will have reduced * If the buffer is too small at runtime, input shaping will have reduced
* effectiveness during high speed movements. * effectiveness during high speed movements.
* *
* Tune with M593 D<factor> F<frequency>: * Tune with M593 D<factor> F<frequency>
*
* D<factor> Set the zeta/damping factor. If axes (X, Y, etc.) are not specified, set for all axes.
* F<frequency> Set the frequency. If axes (X, Y, etc.) are not specified, set for all axes.
* T[map] Input Shaping type, 0:ZV, 1:EI, 2:2H EI (not implemented yet)
* X<1> Set the given parameters only for the X axis.
* Y<1> Set the given parameters only for the Y axis.
*/ */
//#define INPUT_SHAPING_X //#define INPUT_SHAPING_X
//#define INPUT_SHAPING_Y //#define INPUT_SHAPING_Y
#if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y) //#define INPUT_SHAPING_Z
#if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y, INPUT_SHAPING_Z)
#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. #if ENABLED(INPUT_SHAPING_Z)
#define SHAPING_FREQ_Z 40.0 // (Hz) The default dominant resonant frequency on the Z axis.
#define SHAPING_ZETA_Z 0.15 // Damping ratio of the Z axis (range: 0.0 = no damping to 1.0 = critical damping).
#endif
//#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,11 +1277,11 @@
* 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
// //
@@ -1332,8 +1339,6 @@
//#define CALIBRATION_SCRIPT_PRE "M117 Starting Auto-Calibration\nT0\nG28\nG12\nM117 Calibrating..." //#define CALIBRATION_SCRIPT_PRE "M117 Starting Auto-Calibration\nT0\nG28\nG12\nM117 Calibrating..."
//#define CALIBRATION_SCRIPT_POST "M500\nM117 Calibration data saved" //#define CALIBRATION_SCRIPT_POST "M500\nM117 Calibration data saved"
#define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
#define CALIBRATION_FEEDRATE_SLOW 60 // mm/min #define CALIBRATION_FEEDRATE_SLOW 60 // mm/min
#define CALIBRATION_FEEDRATE_FAST 1200 // mm/min #define CALIBRATION_FEEDRATE_FAST 1200 // mm/min
#define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/min #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/min
@@ -1492,8 +1497,17 @@
#define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440
#endif #endif
/**
* Probe Offset Wizard
* Add a Probe Z Offset calibration option to the LCD menu.
* Use this helper to get a perfect 'M851 Z' probe offset.
* When launched this powerful wizard:
* - Measures the bed height at the configured position with the probe.
* - Moves the nozzle to the same position for a "paper" measurement.
* - The difference is used to set the probe Z offset.
*/
#if HAS_BED_PROBE && ANY(HAS_MARLINUI_MENU, HAS_TFT_LVGL_UI) #if HAS_BED_PROBE && ANY(HAS_MARLINUI_MENU, HAS_TFT_LVGL_UI)
//#define PROBE_OFFSET_WIZARD // Add a Probe Z Offset calibration option to the LCD menu //#define PROBE_OFFSET_WIZARD
#if ENABLED(PROBE_OFFSET_WIZARD) #if ENABLED(PROBE_OFFSET_WIZARD)
/** /**
* Enable to init the Probe Z-Offset when starting the Wizard. * Enable to init the Probe Z-Offset when starting the Wizard.
@@ -1510,6 +1524,10 @@
#if HAS_MARLINUI_MENU #if HAS_MARLINUI_MENU
#if HAS_BED_PROBE #if HAS_BED_PROBE
// Show Deploy / Stow Probe options in the Motion menu.
#define PROBE_DEPLOY_STOW_MENU
// Add calibration in the Probe Offsets menu to compensate for X-axis twist. // Add calibration in the Probe Offsets menu to compensate for X-axis twist.
//#define X_AXIS_TWIST_COMPENSATION //#define X_AXIS_TWIST_COMPENSATION
#if ENABLED(X_AXIS_TWIST_COMPENSATION) #if ENABLED(X_AXIS_TWIST_COMPENSATION)
@@ -1524,8 +1542,6 @@
#define XATC_Z_OFFSETS { 0, 0, 0 } // Z offsets for X axis sample points #define XATC_Z_OFFSETS { 0, 0, 0 } // Z offsets for X axis sample points
#endif #endif
// Show Deploy / Stow Probe options in the Motion menu.
#define PROBE_DEPLOY_STOW_MENU
#endif #endif
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
@@ -1556,6 +1572,9 @@
// BACK menu items keep the highlight at the top // BACK menu items keep the highlight at the top
//#define TURBO_BACK_MENU_ITEM //#define TURBO_BACK_MENU_ITEM
// BACK menu items show "Back" instead of the previous menu name
//#define GENERIC_BACK_MENU_ITEM
// Insert a menu for preheating at the top level to allow for quick access // Insert a menu for preheating at the top level to allow for quick access
//#define PREHEAT_SHORTCUT_MENU_ITEM //#define PREHEAT_SHORTCUT_MENU_ITEM
@@ -1584,7 +1603,7 @@
#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, HAS_MARLINUI_HD44780)
//#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.
#endif #endif
#endif #endif
@@ -1970,17 +1989,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.
@@ -2229,13 +2237,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
// //
@@ -2334,6 +2349,7 @@
* *
* Control extrusion rate based on instantaneous extruder velocity. Can be used to correct for * Control extrusion rate based on instantaneous extruder velocity. Can be used to correct for
* underextrusion at high extruder speeds that are otherwise well-behaved (i.e., not skipping). * underextrusion at high extruder speeds that are otherwise well-behaved (i.e., not skipping).
* For better results also enable ADAPTIVE_STEP_SMOOTHING.
*/ */
//#define NONLINEAR_EXTRUSION //#define NONLINEAR_EXTRUSION
@@ -2561,21 +2577,22 @@
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650 //#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/** /**
* Minimum stepper driver pulse width (in µs) * Minimum stepper driver pulse width (in ns)
* 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers * If undefined, these defaults (from Conditionals-4-adv.h) apply:
* 0 : Minimum 500ns for LV8729, adjusted in stepper.h * 100 : Minimum for TMC2xxx stepper drivers
* 1 : Minimum for A4988 and A5984 stepper drivers * 500 : Minimum for LV8729
* 2 : Minimum for DRV8825 stepper drivers * 1000 : Minimum for A4988 and A5984 stepper drivers
* 3 : Minimum for TB6600 stepper drivers * 2000 : Minimum for DRV8825 stepper drivers
* 30 : Minimum for TB6560 stepper drivers * 3000 : Minimum for TB6600 stepper drivers
* 30000 : Minimum for TB6560 stepper drivers
* *
* Override the default value based on the driver type set in Configuration.h. * Override the default value based on the driver type set in Configuration.h.
*/ */
//#define MINIMUM_STEPPER_PULSE 2 //#define MINIMUM_STEPPER_PULSE_NS 2000
/** /**
* Maximum stepping rate (in Hz) the stepper driver allows * Maximum stepping rate (in Hz) the stepper driver allows
* If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) * If undefined, these defaults (from Conditionals-4-adv.h) apply:
* 5000000 : Maximum for TMC2xxx stepper drivers * 5000000 : Maximum for TMC2xxx stepper drivers
* 1000000 : Maximum for LV8729 stepper driver * 1000000 : Maximum for LV8729 stepper driver
* 500000 : Maximum for A4988 stepper driver * 500000 : Maximum for A4988 stepper driver
@@ -2702,14 +2719,14 @@
* This feature is EXPERIMENTAL so use with caution and test thoroughly. * This feature is EXPERIMENTAL so use with caution and test thoroughly.
* Enable this option to receive data on the serial ports via the onboard DMA * Enable this option to receive data on the serial ports via the onboard DMA
* controller for more stable and reliable high-speed serial communication. * controller for more stable and reliable high-speed serial communication.
* Only some STM32 MCUs are currently supported. * Support is currently limited to some STM32 MCUs and all HC32 MCUs.
* Note: This has no effect on emulated USB serial ports. * Note: This has no effect on emulated USB serial ports.
*/ */
//#define SERIAL_DMA //#define SERIAL_DMA
/** /**
* Set the number of proportional font spaces required to fill up a typical character space. * Set the number of proportional font spaces required to fill up a typical character space.
* This can help to better align the output of commands like `G29 O` Mesh Output. * This can help to better align the output of commands like 'G29 O' Mesh Output.
* *
* For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0.
* Otherwise, adjust according to your client and font. * Otherwise, adjust according to your client and font.
@@ -2957,15 +2974,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
@@ -2977,9 +2991,9 @@
#if AXIS_IS_TMC_CONFIG(X) #if AXIS_IS_TMC_CONFIG(X)
#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 homing. (Typically lower than *_CURRENT.)
#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
@@ -3187,6 +3201,13 @@
//#define E7_HOLD_MULTIPLIER 0.5 //#define E7_HOLD_MULTIPLIER 0.5
#endif #endif
/**
* Use the homing current for all probing. (e.g., Current may be reduced to the
* point where a collision makes the motor skip instead of damaging the bed,
* though this is unlikely to save delicate probes from being damaged.
*/
//#define PROBING_USE_CURRENT_HOME
// @section tmc/spi // @section tmc/spi
/** /**
@@ -3451,7 +3472,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.
@@ -3472,7 +3493,7 @@
*/ */
#define TMC_ADV() { } #define TMC_ADV() { }
#endif // HAS_TRINAMIC_CONFIG || HAS_TMC26X #endif // HAS_TRINAMIC_CONFIG
// @section i2cbus // @section i2cbus
@@ -3533,7 +3554,7 @@
//#define PHOTOGRAPH_PIN 23 //#define PHOTOGRAPH_PIN 23
// Canon Hack Development Kit // Canon Hack Development Kit
// https://web.archive.org/web/20200920094805/https://captain-slow.dk/2014/03/09/3d-printing-timelapses/ // https://web.archive.org/web/20200920094805/captain-slow.dk/2014/03/09/3d-printing-timelapses/
//#define CHDK_PIN 4 //#define CHDK_PIN 4
// Optional second move with delay to trigger the camera shutter // Optional second move with delay to trigger the camera shutter
@@ -3565,7 +3586,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.
* *
@@ -4268,7 +4289,8 @@
/** /**
* Instant freeze / unfreeze functionality * Instant freeze / unfreeze functionality
* Potentially useful for emergency stop that allows being resumed. * Potentially useful for rapid stop that allows being resumed. Halts stepper movement.
* Note this does NOT pause spindles, lasers, fans, heaters or any other auxiliary device.
* @section interface * @section interface
*/ */
//#define FREEZE_FEATURE //#define FREEZE_FEATURE
@@ -4315,6 +4337,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
/** /**
@@ -4348,7 +4371,7 @@
* Extras for an ESP32-based motherboard with WIFISUPPORT * Extras for an ESP32-based motherboard with WIFISUPPORT
* These options don't apply to add-on WiFi modules based on ESP32 WiFi101. * These options don't apply to add-on WiFi modules based on ESP32 WiFi101.
*/ */
#if ENABLED(WIFISUPPORT) #if ANY(WIFISUPPORT, ESP3D_WIFISUPPORT)
//#define WEBSUPPORT // Start a webserver (which may include auto-discovery) using SPIFFS //#define WEBSUPPORT // Start a webserver (which may include auto-discovery) using SPIFFS
//#define OTASUPPORT // Support over-the-air firmware updates //#define OTASUPPORT // Support over-the-air firmware updates
//#define WIFI_CUSTOM_COMMAND // Accept feature config commands (e.g., WiFi ESP3D) from the host //#define WIFI_CUSTOM_COMMAND // Accept feature config commands (e.g., WiFi ESP3D) from the host
@@ -4384,31 +4407,37 @@
//#define E_MUX0_PIN 40 // Always Required //#define E_MUX0_PIN 40 // Always Required
//#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs //#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs //#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#elif HAS_PRUSA_MMU2
// Serial port used for communication with MMU2.
#define MMU2_SERIAL_PORT 2
// Use hardware reset for MMU if a pin is defined for it #elif HAS_PRUSA_MMU2 || HAS_PRUSA_MMU3
//#define MMU2_RST_PIN 23 // Common settings for MMU2/MMU2S/MMU3
// Serial port used for communication with MMU2/MMU2S/MMU3.
#define MMU_SERIAL_PORT 2
#define MMU_BAUD 115200
//#define MMU_RST_PIN 23 // Define this pin to use Hardware Reset for MMU2/MMU2S/MMU3
//#define MMU_MENUS // Add an LCD menu for MMU2/MMU2S/MMU3
//#define MMU_DEBUG // Write debug info to serial output
// Options pertaining to MMU2 and MMU2S
#if HAS_PRUSA_MMU2
// Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up) // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
//#define MMU2_MODE_12V //#define MMU2_MODE_12V
// G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
#define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
// Add an LCD menu for MMU2
//#define MMU2_MENUS
// Settings for filament load / unload from the LCD menu. // Settings for filament load / unload from the LCD menu.
// This is for Průša MK3-style extruders. Customize for your hardware. // This is for Průša MK3-style extruders. Customize for your hardware.
#define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0 #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
// G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
#define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
// MMU2 sequences use mm/min. Not compatible with MMU3, which use mm/sec.
#define MMU2_LOAD_TO_NOZZLE_SEQUENCE \ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
{ 7.2, 1145 }, \ { 4.4, 871 }, \
{ 14.4, 871 }, \ { 10.0, 1393 }, \
{ 36.0, 1393 }, \ { 4.4, 871 }, \
{ 14.4, 871 }, \ { 10.0, 198 }
{ 50.0, 198 }
#define MMU2_RAMMING_SEQUENCE \ #define MMU2_RAMMING_SEQUENCE \
{ 1.0, 1000 }, \ { 1.0, 1000 }, \
@@ -4423,19 +4452,36 @@
{ -10.0, 400 }, \ { -10.0, 400 }, \
{ -50.0, 2000 } { -50.0, 2000 }
#endif // HAS_PRUSA_MMU2
/** /**
* Using a sensor like the MMU2S * Options pertaining to MMU2S devices
* This mode requires a MK3S extruder with a sensor at the extruder idler, like the MMU2S. * Requires the MK3S extruder with a sensor at the extruder idler, like the MMU2S.
* See https://help.prusa3d.com/guide/3b-mk3s-mk2-5s-extruder-upgrade_41560#42048, step 11 * See https://help.prusa3d.com/guide/3b-mk3s-mk2-5s-extruder-upgrade_41560#42048, step 11
*/ */
#if HAS_PRUSA_MMU2S #if HAS_PRUSA_MMU2S
#define MMU2_C0_RETRY 5 // Number of retries (total time = timeout*retries) #define MMU2_C0_RETRY 5 // Number of retries (total time = timeout*retries)
/**
* This is called after the filament runout sensor is triggered to check if
* the filament has been loaded properly by moving the filament back and
* forth to see if the filament runout sensor is going to get triggered
* again, which should not occur if the filament is properly loaded.
*
* Thus, the MMU2_CAN_LOAD_SEQUENCE should contain some forward and
* backward moves. The forward moves should be greater than the backward
* moves.
*
* This is useless if your filament runout sensor is way behind the gears.
* In that case use {0, MMU2_CAN_LOAD_FEEDRATE}
*
* Adjust MMU2_CAN_LOAD_SEQUENCE according to your setup.
*/
#define MMU2_CAN_LOAD_FEEDRATE 800 // (mm/min) #define MMU2_CAN_LOAD_FEEDRATE 800 // (mm/min)
#define MMU2_CAN_LOAD_SEQUENCE \ #define MMU2_CAN_LOAD_SEQUENCE \
{ 0.1, MMU2_CAN_LOAD_FEEDRATE }, \ { 5.0, MMU2_CAN_LOAD_FEEDRATE }, \
{ 60.0, MMU2_CAN_LOAD_FEEDRATE }, \ { 15.0, MMU2_CAN_LOAD_FEEDRATE }, \
{ -52.0, MMU2_CAN_LOAD_FEEDRATE } { -10.0, MMU2_CAN_LOAD_FEEDRATE }
#define MMU2_CAN_LOAD_RETRACT 6.0 // (mm) Keep under the distance between Load Sequence values #define MMU2_CAN_LOAD_RETRACT 6.0 // (mm) Keep under the distance between Load Sequence values
#define MMU2_CAN_LOAD_DEVIATION 0.8 // (mm) Acceptable deviation #define MMU2_CAN_LOAD_DEVIATION 0.8 // (mm) Acceptable deviation
@@ -4446,10 +4492,90 @@
// Continue unloading if sensor detects filament after the initial unload move // Continue unloading if sensor detects filament after the initial unload move
//#define MMU_IR_UNLOAD_MOVE //#define MMU_IR_UNLOAD_MOVE
#else
#elif HAS_PRUSA_MMU3
// MMU3 settings
#define MMU3_HAS_CUTTER // Enable cutter related functionality
#define MMU3_MAX_RETRIES 3 // Number of retries (total time = timeout*retries)
// As discussed with our PrusaSlicer profile specialist
// - ToolChange shall not try to push filament into the very tip of the nozzle
// to have some space for additional G-code to tune the extruded filament length
// in the profile
// Beware - this value is used to initialize the MMU logic layer - it will be sent to the MMU upon line up (written into its 8bit register 0x0b)
// However - in the G-code we can get a request to set the extra load distance at runtime to something else (M708 A0xb Xsomething).
// The printer intercepts such a call and sets its extra load distance to match the new value as well.
#define MMU3_FILAMENT_SENSOR_E_POSITION 0 // (mm)
#define _MMU3_LOAD_DISTANCE_PAST_GEARS 5 // (mm)
#define MMU3_TOOL_CHANGE_LOAD_LENGTH (MMU3_FILAMENT_SENSOR_E_POSITION + _MMU3_LOAD_DISTANCE_PAST_GEARS) // (mm)
#define MMU3_LOAD_TO_NOZZLE_FEED_RATE 20.0 // (mm/s)
#define MMU3_VERIFY_LOAD_TO_NOZZLE_FEED_RATE 50.0 // (mm/s)
#define _MMU3_VERIFY_LOAD_TO_NOZZLE_TWEAK -5.0 // (mm) Amount to adjust the length for verifying load-to-nozzle
// The first thing the MMU does is initialize its axis.
// Meanwhile the E-motor will unload 20mm of filament in about 1 second.
#define MMU3_RETRY_UNLOAD_TO_FINDA_LENGTH 80.0 // (mm)
#define MMU3_RETRY_UNLOAD_TO_FINDA_FEED_RATE 80.0 // (mm/s)
// After loading a new filament, the printer will extrude this length of filament
// then retract to the original position. This is used to check if the filament sensor
// reading flickers or filament is jammed.
#define _MMU_EXTRUDER_PTFE_LENGTH 42.3 // (mm)
#define _MMU_EXTRUDER_HEATBREAK_LENGTH 17.7 // (mm)
#define MMU3_CHECK_FILAMENT_PRESENCE_EXTRUSION_LENGTH (MMU3_FILAMENT_SENSOR_E_POSITION + _MMU_EXTRUDER_PTFE_LENGTH + _MMU_EXTRUDER_HEATBREAK_LENGTH + _MMU3_VERIFY_LOAD_TO_NOZZLE_TWEAK) // (mm)
/** /**
* MMU1 Extruder Sensor * SpoolJoin Consumes All Filament -- EXPERIMENTAL
*
* SpoolJoin normally triggers when FINDA sensor untriggers while printing.
* This is the default behaviour and it doesn't consume all the filament
* before triggering a filament change. This leaves some filament in the
* current slot and before switching to the next slot it is unloaded.
*
* Enabling this option will trigger the filament change when both FINDA
* and Filament Runout Sensor triggers during the print and it allows the
* filament in the current slot to be completely consumed before doing the
* filament change. But this can cause problems as a little bit of filament
* will be left between the extruder gears (thinking that the filament
* sensor is triggered through the gears) and the end of the PTFE tube and
* can cause filament load issues.
*/
//#define MMU3_SPOOL_JOIN_CONSUMES_ALL_FILAMENT
// MMU3 sequences use mm/sec. Not compatible with MMU2 which use mm/min.
#define MMU3_LOAD_TO_NOZZLE_SEQUENCE \
{ _MMU_EXTRUDER_PTFE_LENGTH, MMM_TO_MMS(810) }, /* (13.5 mm/s) Fast load ahead of heatbreak */ \
{ _MMU_EXTRUDER_HEATBREAK_LENGTH, MMM_TO_MMS(198) } /* ( 3.3 mm/s) Slow load after heatbreak */
#define MMU3_RAMMING_SEQUENCE \
{ 0.2816, MMM_TO_MMS(1339.0) }, \
{ 0.3051, MMM_TO_MMS(1451.0) }, \
{ 0.3453, MMM_TO_MMS(1642.0) }, \
{ 0.3990, MMM_TO_MMS(1897.0) }, \
{ 0.4761, MMM_TO_MMS(2264.0) }, \
{ 0.5767, MMM_TO_MMS(2742.0) }, \
{ 0.5691, MMM_TO_MMS(3220.0) }, \
{ 0.1081, MMM_TO_MMS(3220.0) }, \
{ 0.7644, MMM_TO_MMS(3635.0) }, \
{ 0.8248, MMM_TO_MMS(3921.0) }, \
{ 0.8483, MMM_TO_MMS(4033.0) }, \
{ -15.0, MMM_TO_MMS(6000.0) }, \
{ -24.5, MMM_TO_MMS(1200.0) }, \
{ -7.0, MMM_TO_MMS( 600.0) }, \
{ -3.5, MMM_TO_MMS( 360.0) }, \
{ 20.0, MMM_TO_MMS( 454.0) }, \
{ -20.0, MMM_TO_MMS( 303.0) }, \
{ -35.0, MMM_TO_MMS(2000.0) }
#else // MMU2 (not MMU2S)
/**
* MMU2 Extruder Sensor
* *
* Support for a Průša (or other) IR Sensor to detect filament near the extruder * Support for a Průša (or other) IR Sensor to detect filament near the extruder
* and make loading more reliable. Suitable for an extruder equipped with a filament * and make loading more reliable. Suitable for an extruder equipped with a filament
@@ -4459,16 +4585,14 @@
* move up to the gears. If no filament is detected, the MMU2 can make some more attempts. * move up to the gears. If no filament is detected, the MMU2 can make some more attempts.
* If all attempts fail, a filament runout will be triggered. * If all attempts fail, a filament runout will be triggered.
*/ */
//#define MMU_EXTRUDER_SENSOR //#define MMU2_EXTRUDER_SENSOR
#if ENABLED(MMU_EXTRUDER_SENSOR) #if ENABLED(MMU2_EXTRUDER_SENSOR)
#define MMU_LOADING_ATTEMPTS_NR 5 // max. number of attempts to load filament if first load fail #define MMU2_LOADING_ATTEMPTS_NR 5 // Number of times to try loading filament before failure
#endif #endif
#endif #endif
//#define MMU2_DEBUG // Write debug info to serial output #endif // HAS_PRUSA_MMU2 || HAS_PRUSA_MMU3
#endif // HAS_PRUSA_MMU2
/** /**
* Advanced Print Counter settings * Advanced Print Counter settings
@@ -4531,3 +4655,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
+108 -77
View File
@@ -187,6 +187,17 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1033)
# RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan) # RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
else ifeq ($(HARDWARE_MOTHERBOARD),1034) else ifeq ($(HARDWARE_MOTHERBOARD),1034)
# RAMPS 1.6+ (Power outputs: Hotend, Fan, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),1035)
# RAMPS 1.6+ (Power outputs: Hotend0, Hotend1, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),1036)
# RAMPS 1.6+ (Power outputs: Hotend, Fan0, Fan1)
else ifeq ($(HARDWARE_MOTHERBOARD),1037)
# RAMPS 1.6+ (Power outputs: Hotend0, Hotend1, Fan)
else ifeq ($(HARDWARE_MOTHERBOARD),1038)
# RAMPS 1.6+ (Power outputs: Spindle, Controller Fan)
else ifeq ($(HARDWARE_MOTHERBOARD),1039)
# #
# RAMPS Derivatives - ATmega1280, ATmega2560 # RAMPS Derivatives - ATmega1280, ATmega2560
# #
@@ -221,108 +232,113 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1112)
else ifeq ($(HARDWARE_MOTHERBOARD),1113) else ifeq ($(HARDWARE_MOTHERBOARD),1113)
# BigTreeTech or BIQU KFB2.0 # BigTreeTech or BIQU KFB2.0
else ifeq ($(HARDWARE_MOTHERBOARD),1114) else ifeq ($(HARDWARE_MOTHERBOARD),1114)
# zrib V2.0 (Chinese RAMPS replica) # Zonestar zrib V2.0 (Chinese RAMPS replica)
else ifeq ($(HARDWARE_MOTHERBOARD),1115) else ifeq ($(HARDWARE_MOTHERBOARD),1115)
# zrib V5.2 (Chinese RAMPS replica) # Zonestar zrib V5.2 (Chinese RAMPS replica)
else ifeq ($(HARDWARE_MOTHERBOARD),1116) else ifeq ($(HARDWARE_MOTHERBOARD),1116)
# Felix 2.0+ Electronics Board (RAMPS like) # Zonestar zrib V5.3 (Chinese RAMPS replica)
else ifeq ($(HARDWARE_MOTHERBOARD),1117) else ifeq ($(HARDWARE_MOTHERBOARD),1117)
# Invent-A-Part RigidBoard # Felix 2.0+ Electronics Board (RAMPS like)
else ifeq ($(HARDWARE_MOTHERBOARD),1118) else ifeq ($(HARDWARE_MOTHERBOARD),1118)
# Invent-A-Part RigidBoard V2 # Invent-A-Part RigidBoard
else ifeq ($(HARDWARE_MOTHERBOARD),1119) else ifeq ($(HARDWARE_MOTHERBOARD),1119)
# Sainsmart 2-in-1 board # Invent-A-Part RigidBoard V2
else ifeq ($(HARDWARE_MOTHERBOARD),1120) else ifeq ($(HARDWARE_MOTHERBOARD),1120)
# Ultimaker # Sainsmart 2-in-1 board
else ifeq ($(HARDWARE_MOTHERBOARD),1121) else ifeq ($(HARDWARE_MOTHERBOARD),1121)
# Ultimaker (Older electronics. Pre 1.5.4. This is rare) # Ultimaker
else ifeq ($(HARDWARE_MOTHERBOARD),1122) else ifeq ($(HARDWARE_MOTHERBOARD),1122)
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
MCU ?= atmega1280 MCU ?= atmega1280
PROG_MCU ?= m1280 PROG_MCU ?= m1280
# Azteeg X3 # Azteeg X3
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
# Azteeg X3 Pro
else ifeq ($(HARDWARE_MOTHERBOARD),1124) else ifeq ($(HARDWARE_MOTHERBOARD),1124)
# Ultimainboard 2.x (Uses TEMP_SENSOR 20) # Azteeg X3 Pro
else ifeq ($(HARDWARE_MOTHERBOARD),1125) else ifeq ($(HARDWARE_MOTHERBOARD),1125)
# Rumba # Ultimainboard 2.x (Uses TEMP_SENSOR 20)
else ifeq ($(HARDWARE_MOTHERBOARD),1126) else ifeq ($(HARDWARE_MOTHERBOARD),1126)
# Raise3D N series Rumba derivative # Rumba
else ifeq ($(HARDWARE_MOTHERBOARD),1127) else ifeq ($(HARDWARE_MOTHERBOARD),1127)
# Rapide Lite 200 (v1, low-cost RUMBA clone with drv) # Raise3D N series Rumba derivative
else ifeq ($(HARDWARE_MOTHERBOARD),1128) else ifeq ($(HARDWARE_MOTHERBOARD),1128)
# Formbot T-Rex 2 Plus # Rapide Lite 200 (v1, low-cost RUMBA clone with drv)
else ifeq ($(HARDWARE_MOTHERBOARD),1129) else ifeq ($(HARDWARE_MOTHERBOARD),1129)
# Formbot T-Rex 3 # Formbot T-Rex 2 Plus
else ifeq ($(HARDWARE_MOTHERBOARD),1130) else ifeq ($(HARDWARE_MOTHERBOARD),1130)
# Formbot Raptor # Formbot T-Rex 3
else ifeq ($(HARDWARE_MOTHERBOARD),1131) else ifeq ($(HARDWARE_MOTHERBOARD),1131)
# Formbot Raptor 2 # Formbot Raptor
else ifeq ($(HARDWARE_MOTHERBOARD),1132) else ifeq ($(HARDWARE_MOTHERBOARD),1132)
# bq ZUM Mega 3D # Formbot Raptor 2
else ifeq ($(HARDWARE_MOTHERBOARD),1133) else ifeq ($(HARDWARE_MOTHERBOARD),1133)
# MakeBoard Mini v2.1.2 by MicroMake # bq ZUM Mega 3D
else ifeq ($(HARDWARE_MOTHERBOARD),1134) else ifeq ($(HARDWARE_MOTHERBOARD),1134)
# TriGorilla Anycubic version 1.3-based on RAMPS EFB # MakeBoard Mini v2.1.2 by MicroMake
else ifeq ($(HARDWARE_MOTHERBOARD),1135) else ifeq ($(HARDWARE_MOTHERBOARD),1135)
# ... Ver 1.4 # TriGorilla Anycubic version 1.3-based on RAMPS EFB
else ifeq ($(HARDWARE_MOTHERBOARD),1136) else ifeq ($(HARDWARE_MOTHERBOARD),1136)
# ... Rev 1.1 (new servo pin order) # ... Ver 1.4
else ifeq ($(HARDWARE_MOTHERBOARD),1137) else ifeq ($(HARDWARE_MOTHERBOARD),1137)
# Creality: Ender-4, CR-8 # ... Rev 1.1 (new servo pin order)
else ifeq ($(HARDWARE_MOTHERBOARD),1138) else ifeq ($(HARDWARE_MOTHERBOARD),1138)
# Creality: CR10S, CR20, CR-X # Creality: Ender-4, CR-8
else ifeq ($(HARDWARE_MOTHERBOARD),1139) else ifeq ($(HARDWARE_MOTHERBOARD),1139)
# Dagoma F5 # Creality: CR10S, CR20, CR-X
else ifeq ($(HARDWARE_MOTHERBOARD),1140) else ifeq ($(HARDWARE_MOTHERBOARD),1140)
# FYSETC F6 1.3 # Dagoma F5
else ifeq ($(HARDWARE_MOTHERBOARD),1141) else ifeq ($(HARDWARE_MOTHERBOARD),1141)
# FYSETC F6 1.4 # Dagoma D6 (as found in the Dagoma DiscoUltimate V2 TMC)
else ifeq ($(HARDWARE_MOTHERBOARD),1142) else ifeq ($(HARDWARE_MOTHERBOARD),1142)
# Wanhao Duplicator i3 Plus # FYSETC F6 1.3
else ifeq ($(HARDWARE_MOTHERBOARD),1143) else ifeq ($(HARDWARE_MOTHERBOARD),1143)
# VORON Design # FYSETC F6 1.4
else ifeq ($(HARDWARE_MOTHERBOARD),1144) else ifeq ($(HARDWARE_MOTHERBOARD),1144)
# Tronxy TRONXY-V3-1.0 # Wanhao Duplicator i3 Plus
else ifeq ($(HARDWARE_MOTHERBOARD),1145) else ifeq ($(HARDWARE_MOTHERBOARD),1145)
# Z-Bolt X Series # VORON Design
else ifeq ($(HARDWARE_MOTHERBOARD),1146) else ifeq ($(HARDWARE_MOTHERBOARD),1146)
# TT OSCAR # Tronxy TRONXY-V3-1.0
else ifeq ($(HARDWARE_MOTHERBOARD),1147) else ifeq ($(HARDWARE_MOTHERBOARD),1147)
# Overlord/Overlord Pro # Z-Bolt X Series
else ifeq ($(HARDWARE_MOTHERBOARD),1148) else ifeq ($(HARDWARE_MOTHERBOARD),1148)
# ADIMLab Gantry v1 # TT OSCAR
else ifeq ($(HARDWARE_MOTHERBOARD),1149) else ifeq ($(HARDWARE_MOTHERBOARD),1149)
# ADIMLab Gantry v2
else ifeq ($(HARDWARE_MOTHERBOARD),1150)
# BIQU Tango V1 # BIQU Tango V1
else ifeq ($(HARDWARE_MOTHERBOARD),1151) else ifeq ($(HARDWARE_MOTHERBOARD),1150)
# MKS GEN L V2 # MKS GEN L V2
else ifeq ($(HARDWARE_MOTHERBOARD),1152) else ifeq ($(HARDWARE_MOTHERBOARD),1151)
# MKS GEN L V2.1 # MKS GEN L V2.1
else ifeq ($(HARDWARE_MOTHERBOARD),1153) else ifeq ($(HARDWARE_MOTHERBOARD),1152)
# Copymaster 3D # Copymaster 3D
else ifeq ($(HARDWARE_MOTHERBOARD),1154) else ifeq ($(HARDWARE_MOTHERBOARD),1153)
# Ortur 4 # Ortur 4
else ifeq ($(HARDWARE_MOTHERBOARD),1155) else ifeq ($(HARDWARE_MOTHERBOARD),1154)
# Tenlog D3 Hero IDEX printer # Tenlog D3 Hero IDEX printer
else ifeq ($(HARDWARE_MOTHERBOARD),1155)
# Tenlog D3, D5, D6 IDEX Printer
else ifeq ($(HARDWARE_MOTHERBOARD),1156) else ifeq ($(HARDWARE_MOTHERBOARD),1156)
# Tenlog D3,5,6 Pro IDEX printers
else ifeq ($(HARDWARE_MOTHERBOARD),1157)
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed) # Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),1158) else ifeq ($(HARDWARE_MOTHERBOARD),1157)
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed) # Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),1159) else ifeq ($(HARDWARE_MOTHERBOARD),1158)
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed) # Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),1160) else ifeq ($(HARDWARE_MOTHERBOARD),1159)
# Longer LK1 PRO / Alfawise U20 Pro (PRO version) # Longer LK1 PRO / Alfawise U20 Pro (PRO version)
else ifeq ($(HARDWARE_MOTHERBOARD),1161) else ifeq ($(HARDWARE_MOTHERBOARD),1160)
# Longer LKx PRO / Alfawise Uxx Pro (PRO version) # Longer LKx PRO / Alfawise Uxx Pro (PRO version)
else ifeq ($(HARDWARE_MOTHERBOARD),1162) else ifeq ($(HARDWARE_MOTHERBOARD),1161)
# Zonestar zrib V5.3 (Chinese RAMPS replica)
else ifeq ($(HARDWARE_MOTHERBOARD),1163)
# Pxmalion Core I3 # Pxmalion Core I3
else ifeq ($(HARDWARE_MOTHERBOARD),1162)
# Panowin Cutlass (as found in the Panowin F1)
else ifeq ($(HARDWARE_MOTHERBOARD),1163)
# Kodama Bardo V1.x (as found in the Kodama Trinus)
else ifeq ($(HARDWARE_MOTHERBOARD),1164) else ifeq ($(HARDWARE_MOTHERBOARD),1164)
# XTLW MFF V1.0
else ifeq ($(HARDWARE_MOTHERBOARD),1165)
# XTLW MFF V2.0
else ifeq ($(HARDWARE_MOTHERBOARD),1166)
# #
# RAMBo and derivatives # RAMBo and derivatives
@@ -340,7 +356,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1203)
else ifeq ($(HARDWARE_MOTHERBOARD),1204) else ifeq ($(HARDWARE_MOTHERBOARD),1204)
# abee Scoovo X9H # abee Scoovo X9H
else ifeq ($(HARDWARE_MOTHERBOARD),1205) else ifeq ($(HARDWARE_MOTHERBOARD),1205)
# Rambo ThinkerV2 # ThinkerV2
else ifeq ($(HARDWARE_MOTHERBOARD),1206) else ifeq ($(HARDWARE_MOTHERBOARD),1206)
# #
@@ -383,30 +399,40 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1315)
else ifeq ($(HARDWARE_MOTHERBOARD),1316) else ifeq ($(HARDWARE_MOTHERBOARD),1316)
# Geeetech GT2560 Rev B for A10(M/T/D) # Geeetech GT2560 Rev B for A10(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1317) else ifeq ($(HARDWARE_MOTHERBOARD),1317)
# Geeetech GT2560 Rev B for A10(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
# Geeetech GT2560 Rev B for Mecreator2 # Geeetech GT2560 Rev B for Mecreator2
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
# Geeetech GT2560 Rev B for A20(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1319) else ifeq ($(HARDWARE_MOTHERBOARD),1319)
# Geeetech GT2560 Rev B for A20(M/T/D) # Geeetech GT2560 Rev B for A10(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1320) else ifeq ($(HARDWARE_MOTHERBOARD),1320)
# Einstart retrofit
else ifeq ($(HARDWARE_MOTHERBOARD),1321)
# Wanhao 0ne+ i3 Mini
else ifeq ($(HARDWARE_MOTHERBOARD),1322)
# Leapfrog Xeed 2015
else ifeq ($(HARDWARE_MOTHERBOARD),1323)
# PICA Shield (original version)
else ifeq ($(HARDWARE_MOTHERBOARD),1324)
# PICA Shield (rev C or later)
else ifeq ($(HARDWARE_MOTHERBOARD),1325)
# Intamsys 4.0 (Funmat HT)
else ifeq ($(HARDWARE_MOTHERBOARD),1326)
# Malyan M180 Mainboard Version 2 (no display function, direct G-code only)
else ifeq ($(HARDWARE_MOTHERBOARD),1327)
# Geeetech GT2560 Rev B for A20(M/T/D) # Geeetech GT2560 Rev B for A20(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1321)
# Einstart retrofit
else ifeq ($(HARDWARE_MOTHERBOARD),1322)
# Wanhao 0ne+ i3 Mini
else ifeq ($(HARDWARE_MOTHERBOARD),1323)
# Overlord/Overlord Pro
else ifeq ($(HARDWARE_MOTHERBOARD),1324)
# ADIMLab Gantry v1
else ifeq ($(HARDWARE_MOTHERBOARD),1325)
# ADIMLab Gantry v2
else ifeq ($(HARDWARE_MOTHERBOARD),1326)
# Leapfrog Xeed 2015
else ifeq ($(HARDWARE_MOTHERBOARD),1327)
# PICA Shield (original version)
else ifeq ($(HARDWARE_MOTHERBOARD),1328) else ifeq ($(HARDWARE_MOTHERBOARD),1328)
# Mega controller & Protoneer CNC Shield V3.00 # PICA Shield (rev C or later)
else ifeq ($(HARDWARE_MOTHERBOARD),1329) else ifeq ($(HARDWARE_MOTHERBOARD),1329)
# Intamsys 4.0 (Funmat HT)
else ifeq ($(HARDWARE_MOTHERBOARD),1330)
# Malyan M180 Mainboard Version 2 (no display function, direct G-code only)
else ifeq ($(HARDWARE_MOTHERBOARD),1331)
# Mega controller & Protoneer CNC Shield V3.00
else ifeq ($(HARDWARE_MOTHERBOARD),1332)
# WEEDO 62A board (TINA2, Monoprice Cadet, etc.)
else ifeq ($(HARDWARE_MOTHERBOARD),1333)
# Geeetech GT2560 V4.1B for A10(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1334)
# #
# ATmega1281, ATmega2561 # ATmega1281, ATmega2561
@@ -440,7 +466,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1502)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p MCU ?= atmega644p
PROG_MCU ?= m644p PROG_MCU ?= m644p
# Melzi V2.0 # Melzi V2
else ifeq ($(HARDWARE_MOTHERBOARD),1503) else ifeq ($(HARDWARE_MOTHERBOARD),1503)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
@@ -450,36 +476,41 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1504)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
PROG_MCU ?= m1284p PROG_MCU ?= m1284p
# Melzi Creality3D board (for CR-10 etc) # Melzi Creality3D (for CR-10 etc)
else ifeq ($(HARDWARE_MOTHERBOARD),1505) else ifeq ($(HARDWARE_MOTHERBOARD),1505)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
PROG_MCU ?= m1284p PROG_MCU ?= m1284p
# Melzi Malyan M150 board # Melzi Creality3D (for Ender-2)
else ifeq ($(HARDWARE_MOTHERBOARD),1506) else ifeq ($(HARDWARE_MOTHERBOARD),1506)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
PROG_MCU ?= m1284p PROG_MCU ?= m1284p
# Tronxy X5S # Melzi Malyan M150
else ifeq ($(HARDWARE_MOTHERBOARD),1507) else ifeq ($(HARDWARE_MOTHERBOARD),1507)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
PROG_MCU ?= m1284p PROG_MCU ?= m1284p
# STB V1.1 # Tronxy X5S
else ifeq ($(HARDWARE_MOTHERBOARD),1508) else ifeq ($(HARDWARE_MOTHERBOARD),1508)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
PROG_MCU ?= m1284p PROG_MCU ?= m1284p
# Azteeg X1 # STB V1.1
else ifeq ($(HARDWARE_MOTHERBOARD),1509) else ifeq ($(HARDWARE_MOTHERBOARD),1509)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
PROG_MCU ?= m1284p PROG_MCU ?= m1284p
# Anet 1.0 (Melzi clone) # Azteeg X1
else ifeq ($(HARDWARE_MOTHERBOARD),1510) else ifeq ($(HARDWARE_MOTHERBOARD),1510)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
PROG_MCU ?= m1284p PROG_MCU ?= m1284p
# Anet 1.0 (Melzi clone)
else ifeq ($(HARDWARE_MOTHERBOARD),1511)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
PROG_MCU ?= m1284p
# ZoneStar ZMIB V2 # ZoneStar ZMIB V2
else ifeq ($(HARDWARE_MOTHERBOARD),1511) else ifeq ($(HARDWARE_MOTHERBOARD),1511)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
+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-31" //#define STRING_DISTRIBUTION_DATE "2024-10-17"
/** /**
* 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 -6
View File
@@ -129,11 +129,11 @@ typedef Servo hal_servo_t;
#endif #endif
#endif #endif
#ifdef MMU2_SERIAL_PORT #ifdef MMU_SERIAL_PORT
#if !WITHIN(MMU2_SERIAL_PORT, 0, 3) #if !WITHIN(MMU_SERIAL_PORT, 0, 3)
#error "MMU2_SERIAL_PORT must be from 0 to 3" #error "MMU_SERIAL_PORT must be from 0 to 3"
#endif #endif
#define MMU2_SERIAL mmuSerial #define MMU_SERIAL mmuSerial
#endif #endif
#ifdef LCD_SERIAL_PORT #ifdef LCD_SERIAL_PORT
@@ -141,7 +141,7 @@ typedef Servo hal_servo_t;
#error "LCD_SERIAL_PORT must be from 0 to 3." #error "LCD_SERIAL_PORT must be from 0 to 3."
#endif #endif
#define LCD_SERIAL lcdSerial #define LCD_SERIAL lcdSerial
#if HAS_DGUS_LCD #if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free() #define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
#endif #endif
#endif #endif
@@ -159,7 +159,7 @@ typedef Servo hal_servo_t;
#define GET_PIN_MAP_INDEX(pin) pin #define GET_PIN_MAP_INDEX(pin) pin
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval) #define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
#define HAL_SENSITIVE_PINS 0, 1, #define HAL_SENSITIVE_PINS 0, 1
#ifdef __AVR_AT90USB1286__ #ifdef __AVR_AT90USB1286__
#define JTAG_DISABLE() do{ MCUCR = 0x80; MCUCR = 0x80; }while(0) #define JTAG_DISABLE() do{ MCUCR = 0x80; MCUCR = 0x80; }while(0)
+8 -8
View File
@@ -601,20 +601,20 @@ MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser);
#endif // SERIAL_PORT_3 #endif // SERIAL_PORT_3
#ifdef MMU2_SERIAL_PORT #ifdef MMU_SERIAL_PORT
ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _RX_vect)) { ISR(SERIAL_REGNAME(USART, MMU_SERIAL_PORT, _RX_vect)) {
MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>::store_rxd_char(); MarlinSerial<MMU2SerialCfg<MMU_SERIAL_PORT>>::store_rxd_char();
} }
ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _UDRE_vect)) { ISR(SERIAL_REGNAME(USART, MMU_SERIAL_PORT, _UDRE_vect)) {
MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>::_tx_udr_empty_irq(); MarlinSerial<MMU2SerialCfg<MMU_SERIAL_PORT>>::_tx_udr_empty_irq();
} }
template class MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> >; template class MarlinSerial< MMU2SerialCfg<MMU_SERIAL_PORT> >;
MSerialMMU2 mmuSerial(MSerialMMU2::HasEmergencyParser); MSerialMMU2 mmuSerial(MSerialMMU2::HasEmergencyParser);
#endif // MMU2_SERIAL_PORT #endif // MMU_SERIAL_PORT
#ifdef LCD_SERIAL_PORT #ifdef LCD_SERIAL_PORT
@@ -629,7 +629,7 @@ MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser);
template class MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> >; template class MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> >;
MSerialLCD lcdSerial(MSerialLCD::HasEmergencyParser); MSerialLCD lcdSerial(MSerialLCD::HasEmergencyParser);
#if HAS_DGUS_LCD #if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
template<typename Cfg> template<typename Cfg>
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::get_tx_buffer_free() { typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::get_tx_buffer_free() {
const ring_buffer_pos_t t = tx_buffer.tail, // next byte to send. const ring_buffer_pos_t t = tx_buffer.tail, // next byte to send.
+3 -3
View File
@@ -205,7 +205,7 @@
static ring_buffer_pos_t available(); static ring_buffer_pos_t available();
static void write(const uint8_t c); static void write(const uint8_t c);
static void flushTX(); static void flushTX();
#if HAS_DGUS_LCD #if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
static ring_buffer_pos_t get_tx_buffer_free(); static ring_buffer_pos_t get_tx_buffer_free();
#endif #endif
@@ -246,7 +246,7 @@
#endif // !USBCON #endif // !USBCON
#ifdef MMU2_SERIAL_PORT #ifdef MMU_SERIAL_PORT
template <uint8_t serial> template <uint8_t serial>
struct MMU2SerialCfg { struct MMU2SerialCfg {
static constexpr int PORT = serial; static constexpr int PORT = serial;
@@ -260,7 +260,7 @@
static constexpr bool RX_OVERRUNS = false; static constexpr bool RX_OVERRUNS = false;
}; };
typedef Serial1Class< MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> > > MSerialMMU2; typedef Serial1Class< MarlinSerial< MMU2SerialCfg<MMU_SERIAL_PORT> > > MSerialMMU2;
extern MSerialMMU2 mmuSerial; extern MSerialMMU2 mmuSerial;
#endif #endif
+8
View File
@@ -345,6 +345,14 @@ void setup_endstop_interrupts() {
pciSetup(Z_MIN_PROBE_PIN); pciSetup(Z_MIN_PROBE_PIN);
#endif #endif
#endif #endif
#if USE_CALIBRATION
#if (digitalPinToInterrupt(CALIBRATION_PIN) != NOT_AN_INTERRUPT)
_ATTACH(CALIBRATION_PIN);
#else
static_assert(digitalPinHasPCICR(CALIBRATION_PIN), "CALIBRATION_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
pciSetup(CALIBRATION_PIN);
#endif
#endif
// If we arrive here without raising an assertion, each pin has either an EXT-interrupt or a PCI. // If we arrive here without raising an assertion, each pin has either an EXT-interrupt or a PCI.
} }
+1 -1
View File
@@ -150,7 +150,7 @@ void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
else { else {
if (p == 32 || p == 128) continue; // Skip TIMER2 specific prescalers when not TIMER2 if (p == 32 || p == 128) continue; // Skip TIMER2 specific prescalers when not TIMER2
const uint16_t rft = (F_CPU) / (p * f_desired); const uint16_t rft = (F_CPU) / (p * f_desired);
DEBUG_ECHOLNPGM("(Not Timer 2) F_CPU=" STRINGIFY(F_CPU), " prescaler=", p, " f_desired=", f_desired); DEBUG_ECHOLNPGM("(Not Timer 2) F_CPU=", STRINGIFY(F_CPU), " prescaler=", p, " f_desired=", f_desired);
res_fast_temp = rft - 1; res_fast_temp = rft - 1;
res_pc_temp = rft / 2; res_pc_temp = rft / 2;
} }
-3
View File
@@ -28,9 +28,6 @@
* Port : E0 E1 E4 E5 G5 E3 H3 H4 H5 H6 B4 B5 B6 B7 J1 J0 H1 H0 D3 D2 D1 D0 A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 C1 C0 D7 G2 G1 G0 L7 L6 L5 L4 L3 L2 L1 L0 B3 B2 B1 B0 F0 F1 F2 F3 F4 F5 F6 F7 K0 K1 K2 K3 K4 K5 K6 K7 | E2 E6 E7 xx xx H2 H7 G3 G4 xx xx xx xx xx D4 D5 D6 xx xx J2 J3 J4 J5 J6 J7 xx xx xx xx xx * Port : E0 E1 E4 E5 G5 E3 H3 H4 H5 H6 B4 B5 B6 B7 J1 J0 H1 H0 D3 D2 D1 D0 A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 C1 C0 D7 G2 G1 G0 L7 L6 L5 L4 L3 L2 L1 L0 B3 B2 B1 B0 F0 F1 F2 F3 F4 F5 F6 F7 K0 K1 K2 K3 K4 K5 K6 K7 | E2 E6 E7 xx xx H2 H7 G3 G4 xx xx xx xx xx D4 D5 D6 xx xx J2 J3 J4 J5 J6 J7 xx xx xx xx xx
* Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 78 79 80 xx xx 84 85 71 70 xx xx xx xx xx 81 82 83 xx xx 72 73 75 76 77 74 xx xx xx xx xx * Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 78 79 80 xx xx 84 85 71 70 xx xx xx xx xx 81 82 83 xx xx 72 73 75 76 77 74 xx xx xx xx xx
* Analog Input : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 * Analog Input : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
*
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/ */
#include "../fastio.h" #include "../fastio.h"
-3
View File
@@ -26,9 +26,6 @@
* *
* Logical Pin: 38 39 40 41 42 43 44 45 16 10 11 12 06 07 08 09 30 31 32 33 34 35 36 37 17 18 19 20 21 22 23 24 00 01 13 05 02 03 14 15 46 47 48 49 50 51 52 53 25 26 27 28 29 04 * Logical Pin: 38 39 40 41 42 43 44 45 16 10 11 12 06 07 08 09 30 31 32 33 34 35 36 37 17 18 19 20 21 22 23 24 00 01 13 05 02 03 14 15 46 47 48 49 50 51 52 53 25 26 27 28 29 04
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5 * Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5
*
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/ */
#include "../fastio.h" #include "../fastio.h"
-3
View File
@@ -26,9 +26,6 @@
* *
* Logical Pin: 08 09 10 11 12 13 14 15 16 17 18 19 20 21 00 01 02 03 04 05 06 07 * Logical Pin: 08 09 10 11 12 13 14 15 16 17 18 19 20 21 00 01 02 03 04 05 06 07
* Port: B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 * Port: B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7
*
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/ */
#include "../fastio.h" #include "../fastio.h"
-3
View File
@@ -26,9 +26,6 @@
* *
* Logical Pin: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 * Logical Pin: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
* Port: B0 B1 B2 B3 B4 B5 B6 B7 D0 D1 D2 D3 D4 D5 D6 D7 C0 C1 C2 C3 C4 C5 C6 C7 A7 A6 A5 A4 A3 A2 A1 A0 * Port: B0 B1 B2 B3 B4 B5 B6 B7 D0 D1 D2 D3 D4 D5 D6 D7 C0 C1 C2 C3 C4 C5 C6 C7 A7 A6 A5 A4 A3 A2 A1 A0
*
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/ */
/** ATMega644 /** ATMega644
+1 -4
View File
@@ -26,10 +26,7 @@
* *
* Logical Pin: 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45 * Logical Pin: 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 * Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
* The logical pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3 * Logical pins 46-47 aren't supported by Teensyduino, but are supported below as E2 and E3
*
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/ */
#include "../fastio.h" #include "../fastio.h"
+17 -17
View File
@@ -42,7 +42,7 @@
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p) #define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p) #define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p) #define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
#define GET_PINMODE(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin)) #define getValidPinMode(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin))
#elif AVR_ATmega2560_FAMILY_PLUS_70 // So we can access/display all the pins on boards using more than 70 #elif AVR_ATmega2560_FAMILY_PLUS_70 // So we can access/display all the pins on boards using more than 70
@@ -50,32 +50,32 @@
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer_plus_70(p) #define digitalPinToTimer_DEBUG(p) digitalPinToTimer_plus_70(p)
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask_plus_70(p) #define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask_plus_70(p)
#define digitalPinToPort_DEBUG(p) digitalPinToPort_plus_70(p) #define digitalPinToPort_DEBUG(p) digitalPinToPort_plus_70(p)
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); } bool getValidPinMode(pin_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
#else #else
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p) #define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p) #define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p) #define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); } bool getValidPinMode(pin_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin) #define getPinByIndex(p) pgm_read_byte(&pin_array[p].pin)
#endif #endif
#define VALID_PIN(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0) #define isValidPin(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0)
#if AVR_ATmega1284_FAMILY #if AVR_ATmega1284_FAMILY
#define IS_ANALOG(P) WITHIN(P, analogInputToDigitalPin(7), analogInputToDigitalPin(0)) #define isAnalogPin(P) WITHIN(P, analogInputToDigitalPin(7), analogInputToDigitalPin(0))
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int(IS_ANALOG(P) ? (P) - analogInputToDigitalPin(7) : -1) #define digitalPinToAnalogIndex(P) int(isAnalogPin(P) ? (P) - analogInputToDigitalPin(7) : -1)
#else #else
#define _ANALOG1(P) WITHIN(P, analogInputToDigitalPin(0), analogInputToDigitalPin(7)) #define _ANALOG1(P) WITHIN(P, analogInputToDigitalPin(0), analogInputToDigitalPin(7))
#define _ANALOG2(P) WITHIN(P, analogInputToDigitalPin(8), analogInputToDigitalPin(15)) #define _ANALOG2(P) WITHIN(P, analogInputToDigitalPin(8), analogInputToDigitalPin(15))
#define IS_ANALOG(P) (_ANALOG1(P) || _ANALOG2(P)) #define isAnalogPin(P) (_ANALOG1(P) || _ANALOG2(P))
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int(_ANALOG1(P) ? (P) - analogInputToDigitalPin(0) : _ANALOG2(P) ? (P) - analogInputToDigitalPin(8) + 8 : -1) #define digitalPinToAnalogIndex(P) int(_ANALOG1(P) ? (P) - analogInputToDigitalPin(0) : _ANALOG2(P) ? (P) - analogInputToDigitalPin(8) + 8 : -1)
#endif #endif
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin) #define getPinByIndex(p) pgm_read_byte(&pin_array[p].pin)
#define MULTI_NAME_PAD 26 // space needed to be pretty if not first name assigned to a pin #define MULTI_NAME_PAD 26 // space needed to be pretty if not first name assigned to a pin
void PRINT_ARRAY_NAME(uint8_t x) { void printPinNameByIndex(uint8_t x) {
PGM_P const name_mem_pointer = (PGM_P)pgm_read_ptr(&pin_array[x].name); PGM_P const name_mem_pointer = (PGM_P)pgm_read_ptr(&pin_array[x].name);
for (uint8_t y = 0; y < MAX_NAME_LENGTH; ++y) { for (uint8_t y = 0; y < MAX_NAME_LENGTH; ++y) {
char temp_char = pgm_read_byte(name_mem_pointer + y); char temp_char = pgm_read_byte(name_mem_pointer + y);
@@ -88,7 +88,7 @@ void PRINT_ARRAY_NAME(uint8_t x) {
} }
} }
#define GET_ARRAY_IS_DIGITAL(x) pgm_read_byte(&pin_array[x].is_digital) #define getPinIsDigitalByIndex(x) pgm_read_byte(&pin_array[x].is_digital)
#if defined(__AVR_ATmega1284P__) // 1284 IDE extensions set this to the number of #if defined(__AVR_ATmega1284P__) // 1284 IDE extensions set this to the number of
#undef NUM_DIGITAL_PINS // digital only pins while all other CPUs have it #undef NUM_DIGITAL_PINS // digital only pins while all other CPUs have it
@@ -276,7 +276,7 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N -
if (TEST(*TMSK, TOIE)) err_prob_interrupt(); if (TEST(*TMSK, TOIE)) err_prob_interrupt();
} }
void pwm_details(uint8_t pin) { void printPinPWM(uint8_t pin) {
switch (digitalPinToTimer_DEBUG(pin)) { switch (digitalPinToTimer_DEBUG(pin)) {
#if ABTEST(0) #if ABTEST(0)
@@ -347,7 +347,7 @@ void pwm_details(uint8_t pin) {
#else #else
UNUSED(print_is_also_tied); UNUSED(print_is_also_tied);
#endif #endif
} // pwm_details } // printPinPWM
#ifndef digitalRead_mod // Use Teensyduino's version of digitalRead - it doesn't disable the PWMs #ifndef digitalRead_mod // Use Teensyduino's version of digitalRead - it doesn't disable the PWMs
int digitalRead_mod(const pin_t pin) { // same as digitalRead except the PWM stop section has been removed int digitalRead_mod(const pin_t pin) { // same as digitalRead except the PWM stop section has been removed
@@ -356,7 +356,7 @@ void pwm_details(uint8_t pin) {
} }
#endif #endif
void print_port(const pin_t pin) { // print port number void printPinPort(const pin_t pin) { // print port number
#ifdef digitalPinToPort_DEBUG #ifdef digitalPinToPort_DEBUG
uint8_t x; uint8_t x;
SERIAL_ECHOPGM(" Port: "); SERIAL_ECHOPGM(" Port: ");
@@ -386,7 +386,7 @@ void print_port(const pin_t pin) { // print port number
#endif #endif
} }
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) #define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
#undef ABTEST #undef ABTEST
@@ -120,7 +120,7 @@ void u8g_spiSend_sw_AVR_mode_3(uint8_t val) {
U8G_ATOMIC_END(); U8G_ATOMIC_END();
} }
#if ENABLED(FYSETC_MINI_12864) #if U8G_SPI_USE_MODE_3
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_3 #define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_3
#else #else
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_0 #define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_0
@@ -143,7 +143,7 @@ uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
break; break;
case U8G_COM_MSG_CHIP_SELECT: case U8G_COM_MSG_CHIP_SELECT:
#if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0 #if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active // the next chip select goes active
u8g_com_arduino_digital_write(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active u8g_com_arduino_digital_write(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
+5 -5
View File
@@ -81,11 +81,11 @@ extern DefaultSerial4 MSerial3;
#endif #endif
#endif #endif
#ifdef MMU2_SERIAL_PORT #ifdef MMU_SERIAL_PORT
#if WITHIN(MMU2_SERIAL_PORT, 0, 3) #if WITHIN(MMU_SERIAL_PORT, 0, 3)
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) #define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT)
#else #else
#error "MMU2_SERIAL_PORT must be from 0 to 3." #error "MMU_SERIAL_PORT must be from 0 to 3."
#endif #endif
#endif #endif
@@ -127,7 +127,7 @@ typedef Servo hal_servo_t;
#define HAL_ADC_RESOLUTION 10 #define HAL_ADC_RESOLUTION 10
#ifndef analogInputToDigitalPin #ifndef analogInputToDigitalPin
#define analogInputToDigitalPin(p) ((p < 12U) ? (p) + 54U : -1) #define analogInputToDigitalPin(p) pin_t((p < 12U) ? (p) + 54U : -1)
#endif #endif
// //
+1 -1
View File
@@ -50,7 +50,7 @@
static Flags<_Nbr_16timers> DisablePending; // ISR should disable the timer at the next timer reset static Flags<_Nbr_16timers> DisablePending; // ISR should disable the timer at the next timer reset
// ------------------------ // ------------------------
/// Interrupt handler for the TC0 channel 1. // Interrupt handler for the TC0 channel 1.
// ------------------------ // ------------------------
void Servo_Handler(const timer16_Sequence_t, Tc*, const uint8_t); void Servo_Handler(const timer16_Sequence_t, Tc*, const uint8_t);
+1
View File
@@ -64,6 +64,7 @@ void setup_endstop_interrupts() {
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN)); TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN)); TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN)); TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN)); TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN)); TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
+1 -1
View File
@@ -61,7 +61,7 @@
#else #else
#define G2_PWM_Z 0 #define G2_PWM_Z 0
#endif #endif
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E) #if HAS_MOTOR_CURRENT_PWM_E
#define G2_PWM_E 1 #define G2_PWM_E 1
#else #else
#define G2_PWM_E 0 #define G2_PWM_E 0
+4 -5
View File
@@ -68,16 +68,15 @@
* Usually the hardware SPI pins are only available to the LCD. This makes the DUE hard SPI used at the same time * Usually the hardware SPI pins are only available to the LCD. This makes the DUE hard SPI used at the same time
* as the TMC2130 soft SPI the most common setup. * as the TMC2130 soft SPI the most common setup.
*/ */
#define _IS_HW_SPI(P) (defined(TMC_SPI_##P) && (TMC_SPI_##P == SD_MOSI_PIN || TMC_SPI_##P == SD_MISO_PIN || TMC_SPI_##P == SD_SCK_PIN))
#if HAS_MEDIA && HAS_DRIVER(TMC2130) #if HAS_MEDIA && HAS_DRIVER(TMC2130)
#if ENABLED(TMC_USE_SW_SPI) #define _IS_HW_SPI(P) (defined(TMC_SPI_##P) && (TMC_SPI_##P == SD_MOSI_PIN || TMC_SPI_##P == SD_MISO_PIN || TMC_SPI_##P == SD_SCK_PIN))
#if DISABLED(SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK)) #if DISABLED(SOFTWARE_SPI) && ENABLED(TMC_USE_SW_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(SOFTWARE_SPI) #if ENABLED(SOFTWARE_SPI) && DISABLED(TMC_USE_SW_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
#undef _IS_HW_SPI
#endif #endif
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY #if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
+11 -11
View File
@@ -64,19 +64,19 @@
#define NUMBER_PINS_TOTAL PINS_COUNT #define NUMBER_PINS_TOTAL PINS_COUNT
#define digitalRead_mod(p) extDigitalRead(p) // AVR digitalRead disabled PWM before it read the pin #define digitalRead_mod(p) extDigitalRead(p) // AVR digitalRead disabled PWM before it read the pin
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0) #define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
#define GET_ARRAY_PIN(p) pin_array[p].pin #define getPinByIndex(p) pin_array[p].pin
#define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital #define getPinIsDigitalByIndex(p) pin_array[p].is_digital
#define VALID_PIN(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL)) #define isValidPin(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL))
#define DIGITAL_PIN_TO_ANALOG_PIN(p) int(p - analogInputToDigitalPin(0)) #define digitalPinToAnalogIndex(p) int(p - analogInputToDigitalPin(0))
#define IS_ANALOG(P) WITHIN(P, char(analogInputToDigitalPin(0)), char(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1))) #define isAnalogPin(P) WITHIN(P, pin_t(analogInputToDigitalPin(0)), pin_t(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1)))
#define pwm_status(pin) (((g_pinStatus[pin] & 0xF) == PIN_STATUS_PWM) && \ #define pwm_status(pin) (((g_pinStatus[pin] & 0xF) == PIN_STATUS_PWM) && \
((g_APinDescription[pin].ulPinAttribute & PIN_ATTR_PWM) == PIN_ATTR_PWM)) ((g_APinDescription[pin].ulPinAttribute & PIN_ATTR_PWM) == PIN_ATTR_PWM))
#define MULTI_NAME_PAD 14 // space needed to be pretty if not first name assigned to a pin #define MULTI_NAME_PAD 14 // space needed to be pretty if not first name assigned to a pin
bool GET_PINMODE(int8_t pin) { // 1: output, 0: input bool getValidPinMode(int8_t pin) { // 1: output, 0: input
volatile Pio* port = g_APinDescription[pin].pPort; volatile Pio* port = g_APinDescription[pin].pPort;
uint32_t mask = g_APinDescription[pin].ulPin; uint32_t mask = g_APinDescription[pin].ulPin;
uint8_t pin_status = g_pinStatus[pin] & 0xF; uint8_t pin_status = g_pinStatus[pin] & 0xF;
@@ -85,14 +85,14 @@ bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
|| pwm_status(pin)); || pwm_status(pin));
} }
void pwm_details(int32_t pin) { void printPinPWM(int32_t pin) {
if (pwm_status(pin)) { if (pwm_status(pin)) {
uint32_t chan = g_APinDescription[pin].ulPWMChannel; uint32_t chan = g_APinDescription[pin].ulPWMChannel;
SERIAL_ECHOPGM("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY); SERIAL_ECHOPGM("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY);
} }
} }
void print_port(const pin_t) {} void printPinPort(const pin_t) {}
/** /**
* DUE Board pin | PORT | Label * DUE Board pin | PORT | Label
+1 -1
View File
@@ -24,7 +24,7 @@
/** /**
* Define SPI Pins: SCK, MISO, MOSI, SS * Define SPI Pins: SCK, MISO, MOSI, SS
* *
* Available chip select pins for HW SPI are 4 10 52 77 * Available chip select pins for HW SPI are 4 10 52 77 87
*/ */
#if SDSS == 4 || SDSS == 10 || SDSS == 52 || SDSS == 77 || SDSS == 87 #if SDSS == 4 || SDSS == 10 || SDSS == 52 || SDSS == 77 || SDSS == 87
#if SDSS == 4 #if SDSS == 4
@@ -66,7 +66,7 @@
#include <U8glib-HAL.h> #include <U8glib-HAL.h>
#if ENABLED(FYSETC_MINI_12864) #if U8G_SPI_USE_MODE_3
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_3 #define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_3
#else #else
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_0 #define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_0
@@ -96,15 +96,15 @@ uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
break; break;
case U8G_COM_MSG_CHIP_SELECT: case U8G_COM_MSG_CHIP_SELECT:
#if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0 #if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active // the next chip select goes active
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 1); //set SCK to mode 3 idle state before CS goes active u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, LOW); u8g_SetPILevel_DUE(u8g, U8G_PI_CS, LOW);
} }
else { else {
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, HIGH); u8g_SetPILevel_DUE(u8g, U8G_PI_CS, HIGH);
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0); //set SCK to mode 0 idle state after CS goes inactive u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
} }
#else #else
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, !arg_val); u8g_SetPILevel_DUE(u8g, U8G_PI_CS, !arg_val);
+1 -1
View File
@@ -11,7 +11,7 @@ if pioutil.is_pio_build():
if current_OS == 'Windows': if current_OS == 'Windows':
Import("env") env = pioutil.env
# Use bossac.exe on Windows # Use bossac.exe on Windows
env.Replace( env.Replace(
+20 -22
View File
@@ -18,30 +18,30 @@ extern "C" {
void sd_mmc_spi_mem_init() { void sd_mmc_spi_mem_init() {
} }
Ctrl_status sd_mmc_spi_test_unit_ready() { inline bool media_ready() {
#ifdef DISABLE_DUE_SD_MMC return IS_SD_MOUNTED() && IS_SD_INSERTED() && !IS_SD_FILE_OPEN() && !IS_SD_PRINTING();
return CTRL_NO_PRESENT;
#endif
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
return CTRL_NO_PRESENT;
return CTRL_GOOD;
}
// NOTE: This function is defined as returning the address of the last block
// in the card, which is cardSize() - 1
Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector) {
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
return CTRL_NO_PRESENT;
*nb_sector = card.diskIODriver()->cardSize() - 1;
return CTRL_GOOD;
} }
bool sd_mmc_spi_unload(bool) { return true; } bool sd_mmc_spi_unload(bool) { return true; }
bool sd_mmc_spi_wr_protect() { return false; } bool sd_mmc_spi_wr_protect() { return false; }
bool sd_mmc_spi_removal() { bool sd_mmc_spi_removal() { return !media_ready(); }
return (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted());
Ctrl_status sd_mmc_spi_test_unit_ready() {
#ifdef DISABLE_DUE_SD_MMC
return CTRL_NO_PRESENT;
#endif
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
return CTRL_GOOD;
}
// NOTE: This function is defined as returning the address of the last block
// in the card, which is cardSize() - 1
Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector) {
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
*nb_sector = card.diskIODriver()->cardSize() - 1;
return CTRL_GOOD;
} }
#if ACCESS_USB == true #if ACCESS_USB == true
@@ -61,8 +61,7 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) {
#ifdef DISABLE_DUE_SD_MMC #ifdef DISABLE_DUE_SD_MMC
return CTRL_NO_PRESENT; return CTRL_NO_PRESENT;
#endif #endif
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted()) if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
return CTRL_NO_PRESENT;
#ifdef DEBUG_MMC #ifdef DEBUG_MMC
{ {
@@ -101,8 +100,7 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) {
#ifdef DISABLE_DUE_SD_MMC #ifdef DISABLE_DUE_SD_MMC
return CTRL_NO_PRESENT; return CTRL_NO_PRESENT;
#endif #endif
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted()) if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
return CTRL_NO_PRESENT;
#ifdef DEBUG_MMC #ifdef DEBUG_MMC
{ {
+8 -8
View File
@@ -74,7 +74,7 @@
//! //!
//! @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.
//!/ //!/
extern void sd_mmc_spi_mem_init(void); void sd_mmc_spi_mem_init();
//! //!
//! @brief This function tests the state of the SD_MMC memory and sends it to the Host. //! @brief This function tests the state of the SD_MMC memory and sends it to the Host.
@@ -87,7 +87,7 @@ extern void sd_mmc_spi_mem_init(void);
//! Media not present -> CTRL_NO_PRESENT //! Media not present -> CTRL_NO_PRESENT
//! Media has changed -> CTRL_BUSY //! Media has changed -> CTRL_BUSY
//!/ //!/
extern Ctrl_status sd_mmc_spi_test_unit_ready(void); Ctrl_status sd_mmc_spi_test_unit_ready();
//! //!
//! @brief This function gives the address of the last valid sector. //! @brief This function gives the address of the last valid sector.
@@ -98,7 +98,7 @@ extern Ctrl_status sd_mmc_spi_test_unit_ready(void);
//! Media ready -> CTRL_GOOD //! Media ready -> CTRL_GOOD
//! Media not present -> CTRL_NO_PRESENT //! Media not present -> CTRL_NO_PRESENT
//!/ //!/
extern Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector); Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
/*! \brief Unload/Load the SD/MMC card selected /*! \brief Unload/Load the SD/MMC card selected
* *
@@ -109,7 +109,7 @@ extern Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
* *
* \return \c true if unload/load done success. * \return \c true if unload/load done success.
*/ */
extern bool sd_mmc_spi_unload(bool unload); bool sd_mmc_spi_unload(bool unload);
//! //!
//! @brief This function returns the write protected status of the memory. //! @brief This function returns the write protected status of the memory.
@@ -120,14 +120,14 @@ extern bool sd_mmc_spi_unload(bool unload);
//! //!
//! @return false -> the memory is not write-protected (always) //! @return false -> the memory is not write-protected (always)
//!/ //!/
extern bool sd_mmc_spi_wr_protect(void); bool sd_mmc_spi_wr_protect();
//! //!
//! @brief This function tells if the memory has been removed or not. //! @brief This function tells if the memory has been removed or not.
//! //!
//! @return false -> The memory isn't removed //! @return false -> The memory isn't removed
//! //!
extern bool sd_mmc_spi_removal(void); bool sd_mmc_spi_removal();
//---- ACCESS DATA FUNCTIONS ---- //---- ACCESS DATA FUNCTIONS ----
@@ -147,7 +147,7 @@ extern bool sd_mmc_spi_removal(void);
//! It is ready -> CTRL_GOOD //! It is ready -> CTRL_GOOD
//! A error occur -> CTRL_FAIL //! A error occur -> CTRL_FAIL
//! //!
extern Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector); Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
//! This function initializes the SD/MMC memory for a write operation //! This function initializes the SD/MMC memory for a write operation
//! //!
@@ -161,7 +161,7 @@ extern Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
//! It is ready -> CTRL_GOOD //! It is ready -> CTRL_GOOD
//! An error occurs -> CTRL_FAIL //! An error occurs -> CTRL_FAIL
//! //!
extern Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector); Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector);
#endif // #if ACCESS_USB == true #endif // #if ACCESS_USB == true
+9 -8
View File
@@ -209,16 +209,17 @@ int MarlinHAL::freeMemory() { return ESP.getFreeHeap(); }
// ADC // ADC
// ------------------------ // ------------------------
#define ADC1_CHANNEL(pin) ADC1_GPIO ## pin ## _CHANNEL // https://docs.espressif.com/projects/esp-idf/en/release-v4.4/esp32/api-reference/peripherals/adc.html
adc1_channel_t get_channel(int pin) { adc1_channel_t get_channel(int pin) {
switch (pin) { switch (pin) {
case 39: return ADC1_CHANNEL(39); case 39: return ADC1_CHANNEL_3;
case 36: return ADC1_CHANNEL(36); case 36: return ADC1_CHANNEL_0;
case 35: return ADC1_CHANNEL(35); case 35: return ADC1_CHANNEL_7;
case 34: return ADC1_CHANNEL(34); case 34: return ADC1_CHANNEL_6;
case 33: return ADC1_CHANNEL(33); case 33: return ADC1_CHANNEL_5;
case 32: return ADC1_CHANNEL(32); case 32: return ADC1_CHANNEL_4;
case 37: return ADC1_CHANNEL_1;
case 38: return ADC1_CHANNEL_2;
} }
return ADC1_CHANNEL_MAX; return ADC1_CHANNEL_MAX;
} }
@@ -59,6 +59,7 @@ void setup_endstop_interrupts() {
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN)); TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN)); TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN)); TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN)); TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN)); TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
+1 -1
View File
@@ -152,7 +152,7 @@ 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); const bool using_ftMotion = TERN0(FT_MOTION, ftMotion.cfg.active);
while (dma.rw_pos < DMA_SAMPLE_COUNT) { while (dma.rw_pos < DMA_SAMPLE_COUNT) {
+1 -1
View File
@@ -90,7 +90,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
config.counter_en = TIMER_PAUSE; config.counter_en = TIMER_PAUSE;
config.alarm_en = TIMER_ALARM_EN; config.alarm_en = TIMER_ALARM_EN;
config.intr_type = TIMER_INTR_LEVEL; config.intr_type = TIMER_INTR_LEVEL;
config.auto_reload = true; config.auto_reload = TIMER_AUTORELOAD_EN;
// Select and initialize the timer // Select and initialize the timer
timer_init(timer.group, timer.idx, &config); timer_init(timer.group, timer.idx, &config);
+1 -2
View File
@@ -53,12 +53,11 @@ typedef uint64_t hal_timer_t;
#if ENABLED(I2S_STEPPER_STREAM) #if ENABLED(I2S_STEPPER_STREAM)
#define STEPPER_TIMER_PRESCALE 1 #define STEPPER_TIMER_PRESCALE 1
#define STEPPER_TIMER_RATE 250000 // 250khz, 4µs pulses of i2s word clock #define STEPPER_TIMER_RATE 250000 // 250khz, 4µs pulses of i2s word clock
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs // wrong would be 0.25
#else #else
#define STEPPER_TIMER_PRESCALE 40 #define STEPPER_TIMER_PRESCALE 40
#define STEPPER_TIMER_RATE ((HAL_TIMER_RATE) / (STEPPER_TIMER_PRESCALE)) // frequency of stepper timer, 2MHz #define STEPPER_TIMER_RATE ((HAL_TIMER_RATE) / (STEPPER_TIMER_PRESCALE)) // frequency of stepper timer, 2MHz
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
#endif #endif
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts #define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
+30 -14
View File
@@ -114,22 +114,19 @@
// Misc. Functions // Misc. Functions
// //
#ifndef analogInputToDigitalPin #ifndef analogInputToDigitalPin
#define analogInputToDigitalPin(p) (p) #define analogInputToDigitalPin(p) pin_t(p)
#endif #endif
#define CRITICAL_SECTION_START \ #define CRITICAL_SECTION_START() \
uint32_t primask = __get_PRIMASK(); \ const bool irqon = !__get_PRIMASK(); \
(void)__iCliRetVal() __disable_irq(); \
__DSB();
#define CRITICAL_SECTION_END() \
__DSB(); \
if (irqon) __enable_irq();
#define CRITICAL_SECTION_END \ #define cli() __disable_irq()
if (!primask) \ #define sei() __enable_irq()
(void)__iSeiRetVal()
// Disable interrupts
#define cli() noInterrupts()
// Enable interrupts
#define sei() interrupts()
// bss_end alias // bss_end alias
#define __bss_end __bss_end__ #define __bss_end __bss_end__
@@ -142,12 +139,31 @@
// ADC // ADC
// //
#define HAL_ADC_VREF_MV 3300 #define HAL_ADC_VREF_MV 3300
#define HAL_ADC_RESOLUTION 10 #define HAL_ADC_RESOLUTION 12
#define GET_PIN_MAP_PIN(index) index #define GET_PIN_MAP_PIN(index) index
#define GET_PIN_MAP_INDEX(pin) pin #define GET_PIN_MAP_INDEX(pin) pin
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval) #define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
//
// Debug port disable
// JTMS / SWDIO = PA13
// JTCK / SWCLK = PA14
// JTDI = PA15
// JTDO = PB3
// NJTRST = PB4
//
#define DBG_SWCLK _BV(0)
#define DBG_SWDIO _BV(1)
#define DBG_TDO _BV(2)
#define DBG_TDI _BV(3)
#define DBG_TRST _BV(4)
#define DBG_ALL (DBG_SWCLK | DBG_SWDIO | DBG_TDO | DBG_TDI | DBG_TRST)
#define JTAGSWD_RESET() PORT_DebugPortSetting(DBG_ALL, Enable);
#define JTAG_DISABLE() PORT_DebugPortSetting(DBG_TDO | DBG_TDI | DBG_TRST, Disable);
#define JTAGSWD_DISABLE() PORT_DebugPortSetting(DBG_ALL, Disable);
// //
// MarlinHAL implementation // MarlinHAL implementation
// //
+33 -2
View File
@@ -123,6 +123,11 @@ void MarlinHAL::init() {
// Register min serial // Register min serial
TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); TERN_(POSTMORTEM_DEBUGGING, install_min_serial());
// warn if low memory after init
if (freeMemory() < 1024) {
SERIAL_WARN_MSG("HAL: low memory after init!\n");
}
} }
void MarlinHAL::init_board() {} void MarlinHAL::init_board() {}
@@ -147,7 +152,31 @@ void MarlinHAL::delay_ms(const int ms) {
delay(ms); delay(ms);
} }
void MarlinHAL::idletask() {} void MarlinHAL::idletask() {
#if ENABLED(MARLIN_DEV_MODE)
// check & print serial RX errors
MSerialT *serials[] = { &MSerial1, &MSerial2 };
for (int serial = 0; serial < 2; serial++) {
usart_receive_error_t err = serials[serial]->getReceiveError();
if (err != usart_receive_error_t::None) {
// "Warning: MSerial[n] RX [Framing|Parity|Overrun] Error"
SERIAL_WARN_START();
SERIAL_ECHOPGM(" MSerial");
SERIAL_ECHO(serial + 1);
SERIAL_ECHOPGM(" RX ");
switch(err) {
case usart_receive_error_t::FramingError: SERIAL_ECHOPGM("Framing"); break;
case usart_receive_error_t::ParityError: SERIAL_ECHOPGM("Parity"); break;
case usart_receive_error_t::OverrunError: SERIAL_ECHOPGM("Overrun"); break;
case usart_receive_error_t::RxDataDropped: SERIAL_ECHOPGM("DataDropped"); break;
default: break;
}
SERIAL_ECHOPGM(" Error");
SERIAL_EOL();
}
}
#endif
}
uint8_t MarlinHAL::get_reset_source() { uint8_t MarlinHAL::get_reset_source() {
// Query reset cause from RMU // Query reset cause from RMU
@@ -203,7 +232,9 @@ int MarlinHAL::freeMemory() {
return &top - _sbrk(0); return &top - _sbrk(0);
} }
void MarlinHAL::adc_init() {} void MarlinHAL::adc_init() {
analogReadResolution(HAL_ADC_RESOLUTION);
}
void MarlinHAL::adc_enable(const pin_t pin) { void MarlinHAL::adc_enable(const pin_t pin) {
#if TEMP_SENSOR_SOC #if TEMP_SENSOR_SOC
+23 -3
View File
@@ -46,14 +46,34 @@ constexpr bool serial_handles_emergency(int port) {
// //
// Define serial ports // Define serial ports
// //
#define DEFINE_HWSERIAL_MARLIN(name, n) \
// serial port where RX and TX use IRQs
#define DEFINE_IRQ_SERIAL_MARLIN(name, n) \
MSerialT name(serial_handles_emergency(n), \ MSerialT name(serial_handles_emergency(n), \
&USART##n##_config, \ &USART##n##_config, \
BOARD_USART##n##_TX_PIN, \ BOARD_USART##n##_TX_PIN, \
BOARD_USART##n##_RX_PIN); BOARD_USART##n##_RX_PIN);
DEFINE_HWSERIAL_MARLIN(MSerial1, 1); // serial port where RX uses DMA and TX uses IRQs
DEFINE_HWSERIAL_MARLIN(MSerial2, 2); // all serial ports use DMA1
// since there are 4 USARTs and 4 DMA channels, we can use the USART number as the DMA channel
#define DEFINE_DMA_SERIAL_MARLIN(name, n) \
MSerialT name(serial_handles_emergency(n), \
&USART##n##_config, \
BOARD_USART##n##_TX_PIN, \
BOARD_USART##n##_RX_PIN, \
M4_DMA1, \
((en_dma_channel_t)(n - 1))); // map USART1 to DMA channel 0, USART2 to DMA channel 1, etc.
#define DEFINE_SERIAL_MARLIN(name, n) TERN(SERIAL_DMA, DEFINE_DMA_SERIAL_MARLIN(name, n), DEFINE_IRQ_SERIAL_MARLIN(name, n))
DEFINE_SERIAL_MARLIN(MSerial1, 1);
DEFINE_SERIAL_MARLIN(MSerial2, 2);
// TODO: remove this warning when SERIAL_DMA has been tested some more
#if ENABLED(SERIAL_DMA)
#warning "SERIAL_DMA may be unstable on HC32F460."
#endif
// //
// Serial port assertions // Serial port assertions
+38 -8
View File
@@ -25,17 +25,42 @@
#include <drivers/usart/Usart.h> #include <drivers/usart/Usart.h>
// Optionally set uart IRQ priority to reduce overflow errors // Optionally set uart IRQ priority to reduce overflow errors
// #define UART_IRQ_PRIO 1 //#define UART_RX_IRQ_PRIO 1
//#define UART_TX_IRQ_PRIO 1
//#define UART_RX_DMA_IRQ_PRIO 1
struct MarlinSerial : public Usart { struct MarlinSerial : public Usart {
MarlinSerial(struct usart_config_t *usart_device, gpio_pin_t tx_pin, gpio_pin_t rx_pin) : Usart(usart_device, tx_pin, rx_pin) {} MarlinSerial(
struct usart_config_t *usart_device,
gpio_pin_t tx_pin,
gpio_pin_t rx_pin
#if ENABLED(SERIAL_DMA)
, M4_DMA_TypeDef *dma_unit = nullptr,
en_dma_channel_t rx_dma_channel = DmaCh0
#endif
) : Usart(usart_device, tx_pin, rx_pin) {
#if ENABLED(SERIAL_DMA)
if (dma_unit != nullptr) {
enableRxDma(dma_unit, rx_dma_channel);
}
#endif
}
#ifdef UART_IRQ_PRIO #if defined(UART_RX_IRQ_PRIO) || defined(UART_TX_IRQ_PRIO) || defined(UART_RX_DMA_IRQ_PRIO)
void setPriority() { void setPriority() {
NVIC_SetPriority(c_dev()->interrupts.rx_data_available.interrupt_number, UART_IRQ_PRIO); #if defined(UART_RX_IRQ_PRIO)
NVIC_SetPriority(c_dev()->interrupts.rx_error.interrupt_number, UART_IRQ_PRIO); NVIC_SetPriority(c_dev()->interrupts.rx_data_available.interrupt_number, UART_RX_IRQ_PRIO);
NVIC_SetPriority(c_dev()->interrupts.tx_buffer_empty.interrupt_number, UART_IRQ_PRIO); NVIC_SetPriority(c_dev()->interrupts.rx_error.interrupt_number, UART_RX_IRQ_PRIO);
NVIC_SetPriority(c_dev()->interrupts.tx_complete.interrupt_number, UART_IRQ_PRIO); #endif
#if defined(UART_TX_IRQ_PRIO)
NVIC_SetPriority(c_dev()->interrupts.tx_buffer_empty.interrupt_number, UART_TX_IRQ_PRIO);
NVIC_SetPriority(c_dev()->interrupts.tx_complete.interrupt_number, UART_TX_IRQ_PRIO);
#endif
#if defined(UART_RX_DMA_IRQ_PRIO) && ENABLED(SERIAL_DMA)
NVIC_SetPriority(c_dev()->dma.rx.rx_data_available_dma_btc.interrupt_number, UART_RX_DMA_IRQ_PRIO);
#endif
} }
void begin(uint32_t baud) { void begin(uint32_t baud) {
@@ -47,7 +72,12 @@ struct MarlinSerial : public Usart {
Usart::begin(baud, config); Usart::begin(baud, config);
setPriority(); setPriority();
} }
#endif
void begin(uint32_t baud, const stc_usart_uart_init_t *config, const bool rxNoiseFilter = true) {
Usart::begin(baud, config, rxNoiseFilter);
setPriority();
}
#endif // UART_RX_IRQ_PRIO || UART_TX_IRQ_PRIO || UART_RX_DMA_IRQ_PRIO
}; };
typedef Serial1Class<MarlinSerial> MSerialT; typedef Serial1Class<MarlinSerial> MSerialT;
+75
View File
@@ -0,0 +1,75 @@
/**
* app_config.h is included by the hc32f460 arduino build script for every source file.
* it is used to configure the arduino core (and ddl) automatically according
* to the settings in Configuration.h and Configuration_adv.h.
*/
#pragma once
#ifndef _HC32_APP_CONFIG_H_
#define _HC32_APP_CONFIG_H_
#include "../../inc/MarlinConfigPre.h"
//
// dev mode
//
#if ENABLED(MARLIN_DEV_MODE)
#define __DEBUG 1
#define __CORE_DEBUG 1
#endif
//
// Fault Handlers and Panic
//
#if ENABLED(POSTMORTEM_DEBUGGING)
// disable arduino core fault handler, as we define our own
#define CORE_DISABLE_FAULT_HANDLER 1
#endif
// force-enable panic handler so that we can use our custom one (in MinSerial)
#define PANIC_ENABLE 1
// use short filenames in ddl debug and core panic output
#define __DEBUG_SHORT_FILENAMES 1
#define __PANIC_SHORT_FILENAMES 1
// omit panic messages in core panic output
#define __OMIT_PANIC_MESSAGE 1
//
// Usart
//
// disable serial globals (Serial1, Serial2, ...), as we define our own
#define DISABLE_SERIAL_GLOBALS 1
// increase the size of the Usart buffers (both RX and TX)
// NOTE:
// the heap usage will increase by (SERIAL_BUFFER_SIZE - 64) * "number of serial ports used"
// if running out of heap, the system may become unstable
//#define SERIAL_BUFFER_SIZE 256
// enable support for Usart Clock Divider / Oversampling auto config
#define USART_AUTO_CLKDIV_OS_CONFIG 1
// enable USART_RX_DMA_SUPPORT core option when SERIAL_DMA is enabled
#if ENABLED(SERIAL_DMA)
#define USART_RX_DMA_SUPPORT 1
#endif
//
// Misc.
//
// redirect printf to host serial
#define REDIRECT_PRINTF_TO_SERIAL 1
// F_CPU must be known at compile time, but on HC32F460 it's not.
// Thus we assume HCLK to be 200MHz, as that's what is configured in
// 'core_hook_sysclock_init' in 'sysclock.cpp'.
// If you face issues with this assumption, please double-check with the values
// printed by 'MarlinHAL::HAL_clock_frequencies_dump'.
// see also: HAL_TIMER_RATE in timers.h
#define F_CPU 200000000 // 200MHz HCLK
#endif // _HC32_APP_CONFIG_H_
+21 -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,14 +96,19 @@ 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);
SETUP(CALIBRATION);
#undef SETUP #undef SETUP
} }
// 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, USE_CALIBRATION)
#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
+31
View File
@@ -20,6 +20,20 @@
* *
*/ */
#pragma once #pragma once
#include <core_util.h>
#if !defined(ARDUINO_CORE_VERSION_INT) || !defined(GET_VERSION_INT)
// version macros were introduced in arduino core version 1.1.0
// below that version, we polyfill them
#define GET_VERSION_INT(major, minor, patch) ((major * 100000) + (minor * 1000) + patch)
#define ARDUINO_CORE_VERSION_INT GET_VERSION_INT(1, 0, 0)
#endif
#if ARDUINO_CORE_VERSION_INT < GET_VERSION_INT(1, 1, 0)
// because we use app_config.h introduced in arduino core version 1.1.0, the
// HAL is not compatible with older versions
#error "The HC32 HAL is not compatible with Arduino Core versions < 1.1.0. Consider updating the Arduino Core."
#endif
#ifndef BOARD_XTAL_FREQUENCY #ifndef BOARD_XTAL_FREQUENCY
#error "BOARD_XTAL_FREQUENCY is required for HC32F460." #error "BOARD_XTAL_FREQUENCY is required for HC32F460."
@@ -74,3 +88,20 @@
#error "HC32 HAL uses a custom panic handler. Do not define PANIC_USARTx_TX_PIN." #error "HC32 HAL uses a custom panic handler. Do not define PANIC_USARTx_TX_PIN."
#endif #endif
#endif #endif
#if ENABLED(SERIAL_DMA)
#if !defined(USART_RX_DMA_SUPPORT)
#error "SERIAL_DMA requires USART_RX_DMA_SUPPORT to be enabled in the arduino core."
#endif
// Before arduino core version 1.2.0, USART_RX_DMA_SUPPORT did not implement
// core_hook_usart_rx_irq, which is required for the emergency parser.
// With 1.2.0, this was fixed (see https://github.com/shadow578/framework-arduino-hc32f46x/pull/25).
#if ENABLED(EMERGENCY_PARSER) && ARDUINO_CORE_VERSION_INT < GET_VERSION_INT(1, 2, 0)
#error "EMERGENCY_PARSER is not supported with SERIAL_DMA. Please disable either SERIAL_DMA or EMERGENCY_PARSER."
#endif
#if ARDUINO_CORE_VERSION_INT < GET_VERSION_INT(1, 1, 0)
#error "SERIAL_DMA is not supported with arduino core version < 1.1.0."
#endif
#endif
+18 -18
View File
@@ -31,24 +31,24 @@
#define NUM_DIGITAL_PINS BOARD_NR_GPIO_PINS #define NUM_DIGITAL_PINS BOARD_NR_GPIO_PINS
#define NUMBER_PINS_TOTAL BOARD_NR_GPIO_PINS #define NUMBER_PINS_TOTAL BOARD_NR_GPIO_PINS
#define VALID_PIN(pin) IS_GPIO_PIN(pin) #define isValidPin(pin) IS_GPIO_PIN(pin)
// Note: pin_array is defined in `Marlin/src/pins/pinsDebug.h`, and since this file is included // Note: pin_array is defined in `Marlin/src/pins/pinsDebug.h`, and since this file is included
// after it, it is available in this file as well. // after it, it is available in this file as well.
#define GET_ARRAY_PIN(p) pin_t(pin_array[p].pin) #define getPinByIndex(p) pin_t(pin_array[p].pin)
#define digitalRead_mod(p) extDigitalRead(p) #define digitalRead_mod(p) extDigitalRead(p)
#define PRINT_PIN(p) \ #define printPinNumber(p) \
do { \ do { \
sprintf_P(buffer, PSTR("%3hd "), int16_t(p)); \ sprintf_P(buffer, PSTR("%3hd "), int16_t(p)); \
SERIAL_ECHO(buffer); \ SERIAL_ECHO(buffer); \
} while (0) } while (0)
#define PRINT_PIN_ANALOG(p) \ #define printPinAnalog(p) \
do { \ do { \
sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); \ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); \
SERIAL_ECHO(buffer); \ SERIAL_ECHO(buffer); \
} while (0) } while (0)
#define PRINT_PORT(p) print_port(p) #define PRINT_PORT(p) printPinPort(p)
#define PRINT_ARRAY_NAME(x) \ #define printPinNameByIndex(x) \
do { \ do { \
sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); \ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); \
SERIAL_ECHO(buffer); \ SERIAL_ECHO(buffer); \
@@ -71,14 +71,14 @@
#define M43_NEVER_TOUCH(Q) (IS_HOST_USART_PIN(Q) || IS_OSC_PIN(Q)) #define M43_NEVER_TOUCH(Q) (IS_HOST_USART_PIN(Q) || IS_OSC_PIN(Q))
#endif #endif
static pin_t DIGITAL_PIN_TO_ANALOG_PIN(pin_t pin) { static int8_t digitalPinToAnalogIndex(pin_t pin) {
if (!VALID_PIN(pin)) return -1; if (!isValidPin(pin)) return -1;
const int8_t adc_channel = int8_t(PIN_MAP[pin].adc_info.channel); const int8_t adc_channel = int8_t(PIN_MAP[pin].adc_info.channel);
return pin_t(adc_channel); return pin_t(adc_channel);
} }
static bool IS_ANALOG(pin_t pin) { static bool isAnalogPin(pin_t pin) {
if (!VALID_PIN(pin)) return false; if (!isValidPin(pin)) return false;
if (PIN_MAP[pin].adc_info.channel != ADC_PIN_INVALID) if (PIN_MAP[pin].adc_info.channel != ADC_PIN_INVALID)
return _GET_MODE(pin) == INPUT_ANALOG && !M43_NEVER_TOUCH(pin); return _GET_MODE(pin) == INPUT_ANALOG && !M43_NEVER_TOUCH(pin);
@@ -86,13 +86,13 @@ static bool IS_ANALOG(pin_t pin) {
return false; return false;
} }
static bool GET_PINMODE(const pin_t pin) { static bool getValidPinMode(const pin_t pin) {
return VALID_PIN(pin) && !IS_INPUT(pin); return isValidPin(pin) && !IS_INPUT(pin);
} }
static bool GET_ARRAY_IS_DIGITAL(const int16_t array_pin) { static bool getPinIsDigitalByIndex(const int16_t array_pin) {
const pin_t pin = GET_ARRAY_PIN(array_pin); const pin_t pin = getPinByIndex(array_pin);
return (!IS_ANALOG(pin)); return (!isAnalogPin(pin));
} }
/** /**
@@ -117,7 +117,7 @@ bool pwm_status(const pin_t pin) {
return timera_is_unit_initialized(unit) && timera_is_channel_active(unit, channel) && getPinMode(pin) == OUTPUT_PWM; return timera_is_unit_initialized(unit) && timera_is_channel_active(unit, channel) && getPinMode(pin) == OUTPUT_PWM;
} }
void pwm_details(const pin_t pin) { void printPinPWM(const pin_t pin) {
// Get timer assignment for pin // Get timer assignment for pin
timera_config_t *unit; timera_config_t *unit;
en_timera_channel_t channel; en_timera_channel_t channel;
@@ -161,7 +161,7 @@ void pwm_details(const pin_t pin) {
} }
} }
void print_port(pin_t pin) { void printPinPort(pin_t pin) {
const char port = 'A' + char(pin >> 4); // Pin div 16 const char port = 'A' + char(pin >> 4); // Pin div 16
const int16_t gbit = PIN_MAP[pin].bit_pos; const int16_t gbit = PIN_MAP[pin].bit_pos;
char buffer[8]; char buffer[8];
+26 -17
View File
@@ -54,7 +54,7 @@
fn \ fn \
} }
stc_sd_handle_t *handle; stc_sd_handle_t *handle = nullptr;
bool SDIO_Init() { bool SDIO_Init() {
// Configure SDIO pins // Configure SDIO pins
@@ -66,36 +66,45 @@ bool SDIO_Init() {
GPIO_SetFunc(BOARD_SDIO_CMD, Func_Sdio); GPIO_SetFunc(BOARD_SDIO_CMD, Func_Sdio);
GPIO_SetFunc(BOARD_SDIO_DET, Func_Sdio); GPIO_SetFunc(BOARD_SDIO_DET, Func_Sdio);
// If a handle is already initialized, free it before creating a new one
// otherwise, we will leak memory, which will eventually crash the system
if (handle != nullptr) {
delete handle->pstcDmaInitCfg;
delete handle->pstcCardInitCfg;
delete handle;
handle = nullptr;
}
// Create DMA configuration // Create DMA configuration
stc_sdcard_dma_init_t *dmaConf = new stc_sdcard_dma_init_t; stc_sdcard_dma_init_t *dmaConf = new stc_sdcard_dma_init_t;
dmaConf->DMAx = SDIO_DMA_PERIPHERAL; dmaConf->DMAx = SDIO_DMA_PERIPHERAL;
dmaConf->enDmaCh = SDIO_DMA_CHANNEL; dmaConf->enDmaCh = SDIO_DMA_CHANNEL;
// Create card configuration
// This should be a fairly safe configuration for most cards
stc_sdcard_init_t *cardConf = new stc_sdcard_init_t;
cardConf->enBusWidth = SdiocBusWidth4Bit;
cardConf->enClkFreq = SdiocClk400K;
cardConf->enSpeedMode = SdiocNormalSpeedMode;
cardConf->pstcInitCfg = nullptr;
// Create handle in DMA mode // Create handle in DMA mode
handle = new stc_sd_handle_t; handle = new stc_sd_handle_t;
handle->SDIOCx = SDIO_PERIPHERAL; handle->SDIOCx = SDIO_PERIPHERAL;
handle->enDevMode = SdCardDmaMode; handle->enDevMode = SdCardDmaMode;
handle->pstcDmaInitCfg = dmaConf; handle->pstcDmaInitCfg = dmaConf;
//handle->pstcCardInitCfg = cardConf; // assigned in SDCARD_Init
// Create card configuration
// This should be a fairly safe configuration for most cards
stc_sdcard_init_t cardConf = {
.enBusWidth = SdiocBusWidth4Bit,
.enClkFreq = SdiocClk400K,
.enSpeedMode = SdiocNormalSpeedMode,
//.pstcInitCfg = NULL,
};
// Initialize sd card // Initialize sd card
en_result_t rc = SDCARD_Init(handle, &cardConf); en_result_t rc = SDCARD_Init(handle, cardConf);
if (rc != Ok) printf("SDIO_Init() error (rc=%u)\n", rc); if (rc != Ok) printf("SDIO_Init() error (rc=%u)\n", rc);
return rc == Ok; return rc == Ok;
} }
bool SDIO_ReadBlock(uint32_t block, uint8_t *dst) { bool SDIO_ReadBlock(uint32_t block, uint8_t *dst) {
CORE_ASSERT(handle != NULL, "SDIO not initialized"); CORE_ASSERT(handle != nullptr, "SDIO not initialized", return false);
CORE_ASSERT(dst != NULL, "SDIO_ReadBlock dst is NULL"); CORE_ASSERT(dst != nullptr, "SDIO_ReadBlock dst is NULL", return false);
WITH_RETRY(SDIO_READ_RETRIES, { WITH_RETRY(SDIO_READ_RETRIES, {
en_result_t rc = SDCARD_ReadBlocks(handle, block, 1, dst, SDIO_READ_TIMEOUT); en_result_t rc = SDCARD_ReadBlocks(handle, block, 1, dst, SDIO_READ_TIMEOUT);
@@ -107,8 +116,8 @@ bool SDIO_ReadBlock(uint32_t block, uint8_t *dst) {
} }
bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) { bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) {
CORE_ASSERT(handle != NULL, "SDIO not initialized"); CORE_ASSERT(handle != nullptr, "SDIO not initialized", return false);
CORE_ASSERT(src != NULL, "SDIO_WriteBlock src is NULL"); CORE_ASSERT(src != nullptr, "SDIO_WriteBlock src is NULL", return false);
WITH_RETRY(SDIO_WRITE_RETRIES, { WITH_RETRY(SDIO_WRITE_RETRIES, {
en_result_t rc = SDCARD_WriteBlocks(handle, block, 1, (uint8_t *)src, SDIO_WRITE_TIMEOUT); en_result_t rc = SDCARD_WriteBlocks(handle, block, 1, (uint8_t *)src, SDIO_WRITE_TIMEOUT);
@@ -120,12 +129,12 @@ bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) {
} }
bool SDIO_IsReady() { bool SDIO_IsReady() {
CORE_ASSERT(handle != NULL, "SDIO not initialized"); CORE_ASSERT(handle != nullptr, "SDIO not initialized", return false);
return bool(handle->stcCardStatus.READY_FOR_DATA); return bool(handle->stcCardStatus.READY_FOR_DATA);
} }
uint32_t SDIO_GetCardSize() { uint32_t SDIO_GetCardSize() {
CORE_ASSERT(handle != NULL, "SDIO not initialized"); CORE_ASSERT(handle != nullptr, "SDIO not initialized", return 0);
// Multiply number of blocks with block size to get size in bytes // Multiply number of blocks with block size to get size in bytes
const uint64_t cardSizeBytes = uint64_t(handle->stcSdCardInfo.u32LogBlockNbr) * uint64_t(handle->stcSdCardInfo.u32LogBlockSize); const uint64_t cardSizeBytes = uint64_t(handle->stcSdCardInfo.u32LogBlockNbr) * uint64_t(handle->stcSdCardInfo.u32LogBlockSize);
+24 -9
View File
@@ -96,29 +96,44 @@ void core_hook_sysclock_init() {
#endif #endif
#endif #endif
// Setup clock divisors for sysclk = 200 MHz: // sysclk is now configured according to F_CPU (i.e., 200MHz PLL output)
const uint32_t sysclock = F_CPU;
// Setup clock divisors for sysclk = 200 MHz
// Note: PCLK1 is used for step+temp timers, and need to be kept at 50 MHz (until there is a better solution) // Note: PCLK1 is used for step+temp timers, and need to be kept at 50 MHz (until there is a better solution)
stc_clk_sysclk_cfg_t sysClkConf = { constexpr stc_clk_sysclk_cfg_t sysClkConf = {
.enHclkDiv = ClkSysclkDiv1, // HCLK = 200 MHz (CPU) .enHclkDiv = ClkSysclkDiv1, // HCLK = 200 MHz (CPU)
.enExclkDiv = ClkSysclkDiv2, // EXCLK = 100 MHz (SDIO) .enExclkDiv = ClkSysclkDiv2, // EXCLK = 100 MHz (SDIO)
.enPclk0Div = ClkSysclkDiv1, // PCLK0 = 200 MHz (Timer6 (not used)) .enPclk0Div = ClkSysclkDiv2, // PCLK0 = 100 MHz (Timer6 (not used))
.enPclk1Div = ClkSysclkDiv4, // PCLK1 = 50 MHz (USART, SPI, I2S, Timer0 (step+temp), TimerA (Servo)) .enPclk1Div = ClkSysclkDiv4, // PCLK1 = 50 MHz (USART, SPI, I2S, Timer0 (step+temp), TimerA (Servo))
.enPclk2Div = ClkSysclkDiv4, // PCLK2 = 50 MHz (ADC) .enPclk2Div = ClkSysclkDiv8, // PCLK2 = 25 MHz (ADC)
.enPclk3Div = ClkSysclkDiv4, // PCLK3 = 50 MHz (I2C, WDT) .enPclk3Div = ClkSysclkDiv8, // PCLK3 = 25 MHz (I2C, WDT)
.enPclk4Div = ClkSysclkDiv2, // PCLK4 = 100 MHz (ADC ctl) .enPclk4Div = ClkSysclkDiv2, // PCLK4 = 100 MHz (ADC ctl)
}; };
#if ARDUINO_CORE_VERSION_INT >= GET_VERSION_INT(1, 2, 0)
assert_system_clocks_valid<
sysclock,
sysClkConf.enHclkDiv,
sysClkConf.enPclk0Div,
sysClkConf.enPclk1Div,
sysClkConf.enPclk2Div,
sysClkConf.enPclk3Div,
sysClkConf.enPclk4Div,
sysClkConf.enExclkDiv
>();
#endif
sysclock_set_clock_dividers(&sysClkConf); sysclock_set_clock_dividers(&sysClkConf);
// Set power mode // Set power mode
#define POWER_MODE_SYSTEM_CLOCK 200000000 // 200 MHz power_mode_update_pre(sysclock);
power_mode_update_pre(POWER_MODE_SYSTEM_CLOCK);
// Switch to MPLL as sysclk source // Switch to MPLL as sysclk source
CLK_SetSysClkSource(CLKSysSrcMPLL); CLK_SetSysClkSource(CLKSysSrcMPLL);
// Set power mode // Set power mode
power_mode_update_post(POWER_MODE_SYSTEM_CLOCK); power_mode_update_post(sysclock);
#undef POWER_MODE_SYSTEM_CLOCK
} }
#endif // ARDUINO_ARCH_HC32 #endif // ARDUINO_ARCH_HC32
+19 -15
View File
@@ -38,32 +38,36 @@ extern Timer0 step_timer;
// Timer Configurations // Timer Configurations
// //
// TODO: some calculations (step irq min_step_rate) require the timer rate to be known at compile time /**
// this is not possible with the HC32F460, as the timer rate depends on PCLK1 * HAL_TIMER_RATE must be known at compile time since it's used to calculate
// as a workaround, PCLK1 = 50MHz is assumed (check with clock dump in MarlinHAL::init()) * STEPPER_TIMER_RATE, which is used in 'constexpr' calculations.
#define HAL_TIMER_RATE 50000000 // 50MHz * On the HC32F460 the timer rate depends on PCLK1, which is derived from the
* system clock configured at runtime. As a workaround, we use the existing
* assumption of a 200MHz clock, defining F_CPU as 200000000, then configure PCLK1
* as F_CPU with a divider of 4 in 'sysclock.cpp::core_hook_sysclock_init'.
*
* If you face issues with this assumption, please double-check with the values
* printed by 'MarlinHAL::HAL_clock_frequencies_dump'.
*
* TODO: If the 'constexpr' requirement is ever lifted, use TIMER0_BASE_FREQUENCY instead
*/
#define HAL_TIMER_RATE (F_CPU / 4) // i.e., 50MHz
//#define HAL_TIMER_RATE TIMER0_BASE_FREQUENCY //#define HAL_TIMER_RATE TIMER0_BASE_FREQUENCY
// TODO: CYCLES_PER_MICROSECOND seems to be used by Marlin to calculate the number of cycles per microsecond in the timer ISRs
// by default, it uses F_CPU, but since that is not known at compile time for HC32, we overwrite it here
#undef CYCLES_PER_MICROSECOND
#define CYCLES_PER_MICROSECOND (HAL_TIMER_RATE / 1000000UL)
// Temperature timer // Temperature timer
#define TEMP_TIMER_NUM (&temp_timer) #define TEMP_TIMER_NUM (&temp_timer)
#define TEMP_TIMER_PRIORITY DDL_IRQ_PRIORITY_02 #define TEMP_TIMER_PRIORITY DDL_IRQ_PRIORITY_02
#define TEMP_TIMER_PRESCALE 16ul #define TEMP_TIMER_PRESCALE 16UL // 12.5MHz
#define TEMP_TIMER_RATE 1000 // 1kHz #define TEMP_TIMER_RATE 1000 // 1kHz
#define TEMP_TIMER_FREQUENCY TEMP_TIMER_RATE // Alias for Marlin #define TEMP_TIMER_FREQUENCY TEMP_TIMER_RATE // 1kHz also
// Stepper timer // Stepper timer
#define STEP_TIMER_NUM (&step_timer) #define STEP_TIMER_NUM (&step_timer)
#define STEP_TIMER_PRIORITY DDL_IRQ_PRIORITY_01 #define STEP_TIMER_PRIORITY DDL_IRQ_PRIORITY_00 // Top priority, nothing else uses it
#define STEPPER_TIMER_PRESCALE 16ul #define STEPPER_TIMER_PRESCALE 16UL // 12.5MHz
// TODO: STEPPER_TIMER_RATE seems to work fine like this, but requires further testing...
#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // 50MHz / 16 = 3.125MHz #define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // 50MHz / 16 = 3.125MHz
#define STEPPER_TIMER_TICKS_PER_US (STEPPER_TIMER_RATE / 1000000) #define STEPPER_TIMER_TICKS_PER_US (STEPPER_TIMER_RATE / 1000000UL) // Integer 3
// Pulse timer (== stepper timer) // Pulse timer (== stepper timer)
#define PULSE_TIMER_NUM STEP_TIMER_NUM #define PULSE_TIMER_NUM STEP_TIMER_NUM
@@ -82,7 +82,7 @@ static inline uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, c
} }
static void u8g_sw_spi_shift_out(uint8_t val) { static void u8g_sw_spi_shift_out(uint8_t val) {
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) #if U8G_SPI_USE_MODE_3
swSpiTransfer_mode_3(val, SPI_speed); swSpiTransfer_mode_3(val, SPI_speed);
#else #else
swSpiTransfer_mode_0(val, SPI_speed); swSpiTransfer_mode_0(val, SPI_speed);
@@ -116,7 +116,7 @@ uint8_t u8g_com_HAL_HC32_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, voi
break; break;
case U8G_COM_MSG_CHIP_SELECT: case U8G_COM_MSG_CHIP_SELECT:
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // This LCD SPI is running mode 3 while SD card is running mode 0 #if U8G_SPI_USE_MODE_3 // This LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active // the next chip select goes active
WRITE(DOGLCD_SCK, HIGH); // Set SCK to mode 3 idle state before CS goes active WRITE(DOGLCD_SCK, HIGH); // Set SCK to mode 3 idle state before CS goes active
+1 -1
View File
@@ -52,7 +52,7 @@ uint8_t MarlinHAL::active_ch = 0;
uint16_t MarlinHAL::adc_value() { uint16_t MarlinHAL::adc_value() {
const pin_t pin = analogInputToDigitalPin(active_ch); const pin_t pin = analogInputToDigitalPin(active_ch);
if (!VALID_PIN(pin)) return 0; if (!isValidPin(pin)) return 0;
return uint16_t((Gpio::get(pin) >> 2) & 0x3FF); // return 10bit value as Marlin expects return uint16_t((Gpio::get(pin) >> 2) & 0x3FF); // return 10bit value as Marlin expects
} }
+6 -6
View File
@@ -49,28 +49,28 @@ extern "C" void delay(const int msec) {
// IO functions // IO functions
// As defined by Arduino INPUT(0x0), OUTPUT(0x1), INPUT_PULLUP(0x2) // As defined by Arduino INPUT(0x0), OUTPUT(0x1), INPUT_PULLUP(0x2)
void pinMode(const pin_t pin, const uint8_t mode) { void pinMode(const pin_t pin, const uint8_t mode) {
if (!VALID_PIN(pin)) return; if (!isValidPin(pin)) return;
Gpio::setMode(pin, mode); Gpio::setMode(pin, mode);
} }
void digitalWrite(pin_t pin, uint8_t pin_status) { void digitalWrite(pin_t pin, uint8_t pin_status) {
if (!VALID_PIN(pin)) return; if (!isValidPin(pin)) return;
Gpio::set(pin, pin_status); Gpio::set(pin, pin_status);
} }
bool digitalRead(pin_t pin) { bool digitalRead(pin_t pin) {
if (!VALID_PIN(pin)) return false; if (!isValidPin(pin)) return false;
return Gpio::get(pin); return Gpio::get(pin);
} }
void analogWrite(pin_t pin, int pwm_value) { // 1 - 254: pwm_value, 0: LOW, 255: HIGH void analogWrite(pin_t pin, int pwm_value) { // 1 - 254: pwm_value, 0: LOW, 255: HIGH
if (!VALID_PIN(pin)) return; if (!isValidPin(pin)) return;
Gpio::set(pin, pwm_value); Gpio::set(pin, pwm_value);
} }
uint16_t analogRead(pin_t adc_pin) { uint16_t analogRead(pin_t adc_pin) {
if (!VALID_PIN(DIGITAL_PIN_TO_ANALOG_PIN(adc_pin))) return 0; if (!isValidPin(digitalPinToAnalogIndex(adc_pin))) return 0;
return Gpio::get(DIGITAL_PIN_TO_ANALOG_PIN(adc_pin)); return Gpio::get(digitalPinToAnalogIndex(adc_pin));
} }
char *dtostrf(double __val, signed char __width, unsigned char __prec, char *__s) { char *dtostrf(double __val, signed char __width, unsigned char __prec, char *__s) {
+3
View File
@@ -37,7 +37,10 @@ Timer::Timer() {
} }
Timer::~Timer() { Timer::~Timer() {
if (timerid != 0) {
timer_delete(timerid); timer_delete(timerid);
timerid = 0;
}
} }
void Timer::init(uint32_t sig_id, uint32_t sim_freq, callback_fn* fn) { void Timer::init(uint32_t sig_id, uint32_t sim_freq, callback_fn* fn) {
+2 -2
View File
@@ -42,7 +42,7 @@ constexpr pin_t analogInputToDigitalPin(const int8_t p) {
} }
// Get the analog index for a digital pin // Get the analog index for a digital pin
constexpr int8_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t p) { constexpr int8_t digitalPinToAnalogIndex(const pin_t p) {
return (WITHIN(p, analog_offset, NUM_DIGITAL_PINS) ? p - analog_offset : P_NC); return (WITHIN(p, analog_offset, NUM_DIGITAL_PINS) ? p - analog_offset : P_NC);
} }
@@ -50,7 +50,7 @@ constexpr int8_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t p) {
constexpr int16_t GET_PIN_MAP_INDEX(const pin_t pin) { return pin; } constexpr int16_t GET_PIN_MAP_INDEX(const pin_t pin) { return pin; }
// Test whether the pin is valid // Test whether the pin is valid
constexpr bool VALID_PIN(const pin_t p) { return WITHIN(p, 0, NUM_DIGITAL_PINS); } constexpr bool isValidPin(const pin_t p) { return WITHIN(p, 0, NUM_DIGITAL_PINS); }
// Test whether the pin is PWM // Test whether the pin is PWM
constexpr bool PWM_PIN(const pin_t p) { return false; } constexpr bool PWM_PIN(const pin_t p) { return false; }
+2
View File
@@ -21,6 +21,7 @@
*/ */
#ifdef __PLAT_LINUX__ #ifdef __PLAT_LINUX__
#ifndef UNIT_TEST
//#define GPIO_LOGGING // Full GPIO and Positional Logging //#define GPIO_LOGGING // Full GPIO and Positional Logging
@@ -135,4 +136,5 @@ int main() {
read_serial.join(); read_serial.join();
} }
#endif // UNIT_TEST
#endif // __PLAT_LINUX__ #endif // __PLAT_LINUX__
+11 -11
View File
@@ -29,20 +29,20 @@
*/ */
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS #define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0) #define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0 ? 1 : 0)
#define digitalRead_mod(p) digitalRead(p) #define digitalRead_mod(p) digitalRead(p)
#define GET_ARRAY_PIN(p) pin_array[p].pin #define getPinByIndex(p) pin_array[p].pin
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) #define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin #define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
// active ADC function/mode/code values for PINSEL registers // active ADC function/mode/code values for PINSEL registers
constexpr int8_t ADC_pin_mode(pin_t pin) { return -1; } constexpr int8_t ADC_pin_mode(pin_t pin) { return -1; }
int8_t get_pin_mode(const pin_t pin) { return VALID_PIN(pin) ? 0 : -1; } int8_t get_pin_mode(const pin_t pin) { return isValidPin(pin) ? 0 : -1; }
bool GET_PINMODE(const pin_t pin) { bool getValidPinMode(const pin_t pin) {
const int8_t pin_mode = get_pin_mode(pin); const int8_t pin_mode = get_pin_mode(pin);
if (pin_mode == -1 || pin_mode == ADC_pin_mode(pin)) // Invalid pin or active analog pin if (pin_mode == -1 || pin_mode == ADC_pin_mode(pin)) // Invalid pin or active analog pin
return false; return false;
@@ -50,11 +50,11 @@ bool GET_PINMODE(const pin_t pin) {
return (Gpio::getMode(pin) != 0); // Input/output state return (Gpio::getMode(pin) != 0); // Input/output state
} }
bool GET_ARRAY_IS_DIGITAL(const pin_t pin) { bool getPinIsDigitalByIndex(const pin_t pin) {
return (!IS_ANALOG(pin) || get_pin_mode(pin) != ADC_pin_mode(pin)); return (!isAnalogPin(pin) || get_pin_mode(pin) != ADC_pin_mode(pin));
} }
void pwm_details(const pin_t pin) {} void printPinPWM(const pin_t pin) {}
bool pwm_status(const pin_t) { return false; } bool pwm_status(const pin_t) { return false; }
void print_port(const pin_t) {} void printPinPort(const pin_t) {}
-6
View File
@@ -28,12 +28,6 @@
// spiBeginTransaction. // spiBeginTransaction.
#endif #endif
// Onboard SD
//#define SD_SCK_PIN P0_07
//#define SD_MISO_PIN P0_08
//#define SD_MOSI_PIN P0_09
//#define SD_SS_PIN P0_06
// External SD // External SD
#ifndef SD_SCK_PIN #ifndef SD_SCK_PIN
#define SD_SCK_PIN 50 #define SD_SCK_PIN 50
+10 -10
View File
@@ -82,13 +82,13 @@ extern DefaultSerial1 USBSerial;
#endif #endif
#endif #endif
#ifdef MMU2_SERIAL_PORT #ifdef MMU_SERIAL_PORT
#if MMU2_SERIAL_PORT == -1 #if MMU_SERIAL_PORT == -1
#define MMU2_SERIAL USBSerial #define MMU_SERIAL USBSerial
#elif WITHIN(MMU2_SERIAL_PORT, 0, 3) #elif WITHIN(MMU_SERIAL_PORT, 0, 3)
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) #define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT)
#else #else
#error "MMU2_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB." #error "MMU_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
#endif #endif
#endif #endif
@@ -100,7 +100,7 @@ extern DefaultSerial1 USBSerial;
#else #else
#error "LCD_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB." #error "LCD_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
#endif #endif
#if HAS_DGUS_LCD #if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.available() #define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.available()
#endif #endif
#endif #endif
@@ -137,12 +137,12 @@ extern DefaultSerial1 USBSerial;
// //
// Test whether the pin is valid // Test whether the pin is valid
constexpr bool VALID_PIN(const pin_t pin) { constexpr bool isValidPin(const pin_t pin) {
return LPC176x::pin_is_valid(pin); return LPC176x::pin_is_valid(pin);
} }
// Get the analog index for a digital pin // Get the analog index for a digital pin
constexpr int8_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t pin) { constexpr int8_t digitalPinToAnalogIndex(const pin_t pin) {
return (LPC176x::pin_is_valid(pin) && LPC176x::pin_has_adc(pin)) ? pin : -1; return (LPC176x::pin_is_valid(pin) && LPC176x::pin_has_adc(pin)) ? pin : -1;
} }
@@ -159,7 +159,7 @@ constexpr pin_t GET_PIN_MAP_PIN(const int16_t index) {
// Parse a G-code word into a pin index // Parse a G-code word into a pin index
int16_t PARSED_PIN_INDEX(const char code, const int16_t dval); int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
// P0.6 thru P0.9 are for the onboard SD card // P0.6 thru P0.9 are for the onboard SD card
#define HAL_SENSITIVE_PINS P0_06, P0_07, P0_08, P0_09, #define HAL_SENSITIVE_PINS P0_06, P0_07, P0_08, P0_09
// ------------------------ // ------------------------
// Defines // Defines
@@ -146,6 +146,12 @@ void setup_endstop_interrupts() {
#endif #endif
_ATTACH(Z_MIN_PROBE_PIN); _ATTACH(Z_MIN_PROBE_PIN);
#endif #endif
#if USE_CALIBRATION
#if !LPC1768_PIN_INTERRUPT_M(CALIBRATION_PIN)
#error "CALIBRATION_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
#endif
_ATTACH(CALIBRATION_PIN);
#endif
#if USE_I_MAX #if USE_I_MAX
#if !LPC1768_PIN_INTERRUPT_M(I_MAX_PIN) #if !LPC1768_PIN_INTERRUPT_M(I_MAX_PIN)
#error "I_MAX_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #error "I_MAX_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
+4 -2
View File
@@ -26,8 +26,10 @@
void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) { void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
if (!LPC176x::pin_is_valid(pin)) return; if (!LPC176x::pin_is_valid(pin)) return;
if (LPC176x::pwm_attach_pin(pin)) if (LPC176x::pwm_attach_pin(pin)) {
LPC176x::pwm_write_ratio(pin, invert ? 1.0f - (float)v / v_size : (float)v / v_size); // map 1-254 onto PWM range const uint32_t duty = map(invert ? v_size - v : v, 0, v_size, 0, LPC176x::pwm_get_period(pin));
LPC176x::pwm_write(pin, duty);
}
} }
void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) { void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
+1 -1
View File
@@ -66,7 +66,7 @@
#define _WRITE(IO,V) WRITE_PIN(IO,V) #define _WRITE(IO,V) WRITE_PIN(IO,V)
/// toggle a pin /// toggle a pin
#define _TOGGLE(IO) _WRITE(IO, !READ(IO)) #define _TOGGLE(IO) LPC176x::gpio_toggle(IO)
/// set pin as input /// set pin as input
#define _SET_INPUT(IO) SET_DIR_INPUT(IO) #define _SET_INPUT(IO) SET_DIR_INPUT(IO)
+9 -9
View File
@@ -29,12 +29,12 @@
*/ */
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS #define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0) #define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0 ? 1 : 0)
#define digitalRead_mod(p) extDigitalRead(p) #define digitalRead_mod(p) extDigitalRead(p)
#define GET_ARRAY_PIN(p) pin_array[p].pin #define getPinByIndex(p) pin_array[p].pin
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("P%d_%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0) #define printPinNumber(p) do{ sprintf_P(buffer, PSTR("P%d_%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR("_A%d "), LPC176x::pin_get_adc_channel(pin)); SERIAL_ECHO(buffer); }while(0) #define printPinAnalog(p) do{ sprintf_P(buffer, PSTR("_A%d "), LPC176x::pin_get_adc_channel(pin)); SERIAL_ECHO(buffer); }while(0)
#define MULTI_NAME_PAD 17 // space needed to be pretty if not first name assigned to a pin #define MULTI_NAME_PAD 17 // space needed to be pretty if not first name assigned to a pin
// pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities // pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities
@@ -42,15 +42,15 @@
#define M43_NEVER_TOUCH(Q) ((Q) == P0_29 || (Q) == P0_30 || (Q) == P2_09) // USB pins #define M43_NEVER_TOUCH(Q) ((Q) == P0_29 || (Q) == P0_30 || (Q) == P2_09) // USB pins
#endif #endif
bool GET_PINMODE(const pin_t pin) { bool getValidPinMode(const pin_t pin) {
if (!LPC176x::pin_is_valid(pin) || LPC176x::pin_adc_enabled(pin)) // Invalid pin or active analog pin if (!LPC176x::pin_is_valid(pin) || LPC176x::pin_adc_enabled(pin)) // Invalid pin or active analog pin
return false; return false;
return LPC176x::gpio_direction(pin); return LPC176x::gpio_direction(pin);
} }
#define GET_ARRAY_IS_DIGITAL(x) ((bool) pin_array[x].is_digital) #define getPinIsDigitalByIndex(x) ((bool) pin_array[x].is_digital)
void print_port(const pin_t) {} void printPinPort(const pin_t) {}
void pwm_details(const pin_t) {} void printPinPWM(const pin_t) {}
bool pwm_status(const pin_t) { return false; } bool pwm_status(const pin_t) { return false; }
+3 -2
View File
@@ -28,12 +28,13 @@
// spiBeginTransaction. // spiBeginTransaction.
#endif #endif
/** onboard SD card */ // Onboard SD
//#define SD_SCK_PIN P0_07 //#define SD_SCK_PIN P0_07
//#define SD_MISO_PIN P0_08 //#define SD_MISO_PIN P0_08
//#define SD_MOSI_PIN P0_09 //#define SD_MOSI_PIN P0_09
//#define SD_SS_PIN P0_06 //#define SD_SS_PIN P0_06
/** external */
// External SD
#ifndef SD_SCK_PIN #ifndef SD_SCK_PIN
#define SD_SCK_PIN P0_15 #define SD_SCK_PIN P0_15
#endif #endif
@@ -132,7 +132,7 @@ uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, const pin_t sck
static uint8_t SPI_speed = 0; static uint8_t SPI_speed = 0;
static void u8g_sw_spi_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) { static void u8g_sw_spi_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) {
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) #if U8G_SPI_USE_MODE_3
swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin); swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin);
#else #else
swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin); swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin);
@@ -160,7 +160,7 @@ uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val,
break; break;
case U8G_COM_MSG_CHIP_SELECT: case U8G_COM_MSG_CHIP_SELECT:
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0 #if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active // the next chip select goes active
u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
@@ -13,9 +13,9 @@ if pioutil.is_pio_build():
target_drive = "REARM" target_drive = "REARM"
import platform import platform
current_OS = platform.system() current_OS = platform.system()
Import("env")
env = pioutil.env
def print_error(e): def print_error(e):
print('\nUnable to find destination disk (%s)\n' \ print('\nUnable to find destination disk (%s)\n' \
+4 -4
View File
@@ -87,11 +87,11 @@ extern MSerialT serial_stream_3;
#endif #endif
#endif #endif
#ifdef MMU2_SERIAL_PORT #ifdef MMU_SERIAL_PORT
#if WITHIN(MMU2_SERIAL_PORT, 0, 3) #if WITHIN(MMU_SERIAL_PORT, 0, 3)
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) #define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT)
#else #else
#error "MMU2_SERIAL_PORT must be from 0 to 3. Please update your configuration." #error "MMU_SERIAL_PORT must be from 0 to 3. Please update your configuration."
#endif #endif
#endif #endif
+6 -6
View File
@@ -27,9 +27,9 @@
int8_t ADC_pin_mode(pin_t pin) { return -1; } int8_t ADC_pin_mode(pin_t pin) { return -1; }
int8_t get_pin_mode(const pin_t pin) { return VALID_PIN(pin) ? 0 : -1; } int8_t get_pin_mode(const pin_t pin) { return isValidPin(pin) ? 0 : -1; }
bool GET_PINMODE(const pin_t pin) { bool getValidPinMode(const pin_t pin) {
const int8_t pin_mode = get_pin_mode(pin); const int8_t pin_mode = get_pin_mode(pin);
if (pin_mode == -1 || pin_mode == ADC_pin_mode(pin)) // Invalid pin or active analog pin if (pin_mode == -1 || pin_mode == ADC_pin_mode(pin)) // Invalid pin or active analog pin
return false; return false;
@@ -37,12 +37,12 @@ bool GET_PINMODE(const pin_t pin) {
return (Gpio::getMode(pin) != 0); // Input/output state return (Gpio::getMode(pin) != 0); // Input/output state
} }
bool GET_ARRAY_IS_DIGITAL(const pin_t pin) { bool getPinIsDigitalByIndex(const pin_t pin) {
return !IS_ANALOG(pin) || get_pin_mode(pin) != ADC_pin_mode(pin); return !isAnalogPin(pin) || get_pin_mode(pin) != ADC_pin_mode(pin);
} }
void print_port(const pin_t) {} void printPinPort(const pin_t) {}
void pwm_details(const pin_t) {} void printPinPWM(const pin_t) {}
bool pwm_status(const pin_t) { return false; } bool pwm_status(const pin_t) { return false; }
#endif #endif
+9 -9
View File
@@ -30,19 +30,19 @@
*/ */
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS #define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0) #define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0 ? 1 : 0)
#define digitalRead_mod(p) digitalRead(p) #define digitalRead_mod(p) digitalRead(p)
#define GET_ARRAY_PIN(p) pin_array[p].pin #define getPinByIndex(p) pin_array[p].pin
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) #define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin #define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
// Active ADC function/mode/code values for PINSEL registers // Active ADC function/mode/code values for PINSEL registers
int8_t ADC_pin_mode(pin_t pin); int8_t ADC_pin_mode(pin_t pin);
int8_t get_pin_mode(const pin_t pin); int8_t get_pin_mode(const pin_t pin);
bool GET_PINMODE(const pin_t pin); bool getValidPinMode(const pin_t pin);
bool GET_ARRAY_IS_DIGITAL(const pin_t pin); bool getPinIsDigitalByIndex(const pin_t pin);
void print_port(const pin_t); void printPinPort(const pin_t);
void pwm_details(const pin_t); void printPinPWM(const pin_t);
bool pwm_status(const pin_t); bool pwm_status(const pin_t);
@@ -131,7 +131,7 @@ static uint8_t swSpiInit(const uint8_t spi_speed, const uint8_t clk_pin, const u
} }
static void u8g_sw_spi_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) { static void u8g_sw_spi_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) {
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) #if U8G_SPI_USE_MODE_3
swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin); swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin);
#else #else
swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin); swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin);
@@ -159,7 +159,7 @@ uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_pt
break; break;
case U8G_COM_MSG_CHIP_SELECT: case U8G_COM_MSG_CHIP_SELECT:
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0 #if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active // the next chip select goes active
u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
+6 -6
View File
@@ -69,13 +69,13 @@ extern DefaultSerial3 MSerial1;
#endif #endif
#endif #endif
#ifdef MMU2_SERIAL_PORT #ifdef MMU_SERIAL_PORT
#if WITHIN(MMU2_SERIAL_PORT, 0, 1) #if WITHIN(MMU_SERIAL_PORT, 0, 1)
#define MMU2_SERIAL MSERIAL(SERIAL_PORT) #define MMU_SERIAL MSERIAL(SERIAL_PORT)
#elif MMU2_SERIAL_PORT == -1 #elif MMU_SERIAL_PORT == -1
#define MMU2_SERIAL MSerialUSB #define MMU_SERIAL MSerialUSB
#else #else
#error "MMU2_SERIAL_PORT must be -1 (Native USB only)." #error "MMU_SERIAL_PORT must be -1 (Native USB only)."
#endif #endif
#endif #endif
+9 -1
View File
@@ -83,6 +83,7 @@
#define MATCH_Z4_MAX_EILINE(P) TERN0(USE_Z4_MAX, DEFER4(MATCH_EILINE)(P, Z4_MAX_PIN)) #define MATCH_Z4_MAX_EILINE(P) TERN0(USE_Z4_MAX, DEFER4(MATCH_EILINE)(P, Z4_MAX_PIN))
#define MATCH_Z4_MIN_EILINE(P) TERN0(USE_Z4_MIN, DEFER4(MATCH_EILINE)(P, Z4_MIN_PIN)) #define MATCH_Z4_MIN_EILINE(P) TERN0(USE_Z4_MIN, DEFER4(MATCH_EILINE)(P, Z4_MIN_PIN))
#define MATCH_Z_MIN_PROBE_EILINE(P) TERN0(USE_Z_MIN_PROBE, DEFER4(MATCH_EILINE)(P, Z_MIN_PROBE_PIN)) #define MATCH_Z_MIN_PROBE_EILINE(P) TERN0(USE_Z_MIN_PROBE, DEFER4(MATCH_EILINE)(P, Z_MIN_PROBE_PIN))
#define MATCH_CALIBRATION_EILINE(P) TERN0(USE_CALIBRATION, DEFER4(MATCH_EILINE)(P, CALIBRATION_PIN))
#define AVAILABLE_EILINE(P) ( PIN_TO_EILINE(P) != -1 \ #define AVAILABLE_EILINE(P) ( PIN_TO_EILINE(P) != -1 \
&& !MATCH_X_MAX_EILINE(P) && !MATCH_X_MIN_EILINE(P) \ && !MATCH_X_MAX_EILINE(P) && !MATCH_X_MIN_EILINE(P) \
@@ -99,7 +100,8 @@
&& !MATCH_Z2_MAX_EILINE(P) && !MATCH_Z2_MIN_EILINE(P) \ && !MATCH_Z2_MAX_EILINE(P) && !MATCH_Z2_MIN_EILINE(P) \
&& !MATCH_Z3_MAX_EILINE(P) && !MATCH_Z3_MIN_EILINE(P) \ && !MATCH_Z3_MAX_EILINE(P) && !MATCH_Z3_MIN_EILINE(P) \
&& !MATCH_Z4_MAX_EILINE(P) && !MATCH_Z4_MIN_EILINE(P) \ && !MATCH_Z4_MAX_EILINE(P) && !MATCH_Z4_MIN_EILINE(P) \
&& !MATCH_Z_MIN_PROBE_EILINE(P) ) && !MATCH_Z_MIN_PROBE_EILINE(P) \
&& !MATCH_CALIBRATION_EILINE(P) )
// One ISR for all EXT-Interrupts // One ISR for all EXT-Interrupts
void endstop_ISR() { endstops.update(); } void endstop_ISR() { endstops.update(); }
@@ -208,6 +210,12 @@ void setup_endstop_interrupts() {
#endif #endif
_ATTACH(Z_MIN_PROBE_PIN); _ATTACH(Z_MIN_PROBE_PIN);
#endif #endif
#if USE_CALIBRATION
#if !AVAILABLE_EILINE(CALIBRATION_PIN)
#error "CALIBRATION_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
#endif
_ATTACH(CALIBRATION_PIN);
#endif
#if USE_I_MAX #if USE_I_MAX
#if !AVAILABLE_EILINE(I_MAX_PIN) #if !AVAILABLE_EILINE(I_MAX_PIN)
#error "I_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #error "I_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
+1 -1
View File
@@ -152,7 +152,7 @@
: ((P) == 14) ? ADC_INPUTCTRL_MUXPOS_PIN14 \ : ((P) == 14) ? ADC_INPUTCTRL_MUXPOS_PIN14 \
: ADC_INPUTCTRL_MUXPOS_PIN15) : ADC_INPUTCTRL_MUXPOS_PIN15)
#define digitalPinToAnalogInput(P) (WITHIN(P, 67, 74) ? (P) - 67 : WITHIN(P, 54, 61) ? 8 + (P) - 54 : WITHIN(P, 12, 13) ? 16 + (P) - 12 : P == 9 ? 18 : -1) #define digitalPinToAnalogIndex(P) (WITHIN(P, 67, 74) ? (P) - 67 : WITHIN(P, 54, 61) ? 8 + (P) - 54 : WITHIN(P, 12, 13) ? 16 + (P) - 12 : P == 9 ? 18 : -1)
/** /**
* pins * pins
+9 -10
View File
@@ -30,14 +30,13 @@
#define digitalRead_mod(p) extDigitalRead(p) #define digitalRead_mod(p) extDigitalRead(p)
#define PRINT_PORT(p) do{ SERIAL_ECHOPGM(" Port: "); sprintf_P(buffer, PSTR("%c%02ld"), 'A' + g_APinDescription[p].ulPort, g_APinDescription[p].ulPin); SERIAL_ECHO(buffer); }while (0) #define PRINT_PORT(p) do{ SERIAL_ECHOPGM(" Port: "); sprintf_P(buffer, PSTR("%c%02ld"), 'A' + g_APinDescription[p].ulPort, g_APinDescription[p].ulPin); SERIAL_ECHO(buffer); }while (0)
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) #define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
#define GET_ARRAY_PIN(p) pin_array[p].pin #define getPinByIndex(p) pin_array[p].pin
#define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital #define getPinIsDigitalByIndex(p) pin_array[p].is_digital
#define VALID_PIN(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL) #define isValidPin(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL)
#define DIGITAL_PIN_TO_ANALOG_PIN(p) digitalPinToAnalogInput(p) #define isAnalogPin(P) (digitalPinToAnalogIndex(P)!=-1)
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P)!=-1)
#define pwm_status(pin) digitalPinHasPWM(pin) #define pwm_status(pin) digitalPinHasPWM(pin)
#define MULTI_NAME_PAD 27 // space needed to be pretty if not first name assigned to a pin #define MULTI_NAME_PAD 27 // space needed to be pretty if not first name assigned to a pin
@@ -45,13 +44,13 @@
// uses pin index // uses pin index
#define M43_NEVER_TOUCH(Q) ((Q) >= 75) #define M43_NEVER_TOUCH(Q) ((Q) >= 75)
bool GET_PINMODE(int8_t pin) { // 1: output, 0: input bool getValidPinMode(int8_t pin) { // 1: output, 0: input
const EPortType samdport = g_APinDescription[pin].ulPort; const EPortType samdport = g_APinDescription[pin].ulPort;
const uint32_t samdpin = g_APinDescription[pin].ulPin; const uint32_t samdpin = g_APinDescription[pin].ulPin;
return PORT->Group[samdport].DIR.reg & MASK(samdpin) || (PORT->Group[samdport].PINCFG[samdpin].reg & (PORT_PINCFG_INEN | PORT_PINCFG_PULLEN)) == PORT_PINCFG_PULLEN; return PORT->Group[samdport].DIR.reg & MASK(samdpin) || (PORT->Group[samdport].PINCFG[samdpin].reg & (PORT_PINCFG_INEN | PORT_PINCFG_PULLEN)) == PORT_PINCFG_PULLEN;
} }
void pwm_details(int32_t pin) { void printPinPWM(int32_t pin) {
if (pwm_status(pin)) { if (pwm_status(pin)) {
//uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative; //uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative;
//SERIAL_ECHOPGM("PWM = ", duty); //SERIAL_ECHOPGM("PWM = ", duty);
+16 -6
View File
@@ -69,13 +69,23 @@
#endif #endif
#endif #endif
#ifdef MMU2_SERIAL_PORT #ifdef SERIAL_PORT_3
#if MMU2_SERIAL_PORT == -1 #if SERIAL_PORT_3 == -1
#define MMU2_SERIAL MSerial0 #define MYSERIAL3 MSerial0
#elif WITHIN(MMU2_SERIAL_PORT, 0, 3) #elif WITHIN(SERIAL_PORT_3, 0, 3)
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) #define MYSERIAL3 MSERIAL(SERIAL_PORT_3)
#else #else
#error "MMU2_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB." #error "SERIAL_PORT_3 must be from 0 to 3. You can also use -1 if the board supports Native USB."
#endif
#endif
#ifdef MMU_SERIAL_PORT
#if MMU_SERIAL_PORT == -1
#define MMU_SERIAL MSerial0
#elif WITHIN(MMU_SERIAL_PORT, 0, 3)
#define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT)
#else
#error "MMU_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
#endif #endif
#endif #endif
+9 -1
View File
@@ -82,6 +82,7 @@
#define MATCH_Z4_MAX_EILINE(P) TERN0(USE_Z4_MAX, DEFER4(MATCH_EILINE)(P, Z4_MAX_PIN)) #define MATCH_Z4_MAX_EILINE(P) TERN0(USE_Z4_MAX, DEFER4(MATCH_EILINE)(P, Z4_MAX_PIN))
#define MATCH_Z4_MIN_EILINE(P) TERN0(USE_Z4_MIN, DEFER4(MATCH_EILINE)(P, Z4_MIN_PIN)) #define MATCH_Z4_MIN_EILINE(P) TERN0(USE_Z4_MIN, DEFER4(MATCH_EILINE)(P, Z4_MIN_PIN))
#define MATCH_Z_MIN_PROBE_EILINE(P) TERN0(USE_Z_MIN_PROBE, DEFER4(MATCH_EILINE)(P, Z_MIN_PROBE_PIN)) #define MATCH_Z_MIN_PROBE_EILINE(P) TERN0(USE_Z_MIN_PROBE, DEFER4(MATCH_EILINE)(P, Z_MIN_PROBE_PIN))
#define MATCH_CALIBRATION_EILINE(P) TERN0(USE_CALIBRATION, DEFER4(MATCH_EILINE)(P, CALIBRATION_PIN))
#define AVAILABLE_EILINE(P) ( PIN_TO_EILINE(P) != -1 \ #define AVAILABLE_EILINE(P) ( PIN_TO_EILINE(P) != -1 \
&& !MATCH_X_MAX_EILINE(P) && !MATCH_X_MIN_EILINE(P) \ && !MATCH_X_MAX_EILINE(P) && !MATCH_X_MIN_EILINE(P) \
@@ -98,7 +99,8 @@
&& !MATCH_Z2_MAX_EILINE(P) && !MATCH_Z2_MIN_EILINE(P) \ && !MATCH_Z2_MAX_EILINE(P) && !MATCH_Z2_MIN_EILINE(P) \
&& !MATCH_Z3_MAX_EILINE(P) && !MATCH_Z3_MIN_EILINE(P) \ && !MATCH_Z3_MAX_EILINE(P) && !MATCH_Z3_MIN_EILINE(P) \
&& !MATCH_Z4_MAX_EILINE(P) && !MATCH_Z4_MIN_EILINE(P) \ && !MATCH_Z4_MAX_EILINE(P) && !MATCH_Z4_MIN_EILINE(P) \
&& !MATCH_Z_MIN_PROBE_EILINE(P) ) && !MATCH_Z_MIN_PROBE_EILINE(P) \
&& !MATCH_CALIBRATION_EILINE(P) )
// One ISR for all EXT-Interrupts // One ISR for all EXT-Interrupts
void endstop_ISR() { endstops.update(); } void endstop_ISR() { endstops.update(); }
@@ -183,6 +185,12 @@ void setup_endstop_interrupts() {
#endif #endif
_ATTACH(Z_MIN_PROBE_PIN); _ATTACH(Z_MIN_PROBE_PIN);
#endif #endif
#if USE_CALIBRATION
#if !AVAILABLE_EILINE(CALIBRATION_PIN)
#error "CALIBRATION_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
#endif
_ATTACH(CALIBRATION_PIN);
#endif
#if USE_I_MAX #if USE_I_MAX
#if !AVAILABLE_EILINE(I_MAX_PIN) #if !AVAILABLE_EILINE(I_MAX_PIN)
#error "I_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #error "I_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
+1 -1
View File
@@ -174,7 +174,7 @@
: (P == 17) ? PIN_TO_SAMD_PIN(13) \ : (P == 17) ? PIN_TO_SAMD_PIN(13) \
: PIN_TO_SAMD_PIN(9)) : PIN_TO_SAMD_PIN(9))
#define digitalPinToAnalogInput(P) (WITHIN(P, 67, 74) ? (P) - 67 : WITHIN(P, 54, 61) ? 8 + (P) - 54 : WITHIN(P, 12, 13) ? 16 + (P) - 12 : P == 9 ? 18 : -1) #define digitalPinToAnalogIndex(P) (WITHIN(P, 67, 74) ? (P) - 67 : WITHIN(P, 54, 61) ? 8 + (P) - 54 : WITHIN(P, 12, 13) ? 16 + (P) - 12 : P == 9 ? 18 : -1)
/** /**
* pins * pins
+9 -10
View File
@@ -29,14 +29,13 @@
#define digitalRead_mod(p) extDigitalRead(p) #define digitalRead_mod(p) extDigitalRead(p)
#define PRINT_PORT(p) do{ SERIAL_ECHOPGM(" Port: "); sprintf_P(buffer, PSTR("%c%02ld"), 'A' + g_APinDescription[p].ulPort, g_APinDescription[p].ulPin); SERIAL_ECHO(buffer); }while (0) #define PRINT_PORT(p) do{ SERIAL_ECHOPGM(" Port: "); sprintf_P(buffer, PSTR("%c%02ld"), 'A' + g_APinDescription[p].ulPort, g_APinDescription[p].ulPin); SERIAL_ECHO(buffer); }while (0)
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) #define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
#define GET_ARRAY_PIN(p) pin_array[p].pin #define getPinByIndex(p) pin_array[p].pin
#define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital #define getPinIsDigitalByIndex(p) pin_array[p].is_digital
#define VALID_PIN(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL)) #define isValidPin(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL))
#define DIGITAL_PIN_TO_ANALOG_PIN(p) digitalPinToAnalogInput(p) #define isAnalogPin(P) (digitalPinToAnalogIndex(P)!=-1)
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P)!=-1)
#define pwm_status(pin) digitalPinHasPWM(pin) #define pwm_status(pin) digitalPinHasPWM(pin)
#define MULTI_NAME_PAD 27 // space needed to be pretty if not first name assigned to a pin #define MULTI_NAME_PAD 27 // space needed to be pretty if not first name assigned to a pin
@@ -44,13 +43,13 @@
// uses pin index // uses pin index
#define M43_NEVER_TOUCH(Q) ((Q) >= 75) #define M43_NEVER_TOUCH(Q) ((Q) >= 75)
bool GET_PINMODE(int8_t pin) { // 1: output, 0: input bool getValidPinMode(int8_t pin) { // 1: output, 0: input
const EPortType samdport = g_APinDescription[pin].ulPort; const EPortType samdport = g_APinDescription[pin].ulPort;
const uint32_t samdpin = g_APinDescription[pin].ulPin; const uint32_t samdpin = g_APinDescription[pin].ulPin;
return PORT->Group[samdport].DIR.reg & MASK(samdpin) || (PORT->Group[samdport].PINCFG[samdpin].reg & (PORT_PINCFG_INEN | PORT_PINCFG_PULLEN)) == PORT_PINCFG_PULLEN; return PORT->Group[samdport].DIR.reg & MASK(samdpin) || (PORT->Group[samdport].PINCFG[samdpin].reg & (PORT_PINCFG_INEN | PORT_PINCFG_PULLEN)) == PORT_PINCFG_PULLEN;
} }
void pwm_details(int32_t pin) { void printPinPWM(int32_t pin) {
if (pwm_status(pin)) { if (pwm_status(pin)) {
//uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative; //uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative;
//SERIAL_ECHOPGM("PWM = ", duty); //SERIAL_ECHOPGM("PWM = ", duty);
+17 -9
View File
@@ -90,15 +90,15 @@
#endif #endif
#endif #endif
#ifdef MMU2_SERIAL_PORT #ifdef MMU_SERIAL_PORT
#if WITHIN(MMU2_SERIAL_PORT, 1, 9) #if WITHIN(MMU_SERIAL_PORT, 1, 9)
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) #define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT)
#elif !defined(USBCON) #elif !defined(USBCON)
#error "MMU2_SERIAL_PORT must be from 1 to 9." #error "MMU_SERIAL_PORT must be from 1 to 9."
#elif MMU2_SERIAL_PORT == -1 #elif MMU_SERIAL_PORT == -1
#define MMU2_SERIAL MSerialUSB #define MMU_SERIAL MSerialUSB
#else #else
#error "MMU2_SERIAL_PORT must be from 1 to 9, or -1 for Native USB." #error "MMU_SERIAL_PORT must be from 1 to 9, or -1 for Native USB."
#endif #endif
#endif #endif
@@ -112,16 +112,24 @@
#else #else
#error "LCD_SERIAL_PORT must be from 1 to 9, or -1 for Native USB." #error "LCD_SERIAL_PORT must be from 1 to 9, or -1 for Native USB."
#endif #endif
#if HAS_DGUS_LCD #if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite() #define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
#endif #endif
#endif #endif
#ifdef RS485_SERIAL_PORT
#if WITHIN(RS485_SERIAL_PORT, 1, 9)
#define RS485_SERIAL MSERIAL(RS485_SERIAL_PORT)
#else
#error "RS485_SERIAL_PORT must be from 1 to 9."
#endif
#endif
/** /**
* TODO: review this to return 1 for pins that are not analog input * TODO: review this to return 1 for pins that are not analog input
*/ */
#ifndef analogInputToDigitalPin #ifndef analogInputToDigitalPin
#define analogInputToDigitalPin(p) (p) #define analogInputToDigitalPin(p) pin_t(p)
#endif #endif
// //
+1 -1
View File
@@ -37,7 +37,7 @@ static SPISettings spiConfig;
// Public functions // Public functions
// ------------------------ // ------------------------
#if ENABLED(SOFTWARE_SPI) #if ANY(SOFTWARE_SPI, FORCE_SOFT_SPI)
// ------------------------ // ------------------------
// Software SPI // Software SPI
+4 -4
View File
@@ -126,7 +126,7 @@
void serialEvent2() __attribute__((weak)); void serialEvent2() __attribute__((weak));
#endif #endif
#ifdef USING_HW_SERIAL3 #ifdef USING_HW_SERIAL3
HAL_HardwareSerial Serial3(USART3); HAL_HardwareSerial HSerial3(USART3);
void serialEvent3() __attribute__((weak)); void serialEvent3() __attribute__((weak));
#endif #endif
#ifdef USING_HW_SERIAL4 #ifdef USING_HW_SERIAL4
@@ -147,11 +147,11 @@
#endif #endif
#ifdef USING_HW_SERIAL6 #ifdef USING_HW_SERIAL6
#ifdef USART6 #ifdef USART6
HAL_HardwareSerial HSerial5(USART6); HAL_HardwareSerial HSerial6(USART6);
#else #else
HAL_HardwareSerial HSerial5(UART6); HAL_HardwareSerial HSerial6(UART6);
#endif #endif
void serialEvent5() __attribute__((weak)); void serialEvent6() __attribute__((weak));
#endif #endif
// Constructors //////////////////////////////////////////////////////////////// // Constructors ////////////////////////////////////////////////////////////////
+3
View File
@@ -37,6 +37,9 @@
#ifndef USART5 #ifndef USART5
#define USART5 UART5 #define USART5 UART5
#endif #endif
#ifndef USART6
#define USART6 UART6
#endif
#ifndef USART7 #ifndef USART7
#define USART7 UART7 #define USART7 UART7
#endif #endif
+1
View File
@@ -53,6 +53,7 @@
inline void begin(unsigned long baud) { begin(baud, SERIAL_8N1); } inline void begin(unsigned long baud) { begin(baud, SERIAL_8N1); }
void _rx_complete_irq(serial_t *obj); void _rx_complete_irq(serial_t *obj);
FORCE_INLINE static uint8_t buffer_overruns() { return 0; } // Not implemented. Void to avoid platform-dependent code.
protected: protected:
usart_rx_callback_t _rx_callback; usart_rx_callback_t _rx_callback;
@@ -0,0 +1,136 @@
/**
* 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 / Ryan Power
*
* 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/>.
*
*/
#ifdef HAL_STM32
#include "../../../inc/MarlinConfig.h"
#if ALL(HAS_MARLINUI_U8GLIB, FORCE_SOFT_SPI)
#include <U8glib-HAL.h>
#include "../../shared/HAL_SPI.h"
#define nop asm volatile ("\tnop\n")
static inline uint8_t swSpiTransfer_mode_0(uint8_t b) {
for (uint8_t i = 0; i < 8; ++i) {
const uint8_t state = (b & 0x80) ? HIGH : LOW;
WRITE(DOGLCD_SCK, HIGH);
WRITE(DOGLCD_MOSI, state);
b <<= 1;
WRITE(DOGLCD_SCK, LOW);
}
return b;
}
static inline uint8_t swSpiTransfer_mode_3(uint8_t b) {
for (uint8_t i = 0; i < 8; ++i) {
const uint8_t state = (b & 0x80) ? HIGH : LOW;
WRITE(DOGLCD_SCK, LOW);
WRITE(DOGLCD_MOSI, state);
b <<= 1;
WRITE(DOGLCD_SCK, HIGH);
}
return b;
}
static void u8g_sw_spi_shift_out(uint8_t val) {
#if U8G_SPI_USE_MODE_3
swSpiTransfer_mode_3(val);
#else
swSpiTransfer_mode_0(val);
#endif
}
static void swSpiInit() {
#if PIN_EXISTS(LCD_RESET)
SET_OUTPUT(LCD_RESET_PIN);
#endif
SET_OUTPUT(DOGLCD_A0);
OUT_WRITE(DOGLCD_SCK, LOW);
OUT_WRITE(DOGLCD_MOSI, LOW);
OUT_WRITE(DOGLCD_CS, HIGH);
}
uint8_t u8g_com_HAL_STM32_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
switch (msg) {
case U8G_COM_MSG_INIT:
swSpiInit();
break;
case U8G_COM_MSG_STOP:
break;
case U8G_COM_MSG_RESET:
#if PIN_EXISTS(LCD_RESET)
WRITE(LCD_RESET_PIN, arg_val);
#endif
break;
case U8G_COM_MSG_CHIP_SELECT:
#if U8G_SPI_USE_MODE_3 // This LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
WRITE(DOGLCD_SCK, HIGH); // Set SCK to mode 3 idle state before CS goes active
WRITE(DOGLCD_CS, LOW);
nop; // hold SCK high for a few ns
nop;
}
else {
WRITE(DOGLCD_CS, HIGH);
WRITE(DOGLCD_SCK, LOW); // Set SCK to mode 0 idle state after CS goes inactive
}
#else
WRITE(DOGLCD_CS, !arg_val);
#endif
break;
case U8G_COM_MSG_WRITE_BYTE:
u8g_sw_spi_shift_out(arg_val);
break;
case U8G_COM_MSG_WRITE_SEQ: {
uint8_t *ptr = (uint8_t *)arg_ptr;
while (arg_val > 0) {
u8g_sw_spi_shift_out(*ptr++);
arg_val--;
}
} break;
case U8G_COM_MSG_WRITE_SEQ_P: {
uint8_t *ptr = (uint8_t *)arg_ptr;
while (arg_val > 0) {
u8g_sw_spi_shift_out(u8g_pgm_read(ptr));
ptr++;
arg_val--;
}
} break;
case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
WRITE(DOGLCD_A0, arg_val);
break;
}
return 1;
}
#endif // HAS_MARLINUI_U8GLIB && FORCE_SOFT_SPI
#endif // HAL_STM32
@@ -45,6 +45,7 @@ void setup_endstop_interrupts() {
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN)); TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN)); TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN)); TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN)); TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN)); TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
@@ -30,6 +30,3 @@
#undef F_CPU #undef F_CPU
#define F_CPU BOARD_F_CPU #define F_CPU BOARD_F_CPU
#endif #endif
// The Sensitive Pins array is not optimizable
#define RUNTIME_ONLY_ANALOG_TO_DIGITAL
+3 -2
View File
@@ -58,8 +58,9 @@
* Check for common serial pin conflicts * Check for common serial pin conflicts
*/ */
#define _CHECK_SERIAL_PIN(N) (( \ #define _CHECK_SERIAL_PIN(N) (( \
BTN_EN1 == N || DOGLCD_CS == N || HEATER_BED_PIN == N || FAN0_PIN == N || \ BTN_EN1 == N || BTN_EN2 == N ||DOGLCD_CS == N || HEATER_BED_PIN == N || FAN0_PIN == N || \
SDIO_D2_PIN == N || SDIO_D3_PIN == N || SDIO_CK_PIN == N || SDIO_CMD_PIN == N \ SDIO_D2_PIN == N || SDIO_D3_PIN == N || SDIO_CK_PIN == N || SDIO_CMD_PIN == N || \
Y_STEP_PIN == N || Y_ENABLE_PIN == N || E0_ENABLE_PIN == N || POWER_LOSS_PIN == N \
)) ))
#define CHECK_SERIAL_PIN(T,N) defined(UART##N##_##T##_PIN) && _CHECK_SERIAL_PIN(UART##N##_##T##_PIN) #define CHECK_SERIAL_PIN(T,N) defined(UART##N##_##T##_PIN) && _CHECK_SERIAL_PIN(UART##N##_##T##_PIN)
#if SERIAL_IN_USE(1) #if SERIAL_IN_USE(1)
+13 -13
View File
@@ -115,16 +115,16 @@ const XrefInfo pin_xref[] PROGMEM = {
#define NUM_ANALOG_LAST ((NUM_ANALOG_FIRST) + (NUM_ANALOG_INPUTS) - 1) #define NUM_ANALOG_LAST ((NUM_ANALOG_FIRST) + (NUM_ANALOG_INPUTS) - 1)
#endif #endif
#define NUMBER_PINS_TOTAL ((NUM_DIGITAL_PINS) + TERN0(HAS_HIGH_ANALOG_PINS, NUM_ANALOG_INPUTS)) #define NUMBER_PINS_TOTAL ((NUM_DIGITAL_PINS) + TERN0(HAS_HIGH_ANALOG_PINS, NUM_ANALOG_INPUTS))
#define VALID_PIN(P) (WITHIN(P, 0, (NUM_DIGITAL_PINS) - 1) || TERN0(HAS_HIGH_ANALOG_PINS, WITHIN(P, NUM_ANALOG_FIRST, NUM_ANALOG_LAST))) #define isValidPin(P) (WITHIN(P, 0, (NUM_DIGITAL_PINS) - 1) || TERN0(HAS_HIGH_ANALOG_PINS, WITHIN(P, NUM_ANALOG_FIRST, NUM_ANALOG_LAST)))
#define digitalRead_mod(Ard_num) extDigitalRead(Ard_num) // must use Arduino pin numbers when doing reads #define digitalRead_mod(Ard_num) extDigitalRead(Ard_num) // must use Arduino pin numbers when doing reads
#define PRINT_PIN(Q) #define printPinNumber(Q)
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
#define DIGITAL_PIN_TO_ANALOG_PIN(ANUM) -1 // will report analog pin number in the print port routine #define digitalPinToAnalogIndex(ANUM) -1 // will report analog pin number in the print port routine
// x is a variable used to search pin_array // x is a variable used to search pin_array
#define GET_ARRAY_IS_DIGITAL(x) ((bool) pin_array[x].is_digital) #define getPinIsDigitalByIndex(x) ((bool) pin_array[x].is_digital)
#define GET_ARRAY_PIN(x) ((pin_t) pin_array[x].pin) #define getPinByIndex(x) ((pin_t) pin_array[x].pin)
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define MULTI_NAME_PAD 33 // space needed to be pretty if not first name assigned to a pin #define MULTI_NAME_PAD 33 // space needed to be pretty if not first name assigned to a pin
// //
@@ -164,7 +164,7 @@ uint8_t get_pin_mode(const pin_t Ard_num) {
} }
} }
bool GET_PINMODE(const pin_t Ard_num) { bool getValidPinMode(const pin_t Ard_num) {
const uint8_t pin_mode = get_pin_mode(Ard_num); const uint8_t pin_mode = get_pin_mode(Ard_num);
return pin_mode == MODE_PIN_OUTPUT || pin_mode == MODE_PIN_ALT; // assume all alt definitions are PWM return pin_mode == MODE_PIN_OUTPUT || pin_mode == MODE_PIN_ALT; // assume all alt definitions are PWM
} }
@@ -173,11 +173,11 @@ int8_t digital_pin_to_analog_pin(const pin_t Ard_num) {
if (WITHIN(Ard_num, NUM_ANALOG_FIRST, NUM_ANALOG_LAST)) if (WITHIN(Ard_num, NUM_ANALOG_FIRST, NUM_ANALOG_LAST))
return Ard_num - NUM_ANALOG_FIRST; return Ard_num - NUM_ANALOG_FIRST;
const uint32_t ind = digitalPinToAnalogInput(Ard_num); const int8_t ind = digitalPinToAnalogIndex(Ard_num);
return (ind < NUM_ANALOG_INPUTS) ? ind : -1; return (ind < NUM_ANALOG_INPUTS) ? ind : -1;
} }
bool IS_ANALOG(const pin_t Ard_num) { bool isAnalogPin(const pin_t Ard_num) {
return get_pin_mode(Ard_num) == MODE_PIN_ANALOG; return get_pin_mode(Ard_num) == MODE_PIN_ANALOG;
} }
@@ -186,7 +186,7 @@ bool is_digital(const pin_t Ard_num) {
return pin_mode == MODE_PIN_INPUT || pin_mode == MODE_PIN_OUTPUT; return pin_mode == MODE_PIN_INPUT || pin_mode == MODE_PIN_OUTPUT;
} }
void print_port(const pin_t Ard_num) { void printPinPort(const pin_t Ard_num) {
char buffer[16]; char buffer[16];
pin_t Index; pin_t Index;
for (Index = 0; Index < NUMBER_PINS_TOTAL; Index++) for (Index = 0; Index < NUMBER_PINS_TOTAL; Index++)
@@ -226,7 +226,7 @@ bool pwm_status(const pin_t Ard_num) {
return get_pin_mode(Ard_num) == MODE_PIN_ALT; return get_pin_mode(Ard_num) == MODE_PIN_ALT;
} }
void pwm_details(const pin_t Ard_num) { void printPinPWM(const pin_t Ard_num) {
#ifndef STM32F1xx #ifndef STM32F1xx
if (pwm_status(Ard_num)) { if (pwm_status(Ard_num)) {
uint32_t alt_all = 0; uint32_t alt_all = 0;
@@ -285,4 +285,4 @@ void pwm_details(const pin_t Ard_num) {
#else #else
// TODO: F1 doesn't support changing pins function, so we need to check the function of the PIN and if it's enabled // TODO: F1 doesn't support changing pins function, so we need to check the function of the PIN and if it's enabled
#endif #endif
} // pwm_details } // printPinPWM
+1 -1
View File
@@ -238,7 +238,7 @@ void HAL_SD_MspInit(SD_HandleTypeDef *hsd) {
hdma_sdio.Init.MemInc = DMA_MINC_ENABLE; hdma_sdio.Init.MemInc = DMA_MINC_ENABLE;
hdma_sdio.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; hdma_sdio.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
hdma_sdio.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; hdma_sdio.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
hdma_sdio.Init.Priority = DMA_PRIORITY_LOW; hdma_sdio.Init.Priority = DMA_PRIORITY_MEDIUM;
__HAL_LINKDMA(&hsd, hdmarx, hdma_sdio); __HAL_LINKDMA(&hsd, hdmarx, hdma_sdio);
__HAL_LINKDMA(&hsd, hdmatx, hdma_sdio); __HAL_LINKDMA(&hsd, hdmatx, hdma_sdio);
+45 -38
View File
@@ -37,39 +37,46 @@ LCD_CONTROLLER_TypeDef *TFT_FSMC::LCD;
void TFT_FSMC::init() { void TFT_FSMC::init() {
uint32_t controllerAddress; uint32_t controllerAddress;
FSMC_NORSRAM_TimingTypeDef timing, extTiming; FMC_OR_FSMC(NORSRAM_TimingTypeDef) timing, extTiming;
uint32_t nsBank = (uint32_t)pinmap_peripheral(digitalPinToPinName(TFT_CS_PIN), pinMap_FSMC_CS); uint32_t nsBank = (uint32_t)pinmap_peripheral(digitalPinToPinName(TFT_CS_PIN), pinMap_FSMC_CS);
// Perform the SRAM1 memory initialization sequence // Perform the SRAM1 memory initialization sequence
SRAMx.Instance = FSMC_NORSRAM_DEVICE; SRAMx.Instance = FMC_OR_FSMC(NORSRAM_DEVICE);
SRAMx.Extended = FSMC_NORSRAM_EXTENDED_DEVICE; SRAMx.Extended = FMC_OR_FSMC(NORSRAM_EXTENDED_DEVICE);
// SRAMx.Init // SRAMx.Init
SRAMx.Init.NSBank = nsBank; SRAMx.Init.NSBank = nsBank;
SRAMx.Init.DataAddressMux = FSMC_DATA_ADDRESS_MUX_DISABLE; SRAMx.Init.DataAddressMux = FMC_OR_FSMC(DATA_ADDRESS_MUX_DISABLE);
SRAMx.Init.MemoryType = FSMC_MEMORY_TYPE_SRAM; SRAMx.Init.MemoryType = FMC_OR_FSMC(MEMORY_TYPE_SRAM);
#ifdef STM32F446xx
SRAMx.Init.MemoryDataWidth = TERN(TFT_INTERFACE_FMC_8BIT, FMC_NORSRAM_MEM_BUS_WIDTH_8, FMC_NORSRAM_MEM_BUS_WIDTH_16);
#else
SRAMx.Init.MemoryDataWidth = TERN(TFT_INTERFACE_FSMC_8BIT, FSMC_NORSRAM_MEM_BUS_WIDTH_8, FSMC_NORSRAM_MEM_BUS_WIDTH_16); SRAMx.Init.MemoryDataWidth = TERN(TFT_INTERFACE_FSMC_8BIT, FSMC_NORSRAM_MEM_BUS_WIDTH_8, FSMC_NORSRAM_MEM_BUS_WIDTH_16);
SRAMx.Init.BurstAccessMode = FSMC_BURST_ACCESS_MODE_DISABLE;
SRAMx.Init.WaitSignalPolarity = FSMC_WAIT_SIGNAL_POLARITY_LOW;
SRAMx.Init.WrapMode = FSMC_WRAP_MODE_DISABLE;
SRAMx.Init.WaitSignalActive = FSMC_WAIT_TIMING_BEFORE_WS;
SRAMx.Init.WriteOperation = FSMC_WRITE_OPERATION_ENABLE;
SRAMx.Init.WaitSignal = FSMC_WAIT_SIGNAL_DISABLE;
SRAMx.Init.ExtendedMode = FSMC_EXTENDED_MODE_ENABLE;
SRAMx.Init.AsynchronousWait = FSMC_ASYNCHRONOUS_WAIT_DISABLE;
SRAMx.Init.WriteBurst = FSMC_WRITE_BURST_DISABLE;
#ifdef STM32F4xx
SRAMx.Init.PageSize = FSMC_PAGE_SIZE_NONE;
#endif #endif
SRAMx.Init.BurstAccessMode = FMC_OR_FSMC(BURST_ACCESS_MODE_DISABLE);
SRAMx.Init.WaitSignalPolarity = FMC_OR_FSMC(WAIT_SIGNAL_POLARITY_LOW);
SRAMx.Init.WrapMode = FMC_OR_FSMC(WRAP_MODE_DISABLE);
SRAMx.Init.WaitSignalActive = FMC_OR_FSMC(WAIT_TIMING_BEFORE_WS);
SRAMx.Init.WriteOperation = FMC_OR_FSMC(WRITE_OPERATION_ENABLE);
SRAMx.Init.WaitSignal = FMC_OR_FSMC(WAIT_SIGNAL_DISABLE);
SRAMx.Init.ExtendedMode = FMC_OR_FSMC(EXTENDED_MODE_ENABLE);
SRAMx.Init.AsynchronousWait = FMC_OR_FSMC(ASYNCHRONOUS_WAIT_DISABLE);
SRAMx.Init.WriteBurst = FMC_OR_FSMC(WRITE_BURST_DISABLE);
#if defined(STM32F446xx) || defined(STM32F4xx)
SRAMx.Init.PageSize = FMC_OR_FSMC(PAGE_SIZE_NONE);
#endif
// Read Timing - relatively slow to ensure ID information is correctly read from TFT controller // Read Timing - relatively slow to ensure ID information is correctly read from TFT controller
// Can be decreases from 15-15-24 to 4-4-8 with risk of stability loss // Can be decreased from 15-15-24 to 4-4-8 with risk of stability loss
timing.AddressSetupTime = 15; timing.AddressSetupTime = 15;
timing.AddressHoldTime = 15; timing.AddressHoldTime = 15;
timing.DataSetupTime = 24; timing.DataSetupTime = 24;
timing.BusTurnAroundDuration = 0; timing.BusTurnAroundDuration = 0;
timing.CLKDivision = 16; timing.CLKDivision = 16;
timing.DataLatency = 17; timing.DataLatency = 17;
timing.AccessMode = FSMC_ACCESS_MODE_A; timing.AccessMode = FMC_OR_FSMC(ACCESS_MODE_A);
// Write Timing // Write Timing
// Can be decreased from 8-15-8 to 0-0-1 with risk of stability loss // Can be decreased from 8-15-8 to 0-0-1 with risk of stability loss
extTiming.AddressSetupTime = 8; extTiming.AddressSetupTime = 8;
@@ -78,9 +85,13 @@ void TFT_FSMC::init() {
extTiming.BusTurnAroundDuration = 0; extTiming.BusTurnAroundDuration = 0;
extTiming.CLKDivision = 16; extTiming.CLKDivision = 16;
extTiming.DataLatency = 17; extTiming.DataLatency = 17;
extTiming.AccessMode = FSMC_ACCESS_MODE_A; extTiming.AccessMode = FMC_OR_FSMC(ACCESS_MODE_A);
#ifdef STM32F446xx
__HAL_RCC_FMC_CLK_ENABLE();
#else
__HAL_RCC_FSMC_CLK_ENABLE(); __HAL_RCC_FSMC_CLK_ENABLE();
#endif
for (uint16_t i = 0; pinMap_FSMC[i].pin != NC; i++) for (uint16_t i = 0; pinMap_FSMC[i].pin != NC; i++)
pinmap_pinout(pinMap_FSMC[i].pin, pinMap_FSMC); pinmap_pinout(pinMap_FSMC[i].pin, pinMap_FSMC);
@@ -90,9 +101,9 @@ void TFT_FSMC::init() {
controllerAddress = FSMC_BANK1_1; controllerAddress = FSMC_BANK1_1;
#ifdef PF0 #ifdef PF0
switch (nsBank) { switch (nsBank) {
case FSMC_NORSRAM_BANK2: controllerAddress = FSMC_BANK1_2 ; break; case FMC_OR_FSMC(NORSRAM_BANK2): controllerAddress = FSMC_BANK1_2; break;
case FSMC_NORSRAM_BANK3: controllerAddress = FSMC_BANK1_3 ; break; case FMC_OR_FSMC(NORSRAM_BANK3): controllerAddress = FSMC_BANK1_3; break;
case FSMC_NORSRAM_BANK4: controllerAddress = FSMC_BANK1_4 ; break; case FMC_OR_FSMC(NORSRAM_BANK4): controllerAddress = FSMC_BANK1_4; break;
} }
#endif #endif
@@ -100,11 +111,11 @@ void TFT_FSMC::init() {
HAL_SRAM_Init(&SRAMx, &timing, &extTiming); HAL_SRAM_Init(&SRAMx, &timing, &extTiming);
#ifdef STM32F1xx
__HAL_RCC_DMA1_CLK_ENABLE();
DMAtx.Instance = DMA1_Channel1;
#elif defined(STM32F4xx)
__HAL_RCC_DMA2_CLK_ENABLE(); __HAL_RCC_DMA2_CLK_ENABLE();
#ifdef STM32F1xx
DMAtx.Instance = DMA2_Channel1;
#elif defined(STM32F4xx)
DMAtx.Instance = DMA2_Stream0; DMAtx.Instance = DMA2_Stream0;
DMAtx.Init.Channel = DMA_CHANNEL_0; DMAtx.Init.Channel = DMA_CHANNEL_0;
DMAtx.Init.FIFOMode = DMA_FIFOMODE_ENABLE; DMAtx.Init.FIFOMode = DMA_FIFOMODE_ENABLE;
@@ -124,25 +135,20 @@ void TFT_FSMC::init() {
} }
uint32_t TFT_FSMC::getID() { uint32_t TFT_FSMC::getID() {
uint32_t id;
writeReg(0); writeReg(0);
id = LCD->RAM; uint32_t id = LCD->RAM;
if (id == 0) id = readID(LCD_READ_ID);
if (id == 0) if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) id = readID(LCD_READ_ID4);
id = readID(LCD_READ_ID);
if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF)
id = readID(LCD_READ_ID4);
return id; return id;
} }
uint32_t TFT_FSMC::readID(const tft_data_t inReg) { uint32_t TFT_FSMC::readID(tft_data_t inReg) {
uint32_t id;
writeReg(inReg); writeReg(inReg);
id = LCD->RAM; // dummy read uint32_t id = LCD->RAM; // dummy read
id = inReg << 24; id = inReg << 24;
id |= (LCD->RAM & 0x00FF) << 16; id |= (LCD->RAM & 0x00FF) << 16;
id |= (LCD->RAM & 0x00FF) << 8; id |= (LCD->RAM & 0x00FF) << 8;
id |= LCD->RAM & 0x00FF; id |= (LCD->RAM & 0x00FF);
return id; return id;
} }
@@ -155,7 +161,9 @@ bool TFT_FSMC::isBusy() {
#define __IS_DMA_CONFIGURED(__HANDLE__) ((__HANDLE__)->Instance->PAR != 0) #define __IS_DMA_CONFIGURED(__HANDLE__) ((__HANDLE__)->Instance->PAR != 0)
#endif #endif
#ifdef __IS_DMA_CONFIGURED
if (!__IS_DMA_CONFIGURED(&DMAtx)) return false; if (!__IS_DMA_CONFIGURED(&DMAtx)) return false;
#endif
// Check if DMA transfer error or transfer complete flags are set // Check if DMA transfer error or transfer complete flags are set
if ((__HAL_DMA_GET_FLAG(&DMAtx, __HAL_DMA_GET_TE_FLAG_INDEX(&DMAtx)) == 0) && (__HAL_DMA_GET_FLAG(&DMAtx, __HAL_DMA_GET_TC_FLAG_INDEX(&DMAtx)) == 0)) return true; if ((__HAL_DMA_GET_FLAG(&DMAtx, __HAL_DMA_GET_TE_FLAG_INDEX(&DMAtx)) == 0) && (__HAL_DMA_GET_FLAG(&DMAtx, __HAL_DMA_GET_TC_FLAG_INDEX(&DMAtx)) == 0)) return true;
@@ -174,7 +182,6 @@ void TFT_FSMC::transmitDMA(uint32_t memoryIncrease, uint16_t *data, uint16_t cou
DMAtx.Init.PeriphInc = memoryIncrease; DMAtx.Init.PeriphInc = memoryIncrease;
HAL_DMA_Init(&DMAtx); HAL_DMA_Init(&DMAtx);
HAL_DMA_Start(&DMAtx, (uint32_t)data, (uint32_t)&(LCD->RAM), count); HAL_DMA_Start(&DMAtx, (uint32_t)data, (uint32_t)&(LCD->RAM), count);
TERN_(TFT_SHARED_IO, while (isBusy())); TERN_(TFT_SHARED_IO, while (isBusy()));
} }
+34 -28
View File
@@ -28,11 +28,7 @@
#elif defined(STM32F4xx) #elif defined(STM32F4xx)
#include "stm32f4xx_hal.h" #include "stm32f4xx_hal.h"
#else #else
#error "FSMC TFT is currently only supported on STM32F1 and STM32F4 hardware." #error "FSMC/FMC TFT is currently only supported on STM32F1 and STM32F4 hardware."
#endif
#ifndef HAL_SRAM_MODULE_ENABLED
#error "SRAM module disabled for the STM32 framework (HAL_SRAM_MODULE_ENABLED)! Please consult the development team."
#endif #endif
#ifndef LCD_READ_ID #ifndef LCD_READ_ID
@@ -55,6 +51,12 @@ typedef struct {
__IO tft_data_t RAM; __IO tft_data_t RAM;
} LCD_CONTROLLER_TypeDef; } LCD_CONTROLLER_TypeDef;
#ifdef STM32F446xx
#define FMC_OR_FSMC(N) _CAT(FMC_, N)
#else
#define FMC_OR_FSMC(N) _CAT(FSMC_, N)
#endif
class TFT_FSMC { class TFT_FSMC {
private: private:
static SRAM_HandleTypeDef SRAMx; static SRAM_HandleTypeDef SRAMx;
@@ -62,7 +64,7 @@ class TFT_FSMC {
static LCD_CONTROLLER_TypeDef *LCD; static LCD_CONTROLLER_TypeDef *LCD;
static uint32_t readID(const tft_data_t reg); static uint32_t readID(tft_data_t inReg);
static void transmit(tft_data_t data) { LCD->RAM = data; __DSB(); } static void transmit(tft_data_t data) { LCD->RAM = data; __DSB(); }
static void transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count); static void transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count);
static void transmitDMA(uint32_t memoryIncrease, uint16_t *data, uint16_t count); static void transmitDMA(uint32_t memoryIncrease, uint16_t *data, uint16_t count);
@@ -94,7 +96,11 @@ class TFT_FSMC {
#ifdef STM32F1xx #ifdef STM32F1xx
#define FSMC_PIN_DATA STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_NONE) #define FSMC_PIN_DATA STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_NONE)
#elif defined(STM32F4xx) #elif defined(STM32F4xx)
#ifdef STM32F446xx
#define FSMC_PIN_DATA STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_FMC)
#else
#define FSMC_PIN_DATA STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_FSMC) #define FSMC_PIN_DATA STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_FSMC)
#endif
#define FSMC_BANK1_1 0x60000000U #define FSMC_BANK1_1 0x60000000U
#define FSMC_BANK1_2 0x64000000U #define FSMC_BANK1_2 0x64000000U
#define FSMC_BANK1_3 0x68000000U #define FSMC_BANK1_3 0x68000000U
@@ -104,35 +110,35 @@ class TFT_FSMC {
#endif #endif
const PinMap pinMap_FSMC[] = { const PinMap pinMap_FSMC[] = {
{PD_14, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D00 {PD_14, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D00
{PD_15, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D01 {PD_15, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D01
{PD_0, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D02 {PD_0, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D02
{PD_1, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D03 {PD_1, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D03
{PE_7, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D04 {PE_7, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D04
{PE_8, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D05 {PE_8, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D05
{PE_9, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D06 {PE_9, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D06
{PE_10, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D07 {PE_10, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D07
#if DISABLED(TFT_INTERFACE_FSMC_8BIT) #if DISABLED(TFT_INTERFACE_FSMC_8BIT)
{PE_11, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D08 {PE_11, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D08
{PE_12, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D09 {PE_12, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D09
{PE_13, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D10 {PE_13, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D10
{PE_14, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D11 {PE_14, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D11
{PE_15, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D12 {PE_15, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D12
{PD_8, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D13 {PD_8, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D13
{PD_9, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D14 {PD_9, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D14
{PD_10, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D15 {PD_10, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D15
#endif #endif
{PD_4, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_NOE {PD_4, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_NOE
{PD_5, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_NWE {PD_5, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_NWE
{NC, NP, 0} {NC, NP, 0}
}; };
const PinMap pinMap_FSMC_CS[] = { const PinMap pinMap_FSMC_CS[] = {
{PD_7, (void *)FSMC_NORSRAM_BANK1, FSMC_PIN_DATA}, // FSMC_NE1 {PD_7, (void *)FMC_OR_FSMC(NORSRAM_BANK1), FSMC_PIN_DATA}, // FSMC_NE1
#ifdef PF0 #ifdef PF0
{PG_9, (void *)FSMC_NORSRAM_BANK2, FSMC_PIN_DATA}, // FSMC_NE2 {PG_9, (void *)FMC_OR_FSMC(NORSRAM_BANK2), FSMC_PIN_DATA}, // FSMC_NE2
{PG_10, (void *)FSMC_NORSRAM_BANK3, FSMC_PIN_DATA}, // FSMC_NE3 {PG_10, (void *)FMC_OR_FSMC(NORSRAM_BANK3), FSMC_PIN_DATA}, // FSMC_NE3
{PG_12, (void *)FSMC_NORSRAM_BANK4, FSMC_PIN_DATA}, // FSMC_NE4 {PG_12, (void *)FMC_OR_FSMC(NORSRAM_BANK4), FSMC_PIN_DATA}, // FSMC_NE4
#endif #endif
{NC, NP, 0} {NC, NP, 0}
}; };
+1 -1
View File
@@ -337,7 +337,7 @@ void TFT_SPI::transmitDMA(uint32_t memoryIncrease, uint16_t *data, uint16_t coun
SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN); // Enable Tx DMA Request SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN); // Enable Tx DMA Request
#endif #endif
TERN_(TFT_SHARED_IO, while (isBusy()) { /* nada */ }); TERN_(TFT_SHARED_IO, while (isBusy()));
} }
void TFT_SPI::transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count) { void TFT_SPI::transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count) {
+3 -3
View File
@@ -25,8 +25,8 @@
* STM32 LCD-specific defines * STM32 LCD-specific defines
*/ */
uint8_t u8g_com_std_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); // See U8glib-HAL uint8_t u8g_com_HAL_STM32_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); // u8g_com_stm32duino_swspi.cpp
uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); // See U8glib-HAL #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_STM32_sw_spi_fn
#define U8G_COM_HAL_SW_SPI_FN u8g_com_std_sw_spi_fn uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); // See U8glib-HAL
#define U8G_COM_HAL_HW_SPI_FN u8g_com_stm32duino_hw_spi_fn #define U8G_COM_HAL_HW_SPI_FN u8g_com_stm32duino_hw_spi_fn

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