Compare commits

..

894 Commits

Author SHA1 Message Date
Sven Soost
d60a566cd2 Merge branch '2.1---sv' of https://git.soost.dev/sv/Marlin into 2.1---sv 2024-01-02 11:30:58 +01:00
Sven Soost
07df92fb03 help 2024-01-02 11:26:43 +01:00
Sven Soost
32d88bb983 upped fw version
corrected board type
2024-01-02 11:26:43 +01:00
Scott Lahteine
969a7bcd29 🔨 Specify versions in INI 2024-01-02 11:26:42 +01:00
Scott Lahteine
ef7b2a00f8 🔖 Marlin 2.1.0.1 2024-01-02 11:26:32 +01:00
Scott Lahteine
6fde6ce9c4 🔨 PlatformIO 6 compatibility 2024-01-02 11:24:09 +01:00
efflicto
eee1018122 tweaks 2024-01-02 11:23:53 +01:00
efflicto
c7e0f6e129 tweaks 2024-01-02 11:23:53 +01:00
efflicto
1ea8481194 tweaks 2024-01-02 11:23:53 +01:00
efflicto
1b742e6e01 Tweaks 2024-01-02 11:23:53 +01:00
efflicto
e6c84f6245 fix 2024-01-02 11:23:53 +01:00
efflicto
db5500815e fixes 2024-01-02 11:23:53 +01:00
efflicto
9c82457bef pid tunning 2024-01-02 11:23:53 +01:00
efflicto
7707c21bd1 tweaks 2024-01-02 11:23:53 +01:00
efflicto
33f614aaf5 Fixes and changes for BL and other stuff 2024-01-02 11:23:53 +01:00
76d6f47b05 fixed extruder 2024-01-02 11:23:53 +01:00
sv
ac4b0f41dc Added homing parameters 2024-01-02 11:23:53 +01:00
9a9bb290dc Remeasured extruder steps after extruder metal replacement 2024-01-02 11:23:53 +01:00
efflicto
735b54d32e chagnes and tweaks, enabled BL 2024-01-02 11:23:53 +01:00
efflicto
75a32fdc69 revert MULTI_VOLUME 2024-01-02 11:23:53 +01:00
efflicto
f610f4449a tweaks 2024-01-02 11:23:53 +01:00
efflicto
cea093c0a1 tweaks 2024-01-02 11:23:53 +01:00
efflicto
20a2f46e10 fixes for fans 2024-01-02 11:23:53 +01:00
efflicto
e63a15ce07 Bootscreen added
Adjusted bed PID
2024-01-02 11:22:24 +01:00
efflicto
1f922c98f8 disabled HYBRID_THRESHOLD 2024-01-02 11:22:24 +01:00
efflicto
e249879310 Added host communication
Corrected feeding rate
2024-01-02 11:22:24 +01:00
efflicto
3b5a2f33e8 Fixed fan related stuff 2024-01-02 11:22:24 +01:00
efflicto
331fc693f3 enabled lcd_bed_leveling 2024-01-02 11:22:24 +01:00
efflicto
91f27a5591 switched back to en 2024-01-02 11:22:23 +01:00
efflicto
91dfaec623 fixes for lin_advance & version 2024-01-02 11:22:23 +01:00
efflicto
0112b260fa Initial Setup 2024-01-02 11:22:23 +01:00
sv
0762338343 Initial commit 2024-01-02 11:22:23 +01:00
Scott Lahteine
d5813db0b9 🩹 Fix G33 output
See #26299
2024-01-02 11:22:23 +01:00
Scott Lahteine
5161465a2d 🔖 Version 2.1.2.1 2024-01-02 11:22:23 +01:00
Giuliano Zaro
7e24de9180 🐛 Fix G2/G3 limiting_speed (#25988) 2024-01-02 11:22:23 +01:00
Scott Lahteine
7aeea3f322 🩹 Prevent Z drop with G28 X/Y 2024-01-02 11:22:23 +01:00
Scott Lahteine
ecf5dcbc9d 🩹 Fix TFT LVGL compile error (#25865)
Fixes regression from #24302
2024-01-02 11:22:23 +01:00
Scott Lahteine
2db055d004 🚸 Improve EEPROM validation (#25860) 2024-01-02 11:22:23 +01:00
Scott Lahteine
85f486e037 🩹 Fix null pwm_details 2024-01-02 11:22:22 +01:00
Scott Lahteine
de1ccb20e8 🩹 Improve edit menu rounding 2024-01-02 11:22:22 +01:00
Scott Lahteine
e728cc69ae 🧑‍💻 ftdi_language 2024-01-02 11:22:22 +01:00
Scott Lahteine
50f9493afe 📌 TH3D EZBoard SD_DETECT_PIN 27 2024-01-02 11:22:22 +01:00
Chris Bagwell
1d8be142c8 🔧 Fix SHAPING_MIN_FREQ check (#25358) 2024-01-02 11:22:22 +01:00
Scott Lahteine
c6e4e7fa82 🧑‍💻 M43 updates 2024-01-02 11:22:22 +01:00
Giuliano Zaro
8784b581bb 🔧 Move SOFT_PWM_SCALE fallback to cpp (#25800)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:22:22 +01:00
Scott Lahteine
e1d59948a9 🚸 Faster default Marlin feedrate 2024-01-02 11:22:22 +01:00
ellensp
03baefab85 🔨 MKS Robin2 PIO Env (#25792) 2024-01-02 11:22:22 +01:00
Scott Lahteine
c3f24d61ac 🎨 Move G28O inside ProUI 2024-01-02 11:22:21 +01:00
Scott Mikutsky
d3c9bcd7a2 🐛 Fix STM32 USB disconnect behavior (#25762) 2024-01-02 11:22:21 +01:00
Scott Lahteine
2bf73b415c 🔧 Fix X2/Y2 axis pins check 2024-01-02 11:22:21 +01:00
Scott Lahteine
69dc14d494 🔧 Move MMU section 2024-01-02 11:22:21 +01:00
Scott Lahteine
b31296b7d8 🩹 Fix TFT sanity error 2024-01-02 11:22:21 +01:00
Scott Lahteine
c7e6e65ffb 🧑‍💻 Use NUM_AXIS_ARRAY 2024-01-02 11:22:21 +01:00
Scott Lahteine
ef949a54f9 🔨 Servo Timer 1 with STM32F103RC_fysetc (#25741) 2024-01-02 11:22:21 +01:00
Scott Lahteine
472b14678d 🔧 Update config.ini script 2024-01-02 11:22:21 +01:00
Scott Lahteine
0fe8cd2b7a 🧑‍💻 Change HAL_PATH macro for easier HAL relocation (#25743) 2024-01-02 11:22:21 +01:00
Scott Lahteine
84ad4c9f61 🔧 Extra axis endstop defaults 2024-01-02 11:22:20 +01:00
Anson Liu
bd1db04ccd 🔨 Prevent SlowSoftWire + Wire name conflict (#25707) 2024-01-02 11:22:20 +01:00
Scott Lahteine
b1c1cefef3 📝 Developer note in boards.h 2024-01-02 11:22:20 +01:00
Scott Lahteine
0b0a38c7f9 🚸 Improve PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED (#25681) 2024-01-02 11:22:20 +01:00
Scott Lahteine
cee8622475 🩹 Fix UBL safe measure move with extra axes
Followup to 7e79fc5b
2024-01-02 11:22:20 +01:00
Alexey D. Filimonov
800fd1e2ee 🎨 Clean up TFT Color UI display items (#25712)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:22:20 +01:00
Keith Bennett
7ad2bd1f86 🚸 Permit G38 with Core (#25713) 2024-01-02 11:22:20 +01:00
Jay Robson
6ada8b091c 🐛 Fix G38 with Z, support 9 axes (#25691)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:22:20 +01:00
Keith Bennett
2f5e70f03f 🔧 Check renamed LIN_ADVANCE_K (#25710) 2024-01-02 11:22:20 +01:00
ellensp
2f3f002c27 🩹 Correctly add JSON to mc.zip (#25706) 2024-01-02 11:22:20 +01:00
Scott Lahteine
d35ceb0aa2 🧑‍💻 Minor SpindleLaser::set_enabled tweak 2024-01-02 11:22:19 +01:00
Alexey D. Filimonov
ddb3033268 🩹 Fix Spindle/Laser ENA pin test (#25622) 2024-01-02 11:22:19 +01:00
Bob Kuhn
6d67142f7b 🩹 Fix laser with no PWM compile (#25290) 2024-01-02 11:22:19 +01:00
Dennis Lawler
1407f43f32 🚸 Echo G30 out-of-bounds (#25671) 2024-01-02 11:22:19 +01:00
Giuliano Zaro
a6f8679eda 🩹 Bail on 'mc.zip' write error (#25695)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:22:19 +01:00
ellensp
a2a566337d 🔨 Fix, clean up STM32F1 envs (#25697)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:22:19 +01:00
Giuliano Zaro
faf3a25f20 🐛 Fix Configuration Embedding (#25688) 2024-01-02 11:22:19 +01:00
ellensp
4620d00adb 🩹 Status / Host Prompt followup (#25720)
Followup to #25679

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:22:19 +01:00
Scott Lahteine
84dde2e9f8 🧑‍💻 HostUI::continue_prompt method 2024-01-02 11:22:19 +01:00
Scott Lahteine
1e61e7e19c 🧑‍💻 Status Message cleanup 2024-01-02 11:22:19 +01:00
Scott Lahteine
6ceeca432d 🧑‍💻 JyersUI code cleanup 2024-01-02 11:22:18 +01:00
Scott Lahteine
2854dd98d0 🧑‍💻 Apply simplified ?: 2024-01-02 11:22:18 +01:00
Scott Lahteine
9c00146e43 🔧 Trigorilla / Chiron updates
Followup to c3f34e4e
2024-01-02 11:22:18 +01:00
Scott Lahteine
be0cf33e4d 🔨 Improve runout script check 2024-01-02 11:22:18 +01:00
Scott Lahteine
109960a386 🩹 Fix AUTOFAN_CASE
Followup to #25554
2024-01-02 11:22:18 +01:00
Scott Lahteine
5df4e1ab13 🔧 Move FIL_RUNOUT_PIN for Chiron + GLCD 2024-01-02 11:22:18 +01:00
Scott Lahteine
6ceedafab0 🧑‍💻 Clarify G28 R / R0 2024-01-02 11:22:18 +01:00
Scott Lahteine
c49013becf 🚸 Minor M43 improvements 2024-01-02 11:22:18 +01:00
David Fries
bb61af4fe5 ️ Skip a redundant BLTouch::command (#25656) 2024-01-02 11:22:18 +01:00
Scott Lahteine
c6298ae610 🔧 Move TFT sanity checks 2024-01-02 11:22:18 +01:00
Scott Lahteine
a88627394b 🎨 Detab some build files 2024-01-02 11:22:17 +01:00
Scott Lahteine
1fb57947b9 🎨 Apply const (#25643) 2024-01-02 11:22:17 +01:00
ellensp
e9ec79e12e 🚸 Support CoreXY without Z (#25630) 2024-01-02 11:22:17 +01:00
Scott Lahteine
815d65e262 📝 Update Ender # labels 2024-01-02 11:22:17 +01:00
Scott Lahteine
ef646f2114 🧑‍💻 Update pinsformat.js 2024-01-02 11:22:17 +01:00
Scott Lahteine
1e3a5b0ac3 🐛 Ensure root for 'M503 C' 2024-01-02 11:22:17 +01:00
Giuliano Zaro
563a5da9e7 🌐 Update Italian language (#25587) 2024-01-02 11:22:17 +01:00
Scott Lahteine
3924c398c2 🩹 Fix displayed mix percentages 2024-01-02 11:22:17 +01:00
Scott Lahteine
a05af1b8be 🩹 Fix Ender-3 V2 with no fan 2024-01-02 11:22:16 +01:00
Chris Pepper
775d03bcdf 🔨 MarlinSimUI updates (#25589) 2024-01-02 11:22:16 +01:00
John Unland
be8cc5c4fe 🔨 Improve Docker local tests support (#25583) 2024-01-02 11:22:16 +01:00
Andrew
90474c2553 🎨 Remove unused ProUI : UBLValidMesh (#25591) 2024-01-02 11:22:11 +01:00
Scott Lahteine
f19ea05601 🔧 Fix up WiFi options (#25586) 2024-01-02 11:22:11 +01:00
Scott Lahteine
6bc106c48b 🔨 INI Updates
Co-Authored-By: Martin Turski <turningtides@outlook.de>
2024-01-02 11:22:11 +01:00
Eduard Sukharev
b9e05fd6bd 🐛 Fix M23 long filename support (#25540) 2024-01-02 11:22:11 +01:00
Scott Lahteine
bfd678bd62 🧑‍💻 Auto Fan / Cooler Fan updates (#25554) 2024-01-02 11:22:11 +01:00
Keith Bennett
1298acac83 🩹 Fix Touch Calibration first point (#25298) 2024-01-02 11:22:11 +01:00
Scott Lahteine
21f6f41a6d 🎨 Timer tweaks 2024-01-02 11:22:11 +01:00
ellensp
2569f74ade 🩹 Fix Chitu3D V6 default probe pin (#25552) 2024-01-02 11:22:11 +01:00
Scott Lahteine
90af917a29 🩹 Update TRONXY_V10 SPI_FLASH pins 2024-01-02 11:22:10 +01:00
Scott Lahteine
375c61aaa3 🎨 LPC_SOFTWARE_SPI => SOFTWARE_SPI
Co-Authored-By: Martin Turski <turningtides@outlook.de>
2024-01-02 11:22:10 +01:00
Scott Lahteine
df743d755a 🎨 Pins header comments
Co-Authored-By: Martin Turski <turningtides@outlook.de>
2024-01-02 11:22:10 +01:00
Martin Turski
78f854613c 🩹 Reset touch screen calibration on failure (#25334)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:22:09 +01:00
Scott Lahteine
3c6f086f2d 🎨 calibration_stage => stage 2024-01-02 11:22:09 +01:00
Scott Lahteine
81d279906b 🩹 Fix a serial_ternary 2024-01-02 11:22:09 +01:00
ellensp
707797f5d0 🩹 Fix Ender 2 stock LCD (#25538) 2024-01-02 11:22:09 +01:00
George Fu
66e5a906fb 🐛 Fix FYSETC Cheetah v2.0 Servo/Probe pins (#24635)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:22:09 +01:00
Scott Lahteine
4a3e84c5b9 ️ Misc. optimizations 2024-01-02 11:22:09 +01:00
Davide Rombolà
aa460bd936 🎨 Suppress warning (#25529) 2024-01-02 11:22:09 +01:00
Scott Lahteine
dbf7ea8796 🧑‍💻 More IntelliSense-friendly declares 2024-01-02 11:22:09 +01:00
Michael Hill
8583551557 Sovol v1.3.1 (Sovol SV06) (#25267) 2024-01-02 11:22:09 +01:00
dwzg
e469b04f9a 🩹 Fix DWIN MarlinUI Fan/E/XY (#25502) 2024-01-02 11:22:09 +01:00
Scott Lahteine
9f65ab96e4 🩹 Fan Menu / Status fixes
Followup to #21888
2024-01-02 11:22:08 +01:00
Abdullah YILMAZ
22ce4e5b22 🌐 Update Turkish language (#25447) 2024-01-02 11:22:08 +01:00
Giuliano Zaro
97e9f63286 🌐 Update Italian language (#25454) 2024-01-02 11:22:08 +01:00
Scott Lahteine
b7a3afe85d 📝 Fix a comment 2024-01-02 11:22:08 +01:00
jamespearson04
dc36389ea7 🐛 Fix UBL 'G29 J' mesh tilt (#25453)
Fix regression from #24214
2024-01-02 11:22:08 +01:00
Marcio T
ed992427e7 🚸 Improve CocoaPress Touch UI (#25446) 2024-01-02 11:22:08 +01:00
ellensp
7aa0454712 📝 Link to archived RA Control Panel page (#25424) 2024-01-02 11:22:08 +01:00
Giuliano Zaro
18aa56fa63 🌐 Update Italian language (#25309) 2024-01-02 11:22:08 +01:00
Roman Moravčík
9c4de0056a 🌐 Update Slovak language (#25305) 2024-01-02 11:22:08 +01:00
ellensp
47c00a59bd 🧑‍💻 Add IA_CREALITY CI test (#25434) 2024-01-02 11:22:07 +01:00
Scott Lahteine
e77686cfd9 🔨 Use 'build_src_filter' 2024-01-02 11:22:07 +01:00
Scott Lahteine
18a55a58f5 🔨 Fix thread-unsafe deque iteration 2024-01-02 11:22:03 +01:00
ellensp
3d4c6e5ca3 🐛 Fix MKS Robin Nano 1.3 F4 pin collision (#25838) 2024-01-02 11:21:55 +01:00
ellensp
94b4bd5c1e 🔧 Update thermocouple 2 pin sanity check (#25627) 2024-01-02 11:21:55 +01:00
ellensp
effeb5a4f2 🩹 Fix MARLIN_F446Zx_TRONXY variant (#25659)
Followup to 9be1554f
2024-01-02 11:21:55 +01:00
Chris Pepper
0935cdf7eb 🩹 Fix SD partitionTable packing (#25648) 2024-01-02 11:21:55 +01:00
Jason Smith
7f53cb3ce6 🎨 Suppress M122 sign warning (#25613) 2024-01-02 11:21:54 +01:00
Eduard Sukharev
4287eb83d2 🐛 Fix long filename read/report (#25509) 2024-01-02 11:21:54 +01:00
John Robertson
49ea4714fe 🔧 Sanity-check PRINTCOUNTER_SAVE_INTERVAL + ESP32 I2S Exp (#25527)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:21:54 +01:00
Keith Bennett
979313597a 🐛 Fix Anet ET4 SD_SS_PIN (#25492) 2024-01-02 11:21:54 +01:00
Scott Lahteine
25f3acab4c ️ Exit from ISR on AVR already does sei
Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com>
2024-01-02 11:21:54 +01:00
Keith Bennett
aec1322585 BTT Octopus Max EZ 1.0, SKR 3.0 / 3.0 EZ (#25387, #25495, #25535) 2024-01-02 11:21:54 +01:00
Sion Williams
d57586b6a5 🔨 VSCode + Devcontainer support (#22420) 2024-01-02 11:21:53 +01:00
alextrical
094c9c38e4 🐛 Fix Flash EEPROM for STM32G0B1CB (#25469) 2024-01-02 11:21:53 +01:00
Hans-Christian Ebke
9b7acf8f40 🐛 Fix apply_power for SPINDLE_SERVO (#25465) 2024-01-02 11:21:53 +01:00
tombrazier
d8e232b120 🐛 Fix LA retract/feedrate edge case (#25445)
Followup to #25442
2024-01-02 11:21:53 +01:00
Scott Lahteine
fe7a60dc91 🔨 Improve config.ini example fetch 2024-01-02 11:21:53 +01:00
Scott Lahteine
29b392fa01 🌐 Regenerate language data 2024-01-02 11:21:53 +01:00
Scott Lahteine
bc915a2bb8 🧑‍💻 Script to make non-accented languages 2024-01-02 11:21:53 +01:00
Scott Lahteine
5a50118884 🔨 Update font scripts 2024-01-02 11:21:53 +01:00
ellensp
e55d4c9bfc 🔧 Fix Sensorless Probe sanity-check err (#25417) 2024-01-02 11:21:53 +01:00
tombrazier
27edbb21d3 🐛 Fix Linear Advance E position tracking (#25442)
Fix regression from #24951
2024-01-02 11:21:53 +01:00
tombrazier
32e0662783 🐛 Fix ISR_SHAPING_LOOP_CYCLES (#25335) 2024-01-02 11:21:52 +01:00
ellensp
bbf3083af6 🔨 Fix 'step' type in createTemperatureLookupMarlin.py (#25455) 2024-01-02 11:21:52 +01:00
Keith Bennett
1d6da05b6b 🔨 Fix env STM32G0B1RE_btt, add …_manta_btt (#25431) 2024-01-02 11:21:52 +01:00
Scott Lahteine
32ebc98f66 🎨 Use LIMIT macro 2024-01-02 11:21:52 +01:00
Guðni Már Gilbert
37287b234d ️ Reduce edit_screen code size (#25420) 2024-01-02 11:21:52 +01:00
Scott Lahteine
65443c3b15 🔧 Fix Einsy Rambo TMC driver check 2024-01-02 11:21:52 +01:00
tombrazier
0bd007abe6 🐛 Fix AVR maths used by Stepper (#25338) 2024-01-02 11:21:41 +01:00
ellensp
1de5d24780 🔨 Encrypt some MKS Robin (#25349) 2024-01-02 11:21:41 +01:00
Scott Lahteine
da0307daba 🧑‍💻 Fix preheat tests (nested macro limit ~256)
Followup to #25407
2024-01-02 11:21:41 +01:00
ellensp
cb6135f8f0 🔧 Sanity-check hotend max / preheat temps (#25407)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:21:41 +01:00
ellensp
fd20299a5d 📺 Update Re-ARM VIKI2 SPI pins (#25411) 2024-01-02 11:21:41 +01:00
Scott Lahteine
19ebcac9e3 🚸 Interruptible PLR (#25395) 2024-01-02 11:21:41 +01:00
ellensp
0325a0335c 🐛 Fix FastPWM calculations (#25343)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:21:41 +01:00
Trevin Small
42b7aa50ef ✏️ Fix README typo (#25388) 2024-01-02 11:21:41 +01:00
Scott Lahteine
ea122a1ce1 🎨 Tweak VALIDATE_MESH_TILT 2024-01-02 11:21:41 +01:00
Frederik Kemner
ea198b2cf3 🚸 SPI endstops for X/Y Dual and Core (#25371) 2024-01-02 11:21:41 +01:00
Radek
68621d7cb9 📝 Fix BTT_MINI_12864_V1 comment (#25366) 2024-01-02 11:21:40 +01:00
Scott Lahteine
ef96d439c8 🔨 Suppress native build warnings 2024-01-02 11:21:40 +01:00
EvilGremlin
b8913b19af 🔨 Adjust INI comments (#25183) 2024-01-02 11:21:40 +01:00
Scott Lahteine
f58ebcbbc1 🩹 Extra axis min home with Delta Sensorless Probe 2024-01-02 11:21:40 +01:00
Scott Lahteine
c023781f41 🩹 Extra axes for Tool Change 2024-01-02 11:21:40 +01:00
Scott Lahteine
002b48a52a 🩹 Various simple fixes 2024-01-02 11:21:40 +01:00
Scott Lahteine
f7f50a267a 🩹 Safe Bed Leveling updates 2024-01-02 11:21:40 +01:00
Scott Lahteine
7429633b29 🩹 Misc. extra axis updates 2024-01-02 11:21:40 +01:00
Scott Lahteine
6034a3e502 🩹 Use 'M205 D' when 'B' is an axis 2024-01-02 11:21:40 +01:00
Scott Lahteine
a581ba7107 🔧 Add a test for extra axes 2024-01-02 11:21:39 +01:00
Keith Bennett
6768759d96 BigTreeTech Manta M4P, M5P, M8P V1.0 / 1.1, E3 EZ (#25001) 2024-01-02 11:21:39 +01:00
Victor Oliveira
d58daf80f5 🧑‍💻 General 'MediaFile' type alias (#24424) 2024-01-02 11:21:39 +01:00
vyacheslav-shubin
2e019225d4 🧑‍💻 Add SD Card 'hide' method for dev usage (#22425) 2024-01-02 11:21:39 +01:00
Keith Bennett
63bca6fdd0 📝 Fix Z*_ENDSTOP_ADJUSTMENT comments (#25295) 2024-01-02 11:21:39 +01:00
kg333
670a37640b 📺 Melzi v4 with BTT SKR Mini E3 (#25321) 2024-01-02 11:21:38 +01:00
Martin Turski
32236c84d4 🔨 Fix test build path with spaces (#25329) 2024-01-02 11:21:38 +01:00
Bob Kuhn
79b3bcd3b1 🔧 Fix SD sorting sanity checks (#25318) 2024-01-02 11:21:38 +01:00
Scott Lahteine
ccc0d88a0e 🔧 Fix build with no Y axis (#25311) 2024-01-02 11:21:38 +01:00
Bob Kuhn
c45a880382 🩹 Fix G61 axis parameters with no offset (#25312) 2024-01-02 11:21:38 +01:00
Darren Garnier
44de068229 🔨 Fix config.ini URL fetch (#25313) 2024-01-02 11:21:38 +01:00
avionix-g
7154eea1fe 🐛 Fix MKS board Ultipanel support (#25278) 2024-01-02 11:21:38 +01:00
xBiohazardx
2fc5e21a18 ✏️ Fix probe invert flag (#25282) 2024-01-02 11:21:38 +01:00
Scott Lahteine
2c872dd096 🔧 Refine Input Shaping check (#25280) 2024-01-02 11:21:37 +01:00
Scott Lahteine
d1ebbcfbbe SDIO retry, hsd clock, etc. 2024-01-02 11:21:37 +01:00
Scott Lahteine
05a3ecb438 🔧 Overridable Stepper EN init 2024-01-02 11:21:37 +01:00
Bob Kuhn
fb860e69a8 🐛 Fix Ender-2 Stock Display with Melzi (#25258) 2024-01-02 11:21:37 +01:00
MarkMan0
f49f5ebd02 🐛 Fix, Refactor PID scaling (#25096) 2024-01-02 11:21:37 +01:00
John Robertson
c62005f750 🐛 Fix potential I2S buffer overwrite (#25113) 2024-01-02 11:21:37 +01:00
Scott Lahteine
ec57fcc4d1 🎨 Heading cleanup 2024-01-02 11:21:37 +01:00
Scott Lahteine
7a1d662fc2 🎨 Language / menu cleanup 2024-01-02 11:21:36 +01:00
Scott Lahteine
0df6ae413e ✏️ ProUI followup 2024-01-02 11:21:36 +01:00
Scott Lahteine
68b6ca53cf 🔧 Added MOTHERBOARD error text 2024-01-02 11:21:36 +01:00
Scott Lahteine
78375bbbd4 🎨 Misc. formatting 2024-01-02 11:21:36 +01:00
Scott Lahteine
2087a56624 🧑‍💻 Fix D5 warning 2024-01-02 11:21:36 +01:00
Scott Lahteine
f0b1090e6a 🐛 Fix homing_needed_error 2024-01-02 11:21:36 +01:00
Scott Lahteine
f1895947a8 🔧 Input Shaping sanity checks 2024-01-02 11:21:36 +01:00
Scott Lahteine
1378e3fb2b 🩹 Fix Sim with USE_WATCHDOG disabled 2024-01-02 11:21:35 +01:00
Scott Lahteine
38a954e9fa 🔨 Improve config.ini parser 2024-01-02 11:21:35 +01:00
Alex Z
98bf7cbfeb 🐛 Fix Chitu V6 Z_STOP_PIN (#25227) 2024-01-02 11:21:35 +01:00
Miguel Risco-Castillo
55e4de0144 🚸 ProUI updates (#25176) 2024-01-02 11:21:35 +01:00
Sebastien BLAISOT
e3a64464ee 🐛 Fix Neopixel 1 startup (#25203) 2024-01-02 11:21:35 +01:00
Vlad Popescu
9f7f6ab10f 🩹 Fix E3V2 MarlinUI XYZ frame (#25206) 2024-01-02 11:21:35 +01:00
Richard Layton
dd6791bb45 📝 Linux Sim apt-get line (#25208) 2024-01-02 11:21:35 +01:00
Richard Layton
91fe29319f 📝 More native.ini docs (#25201) 2024-01-02 11:21:34 +01:00
ellensp
f7a9a73f91 🩹 Update MKS_GEN_13 MOSFET pins (#25126) 2024-01-02 11:21:34 +01:00
ellensp
b6267b7ffa 🩹 Replace pow() with _BV() (#25186) 2024-01-02 11:21:34 +01:00
Mike Bignell
8debbc213c 🩹 Fix missing IS_MELZI (#25190) 2024-01-02 11:21:34 +01:00
Ashley 'DrToxic' Devine
9435483b74 🎨 Misc. cleanup (#25194)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:21:34 +01:00
Vovodroid
6d1df38a5b 🚸 Attach USB media (#25120) 2024-01-02 11:21:34 +01:00
Scott Lahteine
e3b2324c13 🧑‍💻 Add Temperature::is_above_target 2024-01-02 11:21:34 +01:00
Scott Lahteine
7ac6609d7d 🎨 Rename *_temp_error to *temp_error 2024-01-02 11:21:34 +01:00
Timothy Hoogland
30c1d06300 🩹 Remove extraneous EZBoard V1 autofans (#25182) 2024-01-02 11:21:34 +01:00
Scott Lahteine
6dfe711846 🎨 Misc. IS cleanup 2024-01-02 11:21:34 +01:00
Giuliano Zaro
4147b41e58 🚸 MarlinUI edit steps/mm to 2 decimal places (#25144) 2024-01-02 11:21:33 +01:00
ellensp
6f5648ae41 🧑‍💻 Fix type warning (#25149) 2024-01-02 11:21:33 +01:00
ellensp
105569c93b 🔨 FILAMENT_RUNOUT_SCRIPT sanity check (#25150) 2024-01-02 11:21:33 +01:00
Lukas Erlacher
222079c7aa 🔧 Add H8 to Creality 4.2.2 stepper warning (#25154) 2024-01-02 11:21:33 +01:00
Lukas Erlacher
84b8d64cda 🚸 Z Servo Probe is HAS_STOWABLE_PROBE (#25158) 2024-01-02 11:21:33 +01:00
Timothy Hoogland
f421096af2 🩹 Remove extraneous EZBoard V2 autofans (#25166) 2024-01-02 11:21:33 +01:00
Scott Lahteine
3efe91aa95 🚸 Hide IS menu while busy 2024-01-02 11:21:33 +01:00
Vlad Popescu
12e066b41f 🐛 Avoid lambda for menu items (#25169) 2024-01-02 11:21:33 +01:00
Stefan Kalscheuer
d37c967754 🐛 Fix Mesh Bed Leveling Z correction (#25122) 2024-01-02 11:21:33 +01:00
Keith Bennett
cc79ceb830 📝 Fix Configs URL (#25167) 2024-01-02 11:21:32 +01:00
Scott Lahteine
a62911210b 🧑‍💻 Fix ONBOARD_FLASH_SIZE 2024-01-02 11:21:27 +01:00
Scott Lahteine
e92d8ed620 🔖 Version 2.1.2 2024-01-02 11:21:27 +01:00
Scott Lahteine
9e4623344c 📝 Update 2.1.x README 2024-01-02 11:21:04 +01:00
Scott Lahteine
60e7acb96b 🧑‍💻 M593 F "min" freq 2024-01-02 11:21:04 +01:00
Scott Lahteine
02171faf35 🐛 Fix Melzi encoder 2024-01-02 11:21:04 +01:00
Scott Lahteine
c74da8b595 🩹 Fix LCD_FOR_MELZI with Tronxy Melzi 2024-01-02 11:21:04 +01:00
EvilGremlin
fef48d3c26 🐛 Fix DOGM time overflow, alignment (#25103) 2024-01-02 11:21:03 +01:00
ellensp
ec409acc7d 🎨 Suppress warning (#25101) 2024-01-02 11:21:03 +01:00
ellensp
a8394ad94a BTT Octopus with STM32-F407 (#25031) 2024-01-02 11:21:03 +01:00
alextrical
6288fb639f BigTreeTech EBB42 v1.1 (#24964) 2024-01-02 11:21:03 +01:00
ils15
e254a806cf 🔧 Use multi-XYZ 'STOP' pins for MIN/MAX (#24855)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:21:03 +01:00
Scott Lahteine
d1e0dffff3 Robin Nano v1 CDC (USB mod)
Followup to #24619
2024-01-02 11:21:03 +01:00
Dipl.-Ing. Raoul Rubien, BSc
46777d86d0 🩹 Fix M115_GEOMETRY_REPORT (#25092) 2024-01-02 11:21:02 +01:00
ellensp
bb34b41608 🩹 Inverted probe pin flag (K8400) (#25085) 2024-01-02 11:21:02 +01:00
Scott Lahteine
e48537fe50 🩹 Fix M502 init of default motion
Fix regression from #25035
2024-01-02 11:21:02 +01:00
alextrical
6dd559184f 🩹 Use custom I2C pins for OLED (#24970) 2024-01-02 11:21:02 +01:00
Bart Meijer
4b52aed9a8 SAMD21 HAL / Minitronics v2.0 (#24976) 2024-01-02 11:21:02 +01:00
Alexander Gavrilenko
ed3ae09e66 TFT_COLOR_UI async DMA SPI (#24980) 2024-01-02 11:21:01 +01:00
Scott Lahteine
903f9b2ac0 📝 Replace Twitter with Fosstodon 2024-01-02 11:21:01 +01:00
Simon Pilepich
4dd5b0e7e3 🔧 Anycubic alternate Z1/Z2 wiring (#25071) 2024-01-02 11:21:01 +01:00
Krzysztof Błażewicz
e2e50a05eb JyersUI TMC Settings (#25048) 2024-01-02 11:21:01 +01:00
Keith Bennett
a20ef4ca63 🔧 Custom Menu Sanity Check (#25079) 2024-01-02 11:21:01 +01:00
Scott Lahteine
b5e0ff331c 🔨 Updated 'mfconfig init' 2024-01-02 11:21:01 +01:00
ellensp
5de18e548a 🔨 No env:mega1280 for MIGHTYBOARD_REVE (#25080) 2024-01-02 11:21:00 +01:00
tombrazier
4e9ed5990b ️ Better IS buffer size calc (#25035) 2024-01-02 11:21:00 +01:00
Vovodroid
c62f686ecc Two controller fans (#24995) 2024-01-02 11:21:00 +01:00
ellensp
6a4a6d8c07 📌 Pins updates for Longer LK5, etc. (#25012)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:21:00 +01:00
EvilGremlin
065eb12f51 🚸 Progress display followup (#24879) 2024-01-02 11:21:00 +01:00
Sebastien BLAISOT
9a07f768bf M150 S default index (#23066)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:21:00 +01:00
Scott Lahteine
1911ed13de 🔨 Return error on mftest exit 2024-01-02 11:20:59 +01:00
Scott Lahteine
751316598e 📝 Update config comments 2024-01-02 11:20:59 +01:00
ellensp
acb2e452bb 🐛 Fix Fast PWM on AVR (#25030)
Followup to #25005
2024-01-02 11:20:59 +01:00
kisslorand
8e2c013c57 ✏️ Fix missing ) (#25055) 2024-01-02 11:20:59 +01:00
Scott Lahteine
855b6de9e7 🔨 Fix CI Test clean step (2) 2024-01-02 11:20:59 +01:00
Scott Lahteine
b8b65e7bcb 🎨 Misc. cleanup 2024-01-02 11:20:59 +01:00
Scott Lahteine
6f119178f2 🔨 Fix CI Test clean step 2024-01-02 11:20:59 +01:00
tombrazier
ac3d422a46 🐛 Fix TMC5160 + Input Shaping overcurrent (#25050) 2024-01-02 11:20:59 +01:00
Taylor Talkington
d1ad6d7481 🩹 Ender 3v2 DWIN MarlinUI Fixup (#24984) 2024-01-02 11:20:58 +01:00
Scott Lahteine
c7e3054b67 🎨 Trailing whitespace 2024-01-02 11:20:58 +01:00
ellensp
258b812eef 🔨 Update renamed.ini (#25042) 2024-01-02 11:20:58 +01:00
ellensp
fb4c69407f 🩹 Fix MSG_MOVE_N_MM substitution (#25043) 2024-01-02 11:20:58 +01:00
kisslorand
94a4101f22 🚸 G30 move to logical XY (#24953) 2024-01-02 11:20:58 +01:00
Scott Lahteine
6b3533a946 🎨 Misc. cleanup 2024-01-02 11:20:58 +01:00
Scott Lahteine
ee4bf53e3b 🧑‍💻 Use spaces indent for Python 2024-01-02 11:20:58 +01:00
トトも
5efd79b282 📝 Formatted Team Overview (#25029) 2024-01-02 11:20:57 +01:00
Scott Lahteine
acfa61728c 🐛 Fix G-code resend race condition
As pointed out in #24972 by @silycr, but simplified.
2024-01-02 11:20:57 +01:00
Taylor Talkington
47263b0411 Ender-3 V2 DWIN for BTT Octopus V1.1 (#24983) 2024-01-02 11:20:57 +01:00
Chris Bagwell
04fb7b322a ️ More SCURVE cycles on unoptimized cortex-m0 (#24955) 2024-01-02 11:20:57 +01:00
tombrazier
a1439ca445 ️ Input Shaping improvements (#24951) 2024-01-02 11:20:57 +01:00
Trivalik
3f46baa323 🐛 Fix missing va_end in UnwPrintf (#25027) 2024-01-02 11:20:56 +01:00
studiodyne
118eb82993 🐛 Fix MILLISECONDS_PREHEAT_TIME / mintemp (#24967) 2024-01-02 11:20:56 +01:00
Marcio T
7d44a3ab46 🩹 Fix ADVANCE_K + DISTINCT_E_FACTORS sanity check (#25007) 2024-01-02 11:20:56 +01:00
Manuel McLure
b340de5e9d 🔧 Merge TMC26X with TMC config (#24373) 2024-01-02 11:20:56 +01:00
Radek
eefaa70893 🐛 Fix SKR mini E2 V2 + BTT_MINI_12864_V1 (#24827)
See https://github.com/bigtreetech/BIGTREETECH-SKR-mini-E3/issues/686#issuecomment-1296545443
2024-01-02 11:20:56 +01:00
Vasily Evseenko
868258fca9 🍻 Fix Z increase on toolchange without UBL (#22942) 2024-01-02 11:20:56 +01:00
ellensp
2b79b66f66 🩹 Fix UBL menu compile (#25020) 2024-01-02 11:20:56 +01:00
mikemerryguy
5c31f99178 🚸 Add 50mm manual move (#24884) 2024-01-02 11:20:55 +01:00
Thomas Buck
bc7aaa6120 🚸 Optional Cutter/Laser status for HD44780 (#25003) 2024-01-02 11:20:55 +01:00
Tanguy Pruvot
ec7af0ca4c 🚸 COLOR_UI sleep timeout / setting (#24994) 2024-01-02 11:20:55 +01:00
ellensp
fe962b1e4c 🔧 Fix TPARA (…SCARA, DELTA) settings (#25016) 2024-01-02 11:20:55 +01:00
Tanguy Pruvot
a7b982ed67 ✏️ Fix Robin nano env typo (#24993) 2024-01-02 11:20:55 +01:00
ellensp
dab181c464 📺 FYSETC_MINI_12864_2_1 with BTT_SKR_E3_DIP (#24986) 2024-01-02 11:20:55 +01:00
ellensp
81f47a9d28 🩹 Fix planner typo (#24977) 2024-01-02 11:20:55 +01:00
ellensp
0bdbc656d6 🐛 MKS_MINI_12864 on SKR 1.3 needs FORCE_SOFT_SPI (#24850) 2024-01-02 11:20:54 +01:00
EvilGremlin
a8a16eaf6b 🔧 Check Delta homing direction (#24865) 2024-01-02 11:20:54 +01:00
phigjm
4eeb38a1e8 🩹 Fix SERVICE_INTERVAL reset (#24888) 2024-01-02 11:20:54 +01:00
Marcio T
4998bee1b8 Fix FAST_PWM_FAN / TouchUI with NO_MOTION_BEFORE_HOMING (#25005)
Fix regressions from #20323, #23463
2024-01-02 11:20:54 +01:00
ellensp
b743c6c1de 🩹 Fix 2 thermocouples (#24982)
Followup to #24898
2024-01-02 11:20:54 +01:00
Scott Lahteine
f930d870c3 🐛 Fix M808 starting count
Reported by adcurtin on Discord
2024-01-02 11:20:54 +01:00
Justin Hartmann
af2dbae015 🩹 Fix Overlord compile (#24947) 2024-01-02 11:20:54 +01:00
Pascal de Bruijn
8c9354c897 🚸 M306: Indicate MPC Autotune (#24949) 2024-01-02 11:20:54 +01:00
ellensp
53691bbecb 🩹 Allow max endstops MKS Monster 8 V2 (#24944) 2024-01-02 11:20:54 +01:00
Scott Lahteine
2c4a35e042 🐛 Fix Anycubic / Trigorilla pins, etc. (#24971) 2024-01-02 11:20:54 +01:00
Scott Lahteine
05fbc97759 🎨 Prefer axis element over index 2024-01-02 11:20:53 +01:00
Scott Lahteine
28544fe5f6 🩹 Fix EEPROM write for !LIN_ADVANCE
Fixes #24963
Followup to #24821
2024-01-02 11:20:53 +01:00
Scott Lahteine
af62eef5d5 🩹 MAX Thermocouple followup
Followup to #24898
2024-01-02 11:20:53 +01:00
Scott Lahteine
55c6d815a1 🩹 leds.update needed for reset_timeout
Followup to #23590
2024-01-02 11:20:53 +01:00
Scott Lahteine
e6cfaeef2c 🧑‍💻 More direct encoder spin 2024-01-02 11:20:53 +01:00
Scott Lahteine
9f29c582d0 🎨 Update SAMD51 headers 2024-01-02 11:20:53 +01:00
Scott Lahteine
6c17e643c4 🎨 Format some lib-uhs3 code 2024-01-02 11:20:53 +01:00
ellensp
ba7cda7a3d 📌 ZRIB V52-V53 Servo Pins (#24880) 2024-01-02 11:20:53 +01:00
InsanityAutomation
343d1da462 Tenlog MB1V23 IDEX board (#24896) 2024-01-02 11:20:52 +01:00
Giuliano Zaro
20bbb1f56b 🌐 Update Italian language (#24915) 2024-01-02 11:20:52 +01:00
ellensp
aedd655cef 📌 Remove unused RX/TX pins (#24932) 2024-01-02 11:20:52 +01:00
Keith Bennett
e01912fb96 🔧 Update Display Sleep LCD Check (#24934) 2024-01-02 11:20:52 +01:00
Justin Hartmann
5f9aae26c4 🩹 Buttons Followup (#24935)
Followup to #24878
2024-01-02 11:20:52 +01:00
Scott Lahteine
6f25c2b1c7 🩹 Allow for last non-servo extruder 2024-01-02 11:20:52 +01:00
ellensp
000fa4b199 🐛 Fix move_extruder_servo (#24908) 2024-01-02 11:20:52 +01:00
InsanityAutomation
4b591c6c3f 🐛 Fix FTDUI Status Screen Timeout (#24899) 2024-01-02 11:20:52 +01:00
Manuel McLure
15c9a6dffa 🩹 Fix spurious "bad command" (#24923) 2024-01-02 11:20:52 +01:00
Scott Lahteine
aefcffa413 🩹 Fix M593 report 2024-01-02 11:20:51 +01:00
kurtis-potier-geofabrica
d33ef1f094 🚸 Up to 3 MAX Thermocouples (#24898) 2024-01-02 11:20:51 +01:00
Scott Lahteine
11b910d4d6 🔧 Clean up unused ESP_WIFI pins 2024-01-02 11:20:51 +01:00
tombrazier
7c88f2ea86 🚀 ZV Input Shaping (#24797) 2024-01-02 11:20:51 +01:00
Scott Lahteine
4cac625bb0 🔨 gcc-12 for macOS native 2024-01-02 11:20:51 +01:00
InsanityAutomation
a932657403 Controllerfan PWM scaling, kickstart (#24873) 2024-01-02 11:20:45 +01:00
silycr
8bbe7481a1 🚸 Probe pins for Chitu V5 (#24910) 2024-01-02 11:20:45 +01:00
ellensp
a73a88917b 🔧 Some STM32 UART Sanity Checks (#24795) 2024-01-02 11:20:45 +01:00
Scott Lahteine
ca407c7934 🎨 Misc. variant cleanup, translation
Followup to #24787
2024-01-02 11:20:45 +01:00
InsanityAutomation
60eb1ef736 🐛 Fix Print Timer stop with MarlinUI abort (#24902) 2024-01-02 11:20:45 +01:00
ellensp
4e4d5aa021 🔧 No Native USB on AVR (#24906) 2024-01-02 11:20:44 +01:00
Scott Lahteine
2d02703af8 🧑‍💻 Pins and debug list cleanup (#24878) 2024-01-02 11:20:44 +01:00
Scott Lahteine
e352cf20c2 🎨 CONF_SERIAL_IS => SERIAL_IN_USE 2024-01-02 11:20:44 +01:00
ellensp
cb0a760200 Tronxy v10 (#24787) 2024-01-02 11:20:44 +01:00
Keith Bennett
8cbb620180 🔧 No Sleep for CR-10 Stock Display (#24875) 2024-01-02 11:20:44 +01:00
karliss
29f0cbcbd6 🐛 Fix compile without Y/Z (#24858)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:20:44 +01:00
Keith Bennett
10e96c64ac 🔧 Check Sensorless Homing on all axes (#24872) 2024-01-02 11:20:44 +01:00
InsanityAutomation
44fdd877fd 🐛 Fix bed/chamber PID P edit (#24861) 2024-01-02 11:20:44 +01:00
Scott Lahteine
62cbe127f1 🎨 HAS_SPI_FLASH => SPI_FLASH 2024-01-02 11:20:43 +01:00
Dan Royer
b12267148e 🐛 Fix and improve Polargraph (#24847)
Co-Authored-By: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:20:43 +01:00
ellensp
c1d9bea3e0 🐛 Fix operators for V axis (#24866)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:20:43 +01:00
mjbogusz
73d4db77d7 🩹 Fix TFT LCD in Simulation (#24871) 2024-01-02 11:20:43 +01:00
Scott Lahteine
a59cfecc16 🎨 MMU2 cleanup 2024-01-02 11:20:43 +01:00
Scott Lahteine
4aaf2d2b82 🐛 Fix M876 without emergency parser
Fix regression from 1fb2fffdbf
2024-01-02 11:20:43 +01:00
adam3654
e0aad89105 DOGM Display Sleep (#24829) 2024-01-02 11:20:43 +01:00
EvilGremlin
48622d27f0 🩹 Fix temperature include (#24834) 2024-01-02 11:20:43 +01:00
Scott Lahteine
cde06bba6a 🎨 Misc. variant cleanup 2024-01-02 11:20:42 +01:00
Scott Lahteine
14d9774f93 🧑‍💻 Min and max for base types 2024-01-02 11:20:42 +01:00
EvilGremlin
eae02513d7 MKS SKIPR board (#24791) 2024-01-02 11:20:42 +01:00
Scott Lahteine
d1ae2e5a8b 🔨 Update mfinfo for 2.1.x 2024-01-02 11:20:42 +01:00
Scott Lahteine
594be2c248 🧑‍💻 Min and max for base types 2024-01-02 11:20:42 +01:00
Giuliano Zaro
4eaea9cd29 ADVANCE_K per-extruder (#24821)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:20:42 +01:00
EvilGremlin
41ffff26a4 ♻️ Set Progress without LCD (#24767)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:20:42 +01:00
EvilGremlin
1c4b9de530 🩹 Fix Color UI touchscreen sleep (#24826) 2024-01-02 11:20:41 +01:00
Adam
6b54b8c409 🩹 Fix Switching Toolhead compile (#24814) 2024-01-02 11:20:41 +01:00
ellensp
986a5c9b80 🧑‍💻 Einsy Rambo EXP headers (#24825) 2024-01-02 11:20:41 +01:00
ellensp
b5f7b7919d 🔨 Detect feature parsing error (#24824) 2024-01-02 11:20:41 +01:00
ellensp
0d88b8b461 Creality v5.2.1 board (#24815)
Followup to #24760
2024-01-02 11:20:41 +01:00
Keith Bennett
009fbc85d2 🔧 Thermistor (66) sanity-check (#24803) 2024-01-02 11:20:41 +01:00
Eduardo José Tagle
316d8e9181 🐛 Fix DUE compile and errors (#24809) 2024-01-02 11:20:41 +01:00
Scott Lahteine
adf3d4cd73 🩹 Fix some vector_3 cast operators 2024-01-02 11:20:41 +01:00
Keith Bennett
726c04b70e 🔧 Update Creality 4.2.2 Driver Warning (#24806) 2024-01-02 11:20:41 +01:00
ellensp
6e7ce5e3aa 🩹 Disable DEBUG_DGUSLCD (#24798) 2024-01-02 11:20:40 +01:00
Yuri D'Elia
eeb286d2a9 🎨 Remove non-const compare operators (#24810) 2024-01-02 11:20:40 +01:00
Plynix / Ben Hartiwch
ec9338474f Creality v5.2.1 board (#24760) 2024-01-02 11:20:40 +01:00
discip
d2594ff9c8 Pt1000 with 2k2 pullup (SKR 3 / EZ) (#24790) 2024-01-02 11:20:40 +01:00
ellensp
abe9431029 ✏️ Followup for M524 (#24775)
Followup to #24761
2024-01-02 11:20:40 +01:00
Stuart Pittaway
3f8a8666f6 🚸 UUID fallback to STM32 device SN (#24759)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:20:40 +01:00
Keith Bennett
bc4a252819 📌 Specify MarlinFirmware/U8glib (#24792) 2024-01-02 11:20:40 +01:00
Renaud11232
4eadd76d47 🔨 Fix LPC1768 autodetect path on Linux (#24773) 2024-01-02 11:20:31 +01:00
Stefan Kalscheuer
623f70fd3b Anycubic i3 Mega LCD file menu fix (#24752) 2024-01-02 11:20:30 +01:00
studiodyne
02694dcd58 M217 G wipe retract length 2024-01-02 11:20:30 +01:00
studiodyne
1bd3f4e7cd XY_COUNTERPART_BACKOFF_MM 2024-01-02 11:20:30 +01:00
studiodyne
d7ecc271a4 RGB_STARTUP_TEST 2024-01-02 11:20:30 +01:00
tombrazier
9bf7f28d15 Permit Linear Advance with I2S Streaming (#24684) 2024-01-02 11:20:30 +01:00
Scott Lahteine
3d90aac76a Robin Nano v1 CDC (USB mod)
Followup to #24619
2024-01-02 11:20:30 +01:00
Scott Lahteine
c71bc95700 🐛 Fix recalculate_max_e_jerk 2024-01-02 11:20:30 +01:00
ellensp
0453fdfb94 🐛 Fix VW axis fields in types.h (#24780) 2024-01-02 11:20:30 +01:00
Giuliano Zaro
9194c9f2dc 🚸 Strict index 2 for M913 / M914 XY (#24680) 2024-01-02 11:20:30 +01:00
Arkadiusz Miśkiewicz
8ce2cd7617 🚸 Emergency Parse M524 (#24761) 2024-01-02 11:20:29 +01:00
Giuliano Zaro
59b99da36f 🐛 Fix / refactor shared PID (#24673)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:20:29 +01:00
Chris Bagwell
a43175aada 🧑‍💻 STM32G0B1RE Pins Debugging (#24748) 2024-01-02 11:20:29 +01:00
Eduard Sukharev
3b98fece67 🩹 Fix MKS TinyBee + MKS MINI 12864 SD blank on write (#24670) 2024-01-02 11:20:29 +01:00
Eduard Sukharev
e6c9776c21 🚸 Sanity check Integrated Babystepping + I2S stream + ESP32 (#24691) 2024-01-02 11:20:29 +01:00
George Fu
7c31b6e518 FYSETC SPIDER KING407 (#24696) 2024-01-02 11:20:29 +01:00
ellensp
08aeec931c BTT SKR Mini E3 V3.0.1 (#24722) 2024-01-02 11:20:29 +01:00
XDA-Bam
17e9faa4b8 ️ Minor planner optimization (#24737) 2024-01-02 11:20:28 +01:00
Arkadiusz Miśkiewicz
c467ab751d 🚸 On pause report "SD printing byte X/Y" (#24709) 2024-01-02 11:20:28 +01:00
Arkadiusz Miśkiewicz
1159cbe0d9 🩹 Report M22 / M23 success / fail (#24706) 2024-01-02 11:20:28 +01:00
Gurmeet Athwal
2a6cc9f343 🚸 M115 spindle/laser (#24681, #24747) 2024-01-02 11:20:28 +01:00
ellensp
b8c3e9df4f 📺 FYSETC Mini 12864 2.1 pins for Creality V4 (#24624) 2024-01-02 11:20:28 +01:00
FBN
2a938002eb 🚸 More automatic MMU2 load (#24750, #24770) 2024-01-02 11:20:28 +01:00
Yuri D'Elia
cc17fbcae4 👷 Array macros to …26 elements (#24789) 2024-01-02 11:20:28 +01:00
Scott Lahteine
a9dad3b2c0 🌐 Some short menu strings 2024-01-02 11:20:28 +01:00
Keith Bennett
b8300aed8a ️ Only Sync Emulated EEPROM Print Counter (#24731) 2024-01-02 11:20:28 +01:00
Giuliano Zaro
668b725cca 🐛 Fix heater timeout PID output (#24682) 2024-01-02 11:20:28 +01:00
Scott Lahteine
33ea1647b1 🧑‍💻 Microsteps to stepper.cpp 2024-01-02 11:20:28 +01:00
hartmannathan
582a5c6dfe 📝 Fix example comment (#24744) 2024-01-02 11:20:28 +01:00
Scott Lahteine
e51a0b4fd0 📝 Fix comment 2024-01-02 11:20:27 +01:00
JoaquinBerrios
24874d7f89 ️ BTT SKR V3.0 / EZ = 480MHz (#24721) 2024-01-02 11:20:27 +01:00
Scott Lahteine
2be53bbc15 🔨 Fix config-labels.py 2024-01-02 11:20:27 +01:00
Scott Lahteine
b36f688851 🔨 Outdent py string 2024-01-02 11:20:27 +01:00
dmitrygribenchuk
e015483d93 🔨 Clean up Python imports (#24736) 2024-01-02 11:20:27 +01:00
ButchMonkey
4732105dd9 🔨 Fix config.ini custom items, and 'all' (#24720) 2024-01-02 11:20:27 +01:00
ButchMonkey
cbc48f165f 🔨 Fix configuration.py with encoding UTF-8 (#24719)
- Opening files with Windows-1252 encoding.
2024-01-02 11:20:27 +01:00
Stephen Hawes
dcf6c735ae Opulo LumenPnP REV04 (#24718) 2024-01-02 11:20:26 +01:00
Keith Bennett
f51ed2fb12 🔨 Update SKR 3 env (#24711) 2024-01-02 11:20:12 +01:00
Scott Lahteine
37aaae242b 📝 Format some comments 2024-01-02 11:20:01 +01:00
EvilGremlin
17eae12bad 🔨 Native USB modified env followup (#24669)
Followup to #24619
2024-01-02 11:20:00 +01:00
Bob Kuhn
2e81c8079a 🐛 Fix UBL regression (#24622)
Fix regression from #24188
2024-01-02 11:20:00 +01:00
Ruedi Steinmann
7f22e95477 🩹 Fix a BUZZ (#24740) 2024-01-02 11:20:00 +01:00
Scott Lahteine
bd175092b6 🔖 Config version 02010200 2024-01-02 11:20:00 +01:00
EvilGremlin
7dfb0046da 🐛 Fix back button (#24694) 2024-01-02 11:20:00 +01:00
Scott Lahteine
d33d47a6ce ✏️ Fix http:// links 2024-01-02 11:20:00 +01:00
Lefteris Garyfalakis
8dabaf86ff ✏️ Fix LCD sleep conditional (#24685) 2024-01-02 11:20:00 +01:00
Miguel Risco-Castillo
c352db3f1e 🩹 Constrain UBL within mesh bounds (#24631)
Fixes #24630
2024-01-02 11:20:00 +01:00
Keith Bennett
1f2b80591c 🚸 Up to 10 Preheat Constants (#24636) 2024-01-02 11:20:00 +01:00
ellensp
f86b79fc9d 🔧 Fix Auto-Fan / Controller-Fan pin conflict check (#24648) 2024-01-02 11:19:59 +01:00
ellensp
afc38a7c6f 🩹 Fix PID debug output (#24647) 2024-01-02 11:19:59 +01:00
Mark
3f17d3cdd5 🐛 Fix Bed Distance Sensor reading (#24649) 2024-01-02 11:19:59 +01:00
Arkadiusz Miśkiewicz
df1eb30d29 M20_TIMESTAMP_SUPPORT (#24679)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:19:59 +01:00
EvilGremlin
1aea7d4a2c ♻️ Display sleep minutes, encoder disable option (#24618)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:19:59 +01:00
DejitaruJin
372916c8cd 🩹 Fix SainSmart LCD (#24672) 2024-01-02 11:19:59 +01:00
Keith Bennett
90bc3d65f3 🩹 Fix Freeze Feature (#24664) 2024-01-02 11:19:59 +01:00
Lefteris Garyfalakis
e49e3880ee 🔨 Suppressible Creality 4.2.2 warning (#24683) 2024-01-02 11:19:59 +01:00
EvilGremlin
3f40d0a59f Robin Nano v1 CDC (USB mod) (#24619) 2024-01-02 11:19:59 +01:00
Alexey Galakhov
5381f53214 🐛 Fix JyersUI (#24652) 2024-01-02 11:19:58 +01:00
Keith Bennett
878b629f91 🔧 Fix Skew Correction defaults (#24601) 2024-01-02 11:19:58 +01:00
Scott Lahteine
8ac992327c 🎨 Some automated cleanup 2024-01-02 11:19:58 +01:00
Keith Bennett
92bc63822f 📺 Add to MKS UI About Screen (#24610) 2024-01-02 11:19:58 +01:00
Keith Bennett
0f7d7fccd7 🔧 Remove STM32F4 Print Counter Sanity Check (#24605) 2024-01-02 11:19:58 +01:00
Protomosh
e0b1bc8403 🐛 Fix DGUS Reloaded + STM32 (#24600) 2024-01-02 11:19:58 +01:00
Scott Lahteine
f54cafdc76 🧑‍💻 Use spaces indent for Python 2024-01-02 11:19:57 +01:00
Scott Lahteine
37918e1c77 🔨 Misc. schema updates 2024-01-02 11:19:42 +01:00
Graham Reed
c607c12e3a 🔨 Fix LPC1768 automatic upload port (#24599) 2024-01-02 11:19:42 +01:00
Scott Lahteine
003dfec67d 🩹 Fix strtof interpreting a hex value
Bug introduced in #21532
2024-01-02 11:19:42 +01:00
Scott Lahteine
2042df1df4 🔨 Add args to schema.py 2024-01-02 11:19:42 +01:00
Scott Lahteine
8d1f734819 🎨 Fix '…if_chain' Uncrustify option 2024-01-02 11:19:42 +01:00
Scott Lahteine
7a3d3d1a14 🔨 Misc. config py updates 2024-01-02 11:19:42 +01:00
Scott Lahteine
61c63d5b4c 🧑‍💻 Add operator== for C++20 2024-01-02 11:19:41 +01:00
Keith Bennett
4dc731f434 🧑‍💻 Fix UBL Build Mesh preheat items (#24598)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-02 11:19:41 +01:00
Ivan Kravets
8fec539881 🔨 Fix a PlatformIO debug issue (#24569) 2024-01-02 11:19:41 +01:00
Scott Lahteine
860e466a13 🔨 Update schema export 2024-01-02 11:19:41 +01:00
Sven Soost
6fcdefe31f help 2024-01-02 11:19:11 +01:00
Sven Soost
075d91e518 upped fw version
corrected board type
2024-01-02 10:33:45 +01:00
Sven Soost
7da3d3f4b2 Merge remote-tracking branch 'default/lts-2.1.0' into 2.1---sv 2024-01-02 10:29:39 +01:00
efflicto
31411b121a tweaks 2024-01-02 10:04:54 +01:00
efflicto
a22d2f7bb1 tweaks 2023-12-28 18:48:43 +01:00
Scott Lahteine
591b856796 👔 Update .gitignore 2023-12-27 15:31:33 -06:00
Scott Lahteine
ed46f6c675 👔 Update .gitignore 2023-12-27 15:30:31 -06:00
efflicto
c197c1c9a0 tweaks 2023-12-26 22:59:12 +01:00
efflicto
6bcbcb17da Tweaks 2023-12-26 17:11:15 +01:00
Scott Lahteine
815c9163ce 🩹 Fix LONG_FILENAME_WRITE_SUPPORT typo 2023-12-11 15:42:30 -06:00
Scott Lahteine
68dbe13f85 🔨 Specify versions in INI 2023-12-11 15:42:30 -06:00
Scott Lahteine
4caa32b6dd 🔖 Version 2.1.1.1 2023-12-11 15:42:26 -06:00
Scott Lahteine
e829fbad70 🔨 Specify versions in INI 2023-12-08 21:42:44 -06:00
efflicto
b062149058 fix 2023-12-01 02:36:26 +01:00
efflicto
33fbcc9d1b fixes 2023-12-01 01:46:56 +01:00
efflicto
7c8411beb9 pid tunning 2023-12-01 01:28:34 +01:00
efflicto
6708be8912 tweaks 2023-11-30 20:24:50 +01:00
efflicto
64a3a22b29 Fixes and changes for BL and other stuff 2023-11-30 14:01:59 +01:00
efflicto
db80c683fa Merge remote-tracking branch 'main/2.1---sv' into 2.1---sv 2023-11-30 13:35:08 +01:00
efflicto
e730f6ba46 chagnes and tweaks, enabled BL 2023-11-30 13:00:41 +01:00
3a70ee72e5 fixed extruder 2023-11-23 14:01:51 +01:00
sv
38c89b749a Added homing parameters 2023-11-17 10:16:28 +01:00
c5db863a4e Remeasured extruder steps after extruder metal replacement 2023-11-16 19:53:06 +00:00
efflicto
f42fe57a86 revert MULTI_VOLUME 2023-11-12 14:02:40 +01:00
efflicto
4498338a2e tweaks 2023-11-12 13:55:15 +01:00
efflicto
64d7ebc11d tweaks 2023-11-12 13:44:38 +01:00
efflicto
d0cf0f2d75 fixes for fans 2023-11-11 02:51:41 +01:00
efflicto
7ea91c9f65 fix 2023-11-11 01:35:33 +01:00
efflicto
2768abf7da Merge branch '2.1---sv' of https://git.soost.dev/me/Marlin into 2.1---sv 2023-11-11 01:35:01 +01:00
efflicto
d9184ee9f5 Bootscreen added
Adjusted bed PID
2023-11-11 01:34:17 +01:00
efflicto
fa28fff246 Changed PID after tuning 2023-11-11 00:27:03 +01:00
efflicto
a8fa1b807b disabled HYBRID_THRESHOLD 2023-11-10 23:56:28 +01:00
efflicto
ca845e11a5 Added host communication
Corrected feeding rate
2023-11-10 23:34:57 +01:00
efflicto
0abe6975e7 Fixed fan related stuff 2023-11-10 22:38:05 +01:00
efflicto
d2173a58a5 enabled lcd_bed_leveling 2023-11-10 21:13:59 +01:00
efflicto
549ed9e5e5 switched back to en 2023-11-10 20:51:54 +01:00
efflicto
6ba8846429 fixes for lin_advance & version 2023-11-10 20:38:24 +01:00
efflicto
1c96d85991 Initial Setup 2023-11-10 20:26:08 +01:00
sv
200f20b5e7 Initial commit 2023-11-09 01:59:30 +01:00
Scott Lahteine
60cd1ecb69 🩹 Fix G33 output
See #26299
2023-10-07 01:08:40 -05:00
Scott Lahteine
b412a1a03e 🔖 Marlin 2.1.0.1 2023-07-20 13:43:19 -05:00
Scott Lahteine
8fd6f9a2b0 🔨 PlatformIO 6 compatibility 2023-07-20 13:43:19 -05:00
Scott Lahteine
09d0b4d152 🔖 Version 2.1.2.1 2023-07-01 19:19:17 -05:00
Giuliano Zaro
862d0e9d5d 🐛 Fix G2/G3 limiting_speed (#25988) 2023-07-01 19:19:17 -05:00
Scott Lahteine
cbdc01ef1a 🩹 Prevent Z drop with G28 X/Y 2023-05-29 19:23:24 -05:00
Scott Lahteine
2dffa3994d 🩹 Fix TFT LVGL compile error (#25865)
Fixes regression from #24302
2023-05-21 08:43:15 -05:00
Scott Lahteine
09247e7ea9 🚸 Improve EEPROM validation (#25860) 2023-05-19 23:31:15 -05:00
Scott Lahteine
62a7bba225 🩹 Fix null pwm_details 2023-05-18 19:53:15 -05:00
Scott Lahteine
ce38260dfb 🩹 Improve edit menu rounding 2023-05-17 00:33:18 -05:00
Scott Lahteine
3ad9c0b98c 🧑‍💻 ftdi_language 2023-05-17 00:33:18 -05:00
Scott Lahteine
a0fd588797 📌 TH3D EZBoard SD_DETECT_PIN 27 2023-05-17 00:33:18 -05:00
Chris Bagwell
876f996691 🔧 Fix SHAPING_MIN_FREQ check (#25358) 2023-05-17 00:33:18 -05:00
Scott Lahteine
dba521a9fb 🧑‍💻 M43 updates 2023-05-17 00:33:18 -05:00
Giuliano Zaro
50ad323567 🔧 Move SOFT_PWM_SCALE fallback to cpp (#25800)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2023-05-17 00:33:18 -05:00
Scott Lahteine
03149b973e 🚸 Faster default Marlin feedrate 2023-05-17 00:33:18 -05:00
ellensp
6e91f3608b 🔨 MKS Robin2 PIO Env (#25792) 2023-05-17 00:33:18 -05:00
Scott Lahteine
0708275c6a 🎨 Move G28O inside ProUI 2023-05-17 00:33:18 -05:00
Scott Mikutsky
a2040bae21 🐛 Fix STM32 USB disconnect behavior (#25762) 2023-05-17 00:33:18 -05:00
Scott Lahteine
b6c27fbbdb 🔧 Fix X2/Y2 axis pins check 2023-05-17 00:33:18 -05:00
Scott Lahteine
b2acd51bc2 🔧 Move MMU section 2023-05-17 00:33:18 -05:00
Scott Lahteine
6d46a4924c 🩹 Fix TFT sanity error 2023-05-17 00:33:18 -05:00
Scott Lahteine
d959e3b0c4 🧑‍💻 Use NUM_AXIS_ARRAY 2023-05-17 00:33:18 -05:00
Scott Lahteine
f48467b2e3 🔨 Servo Timer 1 with STM32F103RC_fysetc (#25741) 2023-05-17 00:33:18 -05:00
Scott Lahteine
a9c476c55e 🔧 Update config.ini script 2023-05-17 00:33:18 -05:00
Scott Lahteine
61d1ce7d2e 🧑‍💻 Change HAL_PATH macro for easier HAL relocation (#25743) 2023-05-17 00:33:18 -05:00
Scott Lahteine
3c9e8e1e60 🔧 Extra axis endstop defaults 2023-05-17 00:33:18 -05:00
Anson Liu
d5548556d3 🔨 Prevent SlowSoftWire + Wire name conflict (#25707) 2023-05-17 00:33:18 -05:00
Scott Lahteine
44b06d7561 📝 Developer note in boards.h 2023-05-17 00:33:18 -05:00
Scott Lahteine
ffe47a0197 🚸 Improve PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED (#25681) 2023-05-17 00:33:18 -05:00
Scott Lahteine
6a12937dec 🩹 Fix UBL safe measure move with extra axes
Followup to 7e79fc5b
2023-05-17 00:33:18 -05:00
Alexey D. Filimonov
00c96dc3cd 🎨 Clean up TFT Color UI display items (#25712)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2023-05-17 00:33:18 -05:00
Keith Bennett
7fb92f4e64 🚸 Permit G38 with Core (#25713) 2023-05-17 00:33:18 -05:00
Jay Robson
a93b3c1222 🐛 Fix G38 with Z, support 9 axes (#25691)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2023-05-17 00:33:18 -05:00
Keith Bennett
d75e016f3a 🔧 Check renamed LIN_ADVANCE_K (#25710) 2023-05-17 00:33:18 -05:00
ellensp
5426759a37 🩹 Correctly add JSON to mc.zip (#25706) 2023-05-17 00:33:18 -05:00
Scott Lahteine
a5b5db4819 🧑‍💻 Minor SpindleLaser::set_enabled tweak 2023-05-17 00:33:18 -05:00
Alexey D. Filimonov
15671a46d2 🩹 Fix Spindle/Laser ENA pin test (#25622) 2023-05-17 00:33:18 -05:00
Bob Kuhn
f62d47a165 🩹 Fix laser with no PWM compile (#25290) 2023-05-17 00:33:18 -05:00
Dennis Lawler
5b8be446a0 🚸 Echo G30 out-of-bounds (#25671) 2023-05-17 00:33:18 -05:00
Giuliano Zaro
df7d13a4d0 🩹 Bail on 'mc.zip' write error (#25695)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2023-05-17 00:33:18 -05:00
ellensp
8592035474 🔨 Fix, clean up STM32F1 envs (#25697)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2023-05-17 00:33:18 -05:00
Giuliano Zaro
5a3806633a 🐛 Fix Configuration Embedding (#25688) 2023-05-17 00:33:18 -05:00
ellensp
0ece7ca66d 🩹 Status / Host Prompt followup (#25720)
Followup to #25679

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2023-05-17 00:33:17 -05:00
Scott Lahteine
2fb47afa4a 🧑‍💻 HostUI::continue_prompt method 2023-05-17 00:33:17 -05:00
Scott Lahteine
d2e84e8446 🧑‍💻 Status Message cleanup 2023-05-17 00:33:17 -05:00
Scott Lahteine
3340491f90 🧑‍💻 JyersUI code cleanup 2023-05-17 00:33:17 -05:00
Scott Lahteine
d3991011e4 🧑‍💻 Apply simplified ?: 2023-05-17 00:33:17 -05:00
Scott Lahteine
02178bdcaf 🔧 Trigorilla / Chiron updates
Followup to c3f34e4e
2023-05-17 00:33:17 -05:00
Scott Lahteine
8bc6f7707d 🔨 Improve runout script check 2023-05-17 00:33:17 -05:00
Scott Lahteine
141cfdde2c 🩹 Fix AUTOFAN_CASE
Followup to #25554
2023-05-17 00:33:17 -05:00
Scott Lahteine
4781d57912 🔧 Move FIL_RUNOUT_PIN for Chiron + GLCD 2023-05-17 00:33:17 -05:00
Scott Lahteine
6ebbfa832c 🧑‍💻 Clarify G28 R / R0 2023-05-17 00:33:17 -05:00
Scott Lahteine
cbbcc01b47 🚸 Minor M43 improvements 2023-05-17 00:33:17 -05:00
David Fries
b5ccd65fb5 ️ Skip a redundant BLTouch::command (#25656) 2023-05-17 00:33:17 -05:00
Scott Lahteine
cf1f56f132 🔧 Move TFT sanity checks 2023-05-17 00:33:17 -05:00
Scott Lahteine
1e2de0e036 🎨 Detab some build files 2023-05-17 00:33:17 -05:00
Scott Lahteine
cf28f48481 🎨 Apply const (#25643) 2023-05-17 00:33:17 -05:00
ellensp
69e8f2ee99 🚸 Support CoreXY without Z (#25630) 2023-05-17 00:33:17 -05:00
Scott Lahteine
2be9f98b9f 📝 Update Ender # labels 2023-05-17 00:33:17 -05:00
Scott Lahteine
c2c1ff8da9 🧑‍💻 Update pinsformat.js 2023-05-17 00:33:17 -05:00
Scott Lahteine
e24087478d 🐛 Ensure root for 'M503 C' 2023-05-17 00:33:17 -05:00
Giuliano Zaro
641295032f 🌐 Update Italian language (#25587) 2023-05-17 00:33:17 -05:00
Scott Lahteine
466ce0b8d2 🩹 Fix displayed mix percentages 2023-05-17 00:33:17 -05:00
Scott Lahteine
59a2cb032f 🩹 Fix Ender-3 V2 with no fan 2023-05-17 00:33:17 -05:00
Chris Pepper
85e28f3123 🔨 MarlinSimUI updates (#25589) 2023-05-17 00:33:17 -05:00
John Unland
bbb75ab9b3 🔨 Improve Docker local tests support (#25583) 2023-05-17 00:33:17 -05:00
Andrew
637cd952ca 🎨 Remove unused ProUI : UBLValidMesh (#25591) 2023-05-16 19:54:19 -05:00
Scott Lahteine
d04b3ff802 🔧 Fix up WiFi options (#25586) 2023-05-16 19:54:19 -05:00
Scott Lahteine
51b33ccf90 🔨 INI Updates
Co-Authored-By: Martin Turski <turningtides@outlook.de>
2023-05-16 19:54:19 -05:00
Eduard Sukharev
f452df047d 🐛 Fix M23 long filename support (#25540) 2023-05-16 19:53:15 -05:00
Scott Lahteine
cd0bfcd3f2 🧑‍💻 Auto Fan / Cooler Fan updates (#25554) 2023-05-16 19:53:15 -05:00
Keith Bennett
bcf30988cb 🩹 Fix Touch Calibration first point (#25298) 2023-05-16 19:53:15 -05:00
Scott Lahteine
a40e17d94b 🎨 Timer tweaks 2023-05-16 19:53:15 -05:00
ellensp
d66f4baba6 🩹 Fix Chitu3D V6 default probe pin (#25552) 2023-05-16 19:53:15 -05:00
Scott Lahteine
26cb2d5b08 🩹 Update TRONXY_V10 SPI_FLASH pins 2023-05-16 19:53:15 -05:00
Scott Lahteine
376e940ae9 🎨 LPC_SOFTWARE_SPI => SOFTWARE_SPI
Co-Authored-By: Martin Turski <turningtides@outlook.de>
2023-05-16 19:53:15 -05:00
Scott Lahteine
ebe3fe0818 🎨 Pins header comments
Co-Authored-By: Martin Turski <turningtides@outlook.de>
2023-05-16 19:53:15 -05:00
Martin Turski
0d7e30bcd8 🩹 Reset touch screen calibration on failure (#25334)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2023-05-16 19:53:15 -05:00
Scott Lahteine
accfab85a2 🎨 calibration_stage => stage 2023-05-16 19:53:15 -05:00
Scott Lahteine
d68ad9e0b1 🩹 Fix a serial_ternary 2023-05-16 19:53:15 -05:00
ellensp
70c8859e7f 🩹 Fix Ender 2 stock LCD (#25538) 2023-05-16 19:53:15 -05:00
George Fu
980fba810d 🐛 Fix FYSETC Cheetah v2.0 Servo/Probe pins (#24635)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2023-05-16 19:53:15 -05:00
Scott Lahteine
d0bdb9c281 ️ Misc. optimizations 2023-05-16 19:53:15 -05:00
Davide Rombolà
821d7969f4 🎨 Suppress warning (#25529) 2023-05-16 19:53:15 -05:00
Scott Lahteine
dcbba65962 🧑‍💻 More IntelliSense-friendly declares 2023-05-16 19:53:15 -05:00
Michael Hill
5c3dd467c7 Sovol v1.3.1 (Sovol SV06) (#25267) 2023-05-16 19:53:15 -05:00
dwzg
e50980e32b 🩹 Fix DWIN MarlinUI Fan/E/XY (#25502) 2023-05-16 19:53:15 -05:00
Scott Lahteine
c3b037e0f3 🩹 Fan Menu / Status fixes
Followup to #21888
2023-05-16 19:53:15 -05:00
Abdullah YILMAZ
71e6f701f3 🌐 Update Turkish language (#25447) 2023-05-16 19:53:15 -05:00
Giuliano Zaro
7f9f922d84 🌐 Update Italian language (#25454) 2023-05-16 19:53:14 -05:00
Scott Lahteine
197b3198b5 📝 Fix a comment 2023-05-16 19:53:14 -05:00
jamespearson04
e03dfb8ca1 🐛 Fix UBL 'G29 J' mesh tilt (#25453)
Fix regression from #24214
2023-05-16 19:53:14 -05:00
Marcio T
cba3b2c527 🚸 Improve CocoaPress Touch UI (#25446) 2023-05-16 19:53:14 -05:00
ellensp
a9a6d1f716 📝 Link to archived RA Control Panel page (#25424) 2023-05-16 19:53:14 -05:00
Giuliano Zaro
61ccd4599e 🌐 Update Italian language (#25309) 2023-05-16 19:53:14 -05:00
Roman Moravčík
bab847809c 🌐 Update Slovak language (#25305) 2023-05-16 19:53:14 -05:00
ellensp
011087731a 🧑‍💻 Add IA_CREALITY CI test (#25434) 2023-05-16 19:53:14 -05:00
Scott Lahteine
b7ee06bb29 🔨 Use 'build_src_filter' 2023-05-16 19:52:39 -05:00
Scott Lahteine
5f8df0aa21 🔨 Fix thread-unsafe deque iteration 2023-05-16 15:50:05 -05:00
ellensp
b338159f9d 🐛 Fix MKS Robin Nano 1.3 F4 pin collision (#25838) 2023-05-16 13:56:13 -05:00
ellensp
2399a24466 🔧 Update thermocouple 2 pin sanity check (#25627) 2023-04-10 05:18:36 -05:00
ellensp
d05acb7626 🩹 Fix MARLIN_F446Zx_TRONXY variant (#25659)
Followup to 9be1554f
2023-04-10 04:20:48 -05:00
Chris Pepper
81d4f8f26a 🩹 Fix SD partitionTable packing (#25648) 2023-04-10 04:20:48 -05:00
Jason Smith
b0c3db67f0 🎨 Suppress M122 sign warning (#25613) 2023-04-10 04:18:49 -05:00
Eduard Sukharev
ea6430ddf6 🐛 Fix long filename read/report (#25509) 2023-04-07 18:14:07 -05:00
John Robertson
ccb4d11696 🔧 Sanity-check PRINTCOUNTER_SAVE_INTERVAL + ESP32 I2S Exp (#25527)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2023-04-07 18:12:07 -05:00
Keith Bennett
176ecf4f82 🐛 Fix Anet ET4 SD_SS_PIN (#25492) 2023-04-07 18:10:46 -05:00
Scott Lahteine
3ec5d6da6e ️ Exit from ISR on AVR already does sei
Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com>
2023-04-07 18:10:45 -05:00
Keith Bennett
75aa880b63 BTT Octopus Max EZ 1.0, SKR 3.0 / 3.0 EZ (#25387, #25495, #25535) 2023-04-07 18:10:45 -05:00
Sion Williams
a50ff5d7c7 🔨 VSCode + Devcontainer support (#22420) 2023-04-07 17:56:54 -05:00
alextrical
504f09f944 🐛 Fix Flash EEPROM for STM32G0B1CB (#25469) 2023-04-07 17:55:46 -05:00
Hans-Christian Ebke
aae1102c54 🐛 Fix apply_power for SPINDLE_SERVO (#25465) 2023-04-07 17:55:46 -05:00
tombrazier
a40ff1357e 🐛 Fix LA retract/feedrate edge case (#25445)
Followup to #25442
2023-04-07 17:53:06 -05:00
Scott Lahteine
dfd1fb736d 🔨 Improve config.ini example fetch 2023-04-07 17:50:00 -05:00
Scott Lahteine
6d8c9f6ed1 🌐 Regenerate language data 2023-04-07 17:50:00 -05:00
Scott Lahteine
db0c8b31f7 🧑‍💻 Script to make non-accented languages 2023-04-07 17:50:00 -05:00
Scott Lahteine
0e3d951872 🔨 Update font scripts 2023-04-07 17:46:21 -05:00
ellensp
22e6365b2f 🔧 Fix Sensorless Probe sanity-check err (#25417) 2023-04-07 17:45:43 -05:00
tombrazier
abd710b5d6 🐛 Fix Linear Advance E position tracking (#25442)
Fix regression from #24951
2023-04-07 17:44:39 -05:00
tombrazier
d5c312cff0 🐛 Fix ISR_SHAPING_LOOP_CYCLES (#25335) 2023-04-07 17:41:52 -05:00
ellensp
64f9c17f3b 🔨 Fix 'step' type in createTemperatureLookupMarlin.py (#25455) 2023-04-07 17:41:52 -05:00
Keith Bennett
bac334c74e 🔨 Fix env STM32G0B1RE_btt, add …_manta_btt (#25431) 2023-04-07 17:36:33 -05:00
Scott Lahteine
071d54ec70 🎨 Use LIMIT macro 2023-04-07 17:35:39 -05:00
Guðni Már Gilbert
c4ac8a2573 ️ Reduce edit_screen code size (#25420) 2023-04-07 17:35:39 -05:00
Scott Lahteine
53698b8f62 🔧 Fix Einsy Rambo TMC driver check 2023-04-07 17:35:39 -05:00
Scott Lahteine
d5d497f2c5 🔨 Fix marlin_custom.* without lib_deps 2023-04-07 17:34:13 -05:00
tombrazier
e65e38afaf 🐛 Fix AVR maths used by Stepper (#25338) 2023-04-07 17:32:30 -05:00
ellensp
9d56b7f073 🔨 Encrypt some MKS Robin (#25349) 2023-04-07 17:29:53 -05:00
Scott Lahteine
1748abde0a 🧑‍💻 Fix preheat tests (nested macro limit ~256)
Followup to #25407
2023-04-07 17:28:37 -05:00
ellensp
7afd823aa5 🔧 Sanity-check hotend max / preheat temps (#25407)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2023-04-07 17:28:37 -05:00
ellensp
4a1cbffbe5 📺 Update Re-ARM VIKI2 SPI pins (#25411) 2023-04-07 17:28:37 -05:00
Scott Lahteine
94780bbb54 🚸 Interruptible PLR (#25395) 2023-04-07 17:28:37 -05:00
ellensp
838df37efd 🐛 Fix FastPWM calculations (#25343)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2023-04-07 17:28:37 -05:00
Trevin Small
7a8c9847e6 ✏️ Fix README typo (#25388) 2023-04-07 17:28:37 -05:00
Scott Lahteine
50f4e6b270 🎨 Tweak VALIDATE_MESH_TILT 2023-04-07 17:22:46 -05:00
Frederik Kemner
db8f501dfe 🚸 SPI endstops for X/Y Dual and Core (#25371) 2023-04-07 17:22:46 -05:00
Radek
255bc3c90c 📝 Fix BTT_MINI_12864_V1 comment (#25366) 2023-04-07 17:19:49 -05:00
Scott Lahteine
38c4c7f4b1 🔨 Suppress native build warnings 2023-04-07 17:18:17 -05:00
EvilGremlin
fecb66779a 🔨 Adjust INI comments (#25183) 2023-04-07 17:18:17 -05:00
Scott Lahteine
f7485cea60 🩹 Extra axis min home with Delta Sensorless Probe 2023-04-07 17:18:17 -05:00
Scott Lahteine
a49d286118 🩹 Extra axes for Tool Change 2023-04-07 17:18:17 -05:00
Scott Lahteine
59c8857564 🩹 Various simple fixes 2023-04-07 17:18:17 -05:00
Scott Lahteine
6e38ec3a3e 🩹 Safe Bed Leveling updates 2023-04-07 17:18:17 -05:00
Scott Lahteine
93c61b1ba8 🩹 Misc. extra axis updates 2023-04-07 17:17:25 -05:00
Scott Lahteine
87d7449952 🩹 Use 'M205 D' when 'B' is an axis 2023-04-07 17:15:17 -05:00
Scott Lahteine
98c9ecd5c5 🔧 Add a test for extra axes 2023-04-07 17:01:32 -05:00
Keith Bennett
8976bc5605 BigTreeTech Manta M4P, M5P, M8P V1.0 / 1.1, E3 EZ (#25001) 2023-04-07 17:01:32 -05:00
Victor Oliveira
e3cff7a28a 🧑‍💻 General 'MediaFile' type alias (#24424) 2023-04-07 17:01:32 -05:00
vyacheslav-shubin
4000db2be3 🧑‍💻 Add SD Card 'hide' method for dev usage (#22425) 2023-04-07 17:01:32 -05:00
Keith Bennett
f9621e2e8e 📝 Fix Z*_ENDSTOP_ADJUSTMENT comments (#25295) 2023-04-07 17:01:32 -05:00
kg333
1a184e5a82 📺 Melzi v4 with BTT SKR Mini E3 (#25321) 2023-04-07 17:01:32 -05:00
Martin Turski
6e427350db 🔨 Fix test build path with spaces (#25329) 2023-04-07 17:01:32 -05:00
Bob Kuhn
79e23752ae 🔧 Fix SD sorting sanity checks (#25318) 2023-04-07 17:01:32 -05:00
Scott Lahteine
858de4ff3f 🔧 Fix build with no Y axis (#25311) 2023-04-07 16:49:35 -05:00
Bob Kuhn
bac0b35b85 🩹 Fix G61 axis parameters with no offset (#25312) 2023-04-07 16:48:57 -05:00
Darren Garnier
60f3857662 🔨 Fix config.ini URL fetch (#25313) 2023-04-07 16:46:17 -05:00
avionix-g
b3c004eed9 🐛 Fix MKS board Ultipanel support (#25278) 2023-04-07 16:44:22 -05:00
xBiohazardx
9e755a25c7 ✏️ Fix probe invert flag (#25282) 2023-04-07 16:43:19 -05:00
Scott Lahteine
0d831183ba 🔧 Refine Input Shaping check (#25280) 2023-04-07 16:39:22 -05:00
Scott Lahteine
0ed083aba8 SDIO retry, hsd clock, etc. 2023-04-07 16:33:39 -05:00
Scott Lahteine
2c39f84888 🔧 Overridable Stepper EN init 2023-04-07 16:33:15 -05:00
Bob Kuhn
b7e421610f 🐛 Fix Ender-2 Stock Display with Melzi (#25258) 2023-04-07 16:30:56 -05:00
MarkMan0
536e8a7d1e 🐛 Fix, Refactor PID scaling (#25096) 2023-04-07 16:28:42 -05:00
John Robertson
8c3425811a 🐛 Fix potential I2S buffer overwrite (#25113) 2023-04-07 16:26:13 -05:00
Scott Lahteine
dd892c6e75 🎨 Heading cleanup 2023-04-07 16:25:33 -05:00
Scott Lahteine
947a9cb000 🎨 Language / menu cleanup 2023-04-07 16:25:33 -05:00
Scott Lahteine
62487c67b6 ✏️ ProUI followup 2023-04-07 16:25:33 -05:00
Scott Lahteine
6cf085d724 🔧 Added MOTHERBOARD error text 2023-04-07 16:20:37 -05:00
Scott Lahteine
c3c6432be4 🎨 Misc. formatting 2023-04-07 16:16:28 -05:00
Scott Lahteine
e7c4a86830 🧑‍💻 Fix D5 warning 2023-01-23 01:36:10 -06:00
Scott Lahteine
dd518f0ce1 🐛 Fix homing_needed_error 2023-01-23 01:36:10 -06:00
Scott Lahteine
d62119ea5b 🔧 Input Shaping sanity checks 2023-01-12 05:24:27 -06:00
Scott Lahteine
71cb723746 🩹 Fix Sim with USE_WATCHDOG disabled 2023-01-12 05:24:27 -06:00
Scott Lahteine
58d94f407b 🔨 Improve config.ini parser 2023-01-12 05:24:17 -06:00
Alex Z
82f7c373c5 🐛 Fix Chitu V6 Z_STOP_PIN (#25227) 2023-01-12 05:24:06 -06:00
Miguel Risco-Castillo
1e9e92368f 🚸 ProUI updates (#25176) 2023-01-12 05:22:17 -06:00
Sebastien BLAISOT
9a22c21b5b 🐛 Fix Neopixel 1 startup (#25203) 2023-01-12 05:20:53 -06:00
Vlad Popescu
885b553416 🩹 Fix E3V2 MarlinUI XYZ frame (#25206) 2023-01-12 05:20:27 -06:00
Richard Layton
9ff2818ce4 📝 Linux Sim apt-get line (#25208) 2023-01-12 05:20:22 -06:00
Richard Layton
5ff467c8c0 📝 More native.ini docs (#25201) 2023-01-12 05:20:02 -06:00
ellensp
f16fdd7814 🩹 Update MKS_GEN_13 MOSFET pins (#25126) 2023-01-12 05:20:02 -06:00
ellensp
e872b575f8 🩹 Replace pow() with _BV() (#25186) 2023-01-12 05:20:02 -06:00
Mike Bignell
8b5014f264 🩹 Fix missing IS_MELZI (#25190) 2023-01-12 05:20:02 -06:00
Ashley 'DrToxic' Devine
9ff1c30745 🎨 Misc. cleanup (#25194)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2023-01-12 05:20:02 -06:00
Vovodroid
a286daf697 🚸 Attach USB media (#25120) 2023-01-12 05:20:02 -06:00
Scott Lahteine
9383c2aa76 🧑‍💻 Add Temperature::is_above_target 2023-01-12 05:20:02 -06:00
Scott Lahteine
58e9dc0cbf 🎨 Rename *_temp_error to *temp_error 2023-01-12 05:20:02 -06:00
Timothy Hoogland
5e69a3dbf4 🩹 Remove extraneous EZBoard V1 autofans (#25182) 2023-01-03 18:53:19 -06:00
Scott Lahteine
c990a35bb0 🎨 Misc. IS cleanup 2023-01-03 04:20:20 -06:00
Giuliano Zaro
f2017d4111 🚸 MarlinUI edit steps/mm to 2 decimal places (#25144) 2023-01-03 04:20:20 -06:00
ellensp
c5f95bfe97 🧑‍💻 Fix type warning (#25149) 2023-01-03 04:20:20 -06:00
ellensp
f13d7f27d1 🔨 FILAMENT_RUNOUT_SCRIPT sanity check (#25150) 2023-01-03 04:20:20 -06:00
Lukas Erlacher
b1099b1c65 🔧 Add H8 to Creality 4.2.2 stepper warning (#25154) 2023-01-03 04:20:20 -06:00
Lukas Erlacher
44e20d2d6a 🚸 Z Servo Probe is HAS_STOWABLE_PROBE (#25158) 2023-01-03 04:20:20 -06:00
Timothy Hoogland
c54c8c2254 🩹 Remove extraneous EZBoard V2 autofans (#25166) 2023-01-03 04:20:20 -06:00
Scott Lahteine
bcb0a370a5 🚸 Hide IS menu while busy 2023-01-03 04:20:20 -06:00
Vlad Popescu
da43218d76 🐛 Avoid lambda for menu items (#25169) 2023-01-03 04:20:20 -06:00
Stefan Kalscheuer
d71a60a14b 🐛 Fix Mesh Bed Leveling Z correction (#25122) 2023-01-03 04:20:15 -06:00
Keith Bennett
246f001521 📝 Fix Configs URL (#25167) 2022-12-30 21:06:35 -06:00
Scott Lahteine
a039081728 🧑‍💻 Fix ONBOARD_FLASH_SIZE 2022-12-20 21:15:14 -06:00
Scott Lahteine
3334582f86 🔖 Version 2.1.2 2022-12-19 14:42:28 -06:00
Scott Lahteine
b2d72de494 📝 Update 2.1.x README 2022-12-19 14:41:09 -06:00
Scott Lahteine
cfa747ed08 🧑‍💻 M593 F "min" freq 2022-12-18 15:49:20 -06:00
Scott Lahteine
92b2076dda 🐛 Fix Melzi encoder 2022-12-18 15:49:20 -06:00
Scott Lahteine
eff6c407a5 🩹 Fix LCD_FOR_MELZI with Tronxy Melzi 2022-12-17 22:17:38 -06:00
EvilGremlin
569bbb18d0 🐛 Fix DOGM time overflow, alignment (#25103) 2022-12-17 22:17:38 -06:00
ellensp
471330b56e 🎨 Suppress warning (#25101) 2022-12-17 22:17:38 -06:00
ellensp
2a724bd94e BTT Octopus with STM32-F407 (#25031) 2022-12-17 22:17:38 -06:00
alextrical
cea2ab1d7f BigTreeTech EBB42 v1.1 (#24964) 2022-12-17 22:17:38 -06:00
ils15
5198a55457 🔧 Use multi-XYZ 'STOP' pins for MIN/MAX (#24855)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-12-17 22:17:38 -06:00
Scott Lahteine
cbb56e3536 Robin Nano v1 CDC (USB mod)
Followup to #24619
2022-12-17 22:17:38 -06:00
Dipl.-Ing. Raoul Rubien, BSc
b3f4eaf6fd 🩹 Fix M115_GEOMETRY_REPORT (#25092) 2022-12-16 14:23:26 -06:00
ellensp
7815b20051 🩹 Inverted probe pin flag (K8400) (#25085) 2022-12-16 14:23:26 -06:00
Scott Lahteine
ffbf6acd6c 🩹 Fix M502 init of default motion
Fix regression from #25035
2022-12-16 14:23:26 -06:00
alextrical
8bafc1d9ae 🩹 Use custom I2C pins for OLED (#24970) 2022-12-16 14:23:26 -06:00
Bart Meijer
ac05f0cb8b SAMD21 HAL / Minitronics v2.0 (#24976) 2022-12-16 14:23:26 -06:00
Alexander Gavrilenko
ec6349f2ac TFT_COLOR_UI async DMA SPI (#24980) 2022-12-16 14:23:26 -06:00
Scott Lahteine
d082223fee 📝 Replace Twitter with Fosstodon 2022-12-16 14:23:26 -06:00
Simon Pilepich
e07a059b2d 🔧 Anycubic alternate Z1/Z2 wiring (#25071) 2022-12-16 14:23:26 -06:00
Krzysztof Błażewicz
313716e7fc JyersUI TMC Settings (#25048) 2022-12-16 14:23:26 -06:00
Keith Bennett
726555901c 🔧 Custom Menu Sanity Check (#25079) 2022-12-16 14:23:26 -06:00
Scott Lahteine
3ad684b10b 🔨 Updated 'mfconfig init' 2022-12-16 14:23:26 -06:00
ellensp
408a53bcdd 🔨 No env:mega1280 for MIGHTYBOARD_REVE (#25080) 2022-12-16 14:23:26 -06:00
tombrazier
eae339b8dc ️ Better IS buffer size calc (#25035) 2022-12-16 14:23:25 -06:00
Vovodroid
79b88471f0 Two controller fans (#24995) 2022-12-16 14:23:25 -06:00
ellensp
86a3362bf6 📌 Pins updates for Longer LK5, etc. (#25012)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-12-16 14:23:25 -06:00
EvilGremlin
0efeedf262 🚸 Progress display followup (#24879) 2022-12-16 14:23:25 -06:00
Sebastien BLAISOT
c86f20010d M150 S default index (#23066)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-12-16 14:23:25 -06:00
Scott Lahteine
5a97ffc414 🔨 Return error on mftest exit 2022-12-16 14:23:25 -06:00
Scott Lahteine
2737286021 📝 Update config comments 2022-12-16 14:23:25 -06:00
ellensp
86a10dc459 🐛 Fix Fast PWM on AVR (#25030)
Followup to #25005
2022-12-16 14:23:25 -06:00
kisslorand
ecdf07f055 ✏️ Fix missing ) (#25055) 2022-12-16 14:23:25 -06:00
Scott Lahteine
686ce0c0e2 🔨 Fix CI Test clean step (2) 2022-12-16 14:23:25 -06:00
Scott Lahteine
3c550e0f19 🎨 Misc. cleanup 2022-12-16 14:23:25 -06:00
Scott Lahteine
071dae0c28 🔨 Fix CI Test clean step 2022-12-16 14:23:25 -06:00
tombrazier
df2a2488a8 🐛 Fix TMC5160 + Input Shaping overcurrent (#25050) 2022-12-16 14:23:25 -06:00
Taylor Talkington
c3090bd4e8 🩹 Ender 3v2 DWIN MarlinUI Fixup (#24984) 2022-12-16 14:23:25 -06:00
Scott Lahteine
0fadb56150 🎨 Trailing whitespace 2022-12-16 14:23:25 -06:00
ellensp
eb125c95b6 🔨 Update renamed.ini (#25042) 2022-12-16 14:23:25 -06:00
ellensp
26edeefeb9 🩹 Fix MSG_MOVE_N_MM substitution (#25043) 2022-12-16 14:23:25 -06:00
kisslorand
96b8c28376 🚸 G30 move to logical XY (#24953) 2022-12-16 14:23:25 -06:00
Scott Lahteine
db3865520f 🎨 Misc. cleanup 2022-12-16 14:23:25 -06:00
Scott Lahteine
51c1645ceb 🧑‍💻 Use spaces indent for Python 2022-12-16 14:23:25 -06:00
トトも
5eb39d5277 📝 Formatted Team Overview (#25029) 2022-12-16 14:23:25 -06:00
Scott Lahteine
0537e78572 🐛 Fix G-code resend race condition
As pointed out in #24972 by @silycr, but simplified.
2022-12-16 14:23:25 -06:00
Taylor Talkington
95019bf526 Ender-3 V2 DWIN for BTT Octopus V1.1 (#24983) 2022-12-16 14:23:25 -06:00
Chris Bagwell
6f5ad55953 ️ More SCURVE cycles on unoptimized cortex-m0 (#24955) 2022-12-16 14:23:25 -06:00
tombrazier
57f6c93192 ️ Input Shaping improvements (#24951) 2022-12-16 14:23:25 -06:00
Trivalik
d2ece1e713 🐛 Fix missing va_end in UnwPrintf (#25027) 2022-12-16 14:23:25 -06:00
studiodyne
12017887f4 🐛 Fix MILLISECONDS_PREHEAT_TIME / mintemp (#24967) 2022-12-16 14:23:25 -06:00
Marcio T
3a28a1fd1d 🩹 Fix ADVANCE_K + DISTINCT_E_FACTORS sanity check (#25007) 2022-12-16 14:23:25 -06:00
Manuel McLure
360e03797f 🔧 Merge TMC26X with TMC config (#24373) 2022-12-16 14:23:25 -06:00
Radek
6185b50dbe 🐛 Fix SKR mini E2 V2 + BTT_MINI_12864_V1 (#24827)
See https://github.com/bigtreetech/BIGTREETECH-SKR-mini-E3/issues/686#issuecomment-1296545443
2022-12-16 14:23:25 -06:00
Vasily Evseenko
b2b8407a75 🍻 Fix Z increase on toolchange without UBL (#22942) 2022-12-16 14:23:25 -06:00
ellensp
c1684a1dbe 🩹 Fix UBL menu compile (#25020) 2022-12-16 14:23:25 -06:00
mikemerryguy
7d0f1dd17c 🚸 Add 50mm manual move (#24884) 2022-12-16 14:23:25 -06:00
Thomas Buck
b6051fe847 🚸 Optional Cutter/Laser status for HD44780 (#25003) 2022-12-16 14:23:25 -06:00
Tanguy Pruvot
b9bed1ca69 🚸 COLOR_UI sleep timeout / setting (#24994) 2022-12-16 14:23:25 -06:00
ellensp
b8ba9d60bb 🔧 Fix TPARA (…SCARA, DELTA) settings (#25016) 2022-12-16 14:23:25 -06:00
Tanguy Pruvot
8fd42eeeb6 ✏️ Fix Robin nano env typo (#24993) 2022-12-16 14:23:25 -06:00
ellensp
19b73a6f29 📺 FYSETC_MINI_12864_2_1 with BTT_SKR_E3_DIP (#24986) 2022-12-16 14:23:25 -06:00
ellensp
db60e0e7dc 🩹 Fix planner typo (#24977) 2022-12-16 14:23:25 -06:00
ellensp
505d73d2ba 🐛 MKS_MINI_12864 on SKR 1.3 needs FORCE_SOFT_SPI (#24850) 2022-12-16 14:23:25 -06:00
EvilGremlin
d05419a8d9 🔧 Check Delta homing direction (#24865) 2022-12-16 14:23:25 -06:00
phigjm
9772f7806b 🩹 Fix SERVICE_INTERVAL reset (#24888) 2022-12-16 14:23:25 -06:00
Marcio T
473d2b888a Fix FAST_PWM_FAN / TouchUI with NO_MOTION_BEFORE_HOMING (#25005)
Fix regressions from #20323, #23463
2022-12-16 14:23:25 -06:00
ellensp
968f04defb 🩹 Fix 2 thermocouples (#24982)
Followup to #24898
2022-12-16 14:23:25 -06:00
Scott Lahteine
30a885a7ef 🐛 Fix M808 starting count
Reported by adcurtin on Discord
2022-12-16 14:23:25 -06:00
Justin Hartmann
847391cfc1 🩹 Fix Overlord compile (#24947) 2022-12-16 14:23:25 -06:00
Pascal de Bruijn
6ea192abe9 🚸 M306: Indicate MPC Autotune (#24949) 2022-12-16 14:23:25 -06:00
ellensp
0de4ec4099 🩹 Allow max endstops MKS Monster 8 V2 (#24944) 2022-12-16 14:23:25 -06:00
Scott Lahteine
c9fa680db9 🐛 Fix Anycubic / Trigorilla pins, etc. (#24971) 2022-12-16 14:23:25 -06:00
Scott Lahteine
379d388b07 🎨 Prefer axis element over index 2022-12-16 14:23:25 -06:00
Scott Lahteine
7002e72f1c 🩹 Fix EEPROM write for !LIN_ADVANCE
Fixes #24963
Followup to #24821
2022-12-16 14:23:25 -06:00
Scott Lahteine
fc2f3cdf40 🩹 MAX Thermocouple followup
Followup to #24898
2022-12-16 14:23:25 -06:00
Scott Lahteine
7feeffdf06 🩹 leds.update needed for reset_timeout
Followup to #23590
2022-12-16 14:23:25 -06:00
Scott Lahteine
ac5464c37c 🧑‍💻 More direct encoder spin 2022-12-16 14:23:25 -06:00
Scott Lahteine
a121c80e1a 🎨 Update SAMD51 headers 2022-12-16 14:23:25 -06:00
Scott Lahteine
2778b00765 🎨 Format some lib-uhs3 code 2022-12-16 14:23:25 -06:00
ellensp
4737af7d70 📌 ZRIB V52-V53 Servo Pins (#24880) 2022-12-16 14:23:25 -06:00
InsanityAutomation
38375cf7a7 Tenlog MB1V23 IDEX board (#24896) 2022-12-16 14:23:25 -06:00
Giuliano Zaro
ddec5faf5a 🌐 Update Italian language (#24915) 2022-12-16 14:23:25 -06:00
ellensp
cbdafd36e0 📌 Remove unused RX/TX pins (#24932) 2022-12-16 14:23:25 -06:00
Keith Bennett
9f5b0b8567 🔧 Update Display Sleep LCD Check (#24934) 2022-12-16 14:23:25 -06:00
Justin Hartmann
d9ffae6578 🩹 Buttons Followup (#24935)
Followup to #24878
2022-12-16 14:23:25 -06:00
Scott Lahteine
1540e8e1d4 🩹 Allow for last non-servo extruder 2022-12-16 14:23:25 -06:00
ellensp
9a4715f31a 🐛 Fix move_extruder_servo (#24908) 2022-12-16 14:23:25 -06:00
InsanityAutomation
a9969d92ea 🐛 Fix FTDUI Status Screen Timeout (#24899) 2022-12-16 14:23:25 -06:00
Manuel McLure
d87d7474c9 🩹 Fix spurious "bad command" (#24923) 2022-12-16 14:23:25 -06:00
Scott Lahteine
4ce2f1e5ba 🩹 Fix M593 report 2022-12-16 14:23:25 -06:00
kurtis-potier-geofabrica
44636f3b74 🚸 Up to 3 MAX Thermocouples (#24898) 2022-12-16 14:23:24 -06:00
Scott Lahteine
e812540f26 🔧 Clean up unused ESP_WIFI pins 2022-12-16 14:23:24 -06:00
tombrazier
c1f0f26bff 🚀 ZV Input Shaping (#24797) 2022-12-16 14:23:24 -06:00
Scott Lahteine
5765449867 🔨 gcc-12 for macOS native 2022-12-16 14:23:24 -06:00
InsanityAutomation
c8b2d0c0fd Controllerfan PWM scaling, kickstart (#24873) 2022-12-16 14:23:24 -06:00
silycr
bdd5da5098 🚸 Probe pins for Chitu V5 (#24910) 2022-12-16 14:23:24 -06:00
ellensp
4d9bf91edc 🔧 Some STM32 UART Sanity Checks (#24795) 2022-12-16 14:23:24 -06:00
Scott Lahteine
682a9b6fbe 🎨 Misc. variant cleanup, translation
Followup to #24787
2022-12-16 14:23:24 -06:00
InsanityAutomation
a913b2437b 🐛 Fix Print Timer stop with MarlinUI abort (#24902) 2022-12-16 14:23:24 -06:00
ellensp
6b1d738995 🔧 No Native USB on AVR (#24906) 2022-12-16 14:23:24 -06:00
Scott Lahteine
dd224b4eb9 🧑‍💻 Pins and debug list cleanup (#24878) 2022-12-16 14:23:24 -06:00
Scott Lahteine
2e2abbcb48 🎨 CONF_SERIAL_IS => SERIAL_IN_USE 2022-12-16 14:23:24 -06:00
ellensp
485fb77596 Tronxy v10 (#24787) 2022-12-16 14:22:44 -06:00
Keith Bennett
29294007ef 🔧 No Sleep for CR-10 Stock Display (#24875) 2022-12-16 14:22:44 -06:00
karliss
256ac01ca2 🐛 Fix compile without Y/Z (#24858)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-12-16 14:22:44 -06:00
Keith Bennett
ca1968a842 🔧 Check Sensorless Homing on all axes (#24872) 2022-12-16 14:22:44 -06:00
InsanityAutomation
6a084e3704 🐛 Fix bed/chamber PID P edit (#24861) 2022-12-16 14:22:44 -06:00
Scott Lahteine
9ae0789166 🎨 HAS_SPI_FLASH => SPI_FLASH 2022-12-16 14:22:44 -06:00
Dan Royer
031ff2d024 🐛 Fix and improve Polargraph (#24847)
Co-Authored-By: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-12-16 14:22:44 -06:00
ellensp
b3e7d1e91e 🐛 Fix operators for V axis (#24866)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-12-16 14:09:29 -06:00
mjbogusz
f39f4d0288 🩹 Fix TFT LCD in Simulation (#24871) 2022-12-16 14:09:26 -06:00
Scott Lahteine
a4d58e8876 🎨 MMU2 cleanup 2022-12-16 14:09:23 -06:00
Scott Lahteine
c52cf77d0a 🐛 Fix M876 without emergency parser
Fix regression from 1fb2fffdbf
2022-12-16 14:09:19 -06:00
adam3654
bfcb8c704a DOGM Display Sleep (#24829) 2022-12-16 14:09:16 -06:00
EvilGremlin
0047b3064d 🩹 Fix temperature include (#24834) 2022-12-16 14:09:12 -06:00
Scott Lahteine
5c195078ff 🎨 Misc. variant cleanup 2022-12-16 14:09:09 -06:00
Scott Lahteine
1a6f9daee8 🧑‍💻 Min and max for base types 2022-12-16 14:09:06 -06:00
EvilGremlin
505f0a647e MKS SKIPR board (#24791) 2022-12-16 14:08:55 -06:00
Scott Lahteine
62b7db9bb7 🔨 Update mfinfo for 2.1.x 2022-12-16 14:08:52 -06:00
Scott Lahteine
3c870f2d4b 🧑‍💻 Min and max for base types 2022-12-16 14:08:48 -06:00
Giuliano Zaro
0203e32c73 ADVANCE_K per-extruder (#24821)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-12-16 14:08:45 -06:00
EvilGremlin
8481264566 ♻️ Set Progress without LCD (#24767)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-12-16 14:08:40 -06:00
EvilGremlin
b0f02b8f9e 🩹 Fix Color UI touchscreen sleep (#24826) 2022-12-16 14:08:36 -06:00
Adam
d6ff8f0062 🩹 Fix Switching Toolhead compile (#24814) 2022-12-16 14:08:33 -06:00
ellensp
8b37b60e58 🧑‍💻 Einsy Rambo EXP headers (#24825) 2022-12-16 14:08:29 -06:00
ellensp
5c68d26d4e 🔨 Detect feature parsing error (#24824) 2022-12-16 14:08:26 -06:00
ellensp
74435b0dcb Creality v5.2.1 board (#24815)
Followup to #24760
2022-12-16 14:08:23 -06:00
Keith Bennett
f17a07df99 🔧 Thermistor (66) sanity-check (#24803) 2022-12-16 14:08:20 -06:00
Eduardo José Tagle
a58f27763f 🐛 Fix DUE compile and errors (#24809) 2022-12-16 14:08:17 -06:00
Scott Lahteine
5aca6ff4f2 🩹 Fix some vector_3 cast operators 2022-12-16 14:08:13 -06:00
Keith Bennett
7b000966f0 🔧 Update Creality 4.2.2 Driver Warning (#24806) 2022-12-16 14:08:10 -06:00
ellensp
6ae0708840 🩹 Disable DEBUG_DGUSLCD (#24798) 2022-12-16 14:08:04 -06:00
Yuri D'Elia
44e4a9c7b1 🎨 Remove non-const compare operators (#24810) 2022-12-16 14:07:59 -06:00
Plynix / Ben Hartiwch
215fcefc1b Creality v5.2.1 board (#24760) 2022-12-16 14:07:56 -06:00
discip
827f9ae792 Pt1000 with 2k2 pullup (SKR 3 / EZ) (#24790) 2022-12-16 14:07:52 -06:00
ellensp
e44f156535 ✏️ Followup for M524 (#24775)
Followup to #24761
2022-12-16 14:07:49 -06:00
Stuart Pittaway
f1a05d19b0 🚸 UUID fallback to STM32 device SN (#24759)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-12-16 14:07:45 -06:00
Keith Bennett
a7a493d795 📌 Specify MarlinFirmware/U8glib (#24792) 2022-12-16 14:07:38 -06:00
Renaud11232
d9967f5395 🔨 Fix LPC1768 autodetect path on Linux (#24773) 2022-12-16 14:07:34 -06:00
Stefan Kalscheuer
5ee74668cf Anycubic i3 Mega LCD file menu fix (#24752) 2022-12-16 14:07:23 -06:00
studiodyne
be149336f0 M217 G wipe retract length 2022-12-16 14:07:08 -06:00
studiodyne
1f72c8341f XY_COUNTERPART_BACKOFF_MM 2022-12-16 14:07:04 -06:00
studiodyne
3d03f96205 RGB_STARTUP_TEST 2022-12-16 14:06:59 -06:00
tombrazier
c996bfddb7 Permit Linear Advance with I2S Streaming (#24684) 2022-12-16 14:06:54 -06:00
Scott Lahteine
647d459a15 Robin Nano v1 CDC (USB mod)
Followup to #24619
2022-12-16 14:06:19 -06:00
Scott Lahteine
29156ffe5d 🐛 Fix recalculate_max_e_jerk 2022-11-09 20:54:40 -06:00
ellensp
eff60964da 🐛 Fix VW axis fields in types.h (#24780) 2022-09-23 00:17:24 -05:00
Giuliano Zaro
5fe1f66478 🚸 Strict index 2 for M913 / M914 XY (#24680) 2022-09-22 13:27:31 -05:00
Arkadiusz Miśkiewicz
2fc97aa240 🚸 Emergency Parse M524 (#24761) 2022-09-22 13:27:31 -05:00
Giuliano Zaro
aa28358267 🐛 Fix / refactor shared PID (#24673)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-09-22 13:27:31 -05:00
Chris Bagwell
e04e18a590 🧑‍💻 STM32G0B1RE Pins Debugging (#24748) 2022-09-22 13:27:31 -05:00
Eduard Sukharev
bdb7f3af3f 🩹 Fix MKS TinyBee + MKS MINI 12864 SD blank on write (#24670) 2022-09-22 13:27:31 -05:00
Eduard Sukharev
2f24c31454 🚸 Sanity check Integrated Babystepping + I2S stream + ESP32 (#24691) 2022-09-22 13:27:31 -05:00
George Fu
96d050c7ba FYSETC SPIDER KING407 (#24696) 2022-09-22 13:27:31 -05:00
ellensp
aabd3e9e19 BTT SKR Mini E3 V3.0.1 (#24722) 2022-09-22 13:27:31 -05:00
XDA-Bam
38b3105900 ️ Minor planner optimization (#24737) 2022-09-22 13:27:31 -05:00
Arkadiusz Miśkiewicz
02810616cc 🚸 On pause report "SD printing byte X/Y" (#24709) 2022-09-22 13:27:31 -05:00
Arkadiusz Miśkiewicz
7daff755f2 🩹 Report M22 / M23 success / fail (#24706) 2022-09-22 13:27:31 -05:00
Gurmeet Athwal
53564fb6f3 🚸 M115 spindle/laser (#24681, #24747) 2022-09-22 13:27:31 -05:00
ellensp
9d9f303c5e 📺 FYSETC Mini 12864 2.1 pins for Creality V4 (#24624) 2022-09-22 13:27:31 -05:00
FBN
b9428bf087 🚸 More automatic MMU2 load (#24750, #24770) 2022-09-22 13:27:08 -05:00
Yuri D'Elia
0642cd8a83 👷 Array macros to …26 elements (#24789) 2022-09-22 13:26:50 -05:00
Scott Lahteine
d2b1467ab3 🌐 Some short menu strings 2022-09-22 13:26:26 -05:00
Keith Bennett
03aba439f6 ️ Only Sync Emulated EEPROM Print Counter (#24731) 2022-09-22 13:26:26 -05:00
Giuliano Zaro
85a47d61e6 🐛 Fix heater timeout PID output (#24682) 2022-09-22 13:17:54 -05:00
Scott Lahteine
78577b13cb 🧑‍💻 Microsteps to stepper.cpp 2022-09-22 13:17:54 -05:00
hartmannathan
b29cd4c510 📝 Fix example comment (#24744) 2022-09-22 13:17:54 -05:00
Scott Lahteine
0eb6a8d12e 📝 Fix comment 2022-09-22 13:17:54 -05:00
JoaquinBerrios
8a8218a8f2 ️ BTT SKR V3.0 / EZ = 480MHz (#24721) 2022-09-22 13:17:54 -05:00
Scott Lahteine
3a18ba0412 🔨 Fix config-labels.py 2022-09-22 13:17:54 -05:00
Scott Lahteine
2828f1d1db 🔨 Outdent py string 2022-09-22 13:17:54 -05:00
dmitrygribenchuk
63507acf98 🔨 Clean up Python imports (#24736) 2022-09-22 13:17:54 -05:00
ButchMonkey
cc2cc7d081 🔨 Fix config.ini custom items, and 'all' (#24720) 2022-09-22 13:17:54 -05:00
ButchMonkey
b676b43874 🔨 Fix configuration.py with encoding UTF-8 (#24719)
- Opening files with Windows-1252 encoding.
2022-09-22 13:17:54 -05:00
Stephen Hawes
2f1b89bd1f Opulo LumenPnP REV04 (#24718) 2022-09-22 13:17:54 -05:00
Keith Bennett
1a2e591d03 🔨 Update SKR 3 env (#24711) 2022-09-22 13:17:54 -05:00
Scott Lahteine
dc65e299fa 📝 Format some comments 2022-09-22 13:17:53 -05:00
EvilGremlin
033bca1773 🔨 Native USB modified env followup (#24669)
Followup to #24619
2022-09-22 13:17:53 -05:00
Bob Kuhn
e350acb360 🐛 Fix UBL regression (#24622)
Fix regression from #24188
2022-09-22 13:17:53 -05:00
Ruedi Steinmann
7d8d2e2c58 🩹 Fix a BUZZ (#24740) 2022-09-09 15:33:54 -05:00
Scott Lahteine
3c6b3e5af4 🔖 Config version 02010200 2022-08-29 19:25:38 -05:00
EvilGremlin
d5e9b25a31 🐛 Fix back button (#24694) 2022-08-29 19:17:32 -05:00
Scott Lahteine
9313c2fd18 ✏️ Fix http:// links 2022-08-29 19:17:31 -05:00
Lefteris Garyfalakis
d8a280bf53 ✏️ Fix LCD sleep conditional (#24685) 2022-08-29 19:17:31 -05:00
Miguel Risco-Castillo
d244389998 🩹 Constrain UBL within mesh bounds (#24631)
Fixes #24630
2022-08-29 19:17:31 -05:00
Keith Bennett
d140be0281 🚸 Up to 10 Preheat Constants (#24636) 2022-08-29 19:17:31 -05:00
ellensp
27bea56025 🔧 Fix Auto-Fan / Controller-Fan pin conflict check (#24648) 2022-08-29 19:17:31 -05:00
ellensp
98ee3fc2b5 🩹 Fix PID debug output (#24647) 2022-08-29 19:17:31 -05:00
Mark
e8394c391e 🐛 Fix Bed Distance Sensor reading (#24649) 2022-08-29 19:17:31 -05:00
Arkadiusz Miśkiewicz
e24d5f9315 M20_TIMESTAMP_SUPPORT (#24679)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-08-29 19:17:31 -05:00
EvilGremlin
ef1cf0d5a1 ♻️ Display sleep minutes, encoder disable option (#24618)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-08-29 19:17:31 -05:00
DejitaruJin
f088722ae8 🩹 Fix SainSmart LCD (#24672) 2022-08-29 19:17:31 -05:00
Keith Bennett
68c5e97fd7 🩹 Fix Freeze Feature (#24664) 2022-08-29 19:17:31 -05:00
Lefteris Garyfalakis
a8cf886aa5 🔨 Suppressible Creality 4.2.2 warning (#24683) 2022-08-29 19:17:31 -05:00
EvilGremlin
a31e65e30b Robin Nano v1 CDC (USB mod) (#24619) 2022-08-29 19:17:31 -05:00
Alexey Galakhov
d94a41527f 🐛 Fix JyersUI (#24652) 2022-08-29 19:17:31 -05:00
Keith Bennett
37a7da075f 🔧 Fix Skew Correction defaults (#24601) 2022-08-29 19:17:31 -05:00
Scott Lahteine
5145266b0d 🎨 Some automated cleanup 2022-08-29 19:17:31 -05:00
Keith Bennett
bdd5f3678e 📺 Add to MKS UI About Screen (#24610) 2022-08-29 19:17:31 -05:00
Keith Bennett
b4af335b7a 🔧 Remove STM32F4 Print Counter Sanity Check (#24605) 2022-08-29 19:17:31 -05:00
Protomosh
cfe1d52bf2 🐛 Fix DGUS Reloaded + STM32 (#24600) 2022-08-29 19:17:31 -05:00
Scott Lahteine
ff09ea13a4 🧑‍💻 Use spaces indent for Python 2022-08-29 19:17:31 -05:00
Scott Lahteine
d93c41a257 🔨 Misc. schema updates 2022-08-29 19:17:31 -05:00
Graham Reed
98e6aacbef 🔨 Fix LPC1768 automatic upload port (#24599) 2022-08-29 19:17:31 -05:00
Scott Lahteine
0adee8fae0 🩹 Fix strtof interpreting a hex value
Bug introduced in #21532
2022-08-29 19:17:31 -05:00
Scott Lahteine
c154302ece 🔨 Add args to schema.py 2022-08-29 19:17:31 -05:00
Scott Lahteine
b5ccddbe35 🎨 Fix '…if_chain' Uncrustify option 2022-08-29 19:17:31 -05:00
Scott Lahteine
d69893309e 🔨 Misc. config py updates 2022-08-29 19:17:31 -05:00
Scott Lahteine
fc3ea96ff9 🧑‍💻 Add operator== for C++20 2022-08-29 19:17:31 -05:00
Keith Bennett
3892d08b06 🧑‍💻 Fix UBL Build Mesh preheat items (#24598)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-08-29 19:17:31 -05:00
Ivan Kravets
857dc73be5 🔨 Fix a PlatformIO debug issue (#24569) 2022-08-29 19:17:31 -05:00
Scott Lahteine
419a145fa3 🔨 Update schema export 2022-08-08 04:42:19 -05:00
932 changed files with 74170 additions and 36123 deletions

29
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/python-3/.devcontainer/base.Dockerfile
# [Choice] Python version: 3, 3.9, 3.8, 3.7, 3.6
ARG VARIANT="3.9.0-buster"
FROM python:${VARIANT}
# [Option] Install Node.js
ARG INSTALL_NODE="true"
ARG NODE_VERSION="lts/*"
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
# COPY requirements.txt /tmp/pip-tmp/
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
# && rm -rf /tmp/pip-tmp
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
RUN pip install -U https://github.com/platformio/platformio-core/archive/develop.zip
RUN platformio update
# To get the test platforms
RUN pip install PyYaml
#ENV PATH /code/buildroot/bin/:/code/buildroot/tests/:${PATH}

View File

@@ -0,0 +1,51 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/python-3
{
"name": "Python 3",
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"args": {
// Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8, 3.9
"VARIANT": "3.9.0-buster",
// Options
"INSTALL_NODE": "false",
"NODE_VERSION": "lts/*"
}
},
// Set *default* container specific settings.json values on container create.
"settings": {
"python.pythonPath": "/usr/local/bin/python",
"python.languageServer": "Pylance",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"platformio.platformio-ide",
"marlinfirmware.auto-build",
"editorconfig.editorconfig"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
}

View File

@@ -14,6 +14,10 @@ end_of_line = lf
indent_style = space indent_style = space
indent_size = 2 indent_size = 2
[{*.py,*.conf,*.sublime-project}] [{*.py}]
indent_style = space
indent_size = 4
[{*.conf,*.sublime-project}]
indent_style = tab indent_style = tab
indent_size = 4 indent_size = 4

71
.gitignore vendored
View File

@@ -1,6 +1,6 @@
# #
# Marlin 3D Printer Firmware # Marlin 3D Printer Firmware
# Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] # Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
# #
# Based on Sprinter and grbl. # Based on Sprinter and grbl.
# Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm # Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
@@ -21,35 +21,24 @@
# Generated files # Generated files
_Version.h _Version.h
bdf2u8g bdf2u8g.exe
genpages.exe
bdf2u8g.exe
genpages.exe
marlin_config.json marlin_config.json
mczip.h mczip.h
language*.csv
out-csv/
out-language/
*.gen *.gen
*.sublime-workspace *.sublime-workspace
#
# OS # OS
#
applet/ applet/
.DS_Store .DS_Store
# # Compiled C++ Object files
# Misc # Compiled C++ Object files
#
*~
*.orig
*.rej
*.bak
*.idea
*.i
*.ii
*.swp
tags
#
# C++
#
# Compiled Object files
*.slo *.slo
*.lo *.lo
*.o *.o
@@ -80,10 +69,8 @@ tags
*.out *.out
*.app *.app
# # Compiled C Object files
# C # Compiled C Object files
#
# Object files
*.o *.o
*.ko *.ko
*.obj *.obj
@@ -143,13 +130,17 @@ vc-fileutils.settings
.vscode/* .vscode/*
!.vscode/extensions.json !.vscode/extensions.json
#Simulation # Simulation files
# Simulation files
imgui.ini imgui.ini
eeprom.dat eeprom.dat
spi_flash.bin spi_flash.bin
fs.img
fs.img
#cmake # CMake
CMakeLists.txt CMakeLists.txt
!buildroot/share/cmake/CMakeLists.txt
src/CMakeLists.txt src/CMakeLists.txt
CMakeListsPrivate.txt CMakeListsPrivate.txt
build/ build/
@@ -169,3 +160,29 @@ __pycache__
# IOLogger logs # IOLogger logs
*_log.csv *_log.csv
# Misc.
*~
*.orig
*.rej
*.bak
*.idea
*.i
*.ii
*.swp
tags
*.logs
*.bak
# Misc.
*~
*.orig
*.rej
*.bak
*.idea
*.i
*.ii
*.swp
tags
*.logs
*.bak

View File

@@ -1,11 +1,16 @@
SCRIPTS_DIR := buildroot/share/scripts
CONTAINER_RT_BIN := docker
CONTAINER_RT_OPTS := --rm -v $(PWD):/code -v platformio-cache:/root/.platformio
CONTAINER_IMAGE := marlin-dev
help: help:
@echo "Tasks for local development:" @echo "Tasks for local development:"
@echo "* tests-single-ci: Run a single test from inside the CI" @echo "* tests-single-ci: Run a single test from inside the CI"
@echo "* tests-single-local: Run a single test locally" @echo "* tests-single-local: Run a single test locally"
@echo "* tests-single-local-docker: Run a single test locally, using docker-compose" @echo "* tests-single-local-docker: Run a single test locally, using docker"
@echo "* tests-all-local: Run all tests locally" @echo "* tests-all-local: Run all tests locally"
@echo "* tests-all-local-docker: Run all tests locally, using docker-compose" @echo "* tests-all-local-docker: Run all tests locally, using docker"
@echo "* setup-local-docker: Setup local docker-compose" @echo "* setup-local-docker: Build the local docker image"
@echo "" @echo ""
@echo "Options for testing:" @echo "Options for testing:"
@echo " TEST_TARGET Set when running tests-single-*, to select the" @echo " TEST_TARGET Set when running tests-single-*, to select the"
@@ -27,26 +32,28 @@ tests-single-ci:
tests-single-local: tests-single-local:
@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local" ; return 1; fi @if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local" ; return 1; fi
export PATH=./buildroot/bin/:./buildroot/tests/:${PATH} \ export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \ && export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
&& run_tests . $(TEST_TARGET) "$(ONLY_TEST)" && run_tests . $(TEST_TARGET) "$(ONLY_TEST)"
.PHONY: tests-single-local .PHONY: tests-single-local
tests-single-local-docker: tests-single-local-docker:
@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local-docker" ; return 1; fi @if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local-docker" ; return 1; fi
docker-compose run --rm marlin $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)" @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)"
.PHONY: tests-single-local-docker .PHONY: tests-single-local-docker
tests-all-local: tests-all-local:
export PATH=./buildroot/bin/:./buildroot/tests/:${PATH} \ export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \ && export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
&& for TEST_TARGET in $$(./get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done && for TEST_TARGET in $$($(SCRIPTS_DIR)/get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done
.PHONY: tests-all-local .PHONY: tests-all-local
tests-all-local-docker: tests-all-local-docker:
docker-compose run --rm marlin $(MAKE) tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) @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)
.PHONY: tests-all-local-docker .PHONY: tests-all-local-docker
setup-local-docker: setup-local-docker:
docker-compose build $(CONTAINER_RT_BIN) build -t $(CONTAINER_IMAGE) -f docker/Dockerfile .
.PHONY: setup-local-docker .PHONY: setup-local-docker

View File

@@ -60,8 +60,8 @@
// @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 "(Sven Soost, 0.0.1)" // Who made the changes.
//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes) #define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
/** /**
* *** VENDORS PLEASE READ *** * *** VENDORS PLEASE READ ***
@@ -78,7 +78,7 @@
#define SHOW_BOOTSCREEN #define SHOW_BOOTSCREEN
// Show the bitmap in Marlin/_Bootscreen.h on startup. // Show the bitmap in Marlin/_Bootscreen.h on startup.
//#define SHOW_CUSTOM_BOOTSCREEN #define SHOW_CUSTOM_BOOTSCREEN
// Show the bitmap in Marlin/_Statusscreen.h on the status screen. // Show the bitmap in Marlin/_Statusscreen.h on the status screen.
//#define CUSTOM_STATUS_SCREEN_IMAGE //#define CUSTOM_STATUS_SCREEN_IMAGE
@@ -87,7 +87,7 @@
// Choose the name from boards.h that matches your setup // Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD #ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_RAMPS_14_EFB #define MOTHERBOARD BOARD_BTT_SKR_MINI_E3_V3_0
#endif #endif
/** /**
@@ -98,7 +98,7 @@
* *
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7] * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/ */
#define SERIAL_PORT 0 #define SERIAL_PORT 2
/** /**
* Serial Port Baud Rate * Serial Port Baud Rate
@@ -111,7 +111,7 @@
* *
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/ */
#define BAUDRATE 250000 #define BAUDRATE 115200
//#define BAUD_RATE_GCODE // Enable G-code M575 to set the baud rate //#define BAUD_RATE_GCODE // Enable G-code M575 to set the baud rate
@@ -120,8 +120,8 @@
* Currently Ethernet (-2) is only supported on Teensy 4.1 boards. * Currently Ethernet (-2) is only supported on Teensy 4.1 boards.
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7] * :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
*/ */
//#define SERIAL_PORT_2 -1 #define SERIAL_PORT_2 -1
//#define BAUDRATE_2 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE //#define BAUDRATE_2 115200 // :[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.
@@ -135,11 +135,13 @@
//#define BLUETOOTH //#define BLUETOOTH
// Name displayed in the LCD "Ready" message and Info menu // Name displayed in the LCD "Ready" message and Info menu
//#define CUSTOM_MACHINE_NAME "3D Printer" #define CUSTOM_MACHINE_NAME "sv3dprt01"
// Printer's unique ID, used by some programs to differentiate between machines. // Printer's unique ID, used by some programs to differentiate between machines.
// Choose your own or use a service like https://www.uuidgenerator.net/version4 // Choose your own or use a service like https://www.uuidgenerator.net/version4
//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" #define MACHINE_UUID "29546829-8cef-4c73-bfb3-7ff034a6861a"
// @section stepper drivers
/** /**
* Stepper Drivers * Stepper Drivers
@@ -156,9 +158,9 @@
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_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', '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', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
*/ */
#define X_DRIVER_TYPE A4988 #define X_DRIVER_TYPE TMC2209
#define Y_DRIVER_TYPE A4988 #define Y_DRIVER_TYPE TMC2209
#define Z_DRIVER_TYPE A4988 #define Z_DRIVER_TYPE TMC2209
//#define X2_DRIVER_TYPE A4988 //#define X2_DRIVER_TYPE A4988
//#define Y2_DRIVER_TYPE A4988 //#define Y2_DRIVER_TYPE A4988
//#define Z2_DRIVER_TYPE A4988 //#define Z2_DRIVER_TYPE A4988
@@ -170,7 +172,7 @@
//#define U_DRIVER_TYPE A4988 //#define U_DRIVER_TYPE A4988
//#define V_DRIVER_TYPE A4988 //#define V_DRIVER_TYPE A4988
//#define W_DRIVER_TYPE A4988 //#define W_DRIVER_TYPE A4988
#define E0_DRIVER_TYPE A4988 #define E0_DRIVER_TYPE TMC2209
//#define E1_DRIVER_TYPE A4988 //#define E1_DRIVER_TYPE A4988
//#define E2_DRIVER_TYPE A4988 //#define E2_DRIVER_TYPE A4988
//#define E3_DRIVER_TYPE A4988 //#define E3_DRIVER_TYPE A4988
@@ -240,21 +242,6 @@
//#define SINGLENOZZLE_STANDBY_FAN //#define SINGLENOZZLE_STANDBY_FAN
#endif #endif
/**
* Multi-Material Unit
* Set to one of these predefined models:
*
* PRUSA_MMU1 : Průša MMU1 (The "multiplexer" version)
* PRUSA_MMU2 : Průša MMU2
* PRUSA_MMU2S : Průša MMU2S (Requires MK3S extruder with motion sensor, EXTRUDERS = 5)
* 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)
*
* Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
* See additional options in Configuration_adv.h.
*/
//#define MMU_MODEL PRUSA_MMU2
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
@@ -388,6 +375,24 @@
//#define HOTEND_OFFSET_Y { 0.0, 5.00 } // (mm) relative Y-offset for each nozzle //#define HOTEND_OFFSET_Y { 0.0, 5.00 } // (mm) relative Y-offset for each nozzle
//#define HOTEND_OFFSET_Z { 0.0, 0.00 } // (mm) relative Z-offset for each nozzle //#define HOTEND_OFFSET_Z { 0.0, 0.00 } // (mm) relative Z-offset for each nozzle
// @section multi-material
/**
* Multi-Material Unit
* Set to one of these predefined models:
*
* PRUSA_MMU1 : Průša MMU1 (The "multiplexer" version)
* PRUSA_MMU2 : Průša MMU2
* PRUSA_MMU2S : Průša MMU2S (Requires MK3S extruder with motion sensor, EXTRUDERS = 5)
* 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)
*
* Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
* See additional options in Configuration_adv.h.
* :["PRUSA_MMU1", "PRUSA_MMU2", "PRUSA_MMU2S", "EXTENDABLE_EMU_MMU2", "EXTENDABLE_EMU_MMU2S"]
*/
//#define MMU_MODEL PRUSA_MMU2
// @section psu control // @section psu control
/** /**
@@ -403,7 +408,7 @@
//#define MKS_PWC // Using the MKS PWC add-on //#define MKS_PWC // Using the MKS PWC add-on
//#define PS_OFF_CONFIRM // Confirm dialog when power off //#define PS_OFF_CONFIRM // Confirm dialog when power off
//#define PS_OFF_SOUND // Beep 1s when power off //#define PS_OFF_SOUND // Beep 1s when power off
#define PSU_ACTIVE_STATE LOW // Set 'LOW' for ATX, 'HIGH' for X-Box #define PSU_ACTIVE_STATE HIGH // Set 'LOW' for ATX, 'HIGH' for X-Box
//#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80 //#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80
//#define PSU_POWERUP_DELAY 250 // (ms) Delay for the PSU to warm up to full power //#define PSU_POWERUP_DELAY 250 // (ms) Delay for the PSU to warm up to full power
@@ -491,7 +496,7 @@
* 30 : 100kΩ Kis3d Silicone heating mat 200W/300W with 6mm precision cast plate (EN AW 5083) NTC100K - beta 3950 * 30 : 100kΩ Kis3d Silicone heating mat 200W/300W with 6mm precision cast plate (EN AW 5083) NTC100K - beta 3950
* 60 : 100kΩ Maker's Tool Works Kapton Bed Thermistor - beta 3950 * 60 : 100kΩ Maker's Tool Works Kapton Bed Thermistor - beta 3950
* 61 : 100kΩ Formbot/Vivedino 350°C Thermistor - beta 3950 * 61 : 100kΩ Formbot/Vivedino 350°C Thermistor - beta 3950
* 66 : 4.7MΩ Dyze Design High Temperature Thermistor * 66 : 4.7MΩ Dyze Design / Trianglelab T-D500 500°C High Temperature Thermistor
* 67 : 500kΩ SliceEngineering 450°C Thermistor * 67 : 500kΩ SliceEngineering 450°C Thermistor
* 68 : PT100 amplifier board from Dyze Design * 68 : PT100 amplifier board from Dyze Design
* 70 : 100kΩ bq Hephestos 2 * 70 : 100kΩ bq Hephestos 2
@@ -513,6 +518,7 @@
* 110 : Pt100 with 1kΩ pullup (atypical) * 110 : Pt100 with 1kΩ pullup (atypical)
* 147 : Pt100 with 4.7kΩ pullup * 147 : Pt100 with 4.7kΩ pullup
* 1010 : Pt1000 with 1kΩ pullup (atypical) * 1010 : Pt1000 with 1kΩ pullup (atypical)
* 1022 : Pt1000 with 2.2kΩ pullup
* 1047 : Pt1000 with 4.7kΩ pullup (E3D) * 1047 : Pt1000 with 4.7kΩ pullup (E3D)
* 20 : Pt100 with circuit in the Ultimainboard V2.x with mainboard ADC reference voltage = INA826 amplifier-board supply voltage. * 20 : Pt100 with circuit in the Ultimainboard V2.x with mainboard ADC reference voltage = INA826 amplifier-board supply voltage.
* NOTE: (1) Must use an ADC input with no pullup. (2) Some INA826 amplifiers are unreliable at 3.3V so consider using sensor 147, 110, or 21. * NOTE: (1) Must use an ADC input with no pullup. (2) Some INA826 amplifiers are unreliable at 3.3V so consider using sensor 147, 110, or 21.
@@ -530,7 +536,7 @@
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
* *
*/ */
#define TEMP_SENSOR_0 1 #define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0 #define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0 #define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0 #define TEMP_SENSOR_3 0
@@ -538,7 +544,7 @@
#define TEMP_SENSOR_5 0 #define TEMP_SENSOR_5 0
#define TEMP_SENSOR_6 0 #define TEMP_SENSOR_6 0
#define TEMP_SENSOR_7 0 #define TEMP_SENSOR_7 0
#define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_BED 1
#define TEMP_SENSOR_PROBE 0 #define TEMP_SENSOR_PROBE 0
#define TEMP_SENSOR_CHAMBER 0 #define TEMP_SENSOR_CHAMBER 0
#define TEMP_SENSOR_COOLER 0 #define TEMP_SENSOR_COOLER 0
@@ -558,6 +564,10 @@
#define MAX31865_SENSOR_OHMS_1 100 #define MAX31865_SENSOR_OHMS_1 100
#define MAX31865_CALIBRATION_OHMS_1 430 #define MAX31865_CALIBRATION_OHMS_1 430
#endif #endif
#if TEMP_SENSOR_IS_MAX_TC(2)
#define MAX31865_SENSOR_OHMS_2 100
#define MAX31865_CALIBRATION_OHMS_2 430
#endif
#if HAS_E_TEMP_SENSOR #if HAS_E_TEMP_SENSOR
#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109 #define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109
@@ -609,7 +619,7 @@
// Above this temperature the heater will be switched off. // Above this temperature the heater will be switched off.
// This can protect components from overheating, but NOT from shorts and failures. // This can protect components from overheating, but NOT from shorts and failures.
// (Use MINTEMP for thermistor short/failure protection.) // (Use MINTEMP for thermistor short/failure protection.)
#define HEATER_0_MAXTEMP 275 #define HEATER_0_MAXTEMP 300
#define HEATER_1_MAXTEMP 275 #define HEATER_1_MAXTEMP 275
#define HEATER_2_MAXTEMP 275 #define HEATER_2_MAXTEMP 275
#define HEATER_3_MAXTEMP 275 #define HEATER_3_MAXTEMP 275
@@ -617,7 +627,7 @@
#define HEATER_5_MAXTEMP 275 #define HEATER_5_MAXTEMP 275
#define HEATER_6_MAXTEMP 275 #define HEATER_6_MAXTEMP 275
#define HEATER_7_MAXTEMP 275 #define HEATER_7_MAXTEMP 275
#define BED_MAXTEMP 150 #define BED_MAXTEMP 100
#define CHAMBER_MAXTEMP 60 #define CHAMBER_MAXTEMP 60
/** /**
@@ -657,9 +667,9 @@
#define DEFAULT_Ki_LIST { 1.08, 1.08 } #define DEFAULT_Ki_LIST { 1.08, 1.08 }
#define DEFAULT_Kd_LIST { 114.00, 114.00 } #define DEFAULT_Kd_LIST { 114.00, 114.00 }
#else #else
#define DEFAULT_Kp 22.20 #define DEFAULT_Kp 21.98
#define DEFAULT_Ki 1.08 #define DEFAULT_Ki 2.59
#define DEFAULT_Kd 114.00 #define DEFAULT_Kd 46.62
#endif #endif
#endif #endif
@@ -724,7 +734,7 @@
* the issues involved, don't use bed PID until someone else verifies that your hardware works. * the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp * @section bed temp
*/ */
//#define PIDTEMPBED #define PIDTEMPBED
//#define BED_LIMIT_SWITCHING //#define BED_LIMIT_SWITCHING
@@ -742,9 +752,9 @@
// 120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) // 120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
// from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) // from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
#define DEFAULT_bedKp 10.00 #define DEFAULT_bedKp 68.68
#define DEFAULT_bedKi .023 #define DEFAULT_bedKi 13.40
#define DEFAULT_bedKd 305.4 #define DEFAULT_bedKd 234.69
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #endif // PIDTEMPBED
@@ -821,7 +831,7 @@
* Note: For Bowden Extruders make this large enough to allow load/unload. * Note: For Bowden Extruders make this large enough to allow load/unload.
*/ */
#define PREVENT_LENGTHY_EXTRUDE #define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200 #define EXTRUDE_MAXLENGTH 450
//=========================================================================== //===========================================================================
//======================== Thermal Runaway Protection ======================= //======================== Thermal Runaway Protection =======================
@@ -869,7 +879,7 @@
//#define POLARGRAPH //#define POLARGRAPH
#if ENABLED(POLARGRAPH) #if ENABLED(POLARGRAPH)
#define POLARGRAPH_MAX_BELT_LEN 1035.0 #define POLARGRAPH_MAX_BELT_LEN 1035.0
#define POLAR_SEGMENTS_PER_SECOND 5 #define DEFAULT_SEGMENTS_PER_SECOND 5
#endif #endif
// @section delta // @section delta
@@ -881,28 +891,26 @@
// Make delta curves from many straight lines (linear interpolation). // Make delta curves from many straight lines (linear interpolation).
// This is a trade-off between visible corners (not enough segments) // This is a trade-off between visible corners (not enough segments)
// and processor overload (too many expensive sqrt calls). // and processor overload (too many expensive sqrt calls).
#define DELTA_SEGMENTS_PER_SECOND 200 #define DEFAULT_SEGMENTS_PER_SECOND 200
// After homing move down to a height where XY movement is unconstrained // After homing move down to a height where XY movement is unconstrained
//#define DELTA_HOME_TO_SAFE_ZONE //#define DELTA_HOME_TO_SAFE_ZONE
// Delta calibration menu // Delta calibration menu
// uncomment to add three points calibration menu option. // Add three-point calibration to the MarlinUI menu.
// See http://minow.blogspot.com/index.html#4918805519571907051 // See http://minow.blogspot.com/index.html#4918805519571907051
//#define DELTA_CALIBRATION_MENU //#define DELTA_CALIBRATION_MENU
// uncomment to add G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results) // G33 Delta Auto-Calibration. Enable EEPROM_SETTINGS to store results.
//#define DELTA_AUTO_CALIBRATION //#define DELTA_AUTO_CALIBRATION
// NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them
#if ENABLED(DELTA_AUTO_CALIBRATION) #if ENABLED(DELTA_AUTO_CALIBRATION)
// set the default number of probe points : n*n (1 -> 7) // Default number of probe points : n*n (1 -> 7)
#define DELTA_CALIBRATION_DEFAULT_POINTS 4 #define DELTA_CALIBRATION_DEFAULT_POINTS 4
#endif #endif
#if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU)
// Set the steprate for papertest probing // Step size for paper-test probing
#define PROBE_MANUALLY_STEP 0.05 // (mm) #define PROBE_MANUALLY_STEP 0.05 // (mm)
#endif #endif
@@ -947,7 +955,7 @@
//#define MP_SCARA //#define MP_SCARA
#if EITHER(MORGAN_SCARA, MP_SCARA) #if EITHER(MORGAN_SCARA, MP_SCARA)
// If movement is choppy try lowering this value // If movement is choppy try lowering this value
#define SCARA_SEGMENTS_PER_SECOND 200 #define DEFAULT_SEGMENTS_PER_SECOND 200
// Length of inner and outer support arms. Measure arm lengths precisely. // Length of inner and outer support arms. Measure arm lengths precisely.
#define SCARA_LINKAGE_1 150 // (mm) #define SCARA_LINKAGE_1 150 // (mm)
@@ -983,18 +991,18 @@
// Enable for TPARA kinematics and configure below // Enable for TPARA kinematics and configure below
//#define AXEL_TPARA //#define AXEL_TPARA
#if ENABLED(AXEL_TPARA) #if ENABLED(AXEL_TPARA)
#define DEBUG_ROBOT_KINEMATICS #define DEBUG_TPARA_KINEMATICS
#define ROBOT_SEGMENTS_PER_SECOND 200 #define DEFAULT_SEGMENTS_PER_SECOND 200
// Length of inner and outer support arms. Measure arm lengths precisely. // Length of inner and outer support arms. Measure arm lengths precisely.
#define ROBOT_LINKAGE_1 120 // (mm) #define TPARA_LINKAGE_1 120 // (mm)
#define ROBOT_LINKAGE_2 120 // (mm) #define TPARA_LINKAGE_2 120 // (mm)
// SCARA tower offset (position of Tower relative to bed zero position) // SCARA 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 SCARA space.
#define ROBOT_OFFSET_X 0 // (mm) #define TPARA_OFFSET_X 0 // (mm)
#define ROBOT_OFFSET_Y 0 // (mm) #define TPARA_OFFSET_Y 0 // (mm)
#define ROBOT_OFFSET_Z 0 // (mm) #define TPARA_OFFSET_Z 0 // (mm)
#define SCARA_FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly #define SCARA_FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
@@ -1160,14 +1168,14 @@
* Override with M92 * Override with M92
* X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]] * X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]]
*/ */
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 500 } #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 100.671 }
/** /**
* Default Max Feed Rate (linear=mm/s, rotational=°/s) * Default Max Feed Rate (linear=mm/s, rotational=°/s)
* Override with M203 * Override with M203
* X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]] * X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]]
*/ */
#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 } #define DEFAULT_MAX_FEEDRATE { 500, 500, 20, 25 }
//#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2 //#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2
#if ENABLED(LIMITED_MAX_FR_EDITING) #if ENABLED(LIMITED_MAX_FR_EDITING)
@@ -1180,7 +1188,7 @@
* Override with M201 * Override with M201
* X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]] * X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]]
*/ */
#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 } #define DEFAULT_MAX_ACCELERATION { 5000, 5000, 150, 10000 }
//#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2 //#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
#if ENABLED(LIMITED_MAX_ACCEL_EDITING) #if ENABLED(LIMITED_MAX_ACCEL_EDITING)
@@ -1195,9 +1203,9 @@
* M204 R Retract Acceleration * M204 R Retract Acceleration
* M204 T Travel Acceleration * M204 T Travel Acceleration
*/ */
#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves #define DEFAULT_ACCELERATION 1500 // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts #define DEFAULT_RETRACT_ACCELERATION 500 // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves #define DEFAULT_TRAVEL_ACCELERATION 2000 // X, Y, Z acceleration for travel (non printing) moves
/** /**
* Default Jerk limits (mm/s) * Default Jerk limits (mm/s)
@@ -1237,7 +1245,7 @@
* https://blog.kyneticcnc.com/2018/10/computing-junction-deviation-for-marlin.html * https://blog.kyneticcnc.com/2018/10/computing-junction-deviation-for-marlin.html
*/ */
#if DISABLED(CLASSIC_JERK) #if DISABLED(CLASSIC_JERK)
#define JUNCTION_DEVIATION_MM 0.013 // (mm) Distance from real junction edge #define JUNCTION_DEVIATION_MM 0.054 // (mm) Distance from real junction edge
#define JD_HANDLE_SMALL_SEGMENTS // Use curvature estimation instead of just the junction angle #define JD_HANDLE_SMALL_SEGMENTS // Use curvature estimation instead of just the junction angle
// for small segments (< 1mm) with large junction angles (> 135°). // for small segments (< 1mm) with large junction angles (> 135°).
#endif #endif
@@ -1250,7 +1258,7 @@
* *
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/ */
//#define S_CURVE_ACCELERATION #define S_CURVE_ACCELERATION
//=========================================================================== //===========================================================================
//============================= Z Probe Options ============================= //============================= Z Probe Options =============================
@@ -1266,10 +1274,10 @@
* The probe replaces the Z-MIN endstop and is used for Z homing. * The probe replaces the Z-MIN endstop and is used for Z homing.
* (Automatically enables USE_PROBE_FOR_Z_HOMING.) * (Automatically enables USE_PROBE_FOR_Z_HOMING.)
*/ */
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN //#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
// Force the use of the probe for Z-axis homing // Force the use of the probe for Z-axis homing
//#define USE_PROBE_FOR_Z_HOMING #define USE_PROBE_FOR_Z_HOMING
/** /**
* Z_MIN_PROBE_PIN * Z_MIN_PROBE_PIN
@@ -1286,7 +1294,7 @@
* - normally-closed switches to GND and D32. * - normally-closed switches to GND and D32.
* - normally-open switches to 5V and D32. * - normally-open switches to 5V and D32.
*/ */
//#define Z_MIN_PROBE_PIN 32 // Pin 32 is the RAMPS default #define Z_MIN_PROBE_PIN PC14 // Pin 32 is the RAMPS default
/** /**
* Probe Type * Probe Type
@@ -1323,7 +1331,7 @@
/** /**
* The BLTouch probe uses a Hall effect sensor and emulates a servo. * The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/ */
//#define BLTOUCH #define BLTOUCH
/** /**
* MagLev V4 probe by MDD * MagLev V4 probe by MDD
@@ -1373,8 +1381,8 @@
*/ */
//#define MAG_MOUNTED_PROBE //#define MAG_MOUNTED_PROBE
#if ENABLED(MAG_MOUNTED_PROBE) #if ENABLED(MAG_MOUNTED_PROBE)
#define PROBE_DEPLOY_FEEDRATE (133*60) // (mm/min) Probe deploy speed #define PROBE_DEPLOY_FEEDRATE (100*60) // (mm/min) Probe deploy speed
#define PROBE_STOW_FEEDRATE (133*60) // (mm/min) Probe stow speed #define PROBE_STOW_FEEDRATE (100*60) // (mm/min) Probe stow speed
#define MAG_MOUNTED_DEPLOY_1 { PROBE_DEPLOY_FEEDRATE, { 245, 114, 30 } } // Move to side Dock & Attach probe #define MAG_MOUNTED_DEPLOY_1 { PROBE_DEPLOY_FEEDRATE, { 245, 114, 30 } } // Move to side Dock & Attach probe
#define MAG_MOUNTED_DEPLOY_2 { PROBE_DEPLOY_FEEDRATE, { 210, 114, 30 } } // Move probe off dock #define MAG_MOUNTED_DEPLOY_2 { PROBE_DEPLOY_FEEDRATE, { 210, 114, 30 } } // Move probe off dock
@@ -1475,17 +1483,17 @@
* | [-] | * | [-] |
* O-- FRONT --+ * O-- FRONT --+
*/ */
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 } #define NOZZLE_TO_PROBE_OFFSET { -40.40, -9.00, -2.45 }
// Most probes should stay away from the edges of the bed, but // Most probes should stay away from the edges of the bed, but
// 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 15
// X and Y axis travel speed (mm/min) between probes // X and Y axis travel speed (mm/min) between probes
#define XY_PROBE_FEEDRATE (133*60) #define XY_PROBE_FEEDRATE (150*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)
#define Z_PROBE_FEEDRATE_FAST (4*60) #define Z_PROBE_FEEDRATE_FAST (10*60)
// Feedrate (mm/min) for the "accurate" probe of each point // Feedrate (mm/min) for the "accurate" probe of each point
#define Z_PROBE_FEEDRATE_SLOW (Z_PROBE_FEEDRATE_FAST / 2) #define Z_PROBE_FEEDRATE_SLOW (Z_PROBE_FEEDRATE_FAST / 2)
@@ -1553,7 +1561,7 @@
* 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 // Z Clearance for Deploy/Stow #define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points #define Z_CLEARANCE_BETWEEN_PROBES 3 // Z Clearance between probe points
#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes #define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done //#define Z_AFTER_PROBING 5 // Z position after probing is done
@@ -1587,12 +1595,12 @@
//#define PROBING_FANS_OFF // Turn fans off when probing //#define PROBING_FANS_OFF // Turn fans off when probing
//#define PROBING_ESTEPPERS_OFF // Turn all extruder steppers off when probing //#define PROBING_ESTEPPERS_OFF // Turn all extruder steppers off when probing
//#define PROBING_STEPPERS_OFF // Turn all steppers off (unless needed to hold position) when probing (including extruders) //#define PROBING_STEPPERS_OFF // Turn all steppers off (unless needed to hold position) when probing (including extruders)
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors #define DELAY_BEFORE_PROBING 350 // (ms) To prevent vibrations from triggering piezo sensors
// Require minimum nozzle and/or bed temperature for probing // Require minimum nozzle and/or bed temperature for probing
//#define PREHEAT_BEFORE_PROBING //#define PREHEAT_BEFORE_PROBING
#if ENABLED(PREHEAT_BEFORE_PROBING) #if ENABLED(PREHEAT_BEFORE_PROBING)
#define PROBING_NOZZLE_TEMP 120 // (°C) Only applies to E0 at this time #define PROBING_NOZZLE_TEMP 180 // (°C) Only applies to E0 at this time
#define PROBING_BED_TEMP 50 #define PROBING_BED_TEMP 50
#endif #endif
@@ -1629,10 +1637,10 @@
#define DISABLE_E false // Disable the extruder when not stepping #define DISABLE_E false // Disable the extruder when not stepping
#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled #define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled
// @section machine // @section motion
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false #define INVERT_X_DIR true
#define INVERT_Y_DIR true #define INVERT_Y_DIR true
#define INVERT_Z_DIR false #define INVERT_Z_DIR false
//#define INVERT_I_DIR false //#define INVERT_I_DIR false
@@ -1645,7 +1653,7 @@
// @section extruder // @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false. // For direct drive extruder v9 set to true, for geared extruder set to false.
#define INVERT_E0_DIR false #define INVERT_E0_DIR true
#define INVERT_E1_DIR false #define INVERT_E1_DIR false
#define INVERT_E2_DIR false #define INVERT_E2_DIR false
#define INVERT_E3_DIR false #define INVERT_E3_DIR false
@@ -1686,8 +1694,8 @@
// @section geometry // @section geometry
// The size of the printable area // The size of the printable area
#define X_BED_SIZE 200 #define X_BED_SIZE 230
#define Y_BED_SIZE 200 #define Y_BED_SIZE 230
// Travel limits (linear=mm, rotational=°) after homing, corresponding to endstop positions. // Travel limits (linear=mm, rotational=°) after homing, corresponding to endstop positions.
#define X_MIN_POS 0 #define X_MIN_POS 0
@@ -1695,7 +1703,7 @@
#define Z_MIN_POS 0 #define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE #define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE #define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 200 #define Z_MAX_POS 250
//#define I_MIN_POS 0 //#define I_MIN_POS 0
//#define I_MAX_POS 50 //#define I_MAX_POS 50
//#define J_MIN_POS 0 //#define J_MIN_POS 0
@@ -1763,9 +1771,9 @@
* RAMPS-based boards use SERVO3_PIN for the first runout sensor. * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
* For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc. * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
*/ */
//#define FILAMENT_RUNOUT_SENSOR #define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR) #if ENABLED(FILAMENT_RUNOUT_SENSOR)
#define FIL_RUNOUT_ENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500. #define FIL_RUNOUT_ENABLED_DEFAULT false // Enable the sensor on startup. Override with M412 followed by M500.
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_STATE LOW // Pin state indicating that filament is NOT present. #define FIL_RUNOUT_STATE LOW // Pin state indicating that filament is NOT present.
@@ -1865,7 +1873,7 @@
*/ */
//#define AUTO_BED_LEVELING_3POINT //#define AUTO_BED_LEVELING_3POINT
//#define AUTO_BED_LEVELING_LINEAR //#define AUTO_BED_LEVELING_LINEAR
//#define AUTO_BED_LEVELING_BILINEAR #define AUTO_BED_LEVELING_BILINEAR
//#define AUTO_BED_LEVELING_UBL //#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING //#define MESH_BED_LEVELING
@@ -1874,13 +1882,13 @@
* these options to restore the prior leveling state or to always enable * these options to restore the prior leveling state or to always enable
* leveling immediately after G28. * leveling immediately after G28.
*/ */
//#define RESTORE_LEVELING_AFTER_G28 #define RESTORE_LEVELING_AFTER_G28
//#define ENABLE_LEVELING_AFTER_G28 //#define ENABLE_LEVELING_AFTER_G28
/** /**
* Auto-leveling needs preheating * Auto-leveling needs preheating
*/ */
//#define PREHEAT_BEFORE_LEVELING #define PREHEAT_BEFORE_LEVELING
#if ENABLED(PREHEAT_BEFORE_LEVELING) #if ENABLED(PREHEAT_BEFORE_LEVELING)
#define LEVELING_NOZZLE_TEMP 120 // (°C) Only applies to E0 at this time #define LEVELING_NOZZLE_TEMP 120 // (°C) Only applies to E0 at this time
#define LEVELING_BED_TEMP 50 #define LEVELING_BED_TEMP 50
@@ -1908,24 +1916,28 @@
#endif #endif
#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) #if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL)
// Gradually reduce leveling correction until a set height is reached, /**
// at which point movement will be level to the machine's XY plane. * Gradually reduce leveling correction until a set height is reached,
// The height can be set with M420 Z<height> * at which point movement will be level to the machine's XY plane.
* The height can be set with M420 Z<height>
*/
#define ENABLE_LEVELING_FADE_HEIGHT #define ENABLE_LEVELING_FADE_HEIGHT
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
#define DEFAULT_LEVELING_FADE_HEIGHT 10.0 // (mm) Default fade height. #define DEFAULT_LEVELING_FADE_HEIGHT 0.0 // (mm) Default fade height.
#endif #endif
// For Cartesian machines, instead of dividing moves on mesh boundaries, /**
// split up moves into short segments like a Delta. This follows the * For Cartesian machines, instead of dividing moves on mesh boundaries,
// contours of the bed more closely than edge-to-edge straight moves. * split up moves into short segments like a Delta. This follows the
* contours of the bed more closely than edge-to-edge straight moves.
*/
#define SEGMENT_LEVELED_MOVES #define SEGMENT_LEVELED_MOVES
#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
/** /**
* Enable the G26 Mesh Validation Pattern tool. * Enable the G26 Mesh Validation Pattern tool.
*/ */
//#define G26_MESH_VALIDATION #define G26_MESH_VALIDATION
#if ENABLED(G26_MESH_VALIDATION) #if ENABLED(G26_MESH_VALIDATION)
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle. #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for G26. #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for G26.
@@ -1951,7 +1963,7 @@
// Beyond the probed grid, continue the implied tilt? // Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge. // Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID #define EXTRAPOLATE_BEYOND_GRID
// //
// Experimental Subdivision of the grid by Catmull-Rom method. // Experimental Subdivision of the grid by Catmull-Rom method.
@@ -1971,10 +1983,10 @@
//========================= Unified Bed Leveling ============================ //========================= Unified Bed Leveling ============================
//=========================================================================== //===========================================================================
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh #define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
#define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed #define MESH_INSET 35 // Set Mesh bounds as an inset region of the bed
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_X 3 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
//#define UBL_HILBERT_CURVE // Use Hilbert distribution for less travel when probing multiple points //#define UBL_HILBERT_CURVE // Use Hilbert distribution for less travel when probing multiple points
@@ -1985,7 +1997,7 @@
//#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
// as the Z-Height correction value. // as the Z-Height correction value.
//#define UBL_MESH_WIZARD // Run several commands in a row to get a complete mesh #define UBL_MESH_WIZARD // Run several commands in a row to get a complete mesh
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)
@@ -2005,7 +2017,7 @@
* Add a bed leveling sub-menu for ABL or MBL. * Add a bed leveling sub-menu for ABL or MBL.
* Include a guided procedure if manual probing is enabled. * Include a guided procedure if manual probing is enabled.
*/ */
//#define LCD_BED_LEVELING #define LCD_BED_LEVELING
#if ENABLED(LCD_BED_LEVELING) #if ENABLED(LCD_BED_LEVELING)
#define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis. #define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis.
@@ -2078,7 +2090,7 @@
* - Allows Z homing only when XY positions are known and trusted. * - Allows Z homing only when XY positions are known and trusted.
* - If stepper drivers sleep, XY homing may be required again before Z homing. * - If stepper drivers sleep, XY homing may be required again before Z homing.
*/ */
//#define Z_SAFE_HOMING #define Z_SAFE_HOMING
#if ENABLED(Z_SAFE_HOMING) #if ENABLED(Z_SAFE_HOMING)
#define Z_SAFE_HOMING_X_POINT X_CENTER // X point for Z homing #define Z_SAFE_HOMING_X_POINT X_CENTER // X point for Z homing
@@ -2086,7 +2098,7 @@
#endif #endif
// 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 { (100*60), (100*60), (10*60) }
// Validate that endstops are triggered on homing moves // Validate that endstops are triggered on homing moves
#define VALIDATE_HOMING_ENDSTOPS #define VALIDATE_HOMING_ENDSTOPS
@@ -2129,8 +2141,7 @@
#define XY_DIAG_BD 282.8427124746 #define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200 #define XY_SIDE_AD 200
// Or, set the default skew factors directly here // Or, set the XY skew factor directly:
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0 #define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z //#define SKEW_CORRECTION_FOR_Z
@@ -2140,6 +2151,8 @@
#define YZ_DIAG_AC 282.8427124746 #define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746 #define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200 #define YZ_SIDE_AD 200
// Or, set the Z skew factors directly:
#define XZ_SKEW_FACTOR 0.0 #define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0 #define YZ_SKEW_FACTOR 0.0
#endif #endif
@@ -2163,12 +2176,12 @@
* M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes)
* M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.)
*/ */
//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 #define EEPROM_SETTINGS // Persistent storage with M500 and M501
//#define DISABLE_M503 // Saves ~2700 bytes of flash. Disable for release! //#define DISABLE_M503 // Saves ~2700 bytes of flash. Disable for release!
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. #define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
#define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load #define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS)
//#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. #define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors.
//#define EEPROM_INIT_NOW // Init EEPROM on first boot after a new build. //#define EEPROM_INIT_NOW // Init EEPROM on first boot after a new build.
#endif #endif
@@ -2199,19 +2212,19 @@
// @section temperature // @section temperature
// //
// Preheat Constants - Up to 6 are supported without changes // Preheat Constants - Up to 10 are supported without changes
// //
#define PREHEAT_1_LABEL "PLA" #define PREHEAT_1_LABEL "PLA"
#define PREHEAT_1_TEMP_HOTEND 180 #define PREHEAT_1_TEMP_HOTEND 185
#define PREHEAT_1_TEMP_BED 70 #define PREHEAT_1_TEMP_BED 45
#define PREHEAT_1_TEMP_CHAMBER 35 #define PREHEAT_1_TEMP_CHAMBER 35
#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 #define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255
#define PREHEAT_2_LABEL "ABS" #define PREHEAT_2_LABEL "ABS"
#define PREHEAT_2_TEMP_HOTEND 240 #define PREHEAT_2_TEMP_HOTEND 240
#define PREHEAT_2_TEMP_BED 110 #define PREHEAT_2_TEMP_BED 70
#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 255 // Value from 0 to 255
// @section motion // @section motion
@@ -2226,7 +2239,7 @@
* P1 Raise the nozzle always to Z-park height. * P1 Raise the nozzle always to Z-park height.
* P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
*/ */
//#define NOZZLE_PARK_FEATURE #define NOZZLE_PARK_FEATURE
#if ENABLED(NOZZLE_PARK_FEATURE) #if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z_raise } // Specify a park position as { X, Y, Z_raise }
@@ -2357,7 +2370,7 @@
*/ */
//#define PRINTCOUNTER //#define PRINTCOUNTER
#if ENABLED(PRINTCOUNTER) #if ENABLED(PRINTCOUNTER)
#define PRINTCOUNTER_SAVE_INTERVAL 60 // (minutes) EEPROM save interval during print #define PRINTCOUNTER_SAVE_INTERVAL 60 // (minutes) EEPROM save interval during print. A value of 0 will save stats at end of print.
#endif #endif
// @section security // @section security
@@ -2448,7 +2461,7 @@
* SD Card support is disabled by default. If your controller has an SD slot, * SD Card support is disabled by default. If your controller has an SD slot,
* you must uncomment the following option or it won't work. * you must uncomment the following option or it won't work.
*/ */
//#define SDSUPPORT #define SDSUPPORT
/** /**
* SD CARD: ENABLE CRC * SD CARD: ENABLE CRC
@@ -2537,7 +2550,7 @@
// If you have a speaker that can produce tones, enable it here. // If you have a speaker that can produce tones, enable it here.
// By default Marlin assumes you have a buzzer with a fixed frequency. // By default Marlin assumes you have a buzzer with a fixed frequency.
// //
//#define SPEAKER #define SPEAKER
// //
// The duration and frequency for the UI feedback sound. // The duration and frequency for the UI feedback sound.
@@ -2546,8 +2559,8 @@
// Note: Test audio output with the G-Code: // Note: Test audio output with the G-Code:
// M300 S<frequency Hz> P<duration ms> // M300 S<frequency Hz> P<duration ms>
// //
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 0
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000 #define LCD_FEEDBACK_FREQUENCY_HZ 5000
//============================================================================= //=============================================================================
//======================== LCD / Controller Selection ========================= //======================== LCD / Controller Selection =========================
@@ -2640,7 +2653,7 @@
// //
// Elefu RA Board Control Panel // Elefu RA Board Control Panel
// http://www.elefu.com/index.php?route=product/product&product_id=53 // https://web.archive.org/web/20140823033947/http://www.elefu.com/index.php?route=product/product&product_id=53
// //
//#define RA_CONTROL_PANEL //#define RA_CONTROL_PANEL
@@ -2728,7 +2741,7 @@
// //
// ReprapWorld Graphical LCD // ReprapWorld Graphical LCD
// https://reprapworld.com/?products_details&products_id/1218 // https://reprapworld.com/electronics/3d-printer-modules/autonomous-printing/graphical-lcd-screen-v1-0/
// //
//#define REPRAPWORLD_GRAPHICAL_LCD //#define REPRAPWORLD_GRAPHICAL_LCD
@@ -2826,7 +2839,7 @@
// This is RAMPS-compatible using a single 10-pin connector. // This is RAMPS-compatible using a single 10-pin connector.
// (For CR-10 owners who want to replace the Melzi Creality board but retain the display) // (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
// //
//#define CR10_STOCKDISPLAY #define CR10_STOCKDISPLAY
// //
// Ender-2 OEM display, a variant of the MKS_MINI_12864 // Ender-2 OEM display, a variant of the MKS_MINI_12864
@@ -2983,6 +2996,7 @@
//#define ANYCUBIC_LCD_CHIRON //#define ANYCUBIC_LCD_CHIRON
#if EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON) #if EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
//#define ANYCUBIC_LCD_DEBUG //#define ANYCUBIC_LCD_DEBUG
//#define ANYCUBIC_LCD_GCODE_EXT // Add ".gcode" to menu entries for DGUS clone compatibility
#endif #endif
// //
@@ -3051,7 +3065,7 @@
//#define MKS_ROBIN_TFT_V1_1R //#define MKS_ROBIN_TFT_V1_1R
// //
// 480x320, 3.5", FSMC Stock Display from TronxXY // 480x320, 3.5", FSMC Stock Display from Tronxy
// //
//#define TFT_TRONXY_X5SA //#define TFT_TRONXY_X5SA
@@ -3118,6 +3132,10 @@
//#define TFT_COLOR_UI //#define TFT_COLOR_UI
//#define TFT_LVGL_UI //#define TFT_LVGL_UI
#if ENABLED(TFT_COLOR_UI)
//#define TFT_SHARED_SPI // SPI is shared between TFT display and other devices. Disable async data transfer
#endif
#if ENABLED(TFT_LVGL_UI) #if ENABLED(TFT_LVGL_UI)
//#define MKS_WIFI_MODULE // MKS WiFi module //#define MKS_WIFI_MODULE // MKS WiFi module
#endif #endif
@@ -3150,10 +3168,11 @@
// //
//#define TOUCH_SCREEN //#define TOUCH_SCREEN
#if ENABLED(TOUCH_SCREEN) #if ENABLED(TOUCH_SCREEN)
#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 TOUCH_IDLE_SLEEP 300 // (s) Turn off the TFT backlight if set (5mn) //#define DISABLE_ENCODER // Disable the click encoder, if any
//#define TOUCH_IDLE_SLEEP_MINS 5 // (minutes) Display Sleep after a period of inactivity. Set with M255 S.
#define TOUCH_SCREEN_CALIBRATION #define TOUCH_SCREEN_CALIBRATION
@@ -3197,7 +3216,7 @@
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not as annoying as with the hardware PWM. On the other hand, if this frequency // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE. // is too low, you should also increment SOFT_PWM_SCALE.
//#define FAN_SOFT_PWM #define FAN_SOFT_PWM
// Incrementing this by 1 will double the software PWM frequency, // Incrementing this by 1 will double the software PWM frequency,
// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
@@ -3244,16 +3263,19 @@
* luminance values can be set from 0 to 255. * luminance values can be set from 0 to 255.
* For NeoPixel LED an overall brightness parameter is also available. * For NeoPixel LED an overall brightness parameter is also available.
* *
* *** CAUTION *** * === CAUTION ===
* LED Strips require a MOSFET Chip between PWM lines and LEDs, * LED Strips require a MOSFET Chip between PWM lines and LEDs,
* as the Arduino cannot handle the current the LEDs will require. * as the Arduino cannot handle the current the LEDs will require.
* Failure to follow this precaution can destroy your Arduino! * Failure to follow this precaution can destroy your Arduino!
*
* NOTE: A separate 5V power supply is required! The NeoPixel LED needs * NOTE: A separate 5V power supply is required! The NeoPixel LED needs
* more current than the Arduino 5V linear regulator can produce. * more current than the Arduino 5V linear regulator can produce.
* *** CAUTION ***
* *
* LED Type. Enable only one of the following two options. * Requires PWM frequency between 50 <> 100Hz (Check HAL or variant)
* Use FAST_PWM_FAN, if possible, to reduce fan noise.
*/ */
// LED Type. Enable only one of the following two options:
//#define RGB_LED //#define RGB_LED
//#define RGBW_LED //#define RGBW_LED
@@ -3262,6 +3284,10 @@
//#define RGB_LED_G_PIN 43 //#define RGB_LED_G_PIN 43
//#define RGB_LED_B_PIN 35 //#define RGB_LED_B_PIN 35
//#define RGB_LED_W_PIN -1 //#define RGB_LED_W_PIN -1
//#define RGB_STARTUP_TEST // For PWM pins, fade between all colors
#if ENABLED(RGB_STARTUP_TEST)
#define RGB_STARTUP_TEST_INNER_MS 10 // (ms) Reduce or increase fading speed
#endif
#endif #endif
// Support for Adafruit NeoPixel LED driver // Support for Adafruit NeoPixel LED driver
@@ -3283,6 +3309,7 @@
#define NEOPIXEL2_PIXELS 15 // Number of LEDs in the second strip #define NEOPIXEL2_PIXELS 15 // Number of LEDs in the second strip
#define NEOPIXEL2_BRIGHTNESS 127 // Initial brightness (0-255) #define NEOPIXEL2_BRIGHTNESS 127 // Initial brightness (0-255)
#define NEOPIXEL2_STARTUP_TEST // Cycle through colors at startup #define NEOPIXEL2_STARTUP_TEST // Cycle through colors at startup
#define NEOPIXEL_M150_DEFAULT -1 // Default strip for M150 without 'S'. Use -1 to set all by default.
#else #else
//#define NEOPIXEL2_INSERIES // Default behavior is NeoPixel 2 in parallel //#define NEOPIXEL2_INSERIES // Default behavior is NeoPixel 2 in parallel
#endif #endif

File diff suppressed because it is too large Load Diff

View File

@@ -307,20 +307,22 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1154)
else ifeq ($(HARDWARE_MOTHERBOARD),1155) else ifeq ($(HARDWARE_MOTHERBOARD),1155)
# Tenlog D3 Hero IDEX printer # Tenlog D3 Hero IDEX printer
else ifeq ($(HARDWARE_MOTHERBOARD),1156) else ifeq ($(HARDWARE_MOTHERBOARD),1156)
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed) # Tenlog D3,5,6 Pro IDEX printers
else ifeq ($(HARDWARE_MOTHERBOARD),1157) 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, Fan, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),1158) 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: Hotend0, Hotend1, Hotend2, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),1159) else ifeq ($(HARDWARE_MOTHERBOARD),1159)
# Longer LK1 PRO / Alfawise U20 Pro (PRO version) # Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),1160) else ifeq ($(HARDWARE_MOTHERBOARD),1160)
# Longer LKx PRO / Alfawise Uxx Pro (PRO version) # Longer LK1 PRO / Alfawise U20 Pro (PRO version)
else ifeq ($(HARDWARE_MOTHERBOARD),1161) else ifeq ($(HARDWARE_MOTHERBOARD),1161)
# Zonestar zrib V5.3 (Chinese RAMPS replica) # Longer LKx PRO / Alfawise Uxx Pro (PRO version)
else ifeq ($(HARDWARE_MOTHERBOARD),1162) else ifeq ($(HARDWARE_MOTHERBOARD),1162)
# Pxmalion Core I3 # Zonestar zrib V5.3 (Chinese RAMPS replica)
else ifeq ($(HARDWARE_MOTHERBOARD),1163) else ifeq ($(HARDWARE_MOTHERBOARD),1163)
# Pxmalion Core I3
else ifeq ($(HARDWARE_MOTHERBOARD),1164)
# #
# RAMBo and derivatives # RAMBo and derivatives

View File

@@ -28,7 +28,7 @@
/** /**
* Marlin release version identifier * Marlin release version identifier
*/ */
//#define SHORT_BUILD_VERSION "2.1.1.1" //#define SHORT_BUILD_VERSION "2.1.0.2"
/** /**
* Verbose version identifier which should contain a reference to the location * Verbose version identifier which should contain a reference to the location
@@ -41,12 +41,13 @@
* 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 "2023-07-20" //#define STRING_DISTRIBUTION_DATE "2023-12-08"
/** /**
* 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.
*/ */
//#define MACHINE_NAME "3D Printer" #define MACHINE_NAME "sv3dprt01.sv.loc"
#define MACHINE_NAME "sv3dprt01.sv.loc"
/** /**
* The SOURCE_CODE_URL is the location where users will find the Marlin Source * The SOURCE_CODE_URL is the location where users will find the Marlin Source
@@ -54,7 +55,8 @@
* has a distinct Github fork— the Source Code URL should just be the main * has a distinct Github fork— the Source Code URL should just be the main
* Marlin repository. * Marlin repository.
*/ */
//#define SOURCE_CODE_URL "github.com/MarlinFirmware/Marlin" #define SOURCE_CODE_URL "https://git.soost.dev/me/Marlin"
#define SOURCE_CODE_URL "https://git.soost.dev/me/Marlin"
/** /**
* Default generic printer UUID. * Default generic printer UUID.
@@ -65,7 +67,8 @@
* The WEBSITE_URL is the location where users can get more information such as * The WEBSITE_URL is the location where users can get more information such as
* documentation about a specific Marlin release. * documentation about a specific Marlin release.
*/ */
//#define WEBSITE_URL "marlinfw.org" //define WEBSITE_URL "https://soo.st"
//define WEBSITE_URL "https://soo.st"
/** /**
* Set the vendor info the serial USB interface, if changable * Set the vendor info the serial USB interface, if changable

50
Marlin/_Bootscreen.h Normal file
View File

@@ -0,0 +1,50 @@
/**
* Made with Marlin Bitmap Converter
* https://marlinfw.org/tools/u8glib/converter.html
*
* This bitmap from the file 'd2.png'
*/
#pragma once
#define CUSTOM_BOOTSCREEN_BMPWIDTH 128
const unsigned char custom_start_bmp[] PROGMEM = {
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xF3,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0x00,0x7C,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x3F,0xFF,0xFF,0xFC,0x00,0x1C,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x1F,0xFF,0xFF,0xF8,0x00,0x0C,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xE0,0x00,0x00,0x07,0xFF,0xFF,0xF8,0x00,0x1C,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,0x0F,0xC0,0x07,0xFF,0xFF,0xF0,0x00,0x3C,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x3F,0xF8,0x03,0xFF,0xFF,0xF0,0x3E,0x7F,0xF0,0x3F,
0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0xFF,0xFC,0x01,0xFF,0xFF,0xF0,0x1F,0xFF,0xF0,0x3F,
0xFF,0xFF,0xFF,0xFF,0xFE,0x01,0xFF,0xFF,0x00,0xFF,0xFF,0xF0,0x07,0xFF,0xF0,0x3F,
0xFF,0xFF,0xFF,0xFF,0xFE,0x03,0xFF,0xFF,0x80,0xFF,0xFF,0xF8,0x01,0xFF,0xF0,0x3F,
0xFF,0xFF,0x01,0xFF,0xFC,0x03,0xE0,0x3F,0x80,0x7F,0xFF,0xF8,0x00,0x7F,0xF0,0x3F,
0xFF,0xFC,0x00,0xFF,0xF8,0x07,0xC0,0x0F,0xC0,0x7F,0xFF,0xFC,0x00,0x1F,0xF0,0x3F,
0xFF,0xF8,0x00,0x7F,0xF8,0x0F,0x80,0x07,0xE0,0x7F,0xFF,0xFE,0x00,0x0F,0xF0,0x3F,
0xFF,0xF0,0x00,0x3F,0xF0,0x1F,0x00,0x03,0xE0,0x3F,0xFF,0xFF,0x80,0x0F,0xF0,0x3F,
0xFF,0xF0,0x00,0x1F,0xE0,0x1E,0x00,0x03,0xE0,0x3F,0xC1,0xFF,0xF0,0x0F,0xF0,0x3F,
0x03,0xE0,0x00,0x1F,0xE0,0x3E,0x00,0x01,0xF0,0x3F,0x80,0xFF,0xFC,0x0F,0xF0,0x3F,
0x03,0xE0,0x00,0x1F,0xC0,0x3C,0x00,0x01,0xF0,0x3F,0x00,0xFC,0x7C,0x0F,0xF0,0x3F,
0x03,0xE0,0x00,0x1F,0x80,0x7C,0x00,0x01,0xF0,0x3F,0x00,0x78,0x00,0x0F,0xF0,0x3F,
0x03,0xE0,0x00,0x1F,0x80,0xFC,0x00,0x01,0xF0,0x3F,0x00,0x70,0x00,0x0F,0xF0,0x3F,
0x03,0xE0,0x00,0x1F,0x00,0xFC,0x00,0x01,0xF0,0x3F,0x00,0xE0,0x00,0x1F,0xF0,0x3F,
0x03,0xE0,0x00,0x1F,0x01,0xFE,0x00,0x01,0xF0,0x3F,0x80,0xF8,0x00,0x3F,0xF0,0x3F,
0x03,0xE0,0x00,0x1E,0x03,0xFE,0x00,0x03,0xFF,0xFF,0xC1,0xFC,0x00,0x7F,0xF0,0x3F,
0x01,0xF0,0x00,0x3C,0x03,0xFF,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xE7,0xFF,0xFF,0xFF,
0x81,0xF8,0x00,0x7C,0x07,0xFF,0x00,0x07,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x80,0xFC,0x00,0xF8,0x07,0xFF,0x80,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x80,0xFE,0x01,0xF0,0x0F,0xFF,0xE0,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xC0,0x7F,0xFF,0xE0,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xC0,0x3F,0xFF,0xC0,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xE0,0x1F,0xFF,0x80,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xF0,0x07,0xFF,0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xF0,0x01,0xFC,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xF8,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFC,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0x00,0x00,0x07,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0x80,0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xE0,0x00,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFC,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
};

View File

@@ -32,6 +32,7 @@
#include <HardwareSerial.h> #include <HardwareSerial.h>
#else #else
#include "MarlinSerial.h" #include "MarlinSerial.h"
#define BOARD_NO_NATIVE_USB
#endif #endif
#include <stdint.h> #include <stdint.h>
@@ -106,36 +107,36 @@ typedef Servo hal_servo_t;
#define MYSERIAL1 TERN(BLUETOOTH, btSerial, MSerial0) #define MYSERIAL1 TERN(BLUETOOTH, btSerial, MSerial0)
#else #else
#if !WITHIN(SERIAL_PORT, -1, 3) #if !WITHIN(SERIAL_PORT, 0, 3)
#error "SERIAL_PORT must be from 0 to 3, or -1 for USB Serial." #error "SERIAL_PORT must be from 0 to 3."
#endif #endif
#define MYSERIAL1 customizedSerial1 #define MYSERIAL1 customizedSerial1
#ifdef SERIAL_PORT_2 #ifdef SERIAL_PORT_2
#if !WITHIN(SERIAL_PORT_2, -1, 3) #if !WITHIN(SERIAL_PORT_2, 0, 3)
#error "SERIAL_PORT_2 must be from 0 to 3, or -1 for USB Serial." #error "SERIAL_PORT_2 must be from 0 to 3."
#endif #endif
#define MYSERIAL2 customizedSerial2 #define MYSERIAL2 customizedSerial2
#endif #endif
#ifdef SERIAL_PORT_3 #ifdef SERIAL_PORT_3
#if !WITHIN(SERIAL_PORT_3, -1, 3) #if !WITHIN(SERIAL_PORT_3, 0, 3)
#error "SERIAL_PORT_3 must be from 0 to 3, or -1 for USB Serial." #error "SERIAL_PORT_3 must be from 0 to 3."
#endif #endif
#define MYSERIAL3 customizedSerial3 #define MYSERIAL3 customizedSerial3
#endif #endif
#endif #endif
#ifdef MMU2_SERIAL_PORT #ifdef MMU2_SERIAL_PORT
#if !WITHIN(MMU2_SERIAL_PORT, -1, 3) #if !WITHIN(MMU2_SERIAL_PORT, 0, 3)
#error "MMU2_SERIAL_PORT must be from 0 to 3, or -1 for USB Serial." #error "MMU2_SERIAL_PORT must be from 0 to 3"
#endif #endif
#define MMU2_SERIAL mmuSerial #define MMU2_SERIAL mmuSerial
#endif #endif
#ifdef LCD_SERIAL_PORT #ifdef LCD_SERIAL_PORT
#if !WITHIN(LCD_SERIAL_PORT, -1, 3) #if !WITHIN(LCD_SERIAL_PORT, 0, 3)
#error "LCD_SERIAL_PORT must be from 0 to 3, or -1 for USB Serial." #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 HAS_DGUS_LCD

View File

@@ -23,6 +23,10 @@
#include "../../inc/MarlinConfig.h" #include "../../inc/MarlinConfig.h"
//#define DEBUG_AVR_FAST_PWM
#define DEBUG_OUT ENABLED(DEBUG_AVR_FAST_PWM)
#include "../../core/debug_out.h"
struct Timer { struct Timer {
volatile uint8_t* TCCRnQ[3]; // max 3 TCCR registers per timer volatile uint8_t* TCCRnQ[3]; // max 3 TCCR registers per timer
volatile uint16_t* OCRnQ[3]; // max 3 OCR registers per timer volatile uint16_t* OCRnQ[3]; // max 3 OCR registers per timer
@@ -108,12 +112,15 @@ const Timer get_pwm_timer(const pin_t pin) {
} }
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) {
DEBUG_ECHOLNPGM("set_pwm_frequency(pin=", pin, ", freq=", f_desired, ")");
const Timer timer = get_pwm_timer(pin); const Timer timer = get_pwm_timer(pin);
if (timer.isProtected || !timer.isPWM) return; // Don't proceed if protected timer or not recognized if (timer.isProtected || !timer.isPWM) return; // Don't proceed if protected timer or not recognized
const bool is_timer2 = timer.n == 2; const bool is_timer2 = timer.n == 2;
const uint16_t maxtop = is_timer2 ? 0xFF : 0xFFFF; const uint16_t maxtop = is_timer2 ? 0xFF : 0xFFFF;
DEBUG_ECHOLNPGM("maxtop=", maxtop);
uint16_t res = 0xFF; // resolution (TOP value) uint16_t res = 0xFF; // resolution (TOP value)
uint8_t j = CS_NONE; // prescaler index uint8_t j = CS_NONE; // prescaler index
uint8_t wgm = WGM_PWM_PC_8; // waveform generation mode uint8_t wgm = WGM_PWM_PC_8; // waveform generation mode
@@ -121,23 +128,29 @@ void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
// Calculating the prescaler and resolution to use to achieve closest frequency // Calculating the prescaler and resolution to use to achieve closest frequency
if (f_desired != 0) { if (f_desired != 0) {
constexpr uint16_t prescaler[] = { 1, 8, (32), 64, (128), 256, 1024 }; // (*) are Timer 2 only constexpr uint16_t prescaler[] = { 1, 8, (32), 64, (128), 256, 1024 }; // (*) are Timer 2 only
uint16_t f = (F_CPU) / (2 * 1024 * maxtop) + 1; // Start with the lowest non-zero frequency achievable (1 or 31) uint16_t f = (F_CPU) / (uint32_t(maxtop) << 11) + 1; // Start with the lowest non-zero frequency achievable (for 16MHz, 1 or 31)
DEBUG_ECHOLNPGM("f=", f);
DEBUG_ECHOLNPGM("(prescaler loop)");
LOOP_L_N(i, COUNT(prescaler)) { // Loop through all prescaler values LOOP_L_N(i, COUNT(prescaler)) { // Loop through all prescaler values
const uint16_t p = prescaler[i]; const uint32_t p = prescaler[i]; // Extend to 32 bits for calculations
DEBUG_ECHOLNPGM("prescaler[", i, "]=", p);
uint16_t res_fast_temp, res_pc_temp; uint16_t res_fast_temp, res_pc_temp;
if (is_timer2) { if (is_timer2) {
#if ENABLED(USE_OCR2A_AS_TOP) // No resolution calculation for TIMER2 unless enabled USE_OCR2A_AS_TOP #if ENABLED(USE_OCR2A_AS_TOP) // No resolution calculation for TIMER2 unless enabled USE_OCR2A_AS_TOP
const uint16_t rft = (F_CPU) / (p * f_desired); const uint16_t rft = (F_CPU) / (p * f_desired);
res_fast_temp = rft - 1; res_fast_temp = rft - 1;
res_pc_temp = rft / 2; res_pc_temp = rft / 2;
DEBUG_ECHOLNPGM("(Timer2) res_fast_temp=", res_fast_temp, " res_pc_temp=", res_pc_temp);
#else #else
res_fast_temp = res_pc_temp = maxtop; res_fast_temp = res_pc_temp = maxtop;
DEBUG_ECHOLNPGM("(Timer2) res_fast_temp=", maxtop, " res_pc_temp=", maxtop);
#endif #endif
} }
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);
res_fast_temp = rft - 1; res_fast_temp = rft - 1;
res_pc_temp = rft / 2; res_pc_temp = rft / 2;
} }
@@ -146,24 +159,28 @@ void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
LIMIT(res_pc_temp, 1U, maxtop); LIMIT(res_pc_temp, 1U, maxtop);
// Calculate frequencies of test prescaler and resolution values // Calculate frequencies of test prescaler and resolution values
const uint32_t f_diff = _MAX(f, f_desired) - _MIN(f, f_desired), const uint16_t f_fast_temp = (F_CPU) / (p * (1 + res_fast_temp)),
f_fast_temp = (F_CPU) / (p * (1 + res_fast_temp)), f_pc_temp = (F_CPU) / ((p * res_pc_temp) << 1),
f_diff = _MAX(f, f_desired) - _MIN(f, f_desired),
f_fast_diff = _MAX(f_fast_temp, f_desired) - _MIN(f_fast_temp, f_desired), f_fast_diff = _MAX(f_fast_temp, f_desired) - _MIN(f_fast_temp, f_desired),
f_pc_temp = (F_CPU) / (2 * p * res_pc_temp),
f_pc_diff = _MAX(f_pc_temp, f_desired) - _MIN(f_pc_temp, f_desired); f_pc_diff = _MAX(f_pc_temp, f_desired) - _MIN(f_pc_temp, f_desired);
DEBUG_ECHOLNPGM("f_fast_temp=", f_fast_temp, " f_pc_temp=", f_pc_temp, " f_diff=", f_diff, " f_fast_diff=", f_fast_diff, " f_pc_diff=", f_pc_diff);
if (f_fast_diff < f_diff && f_fast_diff <= f_pc_diff) { // FAST values are closest to desired f if (f_fast_diff < f_diff && f_fast_diff <= f_pc_diff) { // FAST values are closest to desired f
// Set the Wave Generation Mode to FAST PWM // Set the Wave Generation Mode to FAST PWM
wgm = is_timer2 ? uint8_t(TERN(USE_OCR2A_AS_TOP, WGM2_FAST_PWM_OCR2A, WGM2_FAST_PWM)) : uint8_t(WGM_FAST_PWM_ICRn); wgm = is_timer2 ? uint8_t(TERN(USE_OCR2A_AS_TOP, WGM2_FAST_PWM_OCR2A, WGM2_FAST_PWM)) : uint8_t(WGM_FAST_PWM_ICRn);
// Remember this combination // Remember this combination
f = f_fast_temp; res = res_fast_temp; j = i + 1; f = f_fast_temp; res = res_fast_temp; j = i + 1;
DEBUG_ECHOLNPGM("(FAST) updated f=", f);
} }
else if (f_pc_diff < f_diff) { // PHASE CORRECT values are closes to desired f else if (f_pc_diff < f_diff) { // PHASE CORRECT values are closes to desired f
// Set the Wave Generation Mode to PWM PHASE CORRECT // Set the Wave Generation Mode to PWM PHASE CORRECT
wgm = is_timer2 ? uint8_t(TERN(USE_OCR2A_AS_TOP, WGM2_PWM_PC_OCR2A, WGM2_PWM_PC)) : uint8_t(WGM_PWM_PC_ICRn); wgm = is_timer2 ? uint8_t(TERN(USE_OCR2A_AS_TOP, WGM2_PWM_PC_OCR2A, WGM2_PWM_PC)) : uint8_t(WGM_PWM_PC_ICRn);
f = f_pc_temp; res = res_pc_temp; j = i + 1; f = f_pc_temp; res = res_pc_temp; j = i + 1;
DEBUG_ECHOLNPGM("(PHASE) updated f=", f);
} }
} } // prescaler loop
} }
_SET_WGMnQ(timer, wgm); _SET_WGMnQ(timer, wgm);

View File

@@ -293,11 +293,11 @@ enum ClockSource2 : uint8_t {
#if HAS_MOTOR_CURRENT_PWM #if HAS_MOTOR_CURRENT_PWM
#if PIN_EXISTS(MOTOR_CURRENT_PWM_XY) #if PIN_EXISTS(MOTOR_CURRENT_PWM_XY)
#define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_Z || P == MOTOR_CURRENT_PWM_XY) #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E_PIN || P == MOTOR_CURRENT_PWM_E0_PIN || P == MOTOR_CURRENT_PWM_E1_PIN || P == MOTOR_CURRENT_PWM_Z_PIN || P == MOTOR_CURRENT_PWM_XY_PIN)
#elif PIN_EXISTS(MOTOR_CURRENT_PWM_Z) #elif PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
#define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_Z) #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E_PIN || P == MOTOR_CURRENT_PWM_E0_PIN || P == MOTOR_CURRENT_PWM_E1_PIN || P == MOTOR_CURRENT_PWM_Z_PIN)
#else #else
#define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E) #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E_PIN || P == MOTOR_CURRENT_PWM_E0_PIN || P == MOTOR_CURRENT_PWM_E1_PIN)
#endif #endif
#else #else
#define PWM_CHK_MOTOR_CURRENT(P) false #define PWM_CHK_MOTOR_CURRENT(P) false

View File

@@ -27,6 +27,9 @@
* Hardware Pin : 02 03 06 07 01 05 15 16 17 18 23 24 25 26 64 63 13 12 46 45 44 43 78 77 76 75 74 73 72 71 60 59 58 57 56 55 54 53 50 70 52 51 42 41 40 39 38 37 36 35 22 21 20 19 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 | 04 08 09 10 11 14 27 28 29 30 31 32 33 34 47 48 49 61 62 65 66 67 68 69 79 80 81 98 99 100 * Hardware Pin : 02 03 06 07 01 05 15 16 17 18 23 24 25 26 64 63 13 12 46 45 44 43 78 77 76 75 74 73 72 71 60 59 58 57 56 55 54 53 50 70 52 51 42 41 40 39 38 37 36 35 22 21 20 19 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 | 04 08 09 10 11 14 27 28 29 30 31 32 33 34 47 48 49 61 62 65 66 67 68 69 79 80 81 98 99 100
* 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
*
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/ */
#include "../fastio.h" #include "../fastio.h"

View File

@@ -26,6 +26,9 @@
* *
* 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"

View File

@@ -26,6 +26,9 @@
* *
* 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"

View File

@@ -26,6 +26,9 @@
* *
* 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

View File

@@ -27,6 +27,9 @@
* 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 * The logical pins 46 and 47 are not 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"

View File

@@ -20,7 +20,3 @@
* *
*/ */
#pragma once #pragma once
#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/AVR."
#endif

View File

@@ -25,6 +25,10 @@
* Test AVR-specific configuration values for errors at compile-time. * Test AVR-specific configuration values for errors at compile-time.
*/ */
#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/AVR."
#endif
/** /**
* Check for common serial pin conflicts * Check for common serial pin conflicts
*/ */
@@ -37,22 +41,24 @@
|| X_ENA_PIN == N || Y_ENA_PIN == N || Z_ENA_PIN == N \ || X_ENA_PIN == N || Y_ENA_PIN == N || Z_ENA_PIN == N \
|| BTN_EN1 == N || BTN_EN2 == N \ || BTN_EN1 == N || BTN_EN2 == N \
) )
#if CONF_SERIAL_IS(0) #if SERIAL_IN_USE(0)
// D0-D1. No known conflicts. // D0-D1. No known conflicts.
#endif #endif
#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega1284P__) #if SERIAL_IN_USE(1)
#if CONF_SERIAL_IS(1) && (CHECK_SERIAL_PIN(18) || CHECK_SERIAL_PIN(19)) #if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega1284P__)
#error "Serial Port 1 pin D18 and/or D19 conflicts with another pin on the board." #if CHECK_SERIAL_PIN(18) || CHECK_SERIAL_PIN(19)
#endif #error "Serial Port 1 pin D18 and/or D19 conflicts with another pin on the board."
#else #endif
#if CONF_SERIAL_IS(1) && (CHECK_SERIAL_PIN(10) || CHECK_SERIAL_PIN(11)) #else
#error "Serial Port 1 pin D10 and/or D11 conflicts with another pin on the board." #if CHECK_SERIAL_PIN(10) || CHECK_SERIAL_PIN(11)
#error "Serial Port 1 pin D10 and/or D11 conflicts with another pin on the board."
#endif
#endif #endif
#endif #endif
#if CONF_SERIAL_IS(2) && (CHECK_SERIAL_PIN(16) || CHECK_SERIAL_PIN(17)) #if SERIAL_IN_USE(2) && (CHECK_SERIAL_PIN(16) || CHECK_SERIAL_PIN(17))
#error "Serial Port 2 pin D16 and/or D17 conflicts with another pin on the board." #error "Serial Port 2 pin D16 and/or D17 conflicts with another pin on the board."
#endif #endif
#if CONF_SERIAL_IS(3) && (CHECK_SERIAL_PIN(14) || CHECK_SERIAL_PIN(15)) #if SERIAL_IN_USE(3) && (CHECK_SERIAL_PIN(14) || CHECK_SERIAL_PIN(15))
#error "Serial Port 3 pin D14 and/or D15 conflicts with another pin on the board." #error "Serial Port 3 pin D14 and/or D15 conflicts with another pin on the board."
#endif #endif
#undef CHECK_SERIAL_PIN #undef CHECK_SERIAL_PIN

View File

@@ -27,13 +27,14 @@
// intRes = longIn1 * longIn2 >> 24 // intRes = longIn1 * longIn2 >> 24
// uses: // uses:
// A[tmp] to store 0 // r1, r0 for the result of mul.
// B[tmp] to store bits 16-23 of the 48bit result. The top bit is used to round the two byte result. // [tmp1] to store 0.
// note that the lower two bytes and the upper byte of the 48bit result are not calculated. // [tmp2] to store bits 16-23 of the 56 bit result. The top bit of [tmp2] is used for rounding.
// this can cause the result to be out by one as the lower bytes may cause carries into the upper ones. // Note that the lower two bytes and the upper two bytes of the 56 bit result are not calculated.
// B A are bits 24-39 and are the returned value // This can cause the result to be out by one as the lower bytes may cause carries into the upper ones.
// C B A is longIn1 // [intRes] (A B) is bits 24-39 and is the returned value.
// D C B A is longIn2 // [longIn1] (C B A) is a 24 bit parameter.
// [longIn2] (D C B A) is a 32 bit parameter.
// //
FORCE_INLINE static uint16_t MultiU24X32toH16(uint32_t longIn1, uint32_t longIn2) { FORCE_INLINE static uint16_t MultiU24X32toH16(uint32_t longIn1, uint32_t longIn2) {
uint8_t tmp1; uint8_t tmp1;
@@ -66,11 +67,9 @@ FORCE_INLINE static uint16_t MultiU24X32toH16(uint32_t longIn1, uint32_t longIn2
A("add %[tmp2], r1") A("add %[tmp2], r1")
A("adc %A[intRes], %[tmp1]") A("adc %A[intRes], %[tmp1]")
A("adc %B[intRes], %[tmp1]") A("adc %B[intRes], %[tmp1]")
A("lsr %[tmp2]")
A("adc %A[intRes], %[tmp1]")
A("adc %B[intRes], %[tmp1]")
A("mul %D[longIn2], %A[longIn1]") A("mul %D[longIn2], %A[longIn1]")
A("add %A[intRes], r0") A("lsl %[tmp2]")
A("adc %A[intRes], r0")
A("adc %B[intRes], r1") A("adc %B[intRes], r1")
A("mul %D[longIn2], %B[longIn1]") A("mul %D[longIn2], %B[longIn1]")
A("add %B[intRes], r0") A("add %B[intRes], r0")
@@ -85,11 +84,16 @@ FORCE_INLINE static uint16_t MultiU24X32toH16(uint32_t longIn1, uint32_t longIn2
return intRes; return intRes;
} }
// intRes = intIn1 * intIn2 >> 16 // intRes = intIn1 * intIn2 >> 8
// uses: // uses:
// r26 to store 0 // r1, r0 for the result of mul. After the second mul, r0 holds bits 0-7 of the 24 bit result and
// r27 to store the byte 1 of the 24 bit result // the top bit of r0 is used for rounding.
FORCE_INLINE static uint16_t MultiU16X8toH16(uint8_t charIn1, uint16_t intIn2) { // [tmp] to store 0.
// [intRes] (A B) is bits 8-15 and is the returned value.
// [charIn1] is an 8 bit parameter.
// [intIn2] (B A) is a 16 bit parameter.
//
FORCE_INLINE static uint16_t MultiU8X16toH16(uint8_t charIn1, uint16_t intIn2) {
uint8_t tmp; uint8_t tmp;
uint16_t intRes; uint16_t intRes;
__asm__ __volatile__ ( __asm__ __volatile__ (
@@ -97,10 +101,8 @@ FORCE_INLINE static uint16_t MultiU16X8toH16(uint8_t charIn1, uint16_t intIn2) {
A("mul %[charIn1], %B[intIn2]") A("mul %[charIn1], %B[intIn2]")
A("movw %A[intRes], r0") A("movw %A[intRes], r0")
A("mul %[charIn1], %A[intIn2]") A("mul %[charIn1], %A[intIn2]")
A("add %A[intRes], r1") A("lsl r0")
A("adc %B[intRes], %[tmp]") A("adc %A[intRes], r1")
A("lsr r0")
A("adc %A[intRes], %[tmp]")
A("adc %B[intRes], %[tmp]") A("adc %B[intRes], %[tmp]")
A("clr r1") A("clr r1")
: [intRes] "=&r" (intRes), : [intRes] "=&r" (intRes),

View File

@@ -64,11 +64,13 @@
#define VALID_PIN(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0) #define VALID_PIN(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0)
#if AVR_ATmega1284_FAMILY #if AVR_ATmega1284_FAMILY
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int(analogInputToDigitalPin(0) - (P)) #define IS_ANALOG(P) WITHIN(P, analogInputToDigitalPin(7), analogInputToDigitalPin(0))
#define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(7) && (P) <= analogInputToDigitalPin(0)) #define DIGITAL_PIN_TO_ANALOG_PIN(P) int(IS_ANALOG(P) ? (P) - analogInputToDigitalPin(7) : -1)
#else #else
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int((P) - analogInputToDigitalPin(0)) #define _ANALOG1(P) WITHIN(P, analogInputToDigitalPin(0), analogInputToDigitalPin(7))
#define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(0) && ((P) <= analogInputToDigitalPin(15) || (P) <= analogInputToDigitalPin(7))) #define _ANALOG2(P) WITHIN(P, analogInputToDigitalPin(8), analogInputToDigitalPin(15))
#define IS_ANALOG(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)
#endif #endif
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin) #define GET_ARRAY_PIN(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

View File

@@ -44,14 +44,14 @@ typedef uint16_t hal_timer_t;
#define MF_TIMER_TEMP 0 #define MF_TIMER_TEMP 0
#endif #endif
#define TEMP_TIMER_FREQUENCY ((F_CPU) / 64.0 / 256.0) #define TEMP_TIMER_FREQUENCY (((F_CPU) + 0x2000) / 0x4000)
#define STEPPER_TIMER_RATE HAL_TIMER_RATE #define STEPPER_TIMER_RATE HAL_TIMER_RATE
#define STEPPER_TIMER_PRESCALE 8 #define STEPPER_TIMER_PRESCALE 8
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // Cannot be of type double #define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000)
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer #define PULSE_TIMER_RATE STEPPER_TIMER_RATE
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE #define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US #define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
#define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A) #define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A)

View File

@@ -210,7 +210,7 @@ public:
static void adc_init() {} static void adc_init() {}
// Called by Temperature::init for each sensor at startup // Called by Temperature::init for each sensor at startup
static void adc_enable(const uint8_t ch) {} static void adc_enable(const uint8_t /*ch*/) {}
// Begin ADC sampling on the given channel. Called from Temperature::isr! // Begin ADC sampling on the given channel. Called from Temperature::isr!
static void adc_start(const uint8_t ch) { adc_result = analogRead(ch); } static void adc_start(const uint8_t ch) { adc_result = analogRead(ch); }

View File

@@ -247,12 +247,12 @@
b <<= 1; // little setup time b <<= 1; // little setup time
WRITE(SD_SCK_PIN, HIGH); WRITE(SD_SCK_PIN, HIGH);
DELAY_NS(spiDelayNS); DELAY_NS_VAR(spiDelayNS);
b |= (READ(SD_MISO_PIN) != 0); b |= (READ(SD_MISO_PIN) != 0);
WRITE(SD_SCK_PIN, LOW); WRITE(SD_SCK_PIN, LOW);
DELAY_NS(spiDelayNS); DELAY_NS_VAR(spiDelayNS);
} while (--bits); } while (--bits);
return b; return b;
} }

View File

@@ -41,7 +41,7 @@
practice, we need alignment to 256 bytes to make this work in all practice, we need alignment to 256 bytes to make this work in all
cases */ cases */
__attribute__ ((aligned(256))) __attribute__ ((aligned(256)))
static DeviceVectors ram_tab = { nullptr }; static DeviceVectors ram_tab[61] = { nullptr };
/** /**
* This function checks if the exception/interrupt table is already in SRAM or not. * This function checks if the exception/interrupt table is already in SRAM or not.

View File

@@ -20,7 +20,3 @@
* *
*/ */
#pragma once #pragma once
#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/DUE."
#endif

View File

@@ -25,6 +25,10 @@
* Test Arduino Due specific configuration values for errors at compile-time. * Test Arduino Due specific configuration values for errors at compile-time.
*/ */
#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/DUE."
#endif
/** /**
* Check for common serial pin conflicts * Check for common serial pin conflicts
*/ */
@@ -36,15 +40,15 @@
|| X_DIR_PIN == N || Y_DIR_PIN == N || Z_DIR_PIN == N \ || X_DIR_PIN == N || Y_DIR_PIN == N || Z_DIR_PIN == N \
|| X_ENA_PIN == N || Y_ENA_PIN == N || Z_ENA_PIN == N \ || X_ENA_PIN == N || Y_ENA_PIN == N || Z_ENA_PIN == N \
) )
#if CONF_SERIAL_IS(0) // D0-D1. No known conflicts. #if SERIAL_IN_USE(0) // D0-D1. No known conflicts.
#endif #endif
#if CONF_SERIAL_IS(1) && (CHECK_SERIAL_PIN(18) || CHECK_SERIAL_PIN(19)) #if SERIAL_IN_USE(1) && (CHECK_SERIAL_PIN(18) || CHECK_SERIAL_PIN(19))
#error "Serial Port 1 pin D18 and/or D19 conflicts with another pin on the board." #error "Serial Port 1 pin D18 and/or D19 conflicts with another pin on the board."
#endif #endif
#if CONF_SERIAL_IS(2) && (CHECK_SERIAL_PIN(16) || CHECK_SERIAL_PIN(17)) #if SERIAL_IN_USE(2) && (CHECK_SERIAL_PIN(16) || CHECK_SERIAL_PIN(17))
#error "Serial Port 2 pin D16 and/or D17 conflicts with another pin on the board." #error "Serial Port 2 pin D16 and/or D17 conflicts with another pin on the board."
#endif #endif
#if CONF_SERIAL_IS(3) && (CHECK_SERIAL_PIN(14) || CHECK_SERIAL_PIN(15)) #if SERIAL_IN_USE(3) && (CHECK_SERIAL_PIN(14) || CHECK_SERIAL_PIN(15))
#error "Serial Port 3 pin D14 and/or D15 conflicts with another pin on the board." #error "Serial Port 3 pin D14 and/or D15 conflicts with another pin on the board."
#endif #endif
#undef CHECK_SERIAL_PIN #undef CHECK_SERIAL_PIN
@@ -77,7 +81,7 @@
#endif #endif
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY #if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on DUE." #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/DUE."
#endif #endif
#if HAS_TMC_SW_SERIAL #if HAS_TMC_SW_SERIAL

View File

@@ -70,7 +70,7 @@
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); 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 GET_ARRAY_PIN(p) pin_array[p].pin #define GET_ARRAY_PIN(p) pin_array[p].pin
#define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital #define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital
#define VALID_PIN(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL ? 1 : 0) #define VALID_PIN(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL))
#define DIGITAL_PIN_TO_ANALOG_PIN(p) int(p - analogInputToDigitalPin(0)) #define DIGITAL_PIN_TO_ANALOG_PIN(p) int(p - analogInputToDigitalPin(0))
#define IS_ANALOG(P) WITHIN(P, char(analogInputToDigitalPin(0)), char(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1))) #define IS_ANALOG(P) WITHIN(P, char(analogInputToDigitalPin(0)), char(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) && \

View File

@@ -6,14 +6,14 @@
# #
import pioutil import pioutil
if pioutil.is_pio_build(): if pioutil.is_pio_build():
import platform import platform
current_OS = platform.system() current_OS = platform.system()
if current_OS == 'Windows': if current_OS == 'Windows':
Import("env") Import("env")
# Use bossac.exe on Windows # Use bossac.exe on Windows
env.Replace( env.Replace(
UPLOADCMD="bossac --info --unlock --write --verify --reset --erase -U false --boot $SOURCE" UPLOADCMD="bossac --info --unlock --write --verify --reset --erase -U false --boot $SOURCE"
) )

View File

@@ -62,7 +62,7 @@ void usb_task_idle(void) {
// Attend SD card access from the USB MSD -- Prioritize access to improve speed // Attend SD card access from the USB MSD -- Prioritize access to improve speed
int delay = 2; int delay = 2;
while (main_b_msc_enable && --delay > 0) { while (main_b_msc_enable && --delay > 0) {
if (udi_msc_process_trans()) delay = 10000; if (udi_msc_process_trans()) delay = 20;
// Reset the watchdog, just to be sure // Reset the watchdog, just to be sure
REG_WDT_CR = WDT_CR_WDRSTT | WDT_CR_KEY(0xA5); REG_WDT_CR = WDT_CR_WDRSTT | WDT_CR_KEY(0xA5);

View File

@@ -342,16 +342,16 @@ void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v
} }
else else
pindata.pwm_duty_ticks = duty; // PWM duty count = # of 4µs ticks per full PWM cycle pindata.pwm_duty_ticks = duty; // PWM duty count = # of 4µs ticks per full PWM cycle
return;
} }
else
#endif #endif
{
const int8_t cid = get_pwm_channel(pin, PWM_FREQUENCY, PWM_RESOLUTION); const int8_t cid = get_pwm_channel(pin, PWM_FREQUENCY, PWM_RESOLUTION);
if (cid >= 0) { if (cid >= 0) {
const uint32_t duty = map(invert ? v_size - v : v, 0, v_size, 0, _BV(PWM_RESOLUTION)-1); const uint32_t duty = map(invert ? v_size - v : v, 0, v_size, 0, _BV(PWM_RESOLUTION)-1);
ledcWrite(cid, duty); ledcWrite(cid, duty);
} }
}
} }
int8_t MarlinHAL::set_pwm_frequency(const pin_t pin, const uint32_t f_desired) { int8_t MarlinHAL::set_pwm_frequency(const pin_t pin, const uint32_t f_desired) {
@@ -360,17 +360,15 @@ int8_t MarlinHAL::set_pwm_frequency(const pin_t pin, const uint32_t f_desired) {
pwm_pin_data[pin & 0x7F].pwm_cycle_ticks = 1000000UL / f_desired / 4; // # of 4µs ticks per full PWM cycle pwm_pin_data[pin & 0x7F].pwm_cycle_ticks = 1000000UL / f_desired / 4; // # of 4µs ticks per full PWM cycle
return 0; return 0;
} }
else
#endif #endif
{
const int8_t cid = channel_for_pin(pin); const int8_t cid = channel_for_pin(pin);
if (cid >= 0) { if (cid >= 0) {
if (f_desired == ledcReadFreq(cid)) return cid; // no freq change if (f_desired == ledcReadFreq(cid)) return cid; // no freq change
ledcDetachPin(chan_pin[cid]); ledcDetachPin(chan_pin[cid]);
chan_pin[cid] = 0; // remove old freq channel chan_pin[cid] = 0; // remove old freq channel
} }
return get_pwm_channel(pin, f_desired, PWM_RESOLUTION); // try for new one return get_pwm_channel(pin, f_desired, PWM_RESOLUTION); // try for new one
}
} }
// use hardware PWM if avail, if not then ISR // use hardware PWM if avail, if not then ISR

View File

@@ -50,14 +50,12 @@
#define MYSERIAL1 flushableSerial #define MYSERIAL1 flushableSerial
#if EITHER(WIFISUPPORT, ESP3D_WIFISUPPORT) #if ENABLED(ESP3D_WIFISUPPORT)
#if ENABLED(ESP3D_WIFISUPPORT) typedef ForwardSerial1Class< decltype(Serial2Socket) > DefaultSerial1;
typedef ForwardSerial1Class< decltype(Serial2Socket) > DefaultSerial1; extern DefaultSerial1 MSerial0;
extern DefaultSerial1 MSerial0; #define MYSERIAL2 MSerial0
#define MYSERIAL2 MSerial0 #elif ENABLED(WIFISUPPORT)
#else #define MYSERIAL2 webSocketSerial
#define MYSERIAL2 webSocketSerial
#endif
#endif #endif
#define CRITICAL_SECTION_START() portENTER_CRITICAL(&hal.spinlock) #define CRITICAL_SECTION_START() portENTER_CRITICAL(&hal.spinlock)

View File

@@ -139,22 +139,38 @@ static void IRAM_ATTR i2s_intr_handler_default(void *arg) {
} }
void stepperTask(void *parameter) { void stepperTask(void *parameter) {
uint32_t remaining = 0; uint32_t nextMainISR = 0;
#if ENABLED(LIN_ADVANCE)
uint32_t nextAdvanceISR = Stepper::LA_ADV_NEVER;
#endif
while (1) { for (;;) {
xQueueReceive(dma.queue, &dma.current, portMAX_DELAY); xQueueReceive(dma.queue, &dma.current, portMAX_DELAY);
dma.rw_pos = 0; dma.rw_pos = 0;
while (dma.rw_pos < DMA_SAMPLE_COUNT) { while (dma.rw_pos < DMA_SAMPLE_COUNT) {
// Fill with the port data post pulse_phase until the next step if (!nextMainISR) {
if (remaining) {
i2s_push_sample();
remaining--;
}
else {
Stepper::pulse_phase_isr(); Stepper::pulse_phase_isr();
remaining = Stepper::block_phase_isr(); nextMainISR = Stepper::block_phase_isr();
} }
#if ENABLED(LIN_ADVANCE)
else if (!nextAdvanceISR) {
Stepper::advance_isr();
nextAdvanceISR = Stepper::la_interval;
}
#endif
else
i2s_push_sample();
nextMainISR--;
#if ENABLED(LIN_ADVANCE)
if (nextAdvanceISR == Stepper::LA_ADV_NEVER)
nextAdvanceISR = Stepper::la_interval;
if (nextAdvanceISR && nextAdvanceISR != Stepper::LA_ADV_NEVER)
nextAdvanceISR--;
#endif
} }
} }
} }

View File

@@ -20,7 +20,3 @@
* *
*/ */
#pragma once #pragma once
#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/ESP32."
#endif

View File

@@ -21,12 +21,19 @@
*/ */
#pragma once #pragma once
#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/ESP32."
#endif
#if ENABLED(EMERGENCY_PARSER) #if ENABLED(EMERGENCY_PARSER)
#error "EMERGENCY_PARSER is not yet implemented for ESP32. Disable EMERGENCY_PARSER to continue." #error "EMERGENCY_PARSER is not yet implemented for ESP32. Disable EMERGENCY_PARSER to continue."
#endif #endif
#if (ENABLED(SPINDLE_LASER_USE_PWM) && SPINDLE_LASER_FREQUENCY > 78125) || (ENABLED(FAST_PWM_FAN_FREQUENCY) && FAST_PWM_FAN_FREQUENCY > 78125) #if ENABLED(SPINDLE_LASER_USE_PWM) && SPINDLE_LASER_FREQUENCY > 78125
#error "SPINDLE_LASER_FREQUENCY and FAST_PWM_FREQUENCY maximum value is 78125Hz for ESP32." #error "SPINDLE_LASER_FREQUENCY maximum value is 78125Hz for ESP32."
#endif
#if ENABLED(FAST_PWM_FAN) && FAST_PWM_FAN_FREQUENCY > 78125
#error "FAST_PWM_FREQUENCY maximum value is 78125Hz for ESP32."
#endif #endif
#if HAS_TMC_SW_SERIAL #if HAS_TMC_SW_SERIAL
@@ -45,10 +52,18 @@
#error "FAST_PWM_FAN is not available on TinyBee." #error "FAST_PWM_FAN is not available on TinyBee."
#endif #endif
#if BOTH(I2S_STEPPER_STREAM, BABYSTEPPING) && DISABLED(INTEGRATED_BABYSTEPPING)
#error "BABYSTEPPING on I2S stream requires INTEGRATED_BABYSTEPPING."
#endif
#if USING_PULLDOWNS #if USING_PULLDOWNS
#error "PULLDOWN pin mode is not available on ESP32 boards." #error "PULLDOWN pin mode is not available on ESP32 boards."
#endif #endif
#if BOTH(I2S_STEPPER_STREAM, LIN_ADVANCE) #if BOTH(I2S_STEPPER_STREAM, LIN_ADVANCE) && DISABLED(EXPERIMENTAL_I2S_LA)
#error "I2S stream is currently incompatible with LIN_ADVANCE." #error "I2S stream is currently incompatible with LIN_ADVANCE."
#endif #endif
#if BOTH(I2S_STEPPER_STREAM, PRINTCOUNTER) && PRINTCOUNTER_SAVE_INTERVAL > 0 && DISABLED(PRINTCOUNTER_SYNC)
#error "PRINTCOUNTER_SAVE_INTERVAL may cause issues on ESP32 with an I2S expander. Define PRINTCOUNTER_SYNC in Configuration.h for an imperfect solution."
#endif

View File

@@ -111,12 +111,12 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
/** /**
* Set the upper value of the timer, when the timer reaches this upper value the * Set the upper value of the timer, when the timer reaches this upper value the
* interrupt should be triggered and the counter reset * interrupt should be triggered and the counter reset
* @param timer_num timer number to set the count to * @param timer_num timer number to set the compare value to
* @param count threshold at which the interrupt is triggered * @param compare threshold at which the interrupt is triggered
*/ */
void HAL_timer_set_compare(const uint8_t timer_num, hal_timer_t count) { void HAL_timer_set_compare(const uint8_t timer_num, const hal_timer_t compare) {
const tTimerConfig timer = timer_config[timer_num]; const tTimerConfig timer = timer_config[timer_num];
timer_set_alarm_value(timer.group, timer.idx, count); timer_set_alarm_value(timer.group, timer.idx, compare);
} }
/** /**

View File

@@ -32,6 +32,13 @@
#include "HAL.h" #include "HAL.h"
#include "SPI.h" #include "SPI.h"
#if ENABLED(SDSUPPORT)
#include "../../sd/cardreader.h"
#if ENABLED(ESP3D_WIFISUPPORT)
#include "sd_ESP32.h"
#endif
#endif
static SPISettings spiConfig; static SPISettings spiConfig;
@@ -45,6 +52,11 @@ static SPISettings spiConfig;
uint8_t u8g_eps_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) { uint8_t u8g_eps_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
static uint8_t msgInitCount = 2; // Ignore all messages until 2nd U8G_COM_MSG_INIT static uint8_t msgInitCount = 2; // Ignore all messages until 2nd U8G_COM_MSG_INIT
#if ENABLED(PAUSE_LCD_FOR_BUSY_SD)
if (card.flag.saving || card.flag.logging || TERN0(ESP3D_WIFISUPPORT, sd_busy_lock == true)) return 0;
#endif
if (msgInitCount) { if (msgInitCount) {
if (msg == U8G_COM_MSG_INIT) msgInitCount--; if (msg == U8G_COM_MSG_INIT) msgInitCount--;
if (msgInitCount) return -1; if (msgInitCount) return -1;

View File

@@ -27,7 +27,7 @@
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#endif #endif
#include HAL_PATH(.,HAL.h) #include HAL_PATH(..,HAL.h)
extern MarlinHAL hal; extern MarlinHAL hal;
#define HAL_ADC_RANGE _BV(HAL_ADC_RESOLUTION) #define HAL_ADC_RANGE _BV(HAL_ADC_RESOLUTION)

View File

@@ -20,7 +20,3 @@
* *
*/ */
#pragma once #pragma once
#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/LINUX."
#endif

View File

@@ -31,13 +31,17 @@
#endif #endif
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY #if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on LINUX." #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/LINUX."
#endif
#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/LINUX."
#endif #endif
#if HAS_TMC_SW_SERIAL #if HAS_TMC_SW_SERIAL
#error "TMC220x Software Serial is not supported on LINUX." #error "TMC220x Software Serial is not supported for HAL/LINUX."
#endif #endif
#if ENABLED(POSTMORTEM_DEBUGGING) #if ENABLED(POSTMORTEM_DEBUGGING)
#error "POSTMORTEM_DEBUGGING is not yet supported on LINUX." #error "POSTMORTEM_DEBUGGING is not yet supported for HAL/LINUX."
#endif #endif

View File

@@ -25,10 +25,10 @@
#include "../../inc/MarlinConfigPre.h" #include "../../inc/MarlinConfigPre.h"
#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
// needed due to the speed and mode required for communicating with each device being different. // needed due to the speed and mode required for communicating with each device being different.
// This requirement can be removed if the SPI access to these devices is updated to use // This requirement can be removed if the SPI access to these devices is updated to use
// spiBeginTransaction. // spiBeginTransaction.
#endif #endif
// Onboard SD // Onboard SD

View File

@@ -60,7 +60,7 @@
// ------------------------ // ------------------------
// Public functions // Public functions
// ------------------------ // ------------------------
#if ENABLED(LPC_SOFTWARE_SPI) #if ENABLED(SOFTWARE_SPI)
// Software SPI // Software SPI
@@ -161,7 +161,7 @@
// TODO: Implement this method // TODO: Implement this method
} }
#endif // LPC_SOFTWARE_SPI #endif // SOFTWARE_SPI
/** /**
* @brief Wait until TXE (tx empty) flag is set and BSY (busy) flag unset. * @brief Wait until TXE (tx empty) flag is set and BSY (busy) flag unset.
@@ -318,8 +318,16 @@ void SPIClass::dmaSend(void *buf, uint16_t length, bool minc) {
// Enable DMA // Enable DMA
GPDMA_ChannelCmd(0, ENABLE); GPDMA_ChannelCmd(0, ENABLE);
/*
* Observed behaviour on normal data transfer completion (SKR 1.3 board / LPC1768 MCU)
* GPDMA_STAT_INTTC flag is SET
* GPDMA_STAT_INTERR flag is NOT SET
* GPDMA_STAT_RAWINTTC flag is NOT SET
* GPDMA_STAT_RAWINTERR flag is SET
*/
// Wait for data transfer // Wait for data transfer
while (!GPDMA_IntGetStatus(GPDMA_STAT_RAWINTTC, 0) && !GPDMA_IntGetStatus(GPDMA_STAT_RAWINTERR, 0)) { } while (!GPDMA_IntGetStatus(GPDMA_STAT_INTTC, 0) && !GPDMA_IntGetStatus(GPDMA_STAT_INTERR, 0)) {}
// Clear err and int // Clear err and int
GPDMA_ClearIntPending (GPDMA_STATCLR_INTTC, 0); GPDMA_ClearIntPending (GPDMA_STATCLR_INTTC, 0);
@@ -333,6 +341,43 @@ void SPIClass::dmaSend(void *buf, uint16_t length, bool minc) {
SSP_DMACmd(_currentSetting->spi_d, SSP_DMA_TX, DISABLE); SSP_DMACmd(_currentSetting->spi_d, SSP_DMA_TX, DISABLE);
} }
void SPIClass::dmaSendAsync(void *buf, uint16_t length, bool minc) {
//TODO: LPC dma can only write 0xFFF bytes at once.
GPDMA_Channel_CFG_Type GPDMACfg;
/* Configure GPDMA channel 0 -------------------------------------------------------------*/
/* DMA Channel 0 */
GPDMACfg.ChannelNum = 0;
// Source memory
GPDMACfg.SrcMemAddr = (uint32_t)buf;
// Destination memory - Not used
GPDMACfg.DstMemAddr = 0;
// Transfer size
GPDMACfg.TransferSize = length;
// Transfer width
GPDMACfg.TransferWidth = (_currentSetting->dataSize == DATA_SIZE_16BIT) ? GPDMA_WIDTH_HALFWORD : GPDMA_WIDTH_BYTE;
// Transfer type
GPDMACfg.TransferType = GPDMA_TRANSFERTYPE_M2P;
// Source connection - unused
GPDMACfg.SrcConn = 0;
// Destination connection
GPDMACfg.DstConn = (_currentSetting->spi_d == LPC_SSP0) ? GPDMA_CONN_SSP0_Tx : GPDMA_CONN_SSP1_Tx;
GPDMACfg.DMALLI = 0;
// Enable dma on SPI
SSP_DMACmd(_currentSetting->spi_d, SSP_DMA_TX, ENABLE);
// Only increase memory if minc is true
GPDMACfg.MemoryIncrease = (minc ? GPDMA_DMACCxControl_SI : 0);
// Setup channel with given parameter
GPDMA_Setup(&GPDMACfg);
// Enable DMA
GPDMA_ChannelCmd(0, ENABLE);
}
uint16_t SPIClass::read() { uint16_t SPIClass::read() {
return SSP_ReceiveData(_currentSetting->spi_d); return SSP_ReceiveData(_currentSetting->spi_d);
} }

View File

@@ -20,7 +20,3 @@
* *
*/ */
#pragma once #pragma once
#if HAS_FSMC_TFT
#error "Sorry! FSMC TFT displays are not current available for HAL/LPC1768."
#endif

View File

@@ -29,6 +29,6 @@
// LPC1768 boards seem to lose steps when saving to EEPROM during print (issue #20785) // LPC1768 boards seem to lose steps when saving to EEPROM during print (issue #20785)
// TODO: Which other boards are incompatible? // TODO: Which other boards are incompatible?
#if defined(MCU_LPC1768) && PRINTCOUNTER_SAVE_INTERVAL > 0 #if defined(MCU_LPC1768) && ENABLED(FLASH_EEPROM_EMULATION) && PRINTCOUNTER_SAVE_INTERVAL > 0
#define PRINTCOUNTER_SYNC 1 #define PRINTCOUNTER_SYNC
#endif #endif

View File

@@ -77,6 +77,10 @@ static_assert(!(NUM_SERVOS && ENABLED(FAST_PWM_FAN)), "BLTOUCH and Servos are in
#endif #endif
#endif #endif
#if HAS_FSMC_TFT
#error "Sorry! FSMC TFT displays are not current available for HAL/LPC1768."
#endif
static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported on LPC176x."); static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported on LPC176x.");
/** /**

View File

@@ -155,6 +155,7 @@ public:
void read(uint8_t *buf, uint32_t len); void read(uint8_t *buf, uint32_t len);
void dmaSend(void *buf, uint16_t length, bool minc); void dmaSend(void *buf, uint16_t length, bool minc);
void dmaSendAsync(void *buf, uint16_t length, bool minc);
/** /**
* @brief Sets the number of the SPI peripheral to be used by * @brief Sets the number of the SPI peripheral to be used by

View File

@@ -29,8 +29,8 @@
*/ */
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS #define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
#define pwm_details(pin) pin = pin // do nothing // print PWM details #define pwm_details(pin) NOOP // do nothing
#define pwm_status(pin) false //Print a pin's PWM status. Return true if it's currently a PWM pin. #define pwm_status(pin) false // Print a pin's PWM status. Return true if it's currently a PWM pin.
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0) #define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0)
#define digitalRead_mod(p) extDigitalRead(p) #define digitalRead_mod(p) extDigitalRead(p)
#define PRINT_PORT(p) #define PRINT_PORT(p)

View File

@@ -24,10 +24,10 @@
#include "../../core/macros.h" #include "../../core/macros.h"
#if BOTH(SDSUPPORT, HAS_MARLINUI_U8GLIB) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #if BOTH(SDSUPPORT, HAS_MARLINUI_U8GLIB) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
// needed due to the speed and mode required for communicating with each device being different. // needed due to the speed and mode required for communicating with each device being different.
// This requirement can be removed if the SPI access to these devices is updated to use // This requirement can be removed if the SPI access to these devices is updated to use
// spiBeginTransaction. // spiBeginTransaction.
#endif #endif
/** onboard SD card */ /** onboard SD card */

View File

@@ -26,7 +26,7 @@
#include "tft_spi.h" #include "tft_spi.h"
SPIClass TFT_SPI::SPIx(1); SPIClass TFT_SPI::SPIx(TFT_SPI_DEVICE);
void TFT_SPI::Init() { void TFT_SPI::Init() {
#if PIN_EXISTS(TFT_RESET) #if PIN_EXISTS(TFT_RESET)
@@ -38,40 +38,10 @@ void TFT_SPI::Init() {
OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH); OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH);
#endif #endif
SET_OUTPUT(TFT_DC_PIN); OUT_WRITE(TFT_DC_PIN, HIGH);
SET_OUTPUT(TFT_CS_PIN); OUT_WRITE(TFT_CS_PIN, HIGH);
WRITE(TFT_DC_PIN, HIGH);
WRITE(TFT_CS_PIN, HIGH);
/** SPIx.setModule(TFT_SPI_DEVICE);
* STM32F1 APB2 = 72MHz, APB1 = 36MHz, max SPI speed of this MCU if 18Mhz
* STM32F1 has 3 SPI ports, SPI1 in APB2, SPI2/SPI3 in APB1
* so the minimum prescale of SPI1 is DIV4, SPI2/SPI3 is DIV2
*/
#if 0
#if SPI_DEVICE == 1
#define SPI_CLOCK_MAX SPI_CLOCK_DIV4
#else
#define SPI_CLOCK_MAX SPI_CLOCK_DIV2
#endif
uint8_t clock;
uint8_t spiRate = SPI_FULL_SPEED;
switch (spiRate) {
case SPI_FULL_SPEED: clock = SPI_CLOCK_MAX ; break;
case SPI_HALF_SPEED: clock = SPI_CLOCK_DIV4 ; break;
case SPI_QUARTER_SPEED: clock = SPI_CLOCK_DIV8 ; break;
case SPI_EIGHTH_SPEED: clock = SPI_CLOCK_DIV16; break;
case SPI_SPEED_5: clock = SPI_CLOCK_DIV32; break;
case SPI_SPEED_6: clock = SPI_CLOCK_DIV64; break;
default: clock = SPI_CLOCK_DIV2; // Default from the SPI library
}
#endif
#if TFT_MISO_PIN == BOARD_SPI1_MISO_PIN
SPIx.setModule(1);
#elif TFT_MISO_PIN == BOARD_SPI2_MISO_PIN
SPIx.setModule(2);
#endif
SPIx.setClock(SPI_CLOCK_MAX_TFT); SPIx.setClock(SPI_CLOCK_MAX_TFT);
SPIx.setBitOrder(MSBFIRST); SPIx.setBitOrder(MSBFIRST);
SPIx.setDataMode(SPI_MODE0); SPIx.setDataMode(SPI_MODE0);
@@ -114,17 +84,62 @@ uint32_t TFT_SPI::ReadID(uint16_t Reg) {
return data >> 7; return data >> 7;
} }
bool TFT_SPI::isBusy() { return false; } bool TFT_SPI::isBusy() {
#define __IS_DMA_CONFIGURED(__HANDLE__) ((__HANDLE__)->DMACCSrcAddr != 0)
void TFT_SPI::Abort() { DataTransferEnd(); } // DMA Channel 0 is hardcoded in dmaSendAsync() and dmaSend()
if (!__IS_DMA_CONFIGURED(LPC_GPDMACH0)) return false;
void TFT_SPI::Transmit(uint16_t Data) { SPIx.transfer(Data); } if (GPDMA_IntGetStatus(GPDMA_STAT_INTERR, 0)) {
// You should not be here - DMA transfer error flag is set
// Abort DMA transfer and release SPI
}
else {
// Check if DMA transfer completed flag is set
if (!GPDMA_IntGetStatus(GPDMA_STAT_INTTC, 0)) return true;
// Check if SPI TX butter is empty and SPI is idle
if ((SSP_GetStatus(LPC_SSPx, SSP_STAT_TXFIFO_EMPTY) == RESET) || (SSP_GetStatus(LPC_SSPx, SSP_STAT_BUSY) == SET)) return true;
}
Abort();
return false;
}
void TFT_SPI::Abort() {
// DMA Channel 0 is hardcoded in dmaSendAsync() and dmaSend()
// Disable DMA
GPDMA_ChannelCmd(0, DISABLE);
// Clear ERR and TC
GPDMA_ClearIntPending(GPDMA_STATCLR_INTTC, 0);
GPDMA_ClearIntPending(GPDMA_STATCLR_INTERR, 0);
// Disable DMA on SPI
SSP_DMACmd(LPC_SSPx, SSP_DMA_TX, DISABLE);
// Deconfigure DMA Channel 0
LPC_GPDMACH0->DMACCControl = 0U;
LPC_GPDMACH0->DMACCConfig = 0U;
LPC_GPDMACH0->DMACCSrcAddr = 0U;
LPC_GPDMACH0->DMACCDestAddr = 0U;
void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) {
DataTransferBegin(DATASIZE_16BIT);
WRITE(TFT_DC_PIN, HIGH);
SPIx.dmaSend(Data, Count, MemoryIncrease);
DataTransferEnd(); DataTransferEnd();
} }
void TFT_SPI::Transmit(uint16_t Data) { SPIx.transfer(Data); }
void TFT_SPI::Transmit(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) {
DataTransferBegin(DATASIZE_16BIT);
SPIx.dmaSend(Data, Count, MemoryIncrease);
Abort();
}
void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) {
DataTransferBegin(DATASIZE_16BIT);
SPIx.dmaSendAsync(Data, Count, MemoryIncrease);
TERN_(TFT_SHARED_SPI, while (isBusy()));
}
#endif // HAS_SPI_TFT #endif // HAS_SPI_TFT

View File

@@ -27,6 +27,18 @@
#include <lpc17xx_ssp.h> #include <lpc17xx_ssp.h>
// #include <lpc17xx_gpdma.h> // #include <lpc17xx_gpdma.h>
#define IS_SPI(N) (BOARD_NR_SPI >= N && (TFT_SCK_PIN == BOARD_SPI##N##_SCK_PIN) && (TFT_MOSI_PIN == BOARD_SPI##N##_MOSI_PIN) && (TFT_MISO_PIN == BOARD_SPI##N##_MISO_PIN))
#if IS_SPI(1)
#define TFT_SPI_DEVICE 1
#define LPC_SSPx LPC_SSP0
#elif IS_SPI(2)
#define TFT_SPI_DEVICE 2
#define LPC_SSPx LPC_SSP1
#else
#error "Invalid TFT SPI configuration."
#endif
#undef IS_SPI
#ifndef LCD_READ_ID #ifndef LCD_READ_ID
#define LCD_READ_ID 0x04 // Read display identification information (0xD3 on ILI9341) #define LCD_READ_ID 0x04 // Read display identification information (0xD3 on ILI9341)
#endif #endif
@@ -34,17 +46,19 @@
#define LCD_READ_ID4 0xD3 // Read display identification information (0xD3 on ILI9341) #define LCD_READ_ID4 0xD3 // Read display identification information (0xD3 on ILI9341)
#endif #endif
#define DATASIZE_8BIT SSP_DATABIT_8 #define DATASIZE_8BIT SSP_DATABIT_8
#define DATASIZE_16BIT SSP_DATABIT_16 #define DATASIZE_16BIT SSP_DATABIT_16
#define TFT_IO_DRIVER TFT_SPI #define TFT_IO_DRIVER TFT_SPI
#define DMA_MAX_SIZE 0xFFF
#define DMA_MINC_ENABLE 1 #define DMA_MINC_ENABLE 1
#define DMA_MINC_DISABLE 0 #define DMA_MINC_DISABLE 0
class TFT_SPI { class TFT_SPI {
private: private:
static uint32_t ReadID(uint16_t Reg); static uint32_t ReadID(uint16_t Reg);
static void Transmit(uint16_t Data); static void Transmit(uint16_t Data);
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);
public: public:
@@ -56,22 +70,20 @@ public:
static void Abort(); static void Abort();
static void DataTransferBegin(uint16_t DataWidth = DATASIZE_16BIT); static void DataTransferBegin(uint16_t DataWidth = DATASIZE_16BIT);
static void DataTransferEnd() { OUT_WRITE(TFT_CS_PIN, HIGH); SPIx.end(); }; static void DataTransferEnd() { WRITE(TFT_CS_PIN, HIGH); SSP_Cmd(LPC_SSPx, DISABLE); };
static void DataTransferAbort(); static void DataTransferAbort();
static void WriteData(uint16_t Data) { Transmit(Data); } static void WriteData(uint16_t Data) { Transmit(Data); }
static void WriteReg(uint16_t Reg) { OUT_WRITE(TFT_A0_PIN, LOW); Transmit(Reg); OUT_WRITE(TFT_A0_PIN, HIGH); } static void WriteReg(uint16_t Reg) { WRITE(TFT_DC_PIN, LOW); Transmit(Reg); WRITE(TFT_DC_PIN, HIGH); }
static void WriteSequence(uint16_t *Data, uint16_t Count) { TransmitDMA(DMA_MINC_ENABLE, Data, Count); } static void WriteSequence_DMA(uint16_t *Data, uint16_t Count) { TransmitDMA(DMA_MINC_ENABLE, Data, Count); }
// static void WriteMultiple(uint16_t Color, uint16_t Count) { static uint16_t Data; Data = Color; TransmitDMA(DMA_MINC_DISABLE, &Data, Count); } static void WriteMultiple_DMA(uint16_t Color, uint16_t Count) { static uint16_t Data; Data = Color; TransmitDMA(DMA_MINC_DISABLE, &Data, Count); }
static void WriteSequence(uint16_t *Data, uint16_t Count) { Transmit(DMA_MINC_ENABLE, Data, Count); }
static void WriteMultiple(uint16_t Color, uint32_t Count) { static void WriteMultiple(uint16_t Color, uint32_t Count) {
static uint16_t Data; Data = Color;
//LPC dma can only write 0xFFF bytes at once.
#define MAX_DMA_SIZE (0xFFF - 1)
while (Count > 0) { while (Count > 0) {
TransmitDMA(DMA_MINC_DISABLE, &Data, Count > MAX_DMA_SIZE ? MAX_DMA_SIZE : Count); Transmit(DMA_MINC_DISABLE, &Color, Count > DMA_MAX_SIZE ? DMA_MAX_SIZE : Count);
Count = Count > MAX_DMA_SIZE ? Count - MAX_DMA_SIZE : 0; Count = Count > DMA_MAX_SIZE ? Count - DMA_MAX_SIZE : 0;
} }
#undef MAX_DMA_SIZE
} }
}; };

View File

@@ -44,9 +44,11 @@ uint16_t delta(uint16_t a, uint16_t b) { return a > b ? a - b : b - a; }
#endif #endif
void XPT2046::Init() { void XPT2046::Init() {
SET_INPUT(TOUCH_MISO_PIN); #if DISABLED(TOUCH_BUTTONS_HW_SPI)
SET_OUTPUT(TOUCH_MOSI_PIN); SET_INPUT(TOUCH_MISO_PIN);
SET_OUTPUT(TOUCH_SCK_PIN); SET_OUTPUT(TOUCH_MOSI_PIN);
SET_OUTPUT(TOUCH_SCK_PIN);
#endif
OUT_WRITE(TOUCH_CS_PIN, HIGH); OUT_WRITE(TOUCH_CS_PIN, HIGH);
#if PIN_EXISTS(TOUCH_INT) #if PIN_EXISTS(TOUCH_INT)

View File

@@ -9,127 +9,127 @@ from __future__ import print_function
import pioutil import pioutil
if pioutil.is_pio_build(): if pioutil.is_pio_build():
target_filename = "FIRMWARE.CUR" target_filename = "FIRMWARE.CUR"
target_drive = "REARM" target_drive = "REARM"
import platform import platform
current_OS = platform.system() current_OS = platform.system()
Import("env") Import("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' \
'Please select it in platformio.ini using the upload_port keyword ' \ 'Please select it in platformio.ini using the upload_port keyword ' \
'(https://docs.platformio.org/en/latest/projectconf/section_env_upload.html) ' \ '(https://docs.platformio.org/en/latest/projectconf/section_env_upload.html) ' \
'or copy the firmware (.pio/build/%s/firmware.bin) manually to the appropriate disk\n' \ 'or copy the firmware (.pio/build/%s/firmware.bin) manually to the appropriate disk\n' \
%(e, env.get('PIOENV'))) %(e, env.get('PIOENV')))
def before_upload(source, target, env): def before_upload(source, target, env):
try: try:
from pathlib import Path from pathlib import Path
# #
# Find a disk for upload # Find a disk for upload
# #
upload_disk = 'Disk not found' upload_disk = 'Disk not found'
target_file_found = False target_file_found = False
target_drive_found = False target_drive_found = False
if current_OS == 'Windows': if current_OS == 'Windows':
# #
# platformio.ini will accept this for a Windows upload port designation: 'upload_port = L:' # platformio.ini will accept this for a Windows upload port designation: 'upload_port = L:'
# Windows - doesn't care about the disk's name, only cares about the drive letter # Windows - doesn't care about the disk's name, only cares about the drive letter
import subprocess,string import subprocess,string
from ctypes import windll from ctypes import windll
from pathlib import PureWindowsPath from pathlib import PureWindowsPath
# getting list of drives # getting list of drives
# https://stackoverflow.com/questions/827371/is-there-a-way-to-list-all-the-available-drive-letters-in-python # https://stackoverflow.com/questions/827371/is-there-a-way-to-list-all-the-available-drive-letters-in-python
drives = [] drives = []
bitmask = windll.kernel32.GetLogicalDrives() bitmask = windll.kernel32.GetLogicalDrives()
for letter in string.ascii_uppercase: for letter in string.ascii_uppercase:
if bitmask & 1: if bitmask & 1:
drives.append(letter) drives.append(letter)
bitmask >>= 1 bitmask >>= 1
for drive in drives: for drive in drives:
final_drive_name = drive + ':' final_drive_name = drive + ':'
# print ('disc check: {}'.format(final_drive_name)) # print ('disc check: {}'.format(final_drive_name))
try: try:
volume_info = str(subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT)) volume_info = str(subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT))
except Exception as e: except Exception as e:
print ('error:{}'.format(e)) print ('error:{}'.format(e))
continue continue
else: else:
if target_drive in volume_info and not target_file_found: # set upload if not found target file yet if target_drive in volume_info and not target_file_found: # set upload if not found target file yet
target_drive_found = True target_drive_found = True
upload_disk = PureWindowsPath(final_drive_name) upload_disk = PureWindowsPath(final_drive_name)
if target_filename in volume_info: if target_filename in volume_info:
if not target_file_found: if not target_file_found:
upload_disk = PureWindowsPath(final_drive_name) upload_disk = PureWindowsPath(final_drive_name)
target_file_found = True target_file_found = True
elif current_OS == 'Linux': elif current_OS == 'Linux':
# #
# platformio.ini will accept this for a Linux upload port designation: 'upload_port = /media/media_name/drive' # platformio.ini will accept this for a Linux upload port designation: 'upload_port = /media/media_name/drive'
# #
import getpass import getpass
user = getpass.getuser() user = getpass.getuser()
mpath = Path('media', user) mpath = Path('/media', user)
drives = [ x for x in mpath.iterdir() if x.is_dir() ] drives = [ x for x in mpath.iterdir() if x.is_dir() ]
if target_drive in drives: # If target drive is found, use it. if target_drive in drives: # If target drive is found, use it.
target_drive_found = True target_drive_found = True
upload_disk = mpath / target_drive upload_disk = mpath / target_drive
else: else:
for drive in drives: for drive in drives:
try: try:
fpath = mpath / drive fpath = mpath / drive
files = [ x for x in fpath.iterdir() if x.is_file() ] filenames = [ x.name for x in fpath.iterdir() if x.is_file() ]
except: except:
continue continue
else: else:
if target_filename in files: if target_filename in filenames:
upload_disk = mpath / drive upload_disk = mpath / drive
target_file_found = True target_file_found = True
break break
# #
# set upload_port to drive if found # set upload_port to drive if found
# #
if target_file_found or target_drive_found: if target_file_found or target_drive_found:
env.Replace( env.Replace(
UPLOAD_FLAGS="-P$UPLOAD_PORT" UPLOAD_FLAGS="-P$UPLOAD_PORT"
) )
elif current_OS == 'Darwin': # MAC elif current_OS == 'Darwin': # MAC
# #
# platformio.ini will accept this for a OSX upload port designation: 'upload_port = /media/media_name/drive' # platformio.ini will accept this for a OSX upload port designation: 'upload_port = /media/media_name/drive'
# #
dpath = Path('/Volumes') # human readable names dpath = Path('/Volumes') # human readable names
drives = [ x for x in dpath.iterdir() ] drives = [ x for x in dpath.iterdir() if x.is_dir() ]
if target_drive in drives and not target_file_found: # set upload if not found target file yet if target_drive in drives and not target_file_found: # set upload if not found target file yet
target_drive_found = True target_drive_found = True
upload_disk = dpath / target_drive upload_disk = dpath / target_drive
for drive in drives: for drive in drives:
try: try:
fpath = dpath / drive # will get an error if the drive is protected fpath = dpath / drive # will get an error if the drive is protected
files = [ x for x in fpath.iterdir() ] filenames = [ x.name for x in fpath.iterdir() if x.is_file() ]
except: except:
continue continue
else: else:
if target_filename in files: if target_filename in filenames:
if not target_file_found: upload_disk = dpath / drive
upload_disk = dpath / drive target_file_found = True
target_file_found = True break
# #
# Set upload_port to drive if found # Set upload_port to drive if found
# #
if target_file_found or target_drive_found: if target_file_found or target_drive_found:
env.Replace(UPLOAD_PORT=str(upload_disk)) env.Replace(UPLOAD_PORT=str(upload_disk))
print('\nUpload disk: ', upload_disk, '\n') print('\nUpload disk: ', upload_disk, '\n')
else: else:
print_error('Autodetect Error') print_error('Autodetect Error')
except Exception as e: except Exception as e:
print_error(str(e)) print_error(str(e))
env.AddPreAction("upload", before_upload) env.AddPreAction("upload", before_upload)

View File

@@ -208,8 +208,8 @@ public:
MarlinHAL() {} MarlinHAL() {}
// Watchdog // Watchdog
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {}); static void watchdog_init();
static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {}); static void watchdog_refresh();
static void init() {} // Called early in setup() static void init() {} // Called early in setup()
static void init_board() {} // Called less early in setup() static void init_board() {} // Called less early in setup()

View File

@@ -44,7 +44,7 @@
* *
* Now you can simply SET_OUTPUT(STEP); WRITE(STEP, HIGH); WRITE(STEP, LOW); * Now you can simply SET_OUTPUT(STEP); WRITE(STEP, HIGH); WRITE(STEP, LOW);
* *
* Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html * Why double up on these macros? see https://gcc.gnu.org/onlinedocs/cpp/Stringification.html
*/ */
/// Read a pin /// Read a pin

View File

@@ -31,7 +31,7 @@
#endif #endif
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY #if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on LINUX." #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/LINUX."
#endif #endif
#if HAS_TMC_SW_SERIAL #if HAS_TMC_SW_SERIAL

View File

@@ -27,8 +27,8 @@
*/ */
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS #define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
#define pwm_details(pin) pin = pin // do nothing // print PWM details #define pwm_details(pin) NOOP // do nothing
#define pwm_status(pin) false //Print a pin's PWM status. Return true if it's currently a PWM pin. #define pwm_status(pin) false // Print a pin's PWM status. Return true if it's currently a PWM pin.
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0) #define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0)
#define digitalRead_mod(p) digitalRead(p) #define digitalRead_mod(p) digitalRead(p)
#define PRINT_PORT(p) #define PRINT_PORT(p)

View File

@@ -25,7 +25,7 @@
#include "../../inc/MarlinConfigPre.h" #include "../../inc/MarlinConfigPre.h"
#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
// needed due to the speed and mode required for communicating with each device being different. // needed due to the speed and mode required for communicating with each device being different.
// This requirement can be removed if the SPI access to these devices is updated to use // This requirement can be removed if the SPI access to these devices is updated to use
// spiBeginTransaction. // spiBeginTransaction.

View File

@@ -51,7 +51,7 @@ enum XPTCoordinate : uint8_t {
XPT2046_Z2 = 0x40 | XPT2046_CONTROL | XPT2046_DFR_MODE, XPT2046_Z2 = 0x40 | XPT2046_CONTROL | XPT2046_DFR_MODE,
}; };
#if !defined(XPT2046_Z1_THRESHOLD) #ifndef XPT2046_Z1_THRESHOLD
#define XPT2046_Z1_THRESHOLD 10 #define XPT2046_Z1_THRESHOLD 10
#endif #endif

View File

@@ -34,4 +34,3 @@ void u8g_i2c_stop();
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@@ -40,5 +40,3 @@ uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
#define U8G_COM_T6963 u8g_com_null_fn #define U8G_COM_T6963 u8g_com_null_fn
#define U8G_COM_FAST_PARALLEL u8g_com_null_fn #define U8G_COM_FAST_PARALLEL u8g_com_null_fn
#define U8G_COM_UC_I2C u8g_com_null_fn #define U8G_COM_UC_I2C u8g_com_null_fn

View File

@@ -168,4 +168,4 @@ uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
#endif #endif
#endif // IS_U8GLIB_ST7920 #endif // IS_U8GLIB_ST7920
#endif // TARGET_LPC1768 #endif // __PLAT_NATIVE_SIM__

View File

@@ -0,0 +1,212 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#ifdef __SAMD21__
#include "../../inc/MarlinConfig.h"
#include <wiring_private.h>
#if USING_HW_SERIALUSB
DefaultSerial1 MSerialUSB(false, SerialUSB);
#endif
#if USING_HW_SERIAL0
DefaultSerial2 MSerial1(false, Serial1);
#endif
#if USING_HW_SERIAL1
DefaultSerial3 MSerial2(false, Serial2);
#endif
#define WDT_CONFIG_PER_7_Val 0x9u
#define WDT_CONFIG_PER_Pos 0
#define WDT_CONFIG_PER_7 (WDT_CONFIG_PER_7_Val << WDT_CONFIG_PER_Pos)
#if ENABLED(USE_WATCHDOG)
#define WDT_TIMEOUT_REG TERN(WATCHDOG_DURATION_8S, WDT_CONFIG_PER_CYC8192, WDT_CONFIG_PER_CYC4096) // 4 or 8 second timeout
void MarlinHAL::watchdog_init() {
// Set up the generic clock (GCLK2) used to clock the watchdog timer at 1.024kHz
GCLK->GENDIV.reg = GCLK_GENDIV_DIV(4) | // Divide the 32.768kHz clock source by divisor 32, where 2^(4 + 1): 32.768kHz/32=1.024kHz
GCLK_GENDIV_ID(2); // Select Generic Clock (GCLK) 2
while (GCLK->STATUS.bit.SYNCBUSY); // Wait for synchronization
REG_GCLK_GENCTRL = GCLK_GENCTRL_DIVSEL | // Set to divide by 2^(GCLK_GENDIV_DIV(4) + 1)
GCLK_GENCTRL_IDC | // Set the duty cycle to 50/50 HIGH/LOW
GCLK_GENCTRL_GENEN | // Enable GCLK2
GCLK_GENCTRL_SRC_OSCULP32K | // Set the clock source to the ultra low power oscillator (OSCULP32K)
GCLK_GENCTRL_ID(2); // Select GCLK2
while (GCLK->STATUS.bit.SYNCBUSY); // Wait for synchronization
// Feed GCLK2 to WDT (Watchdog Timer)
REG_GCLK_CLKCTRL = GCLK_CLKCTRL_CLKEN | // Enable GCLK2 to the WDT
GCLK_CLKCTRL_GEN_GCLK2 | // Select GCLK2
GCLK_CLKCTRL_ID_WDT; // Feed the GCLK2 to the WDT
while (GCLK->STATUS.bit.SYNCBUSY); // Wait for synchronization
WDT->CONFIG.bit.PER = WDT_CONFIG_PER_7; // Set the WDT reset timeout to 4 seconds
while (WDT->STATUS.bit.SYNCBUSY); // Wait for synchronization
REG_WDT_CTRL = WDT_CTRL_ENABLE; // Enable the WDT in normal mode
while (WDT->STATUS.bit.SYNCBUSY); // Wait for synchronization
}
// Reset watchdog. MUST be called at least every 4 seconds after the
// first watchdog_init or SAMD will go into emergency procedures.
void MarlinHAL::watchdog_refresh() {
WDT->CLEAR.reg = WDT_CLEAR_CLEAR_KEY;
while (WDT->STATUS.bit.SYNCBUSY);
}
#endif
// ------------------------
// Types
// ------------------------
// ------------------------
// Private Variables
// ------------------------
// ------------------------
// Private functions
// ------------------------
void MarlinHAL::dma_init() {}
// ------------------------
// Public functions
// ------------------------
// HAL initialization task
void MarlinHAL::init() {
TERN_(DMA_IS_REQUIRED, dma_init());
#if ENABLED(SDSUPPORT)
#if HAS_SD_DETECT && SD_CONNECTION_IS(ONBOARD)
SET_INPUT_PULLUP(SD_DETECT_PIN);
#endif
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
#endif
}
#pragma push_macro("WDT")
#undef WDT // Required to be able to use '.bit.WDT'. Compiler wrongly replace struct field with WDT define
uint8_t MarlinHAL::get_reset_source() {
return 0;
}
#pragma pop_macro("WDT")
void MarlinHAL::reboot() { NVIC_SystemReset(); }
extern "C" {
void * _sbrk(int incr);
extern unsigned int __bss_end__; // end of bss section
}
// Return free memory between end of heap (or end bss) and whatever is current
int freeMemory() {
int free_memory, heap_end = (int)_sbrk(0);
return (int)&free_memory - (heap_end ?: (int)&__bss_end__);
}
// ------------------------
// ADC
// ------------------------
uint16_t MarlinHAL::adc_result;
void MarlinHAL::adc_init() {
/* thanks to https://www.eevblog.com/forum/microcontrollers/samd21g18-adc-with-resrdy-interrupts-only-reads-once-or-twice/ */
ADC->CTRLA.bit.ENABLE = false;
while(ADC->STATUS.bit.SYNCBUSY);
// load chip corrections
uint32_t bias = (*((uint32_t *) ADC_FUSES_BIASCAL_ADDR) & ADC_FUSES_BIASCAL_Msk) >> ADC_FUSES_BIASCAL_Pos;
uint32_t linearity = (*((uint32_t *) ADC_FUSES_LINEARITY_0_ADDR) & ADC_FUSES_LINEARITY_0_Msk) >> ADC_FUSES_LINEARITY_0_Pos;
linearity |= ((*((uint32_t *) ADC_FUSES_LINEARITY_1_ADDR) & ADC_FUSES_LINEARITY_1_Msk) >> ADC_FUSES_LINEARITY_1_Pos) << 5;
/* Wait for bus synchronization. */
while (ADC->STATUS.bit.SYNCBUSY) {};
ADC->CALIB.reg = ADC_CALIB_BIAS_CAL(bias) | ADC_CALIB_LINEARITY_CAL(linearity);
/* Wait for bus synchronization. */
while (ADC->STATUS.bit.SYNCBUSY) {};
ADC->CTRLA.bit.SWRST = true;
while(ADC->STATUS.bit.SYNCBUSY);
ADC->REFCTRL.reg = ADC_REFCTRL_REFSEL_INTVCC1;
ADC->AVGCTRL.reg = ADC_AVGCTRL_SAMPLENUM_32| ADC_AVGCTRL_ADJRES(4);;
ADC->CTRLB.reg = ADC_CTRLB_PRESCALER_DIV128 |
ADC_CTRLB_RESSEL_16BIT |
ADC_CTRLB_FREERUN;
while(ADC->STATUS.bit.SYNCBUSY);
ADC->SAMPCTRL.bit.SAMPLEN = 0x00;
while(ADC->STATUS.bit.SYNCBUSY);
ADC->INPUTCTRL.reg = ADC_INPUTCTRL_INPUTSCAN(HAL_ADC_AIN_LEN) // scan (INPUTSCAN + NUM_EXTUDERS - 1) pins
| ADC_INPUTCTRL_GAIN_DIV2 |ADC_INPUTCTRL_MUXNEG_GND| HAL_ADC_AIN_START ; /* set to first AIN */
while(ADC->STATUS.bit.SYNCBUSY);
ADC->INTENSET.reg |= ADC_INTENSET_RESRDY; // enable Result Ready ADC interrupts
while (ADC->STATUS.bit.SYNCBUSY);
NVIC_EnableIRQ(ADC_IRQn); // enable ADC interrupts
NVIC_SetPriority(ADC_IRQn, 3);
ADC->CTRLA.bit.ENABLE = true;
}
volatile uint32_t adc_results[HAL_ADC_AIN_NUM_SENSORS];
void ADC_Handler() {
while(ADC->STATUS.bit.SYNCBUSY == 1);
int pos = ADC->INPUTCTRL.bit.INPUTOFFSET;
adc_results[pos] = ADC->RESULT.reg; /* Read the value. */
ADC->INTFLAG.reg = ADC_INTENSET_RESRDY; /* Clear the data ready flag. */
}
void MarlinHAL::adc_start(const pin_t pin) {
/* due to the way INPUTOFFSET works, the last sensor is the first position in the array
and we want the ADC_handler interrupt to be as simple possible, so we do the calculation here.
*/
unsigned int pos = PIN_TO_INPUTCTRL(pin) - HAL_ADC_AIN_START + 1;
if (pos == HAL_ADC_AIN_NUM_SENSORS) pos = 0;
adc_result = adc_results[pos]; // 16-bit resolution
//adc_result = 0xFFFF;
}
#endif // __SAMD21__

223
Marlin/src/HAL/SAMD21/HAL.h Normal file
View File

@@ -0,0 +1,223 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#define CPU_32_BIT
#include "../shared/Marduino.h"
#include "../shared/math_32bit.h"
#include "../shared/HAL_SPI.h"
#include "fastio.h"
// ------------------------
// Serial ports
// ------------------------
#include "../../core/serial_hook.h"
typedef ForwardSerial1Class< decltype(SerialUSB) > DefaultSerial1;
extern DefaultSerial1 MSerialUSB;
// Serial ports
typedef ForwardSerial1Class< decltype(Serial1) > DefaultSerial2;
typedef ForwardSerial1Class< decltype(Serial2) > DefaultSerial3;
extern DefaultSerial2 MSerial0;
extern DefaultSerial3 MSerial1;
#define __MSERIAL(X) MSerial##X
#define _MSERIAL(X) __MSERIAL(X)
#define MSERIAL(X) _MSERIAL(INCREMENT(X))
#if WITHIN(SERIAL_PORT, 0, 1)
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
#elif SERIAL_PORT == -1
#define MYSERIAL1 MSerialUSB
#else
#error "SERIAL_PORT must be -1 (Native USB only)."
#endif
#ifdef SERIAL_PORT_2
#if WITHIN(SERIAL_PORT_2, 0, 1)
#define MYSERIAL2 MSERIAL(SERIAL_PORT)
#elif SERIAL_PORT_2 == -1
#define MYSERIAL2 MSerialUSB
#else
#error "SERIAL_PORT_2 must be -1 (Native USB only)."
#endif
#endif
#ifdef MMU2_SERIAL_PORT
#if WITHIN(MMU2_SERIAL_PORT, 0, 1)
#define MMU2_SERIAL MSERIAL(SERIAL_PORT)
#elif MMU2_SERIAL_PORT == -1
#define MMU2_SERIAL MSerialUSB
#else
#error "MMU2_SERIAL_PORT must be -1 (Native USB only)."
#endif
#endif
#ifdef LCD_SERIAL_PORT
#if WITHIN(LCD_SERIAL_PORT, 0, 1)
#define LCD_SERIAL MSERIAL(SERIAL_PORT)
#elif LCD_SERIAL_PORT == -1
#define LCD_SERIAL MSerialUSB
#else
#error "LCD_SERIAL_PORT must be -1 (Native USB only)."
#endif
#endif
typedef int8_t pin_t;
#define SHARED_SERVOS HAS_SERVOS // Use shared/servos.cpp
class Servo;
typedef Servo hal_servo_t;
//
// Interrupts
//
#define CRITICAL_SECTION_START() const bool irqon = !__get_PRIMASK(); __disable_irq()
#define CRITICAL_SECTION_END() if (irqon) __enable_irq()
#define cli() __disable_irq() // Disable interrupts
#define sei() __enable_irq() // Enable interrupts
//
// ADC
//
#define HAL_ADC_FILTERED 1 // Disable Marlin's oversampling. The HAL filters ADC values.
#define HAL_ADC_VREF 3.3
#define HAL_ADC_RESOLUTION 12
#define HAL_ADC_AIN_START ADC_INPUTCTRL_MUXPOS_PIN3
#define HAL_ADC_AIN_NUM_SENSORS 3
#define HAL_ADC_AIN_LEN HAL_ADC_AIN_NUM_SENSORS-1
//
// Pin Mapping for M42, M43, M226
//
#define GET_PIN_MAP_PIN(index) index
#define GET_PIN_MAP_INDEX(pin) pin
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
//
// Tone
//
void tone(const pin_t _pin, const unsigned int frequency, const unsigned long duration=0);
void noTone(const pin_t _pin);
// ------------------------
// Class Utilities
// ------------------------
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
#ifdef __cplusplus
extern "C" {
#endif
char *dtostrf(double __val, signed char __width, unsigned char __prec, char *__s);
extern "C" int freeMemory();
#ifdef __cplusplus
}
#endif
#pragma GCC diagnostic pop
// ------------------------
// MarlinHAL Class
// ------------------------
class MarlinHAL {
public:
// Earliest possible init, before setup()
MarlinHAL() {}
// Watchdog
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {});
static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {});
static void init(); // Called early in setup()
static void init_board() {} // Called less early in setup()
static void reboot(); // Restart the firmware from 0x0
// Interrupts
static bool isr_state() { return !__get_PRIMASK(); }
static void isr_on() { sei(); }
static void isr_off() { cli(); }
static void delay_ms(const int ms) { delay(ms); }
// Tasks, called from idle()
static void idletask() {}
// Reset
static uint8_t get_reset_source();
static void clear_reset_source() {}
// Free SRAM
static int freeMemory() { return ::freeMemory(); }
//
// ADC Methods
//
static uint16_t adc_result;
// Called by Temperature::init once at startup
static void adc_init();
// Called by Temperature::init for each sensor at startup
static void adc_enable(const uint8_t ch) {}
// Begin ADC sampling on the given pin. Called from Temperature::isr!
static void adc_start(const pin_t pin);
// Is the ADC ready for reading?
static bool adc_ready() { return true; }
// The current value of the ADC register
static uint16_t adc_value() { return adc_result; }
/**
* Set the PWM duty cycle for the pin to the given value.
* No option to invert the duty cycle [default = false]
* No option to change the scale of the provided value to enable finer PWM duty control [default = 255]
*/
static void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t=255, const bool=false) {
analogWrite(pin, v);
}
private:
static void dma_init();
};

View File

@@ -0,0 +1,148 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
/**
* Hardware and software SPI implementations are included in this file.
*
* Control of the slave select pin(s) is handled by the calling routines and
* SAMD21 let hardware SPI handling to remove SS from its logic.
*/
#ifdef __SAMD21__
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
#include "../../inc/MarlinConfig.h"
#include <SPI.h>
// --------------------------------------------------------------------------
// Public functions
// --------------------------------------------------------------------------
#if EITHER(SOFTWARE_SPI, FORCE_SOFT_SPI)
// ------------------------
// Software SPI
// ------------------------
#error "Software SPI not supported for SAMD21. Use Hardware SPI."
#else // !SOFTWARE_SPI
static SPISettings spiConfig;
// ------------------------
// Hardware SPI
// ------------------------
void spiBegin() {
spiInit(SPI_HALF_SPEED);
}
void spiInit(uint8_t spiRate) {
// Use Marlin datarates
uint32_t clock;
switch (spiRate) {
case SPI_FULL_SPEED: clock = 8000000; break;
case SPI_HALF_SPEED: clock = 4000000; break;
case SPI_QUARTER_SPEED: clock = 2000000; break;
case SPI_EIGHTH_SPEED: clock = 1000000; break;
case SPI_SIXTEENTH_SPEED: clock = 500000; break;
case SPI_SPEED_5: clock = 250000; break;
case SPI_SPEED_6: clock = 125000; break;
default: clock = 4000000; break; // Default from the SPI library
}
spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0);
SPI.begin();
}
/**
* @brief Receives a single byte from the SPI port.
*
* @return Byte received
*
* @details
*/
uint8_t spiRec() {
SPI.beginTransaction(spiConfig);
uint8_t returnByte = SPI.transfer(0xFF);
SPI.endTransaction();
return returnByte;
}
/**
* @brief Receives a number of bytes from the SPI port to a buffer
*
* @param buf Pointer to starting address of buffer to write to.
* @param nbyte Number of bytes to receive.
* @return Nothing
*/
void spiRead(uint8_t *buf, uint16_t nbyte) {
if (nbyte == 0) return;
memset(buf, 0xFF, nbyte);
SPI.beginTransaction(spiConfig);
SPI.transfer(buf, nbyte);
SPI.endTransaction();
}
/**
* @brief Sends a single byte on SPI port
*
* @param b Byte to send
*
* @details
*/
void spiSend(uint8_t b) {
SPI.beginTransaction(spiConfig);
SPI.transfer(b);
SPI.endTransaction();
}
/**
* @brief Write token and then write from 512 byte buffer to SPI (for SD card)
*
* @param buf Pointer with buffer start address
* @return Nothing
*
* @details Uses DMA
*/
void spiSendBlock(uint8_t token, const uint8_t *buf) {
SPI.beginTransaction(spiConfig);
SPI.transfer(token);
SPI.transfer((uint8_t*)buf, 512);
SPI.endTransaction();
}
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
spiConfig = SPISettings(spiClock, (BitOrder)bitOrder, dataMode);
SPI.beginTransaction(spiConfig);
}
#endif // !SOFTWARE_SPI
#endif // __SAMD21__

View File

@@ -0,0 +1,31 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#pragma once
#include <SPI.h>
using MarlinSPI = SPIClass;

View File

@@ -0,0 +1,82 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#include "../../inc/MarlinConfig.h"
#if ENABLED(QSPI_EEPROM)
#include "QSPIFlash.h"
#define INVALID_ADDR 0xFFFFFFFF
#define SECTOR_OF(a) (a & ~(SFLASH_SECTOR_SIZE - 1))
#define OFFSET_OF(a) (a & (SFLASH_SECTOR_SIZE - 1))
Adafruit_SPIFlashBase * QSPIFlash::_flashBase = nullptr;
uint8_t QSPIFlash::_buf[SFLASH_SECTOR_SIZE];
uint32_t QSPIFlash::_addr = INVALID_ADDR;
void QSPIFlash::begin() {
if (_flashBase) return;
_flashBase = new Adafruit_SPIFlashBase(new Adafruit_FlashTransport_QSPI());
_flashBase->begin(nullptr);
}
size_t QSPIFlash::size() {
return _flashBase->size();
}
uint8_t QSPIFlash::readByte(const uint32_t address) {
if (SECTOR_OF(address) == _addr) return _buf[OFFSET_OF(address)];
return _flashBase->read8(address);
}
void QSPIFlash::writeByte(const uint32_t address, const uint8_t value) {
uint32_t const sector_addr = SECTOR_OF(address);
// Page changes, flush old and update new cache
if (sector_addr != _addr) {
flush();
_addr = sector_addr;
// read a whole page from flash
_flashBase->readBuffer(sector_addr, _buf, SFLASH_SECTOR_SIZE);
}
_buf[OFFSET_OF(address)] = value;
}
void QSPIFlash::flush() {
if (_addr == INVALID_ADDR) return;
_flashBase->eraseSector(_addr / SFLASH_SECTOR_SIZE);
_flashBase->writeBuffer(_addr, _buf, SFLASH_SECTOR_SIZE);
_addr = INVALID_ADDR;
}
#endif // QSPI_EEPROM

View File

@@ -0,0 +1,49 @@
/**
* @file QSPIFlash.h
*
* The MIT License (MIT)
*
* Copyright (c) 2019 Ha Thach and Dean Miller for Adafruit Industries LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* Derived from Adafruit_SPIFlash class with no SdFat references
*/
#pragma once
#include <Adafruit_SPIFlashBase.h>
// This class extends Adafruit_SPIFlashBase by adding caching support.
//
// This class will use 4096 Bytes of RAM as a block cache.
class QSPIFlash {
public:
static void begin();
static size_t size();
static uint8_t readByte(const uint32_t address);
static void writeByte(const uint32_t address, const uint8_t v);
static void flush();
private:
static Adafruit_SPIFlashBase * _flashBase;
static uint8_t _buf[SFLASH_SECTOR_SIZE];
static uint32_t _addr;
};
extern QSPIFlash qspi;

View File

@@ -0,0 +1,66 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#define SYNC(sc) while (sc) { \
asm(""); \
}
// Get SAMD port/pin from specified arduino pin
#define GET_SAMD_PORT(P) _GET_SAMD_PORT(PIN_TO_SAMD_PIN(P))
#define GET_SAMD_PIN(P) _GET_SAMD_PIN(PIN_TO_SAMD_PIN(P))
// Get external interrupt line associated to specified arduino pin
#define PIN_TO_EILINE(P) _SAMDPORTPIN_TO_EILINE(GET_SAMD_PORT(P), GET_SAMD_PIN(P))
// Get adc/ain associated to specified arduino pin
#define PIN_TO_ADC(P) (ANAPIN_TO_ADCAIN(P) >> 8)
// Private defines
#define PIN_TO_SAMD_PIN(P) DIO##P##_PIN
#define _GET_SAMD_PORT(P) ((P) >> 5)
#define _GET_SAMD_PIN(P) ((P) & 0x1F)
// Get external interrupt line
#define _SAMDPORTPIN_TO_EILINE(P,B) ((P == 0 && WITHIN(B, 0, 31) && B != 26 && B != 28 && B != 29) ? (B) & 0xF \
: (P == 1 && (WITHIN(B, 0, 25) || WITHIN(B, 30, 31))) ? (B) & 0xF \
: (P == 1 && WITHIN(B, 26, 29)) ? 12 + (B) - 26 \
: (P == 2 && (WITHIN(B, 0, 6) || WITHIN(B, 10, 31)) && B != 29) ? (B) & 0xF \
: (P == 2 && B == 7) ? 9 \
: (P == 3 && WITHIN(B, 0, 1)) ? (B) \
: (P == 3 && WITHIN(B, 8, 12)) ? 3 + (B) - 8 \
: (P == 3 && WITHIN(B, 20, 21)) ? 10 + (B) - 20 \
: -1)
#define A2_AIN 3
#define A3_AIN 4
#define A4_AIN 5
#define PIN_TO_AIN(P) A##P##_AIN
#define AIN_TO_RESULT(P) ( (P - HAL_ADC_AIN_START == HAL_ADC_AIN_NUM_SENSORS-1) ? 0 : (P - HAL_ADC_AIN_START + 1) )

View File

@@ -0,0 +1,220 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
/**
* This comes from Arduino library which at the moment is buggy and uncompilable
*/
#ifdef __SAMD21__
#include "../../inc/MarlinConfig.h"
#if HAS_SERVOS
#include "../shared/servo.h"
#include "../shared/servo_private.h"
#include "SAMD21.h"
#define __TC_GCLK_ID(t) TC##t##_GCLK_ID
#define _TC_GCLK_ID(t) __TC_GCLK_ID(t)
#define TC_GCLK_ID _TC_GCLK_ID(SERVO_TC)
#define _TC_PRESCALER(d) TC_CTRLA_PRESCALER_DIV##d##_Val
#define TC_PRESCALER(d) _TC_PRESCALER(d)
#define __SERVO_IRQn(t) TC##t##_IRQn
#define _SERVO_IRQn(t) __SERVO_IRQn(t)
#define SERVO_IRQn _SERVO_IRQn(SERVO_TC)
#define HAL_SERVO_TIMER_ISR() TC_HANDLER(SERVO_TC)
#define TIMER_TCCHANNEL(t) ((t) & 1)
#define TC_COUNTER_START_VAL 0xFFFF
static volatile int8_t currentServoIndex[_Nbr_16timers]; // index for the servo being pulsed for each timer (or -1 if refresh interval)
FORCE_INLINE static uint16_t getTimerCount() {
Tcc * const tc = timer_config[SERVO_TC].pTcc;
tc->CTRLBSET.reg = TCC_CTRLBCLR_CMD_READSYNC;
SYNC(tc->STATUS.reg & TC_STATUS_SYNCBUSY);
return tc->COUNT.bit.COUNT;
}
// ----------------------------
// Interrupt handler for the TC
// ----------------------------
HAL_SERVO_TIMER_ISR() {
Tcc * const tc = timer_config[SERVO_TC].pTcc;
const timer16_Sequence_t timer =
#ifndef _useTimer1
_timer2
#elif !defined(_useTimer2)
_timer1
#else
(tc->INTFLAG.reg & tc->INTENSET.reg & TC_INTFLAG_MC0) ? _timer1 : _timer2
#endif
;
const uint8_t tcChannel = TIMER_TCCHANNEL(timer);
int8_t cho = currentServoIndex[timer]; // Handle the prior servo first
if (cho < 0) { // Servo -1 indicates the refresh interval completed...
#if defined(_useTimer1) && defined(_useTimer2)
if (currentServoIndex[timer ^ 1] >= 0) {
// Wait for both channels
// Clear the interrupt
tc->INTFLAG.reg = (tcChannel == 0) ? TC_INTFLAG_MC0 : TC_INTFLAG_MC1;
return;
}
#endif
tc->COUNT.reg = TC_COUNTER_START_VAL; // ...so reset the timer
SYNC(tc->STATUS.reg & TC_STATUS_SYNCBUSY);
}
else if (SERVO_INDEX(timer, cho) < ServoCount) // prior channel handled?
digitalWrite(SERVO(timer, cho).Pin.nbr, LOW); // pulse the prior channel LOW
currentServoIndex[timer] = ++cho; // go to the next channel (or 0)
if (cho < SERVOS_PER_TIMER && SERVO_INDEX(timer, cho) < ServoCount) {
if (SERVO(timer, cho).Pin.isActive) // activated?
digitalWrite(SERVO(timer, cho).Pin.nbr, HIGH); // yes: pulse HIGH
tc->CC[tcChannel].reg = getTimerCount() - (uint16_t)SERVO(timer, cho).ticks;
}
else {
// finished all channels so wait for the refresh period to expire before starting over
currentServoIndex[timer] = -1; // reset the timer COUNT.reg on the next call
const uint16_t cval = getTimerCount() - 256 / (SERVO_TIMER_PRESCALER), // allow 256 cycles to ensure the next CV not missed
ival = (TC_COUNTER_START_VAL) - (uint16_t)usToTicks(REFRESH_INTERVAL); // at least REFRESH_INTERVAL has elapsed
tc->CC[tcChannel].reg = min(cval, ival);
}
if (tcChannel == 0) {
SYNC(tc->SYNCBUSY.bit.CC0);
tc->INTFLAG.reg = TC_INTFLAG_MC0; // Clear the interrupt
}
else {
SYNC(tc->SYNCBUSY.bit.CC1);
tc->INTFLAG.reg = TC_INTFLAG_MC1; // Clear the interrupt
}
}
void initISR(const timer16_Sequence_t timer) {
Tcc * const tc = timer_config[SERVO_TC].pTcc;
const uint8_t tcChannel = TIMER_TCCHANNEL(timer);
static bool initialized = false; // Servo TC has been initialized
if (!initialized) {
NVIC_DisableIRQ(SERVO_IRQn);
// Disable the timer
tc->CTRLA.bit.ENABLE = false;
SYNC(tc->STATUS.reg & TC_STATUS_SYNCBUSY);
// Select GCLK0 as timer/counter input clock source
GCLK->CLKCTRL.reg =(GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(TCC0_GCLK_ID));
SYNC (GCLK->STATUS.bit.SYNCBUSY);
// Reset the timer
tc->CTRLA.bit.SWRST = true;
SYNC(tc->CTRLA.bit.SWRST);
// Set timer counter mode to 16 bits
tc->CTRLA.reg = TC_CTRLA_MODE_COUNT16;
// Set timer counter mode as normal PWM
tc->WAVE.bit.WAVEGEN = TCC_WAVE_WAVEGEN_NPWM_Val;
// Set the prescaler factor
tc->CTRLA.bit.PRESCALER = TC_PRESCALER(SERVO_TIMER_PRESCALER);
// Count down
tc->CTRLBSET.reg = TCC_CTRLBCLR_DIR;
SYNC(tc->SYNCBUSY.bit.CTRLB);
// Reset all servo indexes
memset((void *)currentServoIndex, 0xFF, sizeof(currentServoIndex));
// Configure interrupt request
NVIC_ClearPendingIRQ(SERVO_IRQn);
NVIC_SetPriority(SERVO_IRQn, 5);
NVIC_EnableIRQ(SERVO_IRQn);
initialized = true;
}
if (!tc->CTRLA.bit.ENABLE) {
// Reset the timer counter
tc->COUNT.reg = TC_COUNTER_START_VAL;
SYNC(tc->STATUS.reg & TC_STATUS_SYNCBUSY);
// Enable the timer and start it
tc->CTRLA.bit.ENABLE = true;
SYNC(tc->STATUS.reg & TC_STATUS_SYNCBUSY);
}
// First interrupt request after 1 ms
tc->CC[tcChannel].reg = getTimerCount() - (uint16_t)usToTicks(1000UL);
if (tcChannel == 0 ) {
SYNC(tc->SYNCBUSY.bit.CC0);
// Clear pending match interrupt
tc->INTFLAG.reg = TC_INTENSET_MC0;
// Enable the match channel interrupt request
tc->INTENSET.reg = TC_INTENSET_MC0;
}
else {
SYNC(tc->SYNCBUSY.bit.CC1);
// Clear pending match interrupt
tc->INTFLAG.reg = TC_INTENSET_MC1;
// Enable the match channel interrupt request
tc->INTENSET.reg = TC_INTENSET_MC1;
}
}
void finISR(const timer16_Sequence_t timer_index) {
Tcc * const tc = timer_config[SERVO_TC].pTcc;
const uint8_t tcChannel = TIMER_TCCHANNEL(timer_index);
// Disable the match channel interrupt request
tc->INTENCLR.reg = (tcChannel == 0) ? TC_INTENCLR_MC0 : TC_INTENCLR_MC1;
if (true
#if defined(_useTimer1) && defined(_useTimer2)
&& (tc->INTENCLR.reg & (TC_INTENCLR_MC0|TC_INTENCLR_MC1)) == 0
#endif
) {
// Disable the timer if not used
tc->CTRLA.bit.ENABLE = false;
SYNC(tc->STATUS.reg & TC_STATUS_SYNCBUSY);
}
}
#endif // HAS_SERVOS
#endif // __SAMD21__

View File

@@ -0,0 +1,45 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#define _useTimer1
#define _useTimer2
#define TRIM_DURATION 5 // compensation ticks to trim adjust for digitalWrite delays
#define SERVO_TIMER_PRESCALER 64 // timer prescaler factor to 64 (avoid overflowing 16-bit clock counter, at 120MHz this is 1831 ticks per millisecond
#define SERVO_TC 3
typedef enum {
#ifdef _useTimer1
_timer1,
#endif
#ifdef _useTimer2
_timer2,
#endif
_Nbr_16timers
} timer16_Sequence_t;

View File

@@ -0,0 +1,141 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#ifdef __SAMD21__
#include "../../inc/MarlinConfig.h"
#if ENABLED(FLASH_EEPROM_EMULATION)
#define TOTAL_FLASH_SIZE (MARLIN_EEPROM_SIZE+255)/256*256
/* reserve flash memory */
static const uint8_t flashdata[TOTAL_FLASH_SIZE] __attribute__((__aligned__(256))) { }; \
#include "../shared/eeprom_api.h"
size_t PersistentStore::capacity() {
return MARLIN_EEPROM_SIZE;
/* const uint8_t psz = NVMCTRL->SEESTAT.bit.PSZ,
sblk = NVMCTRL->SEESTAT.bit.SBLK;
return (!psz && !sblk) ? 0
: (psz <= 2) ? (0x200 << psz)
: (sblk == 1 || psz == 3) ? 4096
: (sblk == 2 || psz == 4) ? 8192
: (sblk <= 4 || psz == 5) ? 16384
: (sblk >= 9 && psz == 7) ? 65536
: 32768;*/
}
uint32_t PAGE_SIZE;
uint32_t ROW_SIZE;
bool hasWritten = false;
uint8_t * buffer;
void _erase(const volatile void *flash_ptr) {
NVMCTRL->ADDR.reg = ((uint32_t)flash_ptr) / 2;
NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_ER;
while (!NVMCTRL->INTFLAG.bit.READY) { }
}
void erase(const volatile void *flash_ptr, uint32_t size) {
const uint8_t *ptr = (const uint8_t *)flash_ptr;
while (size > ROW_SIZE) {
_erase(ptr);
ptr += ROW_SIZE;
size -= ROW_SIZE;
}
_erase(ptr);
}
bool PersistentStore::access_start() {
/* clear page buffer*/
NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_PBC;
while (NVMCTRL->INTFLAG.bit.READY == 0) { }
PAGE_SIZE = pow(2,3 + NVMCTRL->PARAM.bit.PSZ);
ROW_SIZE= PAGE_SIZE * 4;
/*NVMCTRL->SEECFG.reg = NVMCTRL_SEECFG_WMODE_BUFFERED; // Buffered mode and segment reallocation active
if (NVMCTRL->SEESTAT.bit.RLOCK)
NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_USEE); */ // Unlock E2P data write access
// erase(&flashdata[0], TOTAL_FLASH_SIZE);
return true;
}
bool PersistentStore::access_finish() {
if (hasWritten) {
erase(&flashdata[0], TOTAL_FLASH_SIZE);
NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_PBC;
while (NVMCTRL->INTFLAG.bit.READY == 0) { }
NVMCTRL->CTRLB.bit.MANW = 0;
volatile uint32_t *dst_addr = (volatile uint32_t *) &flashdata;
uint32_t *pointer = (uint32_t *) buffer;
for (uint32_t i = 0; i < TOTAL_FLASH_SIZE; i+=4) {
*dst_addr = (uint32_t) *pointer;
pointer++;
dst_addr ++;
}
// Execute "WP" Write Page
NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_WP;
while (NVMCTRL->INTFLAG.bit.READY == 0) { }
free(buffer);
hasWritten = false;
}
return true;
}
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
if (!hasWritten) {
// init temp buffer
buffer = (uint8_t *) malloc(MARLIN_EEPROM_SIZE);
hasWritten=true;
}
memcpy(buffer+pos,value,size);
pos += size;
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
volatile uint8_t *dst_addr = (volatile uint8_t *) &flashdata;
dst_addr += pos;
memcpy(value,(const void *) dst_addr,size);
pos += size;
return false;
}
#endif // FLASH_EEPROM_EMULATION
#endif // __SAMD21__

View File

@@ -0,0 +1,79 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#ifdef __SAMD21__
#include "../../inc/MarlinConfig.h"
#if ENABLED(QSPI_EEPROM)
#error "QSPI_EEPROM emulation Not implemented on SAMD21"
#include "../shared/eeprom_api.h"
#include "QSPIFlash.h"
static bool initialized;
size_t PersistentStore::capacity() { return qspi.size(); }
bool PersistentStore::access_start() {
if (!initialized) {
qspi.begin();
initialized = true;
}
return true;
}
bool PersistentStore::access_finish() {
qspi.flush();
return true;
}
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
while (size--) {
const uint8_t v = *value;
qspi.writeByte(pos, v);
crc16(crc, &v, 1);
pos++;
value++;
}
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
while (size--) {
uint8_t c = qspi.readByte(pos);
if (writing) *value = c;
crc16(crc, &c, 1);
pos++;
value++;
}
return false;
}
#endif // QSPI_EEPROM
#endif // __SAMD21__

View File

@@ -0,0 +1,82 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#ifdef __SAMD21__
#include "../../inc/MarlinConfig.h"
#if USE_WIRED_EEPROM
#error "USE_WIRED_EEPROM emulation Not implemented on SAMD21"
/**
* PersistentStore for Arduino-style EEPROM interface
* with simple implementations supplied by Marlin.
*/
#include "../shared/eeprom_if.h"
#include "../shared/eeprom_api.h"
#ifndef MARLIN_EEPROM_SIZE
#error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM."
#endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
bool PersistentStore::access_start() { eeprom_init(); return true; }
bool PersistentStore::access_finish() { return true; }
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
uint16_t written = 0;
while (size--) {
const uint8_t v = *value;
uint8_t * const p = (uint8_t * const)pos;
if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
eeprom_write_byte(p, v);
if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes
if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true;
}
}
crc16(crc, &v, 1);
pos++;
value++;
}
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
while (size--) {
uint8_t c = eeprom_read_byte((uint8_t*)pos);
if (writing) *value = c;
crc16(crc, &c, 1);
pos++;
value++;
}
return false;
}
#endif // USE_WIRED_EEPROM
#endif // __SAMD21__

View File

@@ -0,0 +1,253 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
/**
* Endstop interrupts for ATMEL SAMD21 based targets.
*
* On SAMD21, all pins support external interrupt capability.
* Any pin can be used for external interrupts, but there are some restrictions.
* At most 16 different external interrupts can be used at one time.
* Further, you cant just pick any 16 pins to use. This is because every pin on the SAMD21
* connects to what is called an EXTINT line, and only one pin per EXTINT line can be used for external
* interrupts at a time
*/
/**
* Endstop Interrupts
*
* Without endstop interrupts the endstop pins must be polled continually in
* the temperature-ISR via endstops.update(), most of the time finding no change.
* With this feature endstops.update() is called only when we know that at
* least one endstop has changed state, saving valuable CPU cycles.
*
* This feature only works when all used endstop pins can generate an 'external interrupt'.
*
* Test whether pins issue interrupts on your board by flashing 'pin_interrupt_test.ino'.
* (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
*/
#include "../../module/endstops.h"
#define MATCH_EILINE(P1,P2) (P1 != P2 && PIN_TO_EILINE(P1) == PIN_TO_EILINE(P2))
#define MATCH_X_MAX_EILINE(P) TERN0(HAS_X_MAX, DEFER4(MATCH_EILINE)(P, X_MAX_PIN))
#define MATCH_X_MIN_EILINE(P) TERN0(HAS_X_MIN, DEFER4(MATCH_EILINE)(P, X_MIN_PIN))
#define MATCH_Y_MAX_EILINE(P) TERN0(HAS_Y_MAX, DEFER4(MATCH_EILINE)(P, Y_MAX_PIN))
#define MATCH_Y_MIN_EILINE(P) TERN0(HAS_Y_MIN, DEFER4(MATCH_EILINE)(P, Y_MIN_PIN))
#define MATCH_Z_MAX_EILINE(P) TERN0(HAS_Z_MAX, DEFER4(MATCH_EILINE)(P, Z_MAX_PIN))
#define MATCH_Z_MIN_EILINE(P) TERN0(HAS_Z_MIN, DEFER4(MATCH_EILINE)(P, Z_MIN_PIN))
#define MATCH_I_MAX_EILINE(P) TERN0(HAS_I_MAX, DEFER4(MATCH_EILINE)(P, I_MAX_PIN))
#define MATCH_I_MIN_EILINE(P) TERN0(HAS_I_MIN, DEFER4(MATCH_EILINE)(P, I_MIN_PIN))
#define MATCH_J_MAX_EILINE(P) TERN0(HAS_J_MAX, DEFER4(MATCH_EILINE)(P, J_MAX_PIN))
#define MATCH_J_MIN_EILINE(P) TERN0(HAS_J_MIN, DEFER4(MATCH_EILINE)(P, J_MIN_PIN))
#define MATCH_K_MAX_EILINE(P) TERN0(HAS_K_MAX, DEFER4(MATCH_EILINE)(P, K_MAX_PIN))
#define MATCH_K_MIN_EILINE(P) TERN0(HAS_K_MIN, DEFER4(MATCH_EILINE)(P, K_MIN_PIN))
#define MATCH_U_MAX_EILINE(P) TERN0(HAS_U_MAX, DEFER4(MATCH_EILINE)(P, U_MAX_PIN))
#define MATCH_U_MIN_EILINE(P) TERN0(HAS_U_MIN, DEFER4(MATCH_EILINE)(P, U_MIN_PIN))
#define MATCH_V_MAX_EILINE(P) TERN0(HAS_V_MAX, DEFER4(MATCH_EILINE)(P, V_MAX_PIN))
#define MATCH_V_MIN_EILINE(P) TERN0(HAS_V_MIN, DEFER4(MATCH_EILINE)(P, V_MIN_PIN))
#define MATCH_W_MAX_EILINE(P) TERN0(HAS_W_MAX, DEFER4(MATCH_EILINE)(P, W_MAX_PIN))
#define MATCH_W_MIN_EILINE(P) TERN0(HAS_W_MIN, DEFER4(MATCH_EILINE)(P, W_MIN_PIN))
#define MATCH_Z2_MAX_EILINE(P) TERN0(HAS_Z2_MAX, DEFER4(MATCH_EILINE)(P, Z2_MAX_PIN))
#define MATCH_Z2_MIN_EILINE(P) TERN0(HAS_Z2_MIN, DEFER4(MATCH_EILINE)(P, Z2_MIN_PIN))
#define MATCH_Z3_MAX_EILINE(P) TERN0(HAS_Z3_MAX, DEFER4(MATCH_EILINE)(P, Z3_MAX_PIN))
#define MATCH_Z3_MIN_EILINE(P) TERN0(HAS_Z3_MIN, DEFER4(MATCH_EILINE)(P, Z3_MIN_PIN))
#define MATCH_Z4_MAX_EILINE(P) TERN0(HAS_Z4_MAX, DEFER4(MATCH_EILINE)(P, Z4_MAX_PIN))
#define MATCH_Z4_MIN_EILINE(P) TERN0(HAS_Z4_MIN, DEFER4(MATCH_EILINE)(P, Z4_MIN_PIN))
#define MATCH_Z_MIN_PROBE_EILINE(P) TERN0(HAS_Z_MIN_PROBE_PIN, DEFER4(MATCH_EILINE)(P, Z_MIN_PROBE_PIN))
#define AVAILABLE_EILINE(P) ( PIN_TO_EILINE(P) != -1 \
&& !MATCH_X_MAX_EILINE(P) && !MATCH_X_MIN_EILINE(P) \
&& !MATCH_Y_MAX_EILINE(P) && !MATCH_Y_MIN_EILINE(P) \
&& !MATCH_Z_MAX_EILINE(P) && !MATCH_Z_MIN_EILINE(P) \
&& !MATCH_I_MAX_EILINE(P) && !MATCH_I_MIN_EILINE(P) \
&& !MATCH_J_MAX_EILINE(P) && !MATCH_J_MIN_EILINE(P) \
&& !MATCH_K_MAX_EILINE(P) && !MATCH_K_MIN_EILINE(P) \
&& !MATCH_U_MAX_EILINE(P) && !MATCH_U_MIN_EILINE(P) \
&& !MATCH_V_MAX_EILINE(P) && !MATCH_V_MIN_EILINE(P) \
&& !MATCH_W_MAX_EILINE(P) && !MATCH_W_MIN_EILINE(P) \
&& !MATCH_Z2_MAX_EILINE(P) && !MATCH_Z2_MIN_EILINE(P) \
&& !MATCH_Z3_MAX_EILINE(P) && !MATCH_Z3_MIN_EILINE(P) \
&& !MATCH_Z4_MAX_EILINE(P) && !MATCH_Z4_MIN_EILINE(P) \
&& !MATCH_Z_MIN_PROBE_EILINE(P) )
// One ISR for all EXT-Interrupts
void endstop_ISR() { endstops.update(); }
void setup_endstop_interrupts() {
#define _ATTACH(P) attachInterrupt(P, endstop_ISR, CHANGE)
#if HAS_X_MAX
#if !AVAILABLE_EILINE(X_MAX_PIN)
#error "X_MAX_PIN has no EXTINT line available."
#endif
_ATTACH(X_MAX_PIN);
#endif
#if HAS_X_MIN
#if !AVAILABLE_EILINE(X_MIN_PIN)
#error "X_MIN_PIN has no EXTINT line available."
#endif
_ATTACH(X_MIN_PIN);
#endif
#if HAS_Y_MAX
#if !AVAILABLE_EILINE(Y_MAX_PIN)
#error "Y_MAX_PIN has no EXTINT line available."
#endif
_ATTACH(Y_MAX_PIN);
#endif
#if HAS_Y_MIN
#if !AVAILABLE_EILINE(Y_MIN_PIN)
#error "Y_MIN_PIN has no EXTINT line available."
#endif
_ATTACH(Y_MIN_PIN);
#endif
#if HAS_Z_MAX
#if !AVAILABLE_EILINE(Z_MAX_PIN)
#error "Z_MAX_PIN has no EXTINT line available."
#endif
_ATTACH(Z_MAX_PIN);
#endif
#if HAS_Z_MIN
#if !AVAILABLE_EILINE(Z_MIN_PIN)
#error "Z_MIN_PIN has no EXTINT line available."
#endif
_ATTACH(Z_MIN_PIN);
#endif
#if HAS_Z2_MAX
#if !AVAILABLE_EILINE(Z2_MAX_PIN)
#error "Z2_MAX_PIN has no EXTINT line available."
#endif
_ATTACH(Z2_MAX_PIN);
#endif
#if HAS_Z2_MIN
#if !AVAILABLE_EILINE(Z2_MIN_PIN)
#error "Z2_MIN_PIN has no EXTINT line available."
#endif
_ATTACH(Z2_MIN_PIN);
#endif
#if HAS_Z3_MAX
#if !AVAILABLE_EILINE(Z3_MAX_PIN)
#error "Z3_MAX_PIN has no EXTINT line available."
#endif
_ATTACH(Z3_MAX_PIN);
#endif
#if HAS_Z3_MIN
#if !AVAILABLE_EILINE(Z3_MIN_PIN)
#error "Z3_MIN_PIN has no EXTINT line available."
#endif
_ATTACH(Z3_MIN_PIN);
#endif
#if HAS_Z4_MAX
#if !AVAILABLE_EILINE(Z4_MAX_PIN)
#error "Z4_MAX_PIN has no EXTINT line available."
#endif
_ATTACH(Z4_MAX_PIN);
#endif
#if HAS_Z4_MIN
#if !AVAILABLE_EILINE(Z4_MIN_PIN)
#error "Z4_MIN_PIN has no EXTINT line available."
#endif
_ATTACH(Z4_MIN_PIN);
#endif
#if HAS_Z_MIN_PROBE_PIN
#if !AVAILABLE_EILINE(Z_MIN_PROBE_PIN)
#error "Z_MIN_PROBE_PIN has no EXTINT line available."
#endif
_ATTACH(Z_MIN_PROBE_PIN);
#endif
#if HAS_I_MAX
#if !AVAILABLE_EILINE(I_MAX_PIN)
#error "I_MAX_PIN has no EXTINT line available."
#endif
attachInterrupt(I_MAX_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_I_MIN
#if !AVAILABLE_EILINE(I_MIN_PIN)
#error "I_MIN_PIN has no EXTINT line available."
#endif
attachInterrupt(I_MIN_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_J_MAX
#if !AVAILABLE_EILINE(J_MAX_PIN)
#error "J_MAX_PIN has no EXTINT line available."
#endif
attachInterrupt(J_MAX_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_J_MIN
#if !AVAILABLE_EILINE(J_MIN_PIN)
#error "J_MIN_PIN has no EXTINT line available."
#endif
attachInterrupt(J_MIN_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_K_MAX
#if !AVAILABLE_EILINE(K_MAX_PIN)
#error "K_MAX_PIN has no EXTINT line available."
#endif
attachInterrupt(K_MAX_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_K_MIN
#if !AVAILABLE_EILINE(K_MIN_PIN)
#error "K_MIN_PIN has no EXTINT line available."
#endif
attachInterrupt(K_MIN_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_U_MAX
#if !AVAILABLE_EILINE(U_MAX_PIN)
#error "U_MAX_PIN has no EXTINT line available."
#endif
attachInterrupt(U_MAX_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_U_MIN
#if !AVAILABLE_EILINE(U_MIN_PIN)
#error "U_MIN_PIN has no EXTINT line available."
#endif
attachInterrupt(U_MIN_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_V_MAX
#if !AVAILABLE_EILINE(V_MAX_PIN)
#error "V_MAX_PIN has no EXTINT line available."
#endif
attachInterrupt(V_MAX_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_V_MIN
#if !AVAILABLE_EILINE(V_MIN_PIN)
#error "V_MIN_PIN has no EXTINT line available."
#endif
attachInterrupt(V_MIN_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_W_MAX
#if !AVAILABLE_EILINE(W_MAX_PIN)
#error "W_MAX_PIN has no EXTINT line available."
#endif
attachInterrupt(W_MAX_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_W_MIN
#if !AVAILABLE_EILINE(W_MIN_PIN)
#error "W_MIN_PIN has no EXTINT line available."
#endif
attachInterrupt(W_MIN_PIN, endstop_ISR, CHANGE);
#endif
}

View File

@@ -0,0 +1,215 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
/**
* Fast IO functions for SAMD21
*/
#include "SAMD21.h"
/**
* Utility functions
*/
#ifndef MASK
#define MASK(PIN) _BV(PIN)
#endif
/**
* Magic I/O routines
*
* Now you can simply SET_OUTPUT(IO); WRITE(IO, HIGH); WRITE(IO, LOW);
*/
// Read a pin
#define READ(IO) ((PORT->Group[(EPortType)GET_SAMD_PORT(IO)].IN.reg & MASK(GET_SAMD_PIN(IO))) != 0)
// Write to a pin
#define WRITE(IO,V) do{ \
const EPortType port = (EPortType)GET_SAMD_PORT(IO); \
const uint32_t mask = MASK(GET_SAMD_PIN(IO)); \
\
if (V) PORT->Group[port].OUTSET.reg = mask; \
else PORT->Group[port].OUTCLR.reg = mask; \
}while(0)
// Toggle a pin
#define TOGGLE(IO) PORT->Group[(EPortType)GET_SAMD_PORT(IO)].OUTTGL.reg = MASK(GET_SAMD_PIN(IO));
// Set pin as input
#define SET_INPUT(IO) do{ \
const EPortType port = (EPortType)GET_SAMD_PORT(IO); \
const uint32_t pin = GET_SAMD_PIN(IO); \
\
PORT->Group[port].PINCFG[pin].reg = (uint8_t)(PORT_PINCFG_INEN); \
PORT->Group[port].DIRCLR.reg = MASK(pin); \
}while(0)
// Set pin as input with pullup
#define SET_INPUT_PULLUP(IO) do{ \
const EPortType port = (EPortType)GET_SAMD_PORT(IO); \
const uint32_t pin = GET_SAMD_PIN(IO); \
const uint32_t mask = MASK(pin); \
\
PORT->Group[port].PINCFG[pin].reg = (uint8_t)(PORT_PINCFG_INEN | PORT_PINCFG_PULLEN); \
PORT->Group[port].DIRCLR.reg = mask; \
PORT->Group[port].OUTSET.reg = mask; \
}while(0)
// Set pin as input with pulldown
#define SET_INPUT_PULLDOWN(IO) do{ \
const EPortType port = (EPortType)GET_SAMD_PORT(IO); \
const uint32_t pin = GET_SAMD_PIN(IO); \
const uint32_t mask = MASK(pin); \
\
PORT->Group[port].PINCFG[pin].reg = (uint8_t)(PORT_PINCFG_INEN | PORT_PINCFG_PULLEN); \
PORT->Group[port].DIRCLR.reg = mask; \
PORT->Group[port].OUTCLR.reg = mask; \
}while(0)
// Set pin as output (push pull)
#define SET_OUTPUT(IO) do{ \
const EPortType port = (EPortType)GET_SAMD_PORT(IO); \
const uint32_t pin = GET_SAMD_PIN(IO); \
\
PORT->Group[port].DIRSET.reg = MASK(pin); \
PORT->Group[port].PINCFG[pin].reg = 0; \
}while(0)
// Set pin as output (open drain)
#define SET_OUTPUT_OD(IO) do{ \
const EPortType port = (EPortType)GET_SAMD_PORT(IO); \
const uint32_t pin = GET_SAMD_PIN(IO); \
\
PORT->Group[port].PINCFG[pin].reg = (uint8_t)(PORT_PINCFG_PULLEN); \
PORT->Group[port].DIRCLR.reg = MASK(pin); \
}while(0)
// Set pin as PWM (push pull)
#define SET_PWM SET_OUTPUT
// Set pin as PWM (open drain)
#define SET_PWM_OD SET_OUTPUT_OD
// check if pin is an output
#define IS_OUTPUT(IO) ((PORT->Group[(EPortType)GET_SAMD_PORT(IO)].DIR.reg & MASK(GET_SAMD_PIN(IO))) \
|| (PORT->Group[(EPortType)GET_SAMD_PORT(IO)].PINCFG[GET_SAMD_PIN(IO)].reg & (PORT_PINCFG_INEN | PORT_PINCFG_PULLEN)) == PORT_PINCFG_PULLEN)
// check if pin is an input
#define IS_INPUT(IO) !IS_OUTPUT(IO)
// Shorthand
#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)
#define OUT_WRITE_OD(IO,V) do{ SET_OUTPUT_OD(IO); WRITE(IO,V); }while(0)
// digitalRead/Write wrappers
#define extDigitalRead(IO) digitalRead(IO)
#define extDigitalWrite(IO,V) digitalWrite(IO,V)
/**
* Ports and functions
* Added as necessary or if I feel like it- not a comprehensive list!
*/
/*
* Some of these share the same source and so can't be used in the same time
*/
#define PWM_PIN(P) (WITHIN(P, 2, 13) || WITHIN(P, 22, 23) || WITHIN(P, 44, 45) || P == 48)
// Return fulfilled ADCx->INPUTCTRL.reg
#define PIN_TO_INPUTCTRL(P) ( (P == 0) ? ADC_INPUTCTRL_MUXPOS_PIN0 \
: ((P) == 1) ? ADC_INPUTCTRL_MUXPOS_PIN1 \
: ((P) == 2) ? ADC_INPUTCTRL_MUXPOS_PIN3 \
: ((P) == 3) ? ADC_INPUTCTRL_MUXPOS_PIN4 \
: ((P) == 4) ? ADC_INPUTCTRL_MUXPOS_PIN5 \
: ((P) == 5) ? ADC_INPUTCTRL_MUXPOS_PIN5 \
: ((P) == 6) ? ADC_INPUTCTRL_MUXPOS_PIN6 \
: ((P) == 7) ? ADC_INPUTCTRL_MUXPOS_PIN7 \
: ((P) == 8) ? ADC_INPUTCTRL_MUXPOS_PIN8 \
: ((P) == 9) ? ADC_INPUTCTRL_MUXPOS_PIN9 \
: ((P) == 10) ? ADC_INPUTCTRL_MUXPOS_PIN10 \
: ((P) == 11) ? ADC_INPUTCTRL_MUXPOS_PIN11 \
: ((P) == 12) ? ADC_INPUTCTRL_MUXPOS_PIN12 \
: ((P) == 13) ? ADC_INPUTCTRL_MUXPOS_PIN13 \
: ((P) == 14) ? ADC_INPUTCTRL_MUXPOS_PIN14 \
: 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)
/**
* pins
*/
// PORTA
#define DIO28_PIN PIN_PA02 // A0
#define DIO56_PIN PIN_PA03 // A13
#define DIO31_PIN PIN_PA04 // A13
#define DIO32_PIN PIN_PA05 // A1
#define DIO8_PIN PIN_PA06 // A14
#define DIO9_PIN PIN_PA07 // A15
#define DIO4_PIN PIN_PA08 // A15
#define DIO3_PIN PIN_PA09 // A15
#define DIO1_PIN PIN_PA10
#define DIO0_PIN PIN_PA11
#define DIO18_PIN PIN_PA12
#define DIO52_PIN PIN_PA13
#define DIO2_PIN PIN_PA14
#define DIO5_PIN PIN_PA15
#define DIO11_PIN PIN_PA16
#define DIO13_PIN PIN_PA17
#define DIO10_PIN PIN_PA18
#define DIO12_PIN PIN_PA19
#define DIO6_PIN PIN_PA20
#define DIO07_PIN PIN_PA21
#define DIO34_PIN PIN_PA22
#define DIO35_PIN PIN_PA23
#define DIO42_PIN PIN_PA24
#define DIO43_PIN PIN_PA25
#define DIO40_PIN PIN_PA27
#define DIO26_PIN PIN_PB00
#define DIO27_PIN PIN_PB01 // A0
#define DIO33_PIN PIN_PB02
#define DIO39_PIN PIN_PB03
#define DIO14_PIN PIN_PB04
#define DIO15_PIN PIN_PB05
#define DIO16_PIN PIN_PB06
#define DIO17_PIN PIN_PB07
#define DIO29_PIN PIN_PB08
#define DIO30_PIN PIN_PB09
#define DIO37_PIN PIN_PB10
#define DIO38_PIN PIN_PB11
#define DIO36_PIN PIN_PB12
#define DIO19_PIN PIN_PB13
#define DIO20_PIN PIN_PB14
#define DIO21_PIN PIN_PB15
#define DIO22_PIN PIN_PB16
#define DIO23_PIN PIN_PB17
#define DIO44_PIN PIN_PB22
#define DIO45_PIN PIN_PB23
#define DIO24_PIN PIN_PB30
#define DIO25_PIN PIN_PB31
#define DIO53_PIN PIN_PA21
#define DIO54_PIN PIN_PA06
#define DIO55_PIN PIN_PA07

View File

@@ -0,0 +1,23 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

View File

@@ -0,0 +1,27 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#pragma once

View File

@@ -0,0 +1,33 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#pragma once
#if USE_FALLBACK_EEPROM
#define FLASH_EEPROM_EMULATION
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
#define USE_SHARED_EEPROM 1
#endif

View File

@@ -0,0 +1,54 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
/**
* Test SAMD21 specific configuration values for errors at compile-time.
*/
#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/SAMD21."
#endif
#if SERVO_TC == MF_TIMER_RTC
#error "Servos can't use RTC timer"
#endif
#if ENABLED(EMERGENCY_PARSER)
#error "EMERGENCY_PARSER is not yet implemented for SAMD21. Disable EMERGENCY_PARSER to continue."
#endif
#if ENABLED(SDIO_SUPPORT)
#error "SDIO_SUPPORT is not supported on SAMD21."
#endif
#if ENABLED(FAST_PWM_FAN)
#error "Features requiring Hardware PWM (FAST_PWM_FAN) are not yet supported for HAL/SAMD21."
#endif
#if ENABLED(POSTMORTEM_DEBUGGING)
#error "POSTMORTEM_DEBUGGING is not yet supported on SAMD21."
#endif

View File

@@ -0,0 +1,160 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#define NUMBER_PINS_TOTAL PINS_COUNT
#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_ARRAY_NAME(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 PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
#define GET_ARRAY_PIN(p) pin_array[p].pin
#define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital
#define VALID_PIN(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL)
#define DIGITAL_PIN_TO_ANALOG_PIN(p) digitalPinToAnalogInput(p)
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P)!=-1)
#define pwm_status(pin) digitalPinHasPWM(pin)
#define MULTI_NAME_PAD 27 // 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
// uses pin index
#define M43_NEVER_TOUCH(Q) ((Q) >= 75)
bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
const EPortType samdport = g_APinDescription[pin].ulPort;
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;
}
void pwm_details(int32_t pin) {
if (pwm_status(pin)) {
//uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative;
//SERIAL_ECHOPGM("PWM = ", duty);
}
}
/**
* SAMD21 Board pin| PORT | Label
* ----------------+--------+-------
* 0 | PB25 | "RX0"
* 1 | PB24 | "TX0"
* 2 | PC18 |
* 3 | PC19 |
* 4 | PC20 |
* 5 | PC21 |
* 6 | PD20 |
* 7 | PD21 |
* 8 | PB18 |
* 9 | PB2 |
* 10 | PB22 |
* 11 | PB23 |
* 12 | PB0 | "A16"
* 13 | PB1 | LED AMBER "L" / "A17"
* 14 | PB16 | "TX3"
* 15 | PB17 | "RX3"
* 16 | PC22 | "TX2"
* 17 | PC23 | "RX2"
* 18 | PB12 | "TX1" / "A18"
* 19 | PB13 | "RX1"
* 20 | PB20 | "SDA"
* 21 | PB21 | "SCL"
* 22 | PD12 |
* 23 | PA15 |
* 24 | PC17 |
* 25 | PC16 |
* 26 | PA12 |
* 27 | PA13 |
* 28 | PA14 |
* 29 | PB19 |
* 30 | PA23 |
* 31 | PA22 |
* 32 | PA21 |
* 33 | PA20 |
* 34 | PA19 |
* 35 | PA18 |
* 36 | PA17 |
* 37 | PA16 |
* 38 | PB15 |
* 39 | PB14 |
* 40 | PC13 |
* 41 | PC12 |
* 42 | PC15 |
* 43 | PC14 |
* 44 | PC11 |
* 45 | PC10 |
* 46 | PC6 |
* 47 | PC7 |
* 48 | PC4 |
* 49 | PC5 |
* 50 | PD11 |
* 51 | PD8 |
* 52 | PD9 |
* 53 | PD10 |
* 54 | PB5 | "A8"
* 55 | PB6 | "A9"
* 56 | PB7 | "A10"
* 57 | PB8 | "A11"
* 58 | PB9 | "A12"
* 69 | PA4 | "A13"
* 60 | PA6 | "A14"
* 61 | PA7 | "A15"
* 62 | PB17 |
* 63 | PB20 |
* 64 | PD11 |
* 65 | PD8 |
* 66 | PD9 |
* 67 | PA2 | "A0" / "DAC0"
* 68 | PA5 | "A1" / "DAC1"
* 69 | PB3 | "A2"
* 70 | PC0 | "A3"
* 71 | PC1 | "A4"
* 72 | PC2 | "A5"
* 73 | PC3 | "A6"
* 74 | PB4 | "A7"
* 75 | PC31 | LED GREEN "RX"
* 76 | PC30 | LED GREEN "TX"
* 77 | PA27 | USB: Host enable
* 78 | PA24 | USB: D-
* 79 | PA25 | USB: D+
* 80 | PB29 | SD: MISO
* 81 | PB27 | SD: SCK
* 82 | PB26 | SD: MOSI
* 83 | PB28 | SD: CS
* 84 | PA3 | AREF
* 85 | PA2 | DAC0 (Duplicate)
* 86 | PA5 | DAC1 (Duplicate)
* 87 | PB1 | LED AMBER "L" (Duplicate)
* 88 | PC24 | NeoPixel
* 89 | PB10 | QSPI: SCK
* 90 | PB11 | QSPI: CS
* 91 | PA8 | QSPI: IO0
* 92 | PA9 | QSPI: IO1
* 93 | PA10 | QSPI: IO2
* 94 | PA11 | QSPI: IO3
* 95 | PB31 | SD: DETECT
*/

View File

@@ -0,0 +1,54 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
/**
* SAMD21 Default SPI Pins
*
* SS SCK MISO MOSI
* +-------------------------+
* SPI | 53 52 50 51 |
* SPI1 | 83 81 80 82 |
* +-------------------------+
* Any pin can be used for Chip Select (SD_SS_PIN)
*/
#ifndef SD_SCK_PIN
#define SD_SCK_PIN 38
#endif
#ifndef SD_MISO_PIN
#define SD_MISO_PIN 36
#endif
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN 37
#endif
#ifndef SDSS
#define SDSS 18
#endif
#ifndef SD_SS_PIN
#define SD_SS_PIN SDSS
#endif

View File

@@ -0,0 +1,217 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#ifdef __SAMD21__
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
#include "../../inc/MarlinConfig.h"
#include "ServoTimers.h" // for SERVO_TC
// --------------------------------------------------------------------------
// Local defines
// --------------------------------------------------------------------------
#define NUM_HARDWARE_TIMERS 9
// --------------------------------------------------------------------------
// Private Variables
// --------------------------------------------------------------------------
const tTimerConfig timer_config[NUM_HARDWARE_TIMERS] = {
{ {.pTcc=TCC0}, TimerType::tcc, TCC0_IRQn, TC_PRIORITY(0) }, // 0 - stepper (assigned priority 2)
{ {.pTcc=TCC1}, TimerType::tcc, TCC1_IRQn, TC_PRIORITY(1) }, // 1 - stepper (needed by 32 bit timers)
{ {.pTcc=TCC2}, TimerType::tcc, TCC2_IRQn, 5 }, // 2 - tone (reserved by framework and fixed assigned priority 5)
{ {.pTc=TC3}, TimerType::tc, TC3_IRQn, TC_PRIORITY(3) }, // 3 - servo (assigned priority 1)
{ {.pTc=TC4}, TimerType::tc, TC4_IRQn, TC_PRIORITY(4) }, // 4 - software serial (no interrupts used)
{ {.pTc=TC5}, TimerType::tc, TC5_IRQn, TC_PRIORITY(5) },
{ {.pTc=TC6}, TimerType::tc, TC6_IRQn, TC_PRIORITY(6) },
{ {.pTc=TC7}, TimerType::tc, TC7_IRQn, TC_PRIORITY(7) },
{ {.pRtc=RTC}, TimerType::rtc, RTC_IRQn, TC_PRIORITY(8) } // 8 - temperature (assigned priority 6)
};
// --------------------------------------------------------------------------
// Private functions
// --------------------------------------------------------------------------
FORCE_INLINE void Disable_Irq(IRQn_Type irq) {
NVIC_DisableIRQ(irq);
// We NEED memory barriers to ensure Interrupts are actually disabled!
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
__DSB();
__ISB();
}
static bool tcIsSyncing(Tc * tc) {
return tc->COUNT32.STATUS.reg & TC_STATUS_SYNCBUSY;
}
static void tcReset( Tc * tc) {
tc->COUNT32.CTRLA.reg = TC_CTRLA_SWRST;
while (tcIsSyncing(tc)) {}
while (tc->COUNT32.CTRLA.bit.SWRST) {}
}
// --------------------------------------------------------------------------
// Public functions
// --------------------------------------------------------------------------
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
IRQn_Type irq = timer_config[timer_num].IRQ_Id;
// Disable interrupt, just in case it was already enabled
NVIC_DisableIRQ(irq);
NVIC_ClearPendingIRQ(irq);
if (timer_num == MF_TIMER_RTC) {
// https://github.com/arduino-libraries/RTCZero
Rtc * const rtc = timer_config[timer_num].pRtc;
PM->APBAMASK.reg |= PM_APBAMASK_RTC;
GCLK->CLKCTRL.reg = (uint32_t)((GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK4 | (RTC_GCLK_ID << GCLK_CLKCTRL_ID_Pos)));
while (GCLK->STATUS.bit.SYNCBUSY) {}
GCLK->GENCTRL.reg = (GCLK_GENCTRL_GENEN | GCLK_GENCTRL_SRC_OSCULP32K | GCLK_GENCTRL_ID(4) | GCLK_GENCTRL_DIVSEL );
while (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY) {}
GCLK->GENDIV.reg = GCLK_GENDIV_ID(4);
GCLK->GENDIV.bit.DIV=4;
while (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY) {}
// Disable timer interrupt
rtc->MODE0.INTENCLR.reg = RTC_MODE0_INTENCLR_CMP0;
SYNC(rtc->MODE0.STATUS.bit.SYNCBUSY);
while(rtc->MODE0.STATUS.bit.SYNCBUSY) {}
// Stop timer, just in case, to be able to reconfigure it
rtc->MODE0.CTRL.reg =
RTC_MODE0_CTRL_MODE_COUNT32 | // Mode 0 = 32-bits counter
RTC_MODE0_CTRL_PRESCALER_DIV1024; // Divisor = 1024
while(rtc->MODE0.STATUS.bit.SYNCBUSY) {}
// Mode, reset counter on match
rtc->MODE0.CTRL.reg = RTC_MODE0_CTRL_MODE_COUNT32 | RTC_MODE0_CTRL_MATCHCLR;
// Set compare value
rtc->MODE0.COMP[0].reg = (32768 + frequency / 2) / frequency;
SYNC(rtc->MODE0.STATUS.bit.SYNCBUSY);
// Enable interrupt on compare
rtc->MODE0.INTFLAG.reg = RTC_MODE0_INTFLAG_CMP0; // reset pending interrupt
rtc->MODE0.INTENSET.reg = RTC_MODE0_INTENSET_CMP0; // enable compare 0 interrupt
// And start timer
rtc->MODE0.CTRL.bit.ENABLE = true;
SYNC(rtc->MODE0.STATUS.bit.SYNCBUSY);
}
else if (timer_config[timer_num].type==TimerType::tcc) {
Tcc * const tc = timer_config[timer_num].pTcc;
PM->APBCMASK.reg |= PM_APBCMASK_TCC0;
GCLK->CLKCTRL.reg =(GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(TCC0_GCLK_ID));
SYNC (GCLK->STATUS.bit.SYNCBUSY);
tc->CTRLA.reg = TCC_CTRLA_SWRST;
SYNC (tc->SYNCBUSY.reg & TCC_SYNCBUSY_SWRST) {}
SYNC (tc->CTRLA.bit.SWRST);
tc->CTRLA.reg &= ~(TCC_CTRLA_ENABLE); // disable TC module
tc->CTRLA.reg |= TCC_WAVE_WAVEGEN_MFRQ;
tc->CTRLA.reg |= TCC_CTRLA_PRESCALER_DIV2;
tc->CC[0].reg = (HAL_TIMER_RATE) / frequency;
tc->INTENSET.reg = TCC_INTFLAG_MC0;
tc->CTRLA.reg |= TCC_CTRLA_ENABLE;
tc->INTFLAG.reg = 0xFF;
SYNC ( tc->STATUS.reg & TC_STATUS_SYNCBUSY);
}
else {
Tc * const tc = timer_config[timer_num].pTc;
// Disable timer interrupt
tc->COUNT32.INTENCLR.reg = TC_INTENCLR_OVF; // disable overflow interrupt
// TCn clock setup
GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(GCM_TC4_TC5)) ;
SYNC (GCLK->STATUS.bit.SYNCBUSY);
tcReset(tc); // reset TC
// Set Timer counter 5 Mode to 16 bits, it will become a 16bit counter ('mode1' in the datasheet)
tc->COUNT32.CTRLA.reg |= TC_CTRLA_MODE_COUNT32;
// Set TC waveform generation mode to 'match frequency'
tc->COUNT32.CTRLA.reg |= TC_CTRLA_WAVEGEN_MFRQ;
//set prescaler
//the clock normally counts at the GCLK_TC frequency, but we can set it to divide that frequency to slow it down
//you can use different prescaler divisons here like TC_CTRLA_PRESCALER_DIV1 to get a different range
tc->COUNT32.CTRLA.reg |= TC_CTRLA_PRESCALER_DIV1 | TC_CTRLA_ENABLE; //it will divide GCLK_TC frequency by 1024
//set the compare-capture register.
//The counter will count up to this value (it's a 16bit counter so we use uint16_t)
//this is how we fine-tune the frequency, make it count to a lower or higher value
//system clock should be 1MHz (8MHz/8) at Reset by default
tc->COUNT32.CC[0].reg = (uint16_t) (HAL_TIMER_RATE / frequency);
while (tcIsSyncing(tc)) {}
// Enable the TC interrupt request
tc->COUNT32.INTENSET.bit.MC0 = 1;
while (tcIsSyncing(tc)) {}
}
NVIC_SetPriority(irq, timer_config[timer_num].priority);
NVIC_EnableIRQ(irq);
}
void HAL_timer_enable_interrupt(const uint8_t timer_num) {
const IRQn_Type irq = timer_config[timer_num].IRQ_Id;
NVIC_EnableIRQ(irq);
}
void HAL_timer_disable_interrupt(const uint8_t timer_num) {
const IRQn_Type irq = timer_config[timer_num].IRQ_Id;
Disable_Irq(irq);
}
// missing from CMSIS: Check if interrupt is enabled or not
static bool NVIC_GetEnabledIRQ(IRQn_Type IRQn) {
return TEST(NVIC->ISER[uint32_t(IRQn) >> 5], uint32_t(IRQn) & 0x1F);
}
bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
const IRQn_Type irq = timer_config[timer_num].IRQ_Id;
return NVIC_GetEnabledIRQ(irq);
}
#endif // __SAMD21__

View File

@@ -0,0 +1,160 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#include <stdint.h>
// --------------------------------------------------------------------------
// Defines
// --------------------------------------------------------------------------
typedef uint32_t hal_timer_t;
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
#define HAL_TIMER_RATE F_CPU // frequency of timers peripherals
#define MF_TIMER_RTC 8 // This is not a TC but a RTC
#ifndef MF_TIMER_STEP
#define MF_TIMER_STEP 4 // Timer Index for Stepper
#endif
#ifndef MF_TIMER_PULSE
#define MF_TIMER_PULSE MF_TIMER_STEP
#endif
#ifndef MF_TIMER_TEMP
#define MF_TIMER_TEMP MF_TIMER_RTC // Timer Index for Temperature
#endif
#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency
#define STEPPER_TIMER_RATE HAL_TIMER_RATE // frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
#define STEPPER_TIMER_TICKS_PER_US (STEPPER_TIMER_RATE / 1000000) // stepper timer ticks per µs
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_STEP)
#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(MF_TIMER_STEP)
#define STEPPER_ISR_ENABLED() HAL_timer_interrupt_enabled(MF_TIMER_STEP)
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_TEMP)
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(MF_TIMER_TEMP)
#define TC_PRIORITY(t) ( t == SERVO_TC ? 1 \
: (t == MF_TIMER_STEP || t == MF_TIMER_PULSE) ? 2 \
: (t == MF_TIMER_TEMP) ? 6 : 7 )
#define _TC_HANDLER(t) void TC##t##_Handler()
#define TC_HANDLER(t) _TC_HANDLER(t)
#ifndef HAL_STEP_TIMER_ISR
#define HAL_STEP_TIMER_ISR() TC_HANDLER(MF_TIMER_STEP)
#endif
#if MF_TIMER_STEP != MF_TIMER_PULSE
#define HAL_PULSE_TIMER_ISR() TC_HANDLER(MF_TIMER_PULSE)
#endif
#if MF_TIMER_TEMP == MF_TIMER_RTC
#define HAL_TEMP_TIMER_ISR() void RTC_Handler()
#else
#define HAL_TEMP_TIMER_ISR() TC_HANDLER(MF_TIMER_TEMP)
#endif
// --------------------------------------------------------------------------
// Types
// --------------------------------------------------------------------------
typedef enum { tcc, tc, rtc } TimerType;
typedef struct {
union {
Tc *pTc;
Tcc *pTcc;
Rtc *pRtc;
};
TimerType type;
IRQn_Type IRQ_Id;
uint8_t priority;
} tTimerConfig;
// --------------------------------------------------------------------------
// Public Variables
// --------------------------------------------------------------------------
extern const tTimerConfig timer_config[];
// --------------------------------------------------------------------------
// Public functions
// --------------------------------------------------------------------------
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
FORCE_INLINE static void HAL_timer_set_compare(const uint8_t timer_num, const hal_timer_t compare) {
// Should never be called with timer MF_TIMER_RTC
Tc * const tc = timer_config[timer_num].pTc;
tc->COUNT32.CC[0].reg = compare;
}
FORCE_INLINE static hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
// Should never be called with timer MF_TIMER_RTC
Tc * const tc = timer_config[timer_num].pTc;
return (hal_timer_t)tc->COUNT32.CC[0].reg;
}
FORCE_INLINE static hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
// Should never be called with timer MF_TIMER_RTC
Tc * const tc = timer_config[timer_num].pTc;
tc->COUNT32.READREQ.reg = TC_READREQ_RREQ;
// Request a read synchronization
SYNC (tc->COUNT32.STATUS.bit.SYNCBUSY);
//SYNC(tc->COUNT32.STATUS.bit.SYNCBUSY );
return tc->COUNT32.COUNT.reg;
}
void HAL_timer_enable_interrupt(const uint8_t timer_num);
void HAL_timer_disable_interrupt(const uint8_t timer_num);
bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
if (timer_num == MF_TIMER_RTC) {
Rtc * const rtc = timer_config[timer_num].pRtc;
// Clear interrupt flag
rtc->MODE0.INTFLAG.reg = RTC_MODE0_INTFLAG_CMP0| RTC_MODE0_INTFLAG_OVF;
}
else if (timer_config[timer_num].type == TimerType::tcc){
Tcc * const tc = timer_config[timer_num].pTcc;
// Clear interrupt flag
tc->INTFLAG.reg = TCC_INTFLAG_OVF;
}
else {
Tc * const tc = timer_config[timer_num].pTc;
// Clear interrupt flag
tc->COUNT32.INTFLAG.bit.MC0 = 1;
}
}
#define HAL_timer_isr_epilogue(timer_num)

View File

@@ -0,0 +1,32 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
// adapted from I2C/master/master.c example
// https://www-users.cs.york.ac.uk/~pcc/MCP/HAPR-Course-web/CMSIS/examples/html/master_8c_source.html
#ifdef __SAMD21__
#endif // __SAMD21__

View File

@@ -0,0 +1,27 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#pragma once

View File

@@ -0,0 +1,41 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#pragma once
/**
* SAMD21 LCD-specific defines
*/
// The following are optional depending on the platform.
// definitions of HAL specific com and device drivers.
uint8_t u8g_com_samd21_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
uint8_t u8g_com_samd21_st7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
// connect U8g com generic com names to the desired driver
#define U8G_COM_HW_SPI u8g_com_samd21_st7920_hw_spi_fn // use SAMD21 specific hardware SPI routine
#define U8G_COM_ST7920_HW_SPI u8g_com_samd21_st7920_hw_spi_fn

View File

@@ -0,0 +1,42 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
/**
* Low level pin manipulation routines - used by all the drivers.
*
* These are based on the SAMD51 pinMode, digitalRead & digitalWrite routines.
*
* Couldn't just call exact copies because the overhead killed the LCD update speed
* With an intermediate level the softspi was running in the 10-20kHz range which
* resulted in using about about 25% of the CPU's time.
*/
#ifdef __SAMD21__
#include <Arduino.h>
#endif // __SAMD21__

View File

@@ -0,0 +1,42 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#pragma once
/**
* Low level pin manipulation routines - used by all the drivers.
*
* These are based on the SAMD51 pinMode, digitalRead & digitalWrite routines.
*
* Couldn't just call exact copies because the overhead killed the LCD update speed
* With an intermediate level the softspi was running in the 10-20kHz range which
* resulted in using about about 25% of the CPU's time.
*/
void u8g_SetPinOutput(uint8_t internal_pin_number);
void u8g_SetPinInput(uint8_t internal_pin_number);
void u8g_SetPinLevel(uint8_t pin, uint8_t pin_status);
uint8_t u8g_GetPinLevel(uint8_t pin);

View File

@@ -0,0 +1,154 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
/**
* Based on u8g_com_msp430_hw_spi.c
*
* Universal 8bit Graphics Library
*
* Copyright (c) 2012, olikraus@gmail.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef __SAMD21__
#include <U8glib-HAL.h>
#include "SPI.h"
#include "../../shared/HAL_SPI.h"
#ifndef LCD_SPI_SPEED
#define LCD_SPI_SPEED SPI_QUARTER_SPEED
#endif
void u8g_SetPIOutput(u8g_t *u8g, uint8_t pin_index) {
if (u8g->pin_list[pin_index]!= U8G_PIN_NONE)
pinMode(u8g->pin_list[pin_index],OUTPUT);
}
void u8g_SetPILevel(u8g_t *u8g, uint8_t pin_index, uint8_t level) {
if (u8g->pin_list[pin_index]!= U8G_PIN_NONE)
digitalWrite(u8g->pin_list[pin_index],level);
}
uint8_t u8g_com_samd21_st7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
static SPISettings lcdSPIConfig;
switch (msg) {
case U8G_COM_MSG_STOP:
break;
case U8G_COM_MSG_INIT:
u8g_SetPIOutput(u8g, U8G_PI_CS);
u8g_SetPIOutput(u8g, U8G_PI_A0);
u8g_SetPIOutput(u8g, U8G_PI_RESET);
u8g_SetPILevel(u8g, U8G_PI_CS, LOW);
spiBegin();
lcdSPIConfig = SPISettings(900000, MSBFIRST, SPI_MODE0);
u8g->pin_list[U8G_PI_A0_STATE] = 0;
break;
case U8G_COM_MSG_ADDRESS: // define cmd (arg_val = 0) or data mode (arg_val = 1)
u8g_SetPILevel(u8g, U8G_PI_A0, arg_val);
u8g->pin_list[U8G_PI_A0_STATE] = arg_val;
break;
case U8G_COM_MSG_CHIP_SELECT: // arg_val == 1 means chip selected, but ST7920 is active high, so needs inverting
u8g_SetPILevel(u8g, U8G_PI_CS, arg_val ? HIGH : LOW);
break;
case U8G_COM_MSG_RESET:
u8g_SetPILevel(u8g, U8G_PI_RESET, arg_val);
break;
case U8G_COM_MSG_WRITE_BYTE:
SPI.beginTransaction(lcdSPIConfig);
if (u8g->pin_list[U8G_PI_A0_STATE] == 0) { // command
SPI.transfer(0x0f8); u8g->pin_list[U8G_PI_A0_STATE] = 2;
}
else if (u8g->pin_list[U8G_PI_A0_STATE] == 1) { // data
SPI.transfer(0x0fa); u8g->pin_list[U8G_PI_A0_STATE] = 2;
}
SPI.transfer(arg_val & 0x0f0);
SPI.transfer(arg_val << 4);
SPI.endTransaction();
break;
case U8G_COM_MSG_WRITE_SEQ:
SPI.beginTransaction(lcdSPIConfig);
if (u8g->pin_list[U8G_PI_A0_STATE] == 0 ) { // command
SPI.transfer(0x0f8); u8g->pin_list[U8G_PI_A0_STATE] = 2;
}
else if (u8g->pin_list[U8G_PI_A0_STATE] == 1) { // data
SPI.transfer(0x0fa); u8g->pin_list[U8G_PI_A0_STATE] = 2;
}
uint8_t *ptr = (uint8_t*)arg_ptr;
while (arg_val > 0) {
SPI.transfer((*ptr) & 0x0f0);
SPI.transfer((*ptr) << 4);
ptr++;
arg_val--;
}
SPI.endTransaction();
break;
}
return 1;
}
#endif // __SAMD21__

View File

@@ -1,8 +1,9 @@
/** /**
* Marlin 3D Printer Firmware * Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician) *
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -18,6 +19,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
* *
*/ */
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
#ifdef __SAMD51__ #ifdef __SAMD51__
#include "../../inc/MarlinConfig.h" #include "../../inc/MarlinConfig.h"

View File

@@ -1,8 +1,9 @@
/** /**
* Marlin 3D Printer Firmware * Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician) *
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -20,6 +21,10 @@
*/ */
#pragma once #pragma once
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
#define CPU_32_BIT #define CPU_32_BIT
#include "../shared/Marduino.h" #include "../shared/Marduino.h"

View File

@@ -1,8 +1,9 @@
/** /**
* Marlin 3D Printer Firmware * Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician) *
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -19,6 +20,10 @@
* *
*/ */
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
/** /**
* Hardware and software SPI implementations are included in this file. * Hardware and software SPI implementations are included in this file.
* *

View File

@@ -1,8 +1,9 @@
/** /**
* Marlin 3D Printer Firmware * Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician) *
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -18,6 +19,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
* *
*/ */
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
#ifdef ADAFRUIT_GRAND_CENTRAL_M4 #ifdef ADAFRUIT_GRAND_CENTRAL_M4
/** /**

View File

@@ -1,8 +1,9 @@
/** /**
* Marlin 3D Printer Firmware * Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician) *
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -20,6 +21,10 @@
*/ */
#pragma once #pragma once
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
#include "../../core/serial_hook.h" #include "../../core/serial_hook.h"
typedef Serial1Class<Uart> UartT; typedef Serial1Class<Uart> UartT;

View File

@@ -1,8 +1,9 @@
/** /**
* Marlin 3D Printer Firmware * Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician) *
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -20,6 +21,10 @@
*/ */
#pragma once #pragma once
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
#define SYNC(sc) while (sc) { \ #define SYNC(sc) while (sc) { \
asm(""); \ asm(""); \
} }

View File

@@ -1,8 +1,9 @@
/** /**
* Marlin 3D Printer Firmware * Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician) *
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -19,6 +20,10 @@
* *
*/ */
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
/** /**
* This comes from Arduino library which at the moment is buggy and uncompilable * This comes from Arduino library which at the moment is buggy and uncompilable
*/ */

View File

@@ -1,8 +1,9 @@
/** /**
* Marlin 3D Printer Firmware * Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician) *
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -20,6 +21,10 @@
*/ */
#pragma once #pragma once
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
#define _useTimer1 #define _useTimer1
#define _useTimer2 #define _useTimer2

View File

@@ -1,8 +1,9 @@
/** /**
* Marlin 3D Printer Firmware * Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician) *
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -18,6 +19,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
* *
*/ */
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
#ifdef __SAMD51__ #ifdef __SAMD51__
#include "../../inc/MarlinConfig.h" #include "../../inc/MarlinConfig.h"

View File

@@ -1,8 +1,9 @@
/** /**
* Marlin 3D Printer Firmware * Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician) *
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -18,6 +19,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
* *
*/ */
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
#ifdef __SAMD51__ #ifdef __SAMD51__
#include "../../inc/MarlinConfig.h" #include "../../inc/MarlinConfig.h"

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