Compare commits

...

478 Commits

Author SHA1 Message Date
52087db5c1 Config: latest changes 2022-02-15 11:26:34 +01:00
1ea9d9134c Config: adjust PLA Temperatures 2022-02-15 11:26:34 +01:00
f2cdcc39c8 Config: enable G26 mesh validation 2022-02-15 11:26:34 +01:00
1ebccfce51 Config: refine bed size 2022-02-15 11:26:34 +01:00
63d970e6ea Config: installed bed temp sensor 2022-02-15 11:26:34 +01:00
561308cb90 New lead screws, set config 2022-02-15 11:26:34 +01:00
6d677dd119 Config: use LCD SD-card for printing menu
Firmware will still be loaded from onboard sd card only.
2022-02-15 11:26:34 +01:00
88c2026431 Config: adjust homing feedrate and backoff 2022-02-15 11:26:34 +01:00
4d545813b9 Config: enable menu items
- unified bed leveling
- bed trimming: calibrate bed corner height
- enable/disable soft endstops
2022-02-15 11:26:34 +01:00
1d27e86602 Config: extruder settings
- fix extruder direction
- enable load/unload filament menu items
2022-02-15 11:26:34 +01:00
7bf11a8e4c Config: set z steps per mm and probe z offset 2022-02-15 11:26:34 +01:00
1025264400 Config: fix endstop setting
The z endstop is not used due to a probe being present. Should it be
used however this is the right setting.
2022-02-15 11:26:34 +01:00
86456eaf0b Config: fix axis swap and CoreXY setting
Y stepper was set to be reversed by default. This alone swapped the X
and Y axis. The first fix was to enable COREYX instead of COREXY. With
the correct Y direction the printer will run with the correct axis in
COREXY mode.
2022-02-15 11:26:34 +01:00
e6df88855b Config: enable USB serial port 2022-02-15 11:26:34 +01:00
d15a3e2ae8 Config: set extruder fan
FAN1_PIN is the HE1 ferrule connector. By setting the E0_AUTO_FAN_PIN
the fan only turns on at the specified temperature (50).
2022-02-15 11:26:34 +01:00
185e6cf4e9 Config: enable sensorless homing 2022-02-15 11:26:34 +01:00
d2a6971302 Config: configure Z Probe for homing 2022-02-15 11:26:34 +01:00
98999a86c3 Config: setup tft display
- Config based on
  https://github.com/bigtreetech/BIGTREETECH-TouchScreenFirmware#marlin-dependencies
2022-02-15 11:26:21 +01:00
e612574759 Config: specify installed components
- Temp sensor on hotend
- 4, Stepper drivers: X, Y, Z and E0
- BLTOUCH and offset
2022-02-15 11:24:44 +01:00
58062d1754 Config: alter basic settings
- Author, Printer Name, Machine UUID
- Mechanical type, CoreYX
- Bed size
- enable EEPROM and SD-Card
2022-02-15 11:24:41 +01:00
13d425af8c Set board env for platformio
Chipset for BTT SKR 1.4 Turbo is LPC1769
2022-02-15 11:23:43 +01:00
385c76528c Backup configuration files 2022-02-15 11:23:42 +01:00
Mads Ynddal
bf067738f2 🐛 Fix XYZEval::set(XY, Z) and (XY, Z, E) (#23704)
Fix regression in #21953

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2022-02-10 12:01:51 -06:00
Maeyanie
e028a3c441 🐛 Fix M852 report (#23660) 2022-02-10 12:01:16 -06:00
Timothy Hoogland
9847470b38 🐛 Fix EZBoard V2 Environment for OpenBLT (#23659) 2022-02-01 17:25:02 -06:00
Timothy Hoogland
51209667a5 🐛 Fix EZBoard V2 timer conflict (#23648) 2022-01-30 06:38:49 -06:00
Scott Lahteine
db4172b5fa 🔨 Prevent two [cron] in a row 2022-01-17 04:19:12 -06:00
Jim Watson
242192d03d 🐛 Fix SHOW_REMAINING_TIME compile (#23503) 2022-01-12 10:23:50 -06:00
ellensp
7135c3b185 🚑️ Fix M105 regression (#23505)
Fixes #23504
2022-01-12 10:23:50 -06:00
ellensp
c91d033b5d 🐛 Fix Arduino build issues (#23510) 2022-01-12 10:23:50 -06:00
Scott Lahteine
0470fbe0a1 🧑‍💻 Move PB0 init for MKS_ROBIN_NANO 2022-01-12 10:23:50 -06:00
Scott Lahteine
eb8d819325 🧑‍💻 Fewer string macros 2022-01-10 05:52:02 -06:00
DerAndere
41f80a4498 🚸 Include extra axes in position report (#23490) 2022-01-10 05:52:02 -06:00
David Ross Smith
e0f75d4f06 🚑️ Fix preheat target bug
Fixes Jyers/Marlin#1651
2022-01-09 04:41:07 -06:00
Scott Lahteine
42449b8683 🌐 Update auto home axis strings 2022-01-09 04:40:41 -06:00
Roman Moravčík
e23c696566 🌐 Update Slovak language (#23475) 2022-01-09 04:40:28 -06:00
Scott Lahteine
035f9b8e13 🔨 Rename (not copy) with board_build.rename 2022-01-09 04:34:42 -06:00
Miguel Risco-Castillo
49f8171f7a 🚸 BLTouch HS menu item for DWIN Enhanced UI (#23480) 2022-01-09 04:34:29 -06:00
ClockeNessMnstr
75d0e94d5b 🚸 Do G34 "Z Backoff" at full current 2022-01-09 04:33:24 -06:00
jdegenstein
915f610782 📌 LCD_FOR_MELZI for BTT E3 RRF (#23453) 2022-01-09 04:33:24 -06:00
Lefteris Garyfalakis
2231e00b2c 🌐 Localize E3V2 Enhanced UI (#23424) 2022-01-09 04:33:24 -06:00
Anson Liu
63f2b15396 📺 Tune ULTI_CONTROLLER encoder, enable PCA9632 (#23461) 2022-01-09 04:33:24 -06:00
Kyle Hu
f503722c45 🐛 Fix Artillery Ruby (startup code, build flags) (#23446) 2022-01-09 04:33:24 -06:00
Mike La Spina
4fd1de7fb7 🐛 Define required endstop enums (#23425) 2022-01-09 04:33:24 -06:00
Scott Lahteine
93126c0d02 🔨 Strip CR in mftest > awk 2022-01-09 04:33:24 -06:00
Scott Lahteine
80f77ea807 🐛 Fix strlen_P parameter error
Fixes #23447
2022-01-09 04:33:24 -06:00
Scott Lahteine
9ff8220b8a 🩹 Fix RADDS+RRD encoder button 2022-01-09 04:33:24 -06:00
hwmland
7754860289 🩹 RAMPS FET order overridable, E + Laser (#23428) 2022-01-09 04:33:24 -06:00
Jason Smith
4efe4788af ⬆️ Assert newer GCC in PIO via atmelavr@~3.4 (#23432) 2022-01-09 04:33:24 -06:00
Jason Smith
2faf4e2a99 💚 Fix Teensy CI test (#23433) 2022-01-09 04:33:24 -06:00
Scott Lahteine
9956e62674 🧑‍💻 Apply axis conditionals 2022-01-09 04:33:24 -06:00
Scott Lahteine
a732427329 🚨 Fix M906 warning 2022-01-09 04:33:24 -06:00
Mike La Spina
974883d2f6 🔧 Normal FET layout with Spindle/Laser (#23409) 2022-01-09 04:33:24 -06:00
Jason Smith
1170ed995e 🔧 Update deprecated auto_build.py (#23427) 2022-01-09 04:33:24 -06:00
Johannes Hörmann
24f9c3a777 🔨 Upload to Optiboot at 115200 (#23403) 2022-01-09 04:33:24 -06:00
Scott Lahteine
5ec384f40c M919 : Chopper Timing (#23400) 2022-01-09 04:33:24 -06:00
Jason Smith
6d7ffa6add 🔧 Only warn about enabled CONFIGURATION_EMBEDDING (#23408) 2022-01-09 04:33:24 -06:00
Scott Lahteine
dadd7516b5 🚑️ Fix thermal conditionals, structure 2022-01-09 04:33:24 -06:00
Robby Candra
f99732ba75 🔧 DWIN_MARLINUI sanity checks (#23399) 2022-01-09 04:33:24 -06:00
Scott Lahteine
5a9635aa58 🩺 Assert FAN_SOFT_PWM where required (#23383, #23477) 2022-01-09 04:33:24 -06:00
Lefteris Garyfalakis
1552c6d2a5 🎨 E3V2 corner leveling => tramming (#23375) 2022-01-09 04:33:24 -06:00
Miguel Risco-Castillo
06c2ed3c99 🚸 DWIN Enhanced improve, fix, and extend (#23240)
- Offset icon change to show mesh leveling status
- Reset extruder position when enter to Move menu
- New live end-stop diagnostic page
- Editable firmware retracts settings for Tune and filament settings menu
- Print Statistics page accessible from the Advanced Settings menu
- Reset printer draws the boot image
- Adds individual axes homing menu
- Adds probe deploy/stow to Probe Settings menu
- Updates lock screen
- Rebuilds main buttons to support text caption in other languages
- Increases probe offset limits to 60 mm
- Fix M303 PID variable update
- Fix Resume/Pause button update
- Fix redraw of print done
- Fix very large file name bug
- Fix bug in bed manual leveling
2022-01-09 04:33:24 -06:00
Scott Lahteine
430c5da54c 🚚 Rename L6470 G-code file 2022-01-09 04:33:24 -06:00
Scott Lahteine
5b9f3bd4b1 🧑‍💻 Remove extraneous 'inline' hints 2022-01-09 04:33:17 -06:00
Scott Lahteine
ccc66a8528 🎨 Misc. cleanup 2022-01-09 04:33:01 -06:00
Scott Lahteine
8abe314b18 🔨 Get FIRMWARE_BIN from env 2022-01-09 04:32:43 -06:00
Miguel Risco-Castillo
dc470eb10f 🐛 Fix EEPROM_INIT_NOW build hash test (#23479) 2022-01-09 01:31:03 -06:00
Miguel Risco-Castillo
4c5e57ae89 🩹 Reset DWIN CrealityUI print progress on start (#23481) 2022-01-09 01:31:03 -06:00
Scott Lahteine
5d7328df46 🧑‍💻 Add AXIS_COLLISION to catch broken parameters
\
2022-01-09 01:31:03 -06:00
Scott Lahteine
99c237e05e 🚸 Refine stepper-driver-related G-codes (#23372) 2022-01-09 01:31:03 -06:00
Scott Lahteine
56adbc3ebf 📝 Consistent pin header orientation 2022-01-09 01:31:03 -06:00
Scott Lahteine
4cfe812c18 📌 Define MKS Monster8 pins for MKS_MINI_12864
Fixes #23324
2022-01-09 01:31:03 -06:00
Scott Lahteine
27d2471ea3 🐛 Fix mffp usage 2022-01-09 01:31:03 -06:00
Scott Lahteine
61b9248c35 🎨 Pins and SDIO cleanup 2022-01-09 01:31:03 -06:00
EvilGremlin
c9561a8826 🔧 Check Chiron LCD requirements (#23353)
Co-Authored-By: EvilGremlin <22657714+EvilGremlin@users.noreply.github.com>
2022-01-09 01:31:03 -06:00
Scott Lahteine
58c84f17ba 🎨 Simplify some debug echos 2022-01-09 01:31:03 -06:00
Scott Lahteine
73b8320e9c 🔨 Add .vscode/extensions.json 2022-01-05 04:24:04 -06:00
ellensp
1c3f2498b1 🐛 Fix RRW Keypad & Zonestar buttons (#23388) 2022-01-05 04:24:04 -06:00
GHGiampy
4202baa409 🩹 Fix Enhanced UI max E speed (#23387) 2022-01-05 04:24:04 -06:00
Scott Lahteine
f471eab1a2 🔖 Marlin 2.0.9.3 2022-01-05 04:24:03 -06:00
Keith Bennett
9b13ae2399 🐛 Fix MKS Robin E3 NeoPixel pin default (#23350) 2021-12-25 23:11:43 -06:00
kaidegit
06f36dc746 🐛 Fix open for bin rename (#23351) 2021-12-25 23:11:43 -06:00
Scott Lahteine
98eca9cb23 🔧 Move MOTHERBOARD closer to top 2021-12-25 23:11:43 -06:00
fflosi
6268795003 Per-axis TMC hold multiplier (#23345) 2021-12-25 23:11:43 -06:00
Sola
b4f0922a7c MKS TinyBee board support (#23340)
Co-Authored-By: Sola <42537573+solawc@users.noreply.github.com>
2021-12-25 03:23:10 -06:00
Robby Candra
aef613acd3 🔧 Group FAST_PWM_FAN.options (#23331)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 03:23:10 -06:00
InsanityAutomation
9ecfa1d252 BLTouch High Speed mode runtime configuration (#22916, #23337)
Co-Authored-By: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 03:23:10 -06:00
ellensp
e0bed1e344 Option to reset EEPROM on first run (#23276)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 03:23:10 -06:00
Spencer Owen
d21fa25ab8 Creality3D V4.2.3 / Ender-2 Pro board (#23307) 2021-12-25 03:23:10 -06:00
X-Ryl669
0dc1a58b24 Configurations embed and retrieve (#21321, #23303) 2021-12-25 03:23:10 -06:00
John Lagonikas
f2ca70e232 🐛 Fix and improve MAX31865 (#23215)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 03:23:10 -06:00
BigTreeTech
a6bed22839 BigTreeTech SKR mini E3 V3.0 (STM32G0B1RET6) (#23283) 2021-12-25 03:23:09 -06:00
Giuseppe499
efd67cf80d X Twist Compensation & Calibration (#23238) 2021-12-25 03:23:09 -06:00
ladismrkolj
15204470a8 🔧 Chamber Fan index option (#23262) 2021-12-25 03:23:09 -06:00
Mike La Spina
48358d6a5c 🏗️ Fix Maple HAL/STM32F1 PWM (#23211) 2021-12-25 03:23:09 -06:00
Tanguy Pruvot
d7abb891cd 🏗️ Rework STM32 timer frequency protection (#23187) 2021-12-25 03:23:09 -06:00
Scott Lahteine
52a44eb200 🐛 Fix STM32 FastPWM 2021-12-25 03:23:09 -06:00
Scott Lahteine
9b1c0a75e1 🎨 Rename HAL timer elements 2021-12-25 03:23:09 -06:00
schmttc
d75e7784e5 EasyThreeD ET4000+ board and UI (#23080)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 03:23:09 -06:00
John Robertson
0e60c8b7e0 MarkForged YX kinematics (#23163) 2021-12-25 03:23:09 -06:00
Keith Bennett
018c7b1cf4 BigTreeTech Mini 12864 V1.0 (#23130)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 03:23:09 -06:00
Giuliano Zaro
af1d603374 Fan tachometer support (#23086, #23180, #23199)
Co-Authored-By: Scott Lahteine <github@thinkyhead.com>
2021-12-25 03:23:09 -06:00
Scott Lahteine
884308f964 🔧 SOUND_MENU_ITEM for E3V2 2021-12-25 03:23:09 -06:00
Miguel Risco-Castillo
7269990413 🚸 Expose sub-options for E3V2 Enhanced (#23099) 2021-12-25 03:23:09 -06:00
Keith Bennett
2a90d93b17 📌 Overridable probe-related pins (#23107) 2021-12-25 03:23:09 -06:00
BigTreeTech
6e284f8823 Support for BIQU B1-SE-Plus strain gauge probe (#23101)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 03:23:09 -06:00
Scott Lahteine
a2349fc411 🔨 Configurable firmware bin filename
Configuration.h > FIRMWARE_BIN
2021-12-25 02:09:52 -06:00
Scott Lahteine
a3964b2b40 🔨 Ignore more generated files 2021-12-25 02:09:17 -06:00
Scott Lahteine
226ee7c1f3 🔧 Sanity check MMU2_MENUS 2021-12-25 02:07:59 -06:00
Attila BODY
2c12171f46 🐛 Fix Robin Nano v3 filament runout pins (#23344)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 02:06:34 -06:00
MrAlvin
d034a9c295 🚸 Show mm'ss during first hour (#23335)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 02:05:32 -06:00
Robby Candra
d2c7104bb3 🚸 Change "SD" to "Media" or "SD/FD" (#23297) 2021-12-25 02:02:05 -06:00
ellensp
570c7e8638 🐛 Fix Chitu Z_STOP_PIN (#23330) 2021-12-25 02:01:32 -06:00
Tanguy Pruvot
cc4578a3d3 🩹 Fix settings G21 report (#23338) 2021-12-25 01:59:52 -06:00
Mike La Spina
1db84be66a 🚑️ FAST_PWM_FAN default 1KHz base freq. (#23326)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 01:58:34 -06:00
ellensp
77c9668fe2 🐛 Fix LCD_BED_LEVELING compile (#23298) 2021-12-25 01:55:26 -06:00
GHGiampy
22cf9b444e 🧑‍💻 Option allowing > 127 Neopixels (#23322) 2021-12-25 01:54:39 -06:00
Scott Lahteine
97798d1e47 🎨 Update SKR V2 pins 2021-12-25 01:53:13 -06:00
Giuliano Zaro
f4b808456a 🚸 Use M600 for disabled MMU (#21865) 2021-12-25 01:52:31 -06:00
Tanguy Pruvot
6264736968 🐛 Fix TFT_COLOR_UI Release Media issue (#23123) 2021-12-25 01:51:37 -06:00
John Lagonikas
7a5f103bcf 🔧 Warning for IGNORE_THERMOCOUPLE_ERRORS (#23312) 2021-12-25 01:51:11 -06:00
Scott Lahteine
1a8307b196 📝 Fix a config comment 2021-12-25 01:51:11 -06:00
ellensp
13a1c86ae8 M115 flag EXTENDED_M20 (#22941) 2021-12-25 01:51:11 -06:00
ellensp
15656201d2 ✏️ Clean up duplicate defs (#23182) 2021-12-25 01:51:11 -06:00
Robby Candra
f3e372cb4c 🩹 Init fan speed at boot (#23181)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 01:46:19 -06:00
Scott Lahteine
c781ecc437 🔧 Fix unknown board test 2021-12-25 01:46:19 -06:00
Scott Lahteine
daa8fff6c6 🩹 SD abort requires open file
See #22566
2021-12-25 01:42:26 -06:00
ellensp
d481bba327 🐛 Fix MARLIN_F103Rx variant SCK / MOSI pins (#23282) 2021-12-25 01:42:13 -06:00
Scott Alfter
32b08ae04c Fix Endstops::report_states (#23280)
Fix regression 4d45fdf0eb
2021-12-25 01:39:34 -06:00
Scott Lahteine
f00a0356c7 🎨 Misc. probe / endstop cleanup 2021-12-25 01:39:34 -06:00
Sola
9871800874 🐛 Fix MKS LVGL UI retraction (#23267) 2021-12-25 01:39:34 -06:00
Robby Candra
39c2c038be 🩹 Coerce pin_t in set_pwm_duty macros (#23273) 2021-12-25 01:39:34 -06:00
Jason Smith
285d6488a3 🐛 Fix ACTION_ITEM with nullptr (#23195)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 01:39:34 -06:00
Robby Candra
eecbd09a46 🚸 Onboard SD for SKR 2.0 / SKR PRO (#23274) 2021-12-25 01:37:58 -06:00
Scott Lahteine
8d4e4ac115 🎨 Rename MAX31865 elements 2021-12-25 01:37:38 -06:00
Scott Lahteine
b77a5d4c8d ✏️ MAX31856 => MAX31865 2021-12-25 01:37:21 -06:00
Mike La Spina
c3b8b3e7e6 🩹 Fix non-PWM cutter compile (#23169) 2021-12-25 01:37:21 -06:00
Stuart Pittaway
7123b15801 🐛 Fix TWIBus Wire.begin call (#23183) 2021-12-25 01:37:21 -06:00
Chris Pepper
8a2f13d657 🐛 HAL_reboot for native HAL (#23246) 2021-12-25 01:36:47 -06:00
tommywienert
251d9fc1d7 🐛 Fix env:chitu_f103 (#23225) 2021-12-25 01:36:32 -06:00
ellensp
5eeb9650b5 📌 More Longer3D LKx Pro serial tests (#23260) 2021-12-25 01:36:32 -06:00
Stuart Pittaway
c0addd1d33 M3426 to read i2c MCP3426 ADC (#23184) 2021-12-25 01:36:32 -06:00
Scott Lahteine
05b57278d4 🔧 Cutter pins for SKR 2.0 2021-12-25 01:36:31 -06:00
Robby Candra
aa3ec2fbfd 🚸 Park nozzle on "loud kill" (#23172) 2021-12-25 01:34:19 -06:00
ellensp
4468516aa2 BigTree SKR 2 with F429 (#23177) 2021-12-25 01:34:08 -06:00
ellensp
95d006b406 🐛 Fix TIMER_TONE for ZM3E4 (#23212) 2021-12-25 01:33:53 -06:00
Jiri Jirus
5b057b4bcf 🩹 Assume 4K EEPROM for RUMBA32 BTT (#23205) 2021-12-25 01:32:24 -06:00
Scott Lahteine
77af48e547 🐛 Fix STM32 FastPWM 2021-12-25 01:30:50 -06:00
Keith Bennett
0f7f709aad ✏️ Fix Unicode (#23186) 2021-12-25 01:29:19 -06:00
Jason Smith
a8c0e11cb1 🩹 Handle nullptr in CardReader::printLongPath (#23197) 2021-12-25 01:29:19 -06:00
Anson Liu
0556da85b0 🩹 UM2 extruder cooling fan on PJ6 (#23194) 2021-12-25 01:28:54 -06:00
George Fu
93652e5c6f FYSETC Spider v2.2 (#23208) 2021-12-25 01:28:24 -06:00
Giuliano Zaro
f3fc1d15a3 🩹 Fix include path (#23150) 2021-12-25 01:26:59 -06:00
Keith Bennett
3148060550 📌 Biqu BX temporary framework workaround (#23131) 2021-12-25 01:26:59 -06:00
Mike La Spina
5f08864d1f 🐛 Fix STM32 set_pwm_duty (#23125) 2021-12-25 01:26:27 -06:00
Tanguy Pruvot
184fc36a08 🐛 Fix TFT backlight sleep/wake (#23153) 2021-12-25 01:25:14 -06:00
Tanguy Pruvot
281ed99868 ️ Reduce calls to set fan PWM (#23149) 2021-12-25 01:24:58 -06:00
Scott Lahteine
2cc4a1b326 🎨 Misc formatting 2021-12-25 01:24:44 -06:00
BigTreeTech
c5bd08755c 🐛 Init PROBE_ENABLE_PIN (#23133) 2021-12-25 01:24:34 -06:00
luzpaz
99f58f63f2 🎨 Fix misspelling (#23137) 2021-12-25 01:23:32 -06:00
espr14
c2a674d2c1 🏗️ Planner::busy() (#23145) 2021-12-25 01:23:17 -06:00
Scott Lahteine
feffc19867 🐛 Fix fast PWM WGM code
Followup to #23102
2021-12-25 01:23:02 -06:00
Scott Lahteine
f637e1c501 🔨 Bring Makefile up to date 2021-12-25 01:22:50 -06:00
EvilGremlin
78240a279b 🔨 Ignore sim flashdrive file (#23129) 2021-12-25 01:22:50 -06:00
Luc Van Daele
656034d2d9 🐛 Fix G33, Delta radii, reachable (#22795) 2021-12-25 01:22:50 -06:00
Mikhail Basov
39a81d167e 🚸 LCD_SHOW_E_TOTAL for TFT_COLOR_UI (#23127) 2021-12-25 01:19:21 -06:00
Scott Lahteine
cb1570d162 🐛 Fix SENSORLESS_HOMING for 6-axis 2021-12-25 01:19:21 -06:00
EvilGremlin
8cb646cc20 🚸 Simplify touchscreen calibration for SimUI (#23124) 2021-12-25 01:18:35 -06:00
Miguel Risco-Castillo
3cccb21dc9 🚸 Fix up E3V2 Enhanced (#23100) 2021-12-25 01:18:35 -06:00
Scott Lahteine
7f4a49cc44 🎨 Misc. issue review patches 2021-12-25 01:18:35 -06:00
Mike La Spina
e0c439fe91 ️ Controller Fan software PWM (etc.) (#23102)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 01:15:49 -06:00
Tanguy Pruvot
49e233e06f 🎨 MPX ARM Mini pins cleanup (#23113) 2021-12-25 01:14:21 -06:00
Mike La Spina
b662dd1f92 🐛 [LCP1768] Init PWM in set_pwm_duty (#23110) 2021-12-25 01:13:47 -06:00
Skruppy
700cae43ab 🩹 Fix RGB case light compile (#23108) 2021-12-25 01:13:23 -06:00
George Fu
1c74c6e7ac 🐛 Fix FYSETC Cheetah 2.0 pins for production (#23104) 2021-12-25 01:13:07 -06:00
Minims
757a9477db 🩹 Adjust GTR 1.0 ST7920 display delay (#22904) 2021-12-25 01:10:51 -06:00
Scott Lahteine
59d43408f6 fix breaks in F() resolution 2021-12-25 01:10:51 -06:00
Scott Lahteine
1d8941d008 🔨 Port libsdl2_net required for macOS simulator 2021-12-25 01:10:51 -06:00
Keith Bennett
17f853d99c ️ BTT002 (STM32F407VET6) variant, MK3_FAN_PINS flag (#23093) 2021-12-25 00:54:46 -06:00
Scott Lahteine
6f9f25dbb2 🎨 Misc. code cleanup 2021-12-25 00:54:46 -06:00
VragVideo
0273a68587 WYH L12864 LCD (Alfawise Ex8) (#22863) 2021-12-25 00:54:46 -06:00
Keith Bennett
58a26fcaac 🚸 Indicate Preheating for probe / leveling (#23088) 2021-12-25 00:46:49 -06:00
Evgeniy Zhabotinskiy
489aca03ff 🩹 Fix M503 report (#23084) 2021-12-25 00:46:49 -06:00
Jin
f32e19e1c6 🍻 Preliminary fix for Max31865 SPI (#22682)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 00:46:49 -06:00
dwzg
57bd04b6ce 🐛 Fix JyersUI scrolling filename, etc. (#23082)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2021-12-25 00:46:49 -06:00
ellensp
396df93220 🐛 Fix DGUS Reloaded status message (#23090) 2021-12-25 00:46:49 -06:00
Scott Lahteine
9b76b58b79 🍻 Get/clear reset source earlier
Followup to #23075
2021-12-25 00:46:49 -06:00
Skruppy
9fffed7160 🐛 Prevent AVR watchdogpile (#23075) 2021-12-25 00:46:49 -06:00
Tanguy Pruvot
fd136d5501 🐛 Fix TFT backlight [STM32] (#23062) 2021-12-25 00:46:49 -06:00
BigTreeTech
89ec1c71f0 🐛 Fix Octopus-Pro Max31865 / SPI (#23072) 2021-12-25 00:46:49 -06:00
Robby Candra
fc2020c6ec 🔨 Fix IntelliSense / PIO conflicts (#23058)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2021-12-25 00:46:49 -06:00
ellensp
f97635de36 📌 'STOP' auto-assign, some Chitu V9 pins (#22889)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2021-12-25 00:46:49 -06:00
Scott Lahteine
a0a57406a2 🔨 Script 'mfprep' finds pending commits 2021-12-25 00:46:49 -06:00
Scott Lahteine
5efef86cfa 🔨 Update git helper scripts 2021-12-25 00:46:49 -06:00
Scott Lahteine
20c747753d 🔨 Support ABM in mf scripts 2021-12-25 00:46:49 -06:00
Keith Bennett
08a9c61587 📌 Default NeoPixel pin for MKS Robin E3/E3D (#23060) 2021-12-25 00:46:49 -06:00
Andrei M
0d91b07797 ⚗️ Use pwm_set_duty over analogWrite to set PWM (#23048)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 00:46:49 -06:00
Keith Bennett
b033da1782 🔧 Endstop / DIAG homing conflict warning (#23050) 2021-12-25 00:46:49 -06:00
Keith Bennett
4dcd872be5 Allow Low EJERK with LA, optional (#23054) 2021-12-25 00:46:49 -06:00
Keith Bennett
7e9e2a7435 Artillery Ruby (STM32F401RCT6) (#23029) 2021-12-25 00:46:48 -06:00
tombrazier
0b84194127 🚸 More flexible Probe Temperature Compensation (#23033) 2021-12-25 00:46:48 -06:00
Scott Lahteine
efd9329c81 📝 Tweak EXP comments 2021-12-25 00:46:48 -06:00
Scott Lahteine
5cbb820e29 🔨 Help for GDB remote debugging 2021-12-25 00:46:48 -06:00
Scott Lahteine
5a0166489e 🩹 Fix linker error (transfer_port_index) 2021-12-25 00:46:48 -06:00
Scott Lahteine
692c9a6312 💚 Update Ender-3 V2 config path
MarlinFirmware/Configurations#600
2021-12-25 00:46:48 -06:00
Scott Lahteine
545d14f9a5 🎨 Adjust Ender-3 V2 DWIN options 2021-12-25 00:46:48 -06:00
aalku
7b9e01eb2b Shutdown Host Action (#22908)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 00:46:48 -06:00
Scott Lahteine
8562f0ec44 "Rutilea" ESP32 board (#22880) 2021-12-25 00:46:48 -06:00
Scott Lahteine
6f59d8171f 🔧 Configuration version 02000903 2021-12-25 00:46:48 -06:00
Scott Lahteine
d29a9014f2 🎨 Standard 'cooldown' method 2021-12-25 00:46:48 -06:00
Scott Lahteine
205d867e4b 🎨 Standard material presets behavior 2021-12-25 00:46:48 -06:00
Scott Lahteine
84f9490149 🎨 Define HAS_PREHEAT conditional 2021-12-25 00:46:48 -06:00
tome9111991
1fd4258423 🐛 Fix E3V2 (CrealityUI) Tune/Prepare > Zoffset (#23040) 2021-12-25 00:46:48 -06:00
Scott Lahteine
e8a55972a7 🐛 Fix EZBoard V2 board name 2021-12-25 00:46:48 -06:00
Keith Bennett
aef413202e 🐛 Fix MKS Robin E3/E3D Z Stop/Probe pins (#23034) 2021-12-25 00:46:48 -06:00
Scott Lahteine
cbc7dadf42 🎨 Apply HAS_MULTI_HOTEND conditional 2021-12-25 00:46:48 -06:00
Zlopi
c508ecc414 🚸 Scroll long filename on MKS TFT (#23031) 2021-12-25 00:46:48 -06:00
ellensp
384a31765f 🩹 Retain LCD pins with motor expansion (#23024) 2021-12-25 00:46:48 -06:00
somehibs
0f2c4fc40b 🐛 Fix serial PORT_RESTORE (and BUFFER_MONITORING) (#23022) 2021-12-25 00:46:48 -06:00
tome9111991
66a274452c 🐛 Fix E3V2 (CrealityUI) position display (#23023)
Followup to #23005, #22778
2021-12-25 00:46:48 -06:00
Scott Lahteine
12f8168d1e 🚸 Tweaks to UBL G29 Q 2021-12-25 00:46:47 -06:00
woisy00
2142e1dae4 🐛 Fix AUTOTEMP bug (thermal runaway) (#23025)
Regression from 9823a37
2021-12-25 00:46:47 -06:00
tombrazier
8d21ea55a2 🐛 Add USE_TEMP_EXT_COMPENSATION options (#23007) 2021-12-25 00:46:47 -06:00
Scott Lahteine
a0da7e8a1f 🔧 Fewer alerts about Z_SAFE_HOMING 2021-12-25 00:46:47 -06:00
tome9111991
e2452d6c57 🐛 Fix SHOW_REMAINING_TIME option for JyersUI (#22999) 2021-12-25 00:46:47 -06:00
Keith Bennett
5173a3140d BigTreeTech TFT35 SPI V1.0 (#22986) 2021-12-25 00:46:47 -06:00
Mike La Spina
e44f2b7d2d 🩹 Fix pragma ignored for older GCC (#22978) 2021-12-25 00:45:55 -06:00
Scott Lahteine
ed78f7f4e6 🎨 Refactor MOSFET pins layout (#22983) 2021-12-25 00:45:05 -06:00
Scott Lahteine
aa198e41dd 🎨 Pragma GCC cleanup 2021-12-25 00:45:05 -06:00
Jason Smith
18b38fb58a 🐛 Fix max chamber fan speed (#22977) 2021-12-25 00:45:05 -06:00
Keith Bennett
5d79d8fad6 🐛 Fix I2C EEPROM SDA/SCL aliases with SKR Mini E3 V2 (#22955) 2021-12-25 00:45:05 -06:00
ellensp
e7a746966d 🐛 Fix MMU1 compile (#22965) 2021-12-25 00:45:05 -06:00
Mike La Spina
555f35d46f 🎨 Suppress type warning (#22976) 2021-12-25 00:45:05 -06:00
Scott Lahteine
de77dfcbbd 🎨 Add MKS UI goto_previous_ui 2021-12-25 00:45:05 -06:00
Scott Lahteine
af08f16efc 🚸 Tweak MKS UI G-code console 2021-12-25 00:45:05 -06:00
Scott Lahteine
01a0f3a8cf 🎨 Fix up MKS UI defines 2021-12-25 00:45:05 -06:00
Scott Lahteine
f80bcdcc5c 🎨 Refactor Host Actions as singleton 2021-12-25 00:45:05 -06:00
ellensp
1ead7ce681 🔧 Add, update TFT sanity checks (#22928) 2021-12-25 00:45:05 -06:00
InsanityAutomation
dffa56463e ️ Formbot ST7920 delays, intentional X2 pins (#22915)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 00:45:05 -06:00
Dmytro
ae98d2e5ea 🎨 Update MKS UI for no bed, extruder (#22938)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-12-25 00:45:05 -06:00
InsanityAutomation
5b1ef638ee 🐛 Fix IDEX + DISABLE_INACTIVE_EXTRUDER (#22925) 2021-12-25 00:45:05 -06:00
Stuart Pittaway
f3be03da20 M261 S I2C output format (#22890)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2021-12-25 00:45:05 -06:00
Tanguy Pruvot
64128a5bcb 🐛 Queue string followup (#22900) 2021-12-25 00:45:05 -06:00
Pyro-Fox
0018c94a79 🐛 LCD string followup (#22892) 2021-12-25 00:45:05 -06:00
Scott Lahteine
d48cb11537 🐛 Followup to F() in config_line
Followup to 1dafd1887e
2021-12-25 00:45:05 -06:00
Scott Lahteine
d9f7de7a24 🐛 ExtUI F() followups
Followup to 12b5d997a2
2021-12-25 00:45:04 -06:00
Scott Lahteine
3d102a77ca 🎨 Apply F() to kill / sendinfoscreen 2021-12-25 00:45:04 -06:00
Scott Lahteine
492d70424d 🎨 Apply F() to MKS UI errors, assets 2021-12-25 00:45:04 -06:00
Scott Lahteine
24dbeceb45 🎨 Apply F() to various reports 2021-12-25 00:45:04 -06:00
Scott Lahteine
cabd538fdd 🎨 Apply F() to G-code report header 2021-12-25 00:45:04 -06:00
Scott Lahteine
9cf1c3cf05 🎨 Apply F() to UTF-8/MMU2 string put 2021-12-25 00:45:04 -06:00
Scott Lahteine
c3ae221a10 🎨 Apply F() to some ExtUI functions 2021-12-25 00:31:06 -06:00
Scott Lahteine
7626d859a6 🎨 Apply F() to Host Actions strings 2021-12-25 00:20:45 -06:00
Scott Lahteine
360311f232 🎨 Apply F() to status message 2021-12-25 00:20:45 -06:00
Scott Lahteine
433eedd50f 🎨 Apply F() to serial macros 2021-12-25 00:20:45 -06:00
Scott Lahteine
46c53f6730 🎨 Apply F() to G-code suite and queue 2021-12-25 00:20:45 -06:00
Scott Lahteine
2b9ae0cc33 🎨 Apply F() to G-code subcommands 2021-12-25 00:20:45 -06:00
Scott Lahteine
433a27e475 🎨 Update F string declarations 2021-12-25 00:20:44 -06:00
Scott Lahteine
1de265ea5d 🎨 Axis name string interpolation, with examples (#22879) 2021-12-25 00:20:44 -06:00
Robby Candra
854ce63358 🐛 Fix loud_kill heater disable (#23314) 2021-12-18 16:35:22 -06:00
lukrow80
170f77fada 🐛 Fix homing current for extra axes (#23152)
Followup to #19112
2021-11-23 15:30:48 -06:00
InsanityAutomation
72b99bf1ba 🐛 Fix IDEX Duplication Mode Positioning (#22914)
Fixing #22538
2021-11-23 15:22:20 -06:00
Robby Candra
1a8583f4fc 🐛 Fix serial_data_available (#23160) 2021-11-23 15:20:26 -06:00
Scott Lahteine
49e8defda1 🔨 Move Creality 4.2.2 warning 2021-11-03 01:46:17 -05:00
Sebastien BLAISOT
e5c4e77eb0 🐛 Fix NEOPIXEL2_SEPARATE default color (#23057) 2021-11-03 00:32:20 -05:00
ellensp
8dd3f38ae9 🩹 Fill gaps in pinsDebug_list (#23051) 2021-11-03 00:32:20 -05:00
ellensp
044a7db370 🐛 Fix Y_SERIAL_RX_PIN for FYSETC S6 (#23055) 2021-11-03 00:32:20 -05:00
Robby Candra
8cecc626c6 🎨 Fix redefine warnings (#23061) 2021-11-03 00:32:20 -05:00
tombrazier
ee26fd0e05 🚸 Default T0 for M569, M906, M913 (#23020) 2021-10-26 16:07:46 -05:00
ellensp
a7ea6b5925 ️ Add'l PCINTs for Mega Extended (#23019) 2021-10-26 16:07:46 -05:00
Keith Bennett
2b8a804997 Octopus Pro V1.0 with STM32F429ZGT6 (#23008) 2021-10-26 16:07:46 -05:00
Keith Bennett
908335367e BTT Octopus Pro V1.0 (STM32F446ZET6) (#22971) 2021-10-26 16:05:51 -05:00
ellensp
a7415a052e 🐛 Fix børken E_DUAL_STEPPER_DRIVERS (#23017) 2021-10-26 16:01:55 -05:00
Miguel Risco-Castillo
f51e07b196 🐛 Fix Ender-3 V2 Enhanced SetFlow (#23016) 2021-10-26 16:01:45 -05:00
Lefteris Garyfalakis
5f35c539ce 🚸 E3V2 Enhanced cosmetic fixes (#23009) 2021-10-26 16:01:34 -05:00
Scott Lahteine
59503c6bbb 🎨 Apply F() to E3V2 titles, popups 2021-10-26 16:00:40 -05:00
InsanityAutomation
0309fce1fd Creality v2.4.S1 (Ender 7) board (#23010) 2021-10-26 15:55:03 -05:00
Dennis
f6d211f779 🐛 Fix JyersUI current positions (scaling) (#23005) 2021-10-26 15:53:37 -05:00
Scott Lahteine
f179e25cc6 🐛 More explicit allocation of solenoids
In reference to #22887
2021-10-26 15:52:26 -05:00
tombrazier
5b478cd5f6 🐛 Fix probe temp compensation maths (#23004) 2021-10-26 15:51:04 -05:00
ellensp
e852732ea8 🐛 Fix E3V2 width/height defines (#22994) 2021-10-21 23:58:48 -05:00
Augusto Zanellato
c9718e1ec0 Eryone Ery32 mini (STM32F103VET6) board (#22956) 2021-10-21 23:58:48 -05:00
Scott Lahteine
30158424e9 🔨 Fix older GCC CXXFLAGS warning 2021-10-19 13:01:25 -05:00
Scott Lahteine
5f6d9e9f42 🎨 Fix pinsDebug_list warnings 2021-10-19 13:01:06 -05:00
Scott Lahteine
b108741a8e 💡 Sub-include pins labels 2021-10-19 13:00:19 -05:00
Scott Lahteine
b4904cc53e 🔨 Delete after encrypt. Lerdge encrypt only once 2021-10-19 13:00:02 -05:00
Scott Lahteine
2c6fe45847 🔨 Update 'pio vscode init' detection 2021-10-19 13:00:02 -05:00
Scott Lahteine
fed72e4607 🔨 Use pull_request_target for check-pr 2021-10-19 11:18:43 -05:00
Scott Lahteine
c3a4e6b3c8 Warn about dummy thermistors 2021-10-18 02:00:53 -05:00
InsanityAutomation
5bfc5c1010 Fix JyersUI ZOffset Multiplication (#22975) 2021-10-18 02:00:53 -05:00
InsanityAutomation
1112d66fef Fix Tool Change Park (#22968) 2021-10-18 02:00:53 -05:00
Scott Lahteine
61b574f2ce 🔨 Improve 'mftest' error message 2021-10-18 02:00:53 -05:00
Scott Lahteine
522cdd5272 🔧 Safety feature warnings 2021-10-18 02:00:53 -05:00
Scott Lahteine
641bae625b 💡 Update old gnu.org links 2021-10-18 02:00:53 -05:00
InsanityAutomation
d10e20d6d2 Add option EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN (#22960) 2021-10-18 02:00:53 -05:00
ellensp
b18aa933d1 🐛 Fix G33 homing current (#22909) 2021-10-12 21:20:08 -05:00
mks-viva
0f519ebf85 MKS Eagle (STM32F407VET6) board (#22897) 2021-10-12 21:20:08 -05:00
Minims
031f17b4f3 🩹 Adjust GTR 1.0 ST7920 display delay (#22904) 2021-10-12 21:20:08 -05:00
ellensp
036f763eaa 🎨 Define Octopus allocated endstop pins (#22882)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-10-12 21:20:08 -05:00
Scott Lahteine
d137f307eb 🎨 Tweak FORCE_INLINE 2021-10-12 21:20:08 -05:00
Mark
66048a5f27 ESP32 Panda_ZHU and Panda_M4 (#22644) 2021-10-12 21:20:08 -05:00
Scott Lahteine
b8c32e24d8 🎨 Rename MarlinUI::zoffset_overlay 2021-10-12 21:20:08 -05:00
Scott Lahteine
99d51af90f 🔨 Port libsdl2_net required for macOS simulator 2021-10-12 21:20:08 -05:00
Keith Bennett
f47ece0725 🐛 Fix MKS Robin Pro 1.0 LCD reset pin (#22937) 2021-10-12 21:20:08 -05:00
Keith Bennett
975089a954 🔧 Remove obsolete G34 sanity check (#22929) 2021-10-12 21:20:01 -05:00
George Fu
995230f597 🐛 Fix FYSETC Cheetah v2.0 build (#22926) 2021-10-12 21:19:55 -05:00
Keith Bennett
adf7072fa8 🐛 Fix SKR Mini E3 V2 I2C-based EEPROM (#22919)
Followup to #20609
2021-10-12 21:19:47 -05:00
Scott Lahteine
40cb7cf8d6 🔨 Add 'opt_find' to find matching options 2021-10-09 17:10:51 -05:00
ellensp
d0c0630c1f 🩹 Fix EXTRUDER 0 compile warning (#22868) 2021-10-04 01:12:35 -05:00
Sebastien Andrivet
11c829fb28 🐛 Fix ExtUI Pause messages (#22874) 2021-10-04 01:08:59 -05:00
ellensp
e0dda61501 🐛 Fix Arduino IDE compile error (#22877) 2021-10-04 00:27:25 -05:00
Scott Lahteine
a185ce22cf Marlin 2.0.9.2 2021-10-02 22:31:17 -05:00
Scott Lahteine
2a4ee1a482 MKS Robin pins updates 2021-10-02 22:31:17 -05:00
Cytown
3a82b8a251 🎨 Power-off tone followup (#22222) 2021-10-02 22:31:17 -05:00
Scott Lahteine
765b2b43f6 🎨 FTDI Eve Touch UI spinner enqueue string 2021-10-02 22:31:17 -05:00
Steven Haigh
2e602b9b88 🚑️ Fix DWIN_CompletedLeveling (#22851)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-10-02 22:31:17 -05:00
Malderin
5d3e75905d 🐛 E3V2 Mesh Viewer followup (#22850) 2021-10-02 22:31:16 -05:00
Scott Lahteine
eacb660e4b 🎨 Condense reverse-protection code 2021-10-02 22:31:16 -05:00
Scott Lahteine
021ceeba0b ️ Handle shared enable pins (#22824) 2021-10-02 22:31:16 -05:00
Miguel Risco-Castillo
25a131b942 E3V2 (Enhanced) Mesh Viewer (#22844) 2021-10-02 22:31:16 -05:00
Sola
b4c025a451 🚸 Fix MKS LVGL UI temperature set interface (#22848, #22842) 2021-10-02 22:31:16 -05:00
espr14
604a01cd1a 🎨 steps_to_mm => mm_per_step (#22847) 2021-10-02 22:31:16 -05:00
Tanguy Pruvot
064f91e9b0 🚸 TFT backlight PWM / brightness (#22841) 2021-10-02 22:31:16 -05:00
ellensp
34c9f64925 🔧 Sanity-check BLTOUCH_SET_5V_MODE on 5V pins (#22840)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-10-02 22:31:16 -05:00
Giuliano Zaro
060b705dab 🩹 Fix M412_report formatting (#22834) 2021-10-02 22:31:16 -05:00
Scott Lahteine
262cd757fc 🎨 Updated string macros 2021-10-02 22:31:16 -05:00
Steve Wills
dc4d2165f2 🐛 Add 'static' to fix 'duplicates' (#22826) 2021-10-02 22:31:16 -05:00
Manuel McLure
bcd2a483da 🐛 Fix M420 / M851 reports (#22829)
Followup to 79c72ed821
2021-10-02 22:31:16 -05:00
Scott Lahteine
d338872e85 🐛 Fix reset_hotend_offsets 2021-10-02 22:31:16 -05:00
Scott Lahteine
2c30b75268 🎨 Various multi-axis patches (#22823) 2021-10-02 22:31:16 -05:00
Sola
3deb54d0fd ️ Improve LVGL touch driver (#22817) 2021-10-02 22:31:16 -05:00
ellensp
9ae6351a02 🐛 Fix anycubic_i3mega_lcd debug macros (#22820) 2021-10-02 22:31:16 -05:00
Scott Lahteine
b7f95dc8d4 🩹 Add MarlinSPI to more HALs 2021-10-02 22:31:16 -05:00
Scott Lahteine
99647fa940 🎨 Less use of undef for RAMPS pins 2021-10-02 22:31:16 -05:00
Scott Lahteine
ea3df94213 🎨 Fix L64xx enable, clean up conditionals 2021-10-02 22:31:16 -05:00
Scott Lahteine
a37580e4e8 🩹 Remove extra #include, misc. style 2021-10-02 22:31:16 -05:00
Dan Royer
b3fd03198a Polargraph / Makelangelo kinematics (#22790) 2021-10-02 22:31:16 -05:00
Lefteris Garyfalakis
71b8a22d96 🌐 Update Greek language (#22799) 2021-10-02 22:31:16 -05:00
Scott Lahteine
669b68497c 🌐 Skip non-essential translations 2021-10-02 22:31:16 -05:00
Scott Lahteine
6014dd9c7b 🔨 Improve pins_set script 2021-10-02 22:31:16 -05:00
Scott Lahteine
5a54ba8316 🔨 Case-insensitive tests list 2021-10-02 22:31:16 -05:00
Scott Lahteine
be8e8260e2 🌐 Reduce language file sizes 2021-10-02 22:31:16 -05:00
Tanguy Pruvot
5d8ca7c944 🐛 STM32 ADC followup (#22798) 2021-10-02 22:31:16 -05:00
Tanguy Pruvot
0e8e215d4e 🚸 Wake up TFT for some events (#22788) 2021-10-02 22:31:16 -05:00
Scott Lahteine
6cf95509cd 🎨 Replace some infrequently-used macros 2021-10-02 22:31:16 -05:00
Scott Lahteine
ded719cc14 📝 Update some pins comments 2021-10-02 22:31:16 -05:00
Steven Haigh
2630eefcc4 🐛 STM32 ADC Resolution = 12 bit (or ADC_RESOLUTION) (#22789) 2021-10-02 22:31:16 -05:00
Scott Lahteine
2b54a9c0ff 🚸 Move fade item up 2021-10-02 22:31:16 -05:00
Scott Lahteine
bb1eb39ecb 🚸 Better bed position 2021-10-02 22:31:16 -05:00
Scott Lahteine
8b818f4ae5 💬 Add non-translated STR_DONE 2021-10-02 22:31:16 -05:00
Sola
4d113c2efd 🚸 Fix and improve MKS LVGL UI (#22783)
Co-authored-by: makerbase <4164049@qq.com>
Co-authored-by: MKS-Sean <56996910+MKS-Sean@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-10-02 22:31:16 -05:00
Scott Lahteine
ab9609146f 💡 Adjust headers, formatting 2021-10-02 22:31:16 -05:00
InsanityAutomation
e7a25a45e6 Improve pause/filament change for ExtUI (#22655) 2021-10-02 22:31:15 -05:00
Scott Lahteine
023eaabc1c 🔧 Add MANUAL_FEEDRATE sanity-check 2021-10-02 22:31:15 -05:00
Scott Lahteine
03d7fbd755 🎨 Handle more pre-defined pins in pins_postprocess (#22771) 2021-10-02 22:31:15 -05:00
Miguel Risco-Castillo
89898181bd 🐛 E3V2 Brightness followup (#22821)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2021-10-02 22:31:15 -05:00
Scott Lahteine
e705a7724e 🎨 Consolidate Ender-3 V2 DWIN common code (#22778) 2021-10-02 22:31:15 -05:00
Keith Bennett
5b593da04d ✏️ Fix TFT field names (#22776) 2021-10-02 22:31:15 -05:00
mks-viva
9c4f9bc62a 🐛 Fix MKS Monster8 EEPROM issue (serial timer) (#22777) 2021-10-02 22:31:15 -05:00
Miguel Risco-Castillo
84d1619127 🩹 Fix DWIN Enhanced Tune menu during homing (#22773)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2021-10-02 22:31:15 -05:00
Dakkaron
1386e78369 M282 - Detach Servo (#22760) 2021-10-02 22:31:15 -05:00
Tanguy Pruvot
224371dfc6 TFT Screen/Backlight Sleep (#22617) 2021-10-02 22:31:15 -05:00
Scott Lahteine
033043218e 🔖 Configurations version 02000902 2021-10-02 22:31:15 -05:00
Desuuuu
fcbd99d941 🎨 Use ExtUI API where applicable 2021-10-02 22:31:15 -05:00
Roman Moravčík
209e5c27ca 🌐 Update Slovak language (#22752) 2021-10-02 22:31:15 -05:00
Scott Lahteine
92eb819aee 🐛 Fix old spindle/laser options 2021-10-02 22:31:15 -05:00
Scott Lahteine
de4eed33e4 🔧 SPINDLE_LASER_PWM => SPINDLE_LASER_USE_PWM 2021-10-02 22:31:15 -05:00
Scott Lahteine
59ad93560e 🐛 Fix CUSTOM_MENU_MAIN_SCRIPT_DONE
Fix #22762
2021-10-02 22:31:15 -05:00
Vert
50e52c0fdb 🐛 Fix ENABLED => EITHER typo (#22756) 2021-10-02 22:31:15 -05:00
mks-viva
e679fafaaf MKS Robin Nano V1.3 (STM32F407VET6) (#22749) 2021-10-02 22:31:15 -05:00
Scott Lahteine
6de25804eb 🎨 Tweak custom menu item code 2021-10-02 22:31:15 -05:00
Scott Lahteine
ded8ee0a1d 📌 Creality 4.3.1 board variants (#22704)
Co-authored-by: Chico <jjjm6000@gmail.com>
2021-10-02 22:31:15 -05:00
Luc Van Daele
44d54a0d01 🚸 G33 R and O options (#22707) 2021-10-02 22:31:15 -05:00
ellensp
6e1c997a0a 🐛 Fix Trigorilla Pro HAL/STM32 build offset (#22761) 2021-10-02 22:31:15 -05:00
Scott Lahteine
17c9450f0c 🎨 Apply more HAS_DELTA_SENSORLESS_PROBING 2021-10-02 22:31:15 -05:00
Scott Lahteine
d6a87aa75b 🐛 No probe enum for DELTA + SENSORLESS_PROBING
Fix #22729
2021-10-02 22:31:15 -05:00
Scott Lahteine
64acb9fe78 🩹 Warn about user feedback requirement 2021-10-02 22:31:15 -05:00
Scott Lahteine
22bf774d61 🐛 Fix LPC1768 SD-based EEPROM debug
Fixes #22746
2021-10-02 22:31:15 -05:00
Marcio T
e2a790b759 🚸 Enhance FTDI Eve Touch UI file select dialog (#22742) 2021-10-02 22:31:15 -05:00
Scott Lahteine
ee1c1034e5 🩹 Fix TOUCH_UI_FTDI_EVE warnings 2021-10-02 22:31:15 -05:00
Scott Lahteine
b661795ae5 🎨 Fewer serial macros 2021-10-02 22:31:15 -05:00
Scott Lahteine
6d96c221bd 🎨 Standardize G-code reporting 2021-10-02 22:31:15 -05:00
tome9111991
a596faf4e5 🐛 Fix JyersUI for LPC176x (#22745)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2021-10-02 22:31:15 -05:00
Scott Lahteine
3ee27e7e35 🐛 Followup to JyersUI 2021-10-02 22:31:15 -05:00
Miguel Risco-Castillo
6cf2cf7bd4 Ender-3 V2 CrealityUI Enhanced (#21942, #22728, #22733)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-10-02 22:31:15 -05:00
Jyers
54416f780d Ender-3 V2 with Jyers UI (#22422) 2021-10-02 22:31:15 -05:00
mrv96
9d73fcb959 Add DGUS_LCD_UI_RELOADED (#21931) 2021-10-02 22:31:15 -05:00
Scott Lahteine
f434915ad6 🚸 Show ExtUI message for PID_STARTED 2021-10-02 22:31:15 -05:00
Scott Lahteine
bbce951666 🎨 Misc. code cleanup 2021-10-02 22:31:15 -05:00
Scott Lahteine
8a4fec9460 🎨 Misc. Spindle/Laser (etc.) cleanup 2021-10-02 22:31:15 -05:00
Scott Lahteine
3a83516232 🚸 Per-hotend Watch items 2021-10-02 22:31:14 -05:00
Scott Lahteine
03344a0947 🎨 MarlinUI for E3V2 tweaks 2021-10-02 22:31:14 -05:00
Scott Lahteine
72d7bbbbf6 🔧 Sanity checks for Ender 3 V2 2021-10-02 22:31:14 -05:00
dotdash32
253f91765d 🎨 Use largest default ST9720 delays (#22713)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-10-02 22:31:14 -05:00
Dan
4c7f8696ab Protoneer CNC-Shield 3.00 (#22715) 2021-10-02 22:31:14 -05:00
Justin Nesselrotte
f94de97cdb Index Pick-and-Place board Rev.3 (#22647)
Co-authored-by: Gonçalo Pereira <goncalo_pereira@outlook.pt>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-10-02 22:31:14 -05:00
Tanguy Pruvot
bae19a3737 🌐 Update "Homing" for some languages (#22706) 2021-10-02 22:31:14 -05:00
Scott Lahteine
cc3abcd2c5 🩹 Fix 'ms' warning 2021-10-02 22:31:14 -05:00
Thomas White
9e18a543fa Homing submenu option (#22692) 2021-10-02 22:31:14 -05:00
Elliott Indiran
13bccd8441 📝 Update PID_PARAMS_PER_HOTEND comment (#22694)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2021-10-02 22:31:14 -05:00
Tanguy Pruvot
5af3dbdb30 🐛 Fix Mixing code typos (#22697) 2021-10-02 22:31:14 -05:00
DvoraNoob
9f43452fbd 🚸 MKS UI extrusion speed/steps config (#22656) 2021-10-02 22:31:14 -05:00
Tanguy Pruvot
61364906b3 🔨 Enhance Lerdge pins, TFTs, and variants (#22658) 2021-10-02 22:31:14 -05:00
Tanguy Pruvot
105fd73c28 🩹 Allow M42 S0/1 analogWrite on PWM pins (STM32) (#22631) 2021-10-02 22:31:14 -05:00
ellensp
b4b69c0de3 🐛 BTT Octopus X MAX pin for IDEX (#22654) 2021-10-02 22:31:14 -05:00
Vert
a37be7236b GT2560 V4.x A20 (#22664) 2021-10-02 22:31:14 -05:00
Scott Lahteine
bba7c0069f Creality3D CR-30 PrintMill 2021-10-02 22:31:14 -05:00
Scott Lahteine
8916b05cb4 🎨 Tweak pins, comment formatting 2021-10-02 22:31:14 -05:00
Scott Lahteine
99028376e6 ️ Clean up Info Menu 2021-10-02 22:31:14 -05:00
Scott Lahteine
c2796fbf3b 🌐 Tweak language selection 2021-10-02 22:31:14 -05:00
Scott Lahteine
37777a78bf 🐛 Followup to CrealityUI cleanup
Followup to #22586
2021-10-02 22:31:14 -05:00
Scott Lahteine
0da0aa9b2e ️ Add PROBE_PT_LAST_STOW 2021-09-12 19:30:35 -05:00
ellensp
9ffd3ed2e4 🔧 Set Z_PROBE_OFFSET_RANGE_MIN/MAX for MBL (#22663) 2021-09-12 19:30:32 -05:00
Scott Lahteine
1176c10860 🩹 Clean up BTT_SKR_CR6
Fixes #22665
2021-09-12 19:30:29 -05:00
Jason Smith
2e9f819d5f 🚸 Improve Tramming Wizard usability (#22672) 2021-09-12 19:30:27 -05:00
ellensp
19353fc98c ️ Revert MAX31865 recent changes (#22660) 2021-09-12 19:30:24 -05:00
Christian Schuster
b21d62543f 🩹 Fix LPC176x M43 formatting (#22680) 2021-09-12 19:30:21 -05:00
Zs.Antal
a42ecb843e 🌐 Update Hungarian language (#22678) 2021-09-12 19:30:19 -05:00
Giuliano Zaro
93ff2cb086 🌐 Update Italian language (#22645) 2021-09-12 19:30:16 -05:00
Scott Lahteine
086fa0f0a7 🔨 Fix HAL/STM32 F103Zx builds (#22610) 2021-09-12 19:30:13 -05:00
Scott Lahteine
5e97f37a78 🎨 screws_tilt_adjust_pos => tramming_points 2021-09-12 19:30:05 -05:00
Scott Lahteine
c14b162b9e 🌐 MSG_PROBING_MESH => MSG_PROBING_POINT 2021-09-12 19:30:00 -05:00
Scott Lahteine
61c000d96f 🔨 Three columns in mftest menu 2021-09-12 19:29:56 -05:00
Marcio T
c06a183f28 ️ Fix, enhance FTDI Eve Touch UI (#22619) 2021-09-12 19:29:52 -05:00
Marcio T
d1db17c6f5 ️ Enhance and fix FTDI Eve Touch UI file select (#22651) 2021-09-12 19:29:49 -05:00
Scott Lahteine
d336a4d71b 🐛 Fix SDSUPPORT for SKR CR-6 (#22668)
Co-authored-by: Sebastiaan Dammann <sebastiaandammann@outlook.com>
2021-09-12 19:29:46 -05:00
Scott Lahteine
796309c903 ️ Improve G2/G3 arc handling (#22599) 2021-09-12 19:29:44 -05:00
Scott Lahteine
53df1dfe4d 🩹 Sensorless homing tweak 2021-09-12 19:29:40 -05:00
Scott Lahteine
6769718264 🎨 Update more EXP Headers 2021-09-12 19:28:07 -05:00
Scott Lahteine
7704d84419 🎨 EXP headers, ST7920 delays (#22641) 2021-09-12 19:27:38 -05:00
Scott Lahteine
9b0e196ba2 📝 AlephObjects => LulzBot 2021-09-12 19:19:02 -05:00
Tanguy Pruvot
fd594ab176 🔨 Set Longer3D timers in variant (#22632) 2021-09-12 19:18:27 -05:00
Tanguy Pruvot
8cadcf6bb6 🩹 Tweak startup message (#22633) 2021-09-12 19:18:23 -05:00
DerAndere
22fdfa9629 🔨 Melzi with OptiBoot build (#22630) 2021-09-12 19:18:19 -05:00
Jin
a0ebe7c8ff 🩹 Use <SoftwareSPI.h> in MAX31865 lib (#22618) 2021-09-12 19:18:15 -05:00
Ryan V1
125c5bc345 🐛 Fix Multi-Endstop stepping (#22625) 2021-09-12 19:18:11 -05:00
Scott Lahteine
95f27cf339 🎨 EXP1/2 headers and pins cleanup (#22628) 2021-09-12 19:18:07 -05:00
Scott Lahteine
02ae4bc9b9 New board TH3D_EZBOARD_LITE_V2 (#22621) 2021-09-12 19:18:04 -05:00
Scott Lahteine
6bf2be66ed 🎨 Define FYSETC S6 and TH3D EZBoard EXP1/2 pins 2021-09-12 19:17:59 -05:00
Chris Pepper
d8ef23eda7 🐛 Fix LPC176x M43 Pins Debugging (#22611) 2021-09-12 19:17:56 -05:00
Scott Lahteine
73ef26a106 MarlinUI for Ender 3 v2 DWIN LCD (#22594)
Co-Authored-By: Taylor Talkington <taylor.talkington@gmail.com>
2021-09-12 19:17:52 -05:00
ellensp
d51e70083d BOARD_RUMBA32_BTT (#22607) 2021-09-12 19:17:48 -05:00
Scott Lahteine
dc5ae16861 🎨 Misc code and spacing cleanup 2021-09-12 19:17:24 -05:00
Scott Lahteine
0aa87af82f 🎨 Tweak TMC software serial pins 2021-09-12 19:17:18 -05:00
Keith Bennett
0be98b98a7 ⬆️ TMCStepper 0.7.3 (#22608) 2021-09-12 19:17:14 -05:00
Fjederhaek
f7ce107ac6 🐛 Update H-bot / Core for 6-axis (#22600)
Followup to #19112
2021-09-12 19:17:10 -05:00
Scott Lahteine
3f772df568 🌐 Update menu titles, add more IJK (#22605)
Followup to #19112
2021-09-12 19:17:05 -05:00
Scott Lahteine
caa6ec0519 🐛 Show bed size as 'work:' in M115
Fixes #22598
2021-09-12 19:17:01 -05:00
Scott Lahteine
30665737dc 🎨 Fix some formatting, F() versus PSTR() 2021-09-12 19:16:13 -05:00
mks-viva
0c401bddad MKS MINI12864 V3 for MKS Robin Nano V2/3 (#22285) 2021-09-12 18:31:47 -05:00
Scott Lahteine
eb0d80cb19 🎨 Update MKSPWC, some other pins (#22557) 2021-08-18 20:39:41 -05:00
charlespick
e62486a610 M76 Host Pause Feature (#21738) 2021-08-18 20:39:41 -05:00
chendo
51d954a4fd D576 Buffer Monitoring (#19674) 2021-08-18 20:39:41 -05:00
Scott Lahteine
416234f43a Add TEMP_SENSOR_BOARD (#22279, #22342, #22343, #22344, #22350) 2021-08-18 20:39:41 -05:00
Katelyn Schiesser
9ddb4de70a ♻️ Consolidate PSU_CONTROL (#22304) 2021-08-18 20:39:22 -05:00
Cytown
9741be5966 Power-off confirm / beep options (#22191) 2021-08-18 20:39:22 -05:00
Vert
ecb625a666 Mixer Presets (#21562) 2021-08-18 20:39:22 -05:00
Scott Lahteine
de7f6c425b ♻️ Clean up CrealityUI and MarlinUI (#22586) 2021-08-18 20:39:20 -05:00
Scott Lahteine
718227a94c 📌 Disregard TMCStepper 0.7.2 2021-08-18 20:37:26 -05:00
Tanguy Pruvot
bb12ebcca6 🐛 Fix STM32 delay, double reset in FSMC TFT init (#22584) 2021-08-18 20:36:21 -05:00
Tanguy Pruvot
2e14bf15dd 🐛 Fix Longer3D PWM/timer pins (#22583) 2021-08-18 20:36:21 -05:00
Jason Smith
11070b79a3 ️ Simplify PROBING_STEPPERS_OFF (#22581) 2021-08-18 20:36:11 -05:00
Keith Bennett
4219ae9106 ️ Revert ABL G29 feedrate (#22574)
Reverts 9130f58
2021-08-18 20:35:58 -05:00
Scott Lahteine
f803d74bc9 💚 Update STM32F103RET6_creality test path 2021-08-18 20:33:19 -05:00
Scott Lahteine
f0bca66d45 🐛 Fix LCD_COL_X_RJ
Followup to #22471
2021-08-18 20:31:49 -05:00
Tanguy Pruvot
b3c8d9bec8 🚸 Fewer CRs in settings report (#22560) 2021-08-18 20:31:49 -05:00
BigTreeTech
4a7d3a336b 🐛 Fix some BTT SKR2 pins (#22558) 2021-08-18 20:31:49 -05:00
Scott Lahteine
65e39116cb 🔨 Use zip link for MarlinSimUI 2021-08-18 20:31:49 -05:00
Tanguy Pruvot
0c97a2afdc 🐛 Fix M575 port index output (#22553) 2021-08-18 20:29:56 -05:00
Scott Lahteine
9c19d4705e 🎨 Tweak M73 condition 2021-08-18 20:29:56 -05:00
ellensp
be55401e3c 🚸 Better error for MOTHERBOARD not defined (#22551) 2021-08-18 20:29:56 -05:00
luzpaz
c612b56bc1 🐛 Spellcheck comments (#22496)
codespell -q 3 --builtin=clear,rare,informal,code -S ./Marlin/src/lcd/language -L alo,amin,endcode,stdio,uint
2021-08-18 20:29:56 -05:00
ldursw
8385be25cd 🔨 Fix (RRF E3) RX/TX buffer size override (#22475) 2021-08-18 20:29:56 -05:00
Miguel Risco-Castillo
2a323d0a8e 🐛 Fix Ender-3 v2 language init (#22550) 2021-08-18 20:29:56 -05:00
Scott Lahteine
c544711f14 🚚 Relocate and adjust DWIN E3V2 (#22471) 2021-08-18 20:29:56 -05:00
Scott Lahteine
a348f8e02c 🔨 Fix: BIGTREE_E3_RRF doesn't use user RX/TX sizes
Fixes #22466. Regression from #22377.
2021-08-18 20:29:56 -05:00
ellensp
42d9b4c91f 📝 Document DGUS display options (#22443) 2021-08-18 20:29:56 -05:00
Scott Lahteine
7d0efb452a 🎨 Update HAL/STM32 wrappers
Followup to #22537
2021-08-18 20:29:56 -05:00
1282 changed files with 129547 additions and 35477 deletions

View File

@ -7,7 +7,7 @@ name: Bump Distribution Date
on:
schedule:
- cron: '0 0 * * *'
- cron: '0 */6 * * *'
jobs:
bump_date:
@ -26,11 +26,13 @@ jobs:
- name: Bump Distribution Date
run: |
# Inline Bump Script
DIST=$( date +"%Y-%m-%d" )
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/Version.h" && \
git config user.name "${GITHUB_ACTOR}" && \
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
git add . && \
git commit -m "[cron] Bump distribution date ($DIST)" && \
git push
if [[ ! "$( git log -1 --pretty=%B )" =~ ^\[cron\] ]]; then
DIST=$( date +"%Y-%m-%d" )
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/Version.h" && \
git config user.name "${GITHUB_ACTOR}" && \
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
git add . && \
git commit -m "[cron] Bump distribution date ($DIST)" && \
git push
fi

View File

@ -6,7 +6,8 @@
name: PR Bad Target
on:
pull_request:
pull_request_target:
types: [opened]
branches:
- 1.0.x
- 1.1.x

View File

@ -97,6 +97,7 @@ jobs:
- REMRAM_V1
- BTT_SKR_SE_BX
- chitu_f103
- Index_Mobo_Rev03
# Put lengthy tests last

20
.gitignore vendored
View File

@ -22,12 +22,16 @@
# Generated files
_Version.h
bdf2u8g
marlin_config.json
mczip.h
*.gen
*.sublime-workspace
#
# OS
#
applet/
*.DS_Store
.DS_Store
#
# Misc
@ -37,7 +41,6 @@ applet/
*.rej
*.bak
*.idea
*.s
*.i
*.ii
*.swp
@ -137,20 +140,19 @@ __vm/
vc-fileutils.settings
# Visual Studio Code
.vscode
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/*.db
.vscode/*
!.vscode/extensions.json
#Simulation
imgui.ini
eeprom.dat
spi_flash.bin
#cmake
CMakeLists.txt
src/CMakeLists.txt
CMakeListsPrivate.txt
build/
# CLion
cmake-build-*
@ -167,7 +169,3 @@ __pycache__
# IOLogger logs
*_log.csv
# Simulation / Native
eeprom.dat
imgui.ini

8
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,8 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"marlinfirmware.auto-build",
"platformio.platformio-ide"
]
}

View File

@ -35,7 +35,7 @@
*
* Advanced settings can be found in Configuration_adv.h
*/
#define CONFIGURATION_H_VERSION 02000901
#define CONFIGURATION_H_VERSION 02000903
//===========================================================================
//============================= Getting Started =============================
@ -69,7 +69,7 @@
// @section info
// 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 "(Alfred Melch, default config)" // Who made the changes.
//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
/**
@ -94,6 +94,11 @@
// @section machine
// Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_RAMPS_14_EFB
#endif
/**
* Select the serial port on the board to use for communication with the host.
* This allows the connection of wireless adapters (for instance) to non-default port pins.
@ -123,8 +128,8 @@
* Currently Ethernet (-2) is only supported on Teensy 4.1 boards.
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
//#define SERIAL_PORT_2 -1
//#define BAUDRATE_2 250000 // Enable to override BAUDRATE
#define SERIAL_PORT_2 -1
#define BAUDRATE_2 250000 // Enable to override BAUDRATE
/**
* Select a third serial port on the board to use for communication with the host.
@ -139,15 +144,15 @@
// Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_RAMPS_14_EFB
#define MOTHERBOARD BOARD_BTT_SKR_V1_4_TURBO
#endif
// Name displayed in the LCD "Ready" message and Info menu
//#define CUSTOM_MACHINE_NAME "3D Printer"
#define CUSTOM_MACHINE_NAME "x301"
// 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
//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
#define MACHINE_UUID "6b764807-48e6-4e69-ae22-49ffe439ef34"
/**
* Define the number of coordinated linear axes.
@ -260,7 +265,6 @@
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
#if ENABLED(PARKING_EXTRUDER)
@ -342,6 +346,7 @@
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
//#define MIXING_PRESETS // Assign 8 default V-tool presets for 2 or 3 MIXING_STEPPERS
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
@ -366,6 +371,9 @@
//#define PSU_NAME "Power Supply"
#if ENABLED(PSU_CONTROL)
//#define MKS_PWC // Using the MKS PWC add-on
//#define PS_OFF_CONFIRM // Confirm dialog 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_DEFAULT_OFF // Keep power off until enabled directly with M80
@ -449,6 +457,7 @@
* 67 : 500 SliceEngineering 450°C Thermistor
* 70 : 100 bq Hephestos 2
* 75 : 100 Generic Silicon Heat Pad with NTC100K MGB18-104F39050L32
* 2000 : 100 Ultimachine Rambo TDK NTCG104LH104KT1 NTC100K motherboard Thermistor
*
* Analog Thermistors - 1 pullup - Atypical, and requires changing out the 4.7 pullup for 1.
* ------- (but gives greater accuracy and more stable PID)
@ -472,7 +481,7 @@
* NOTE: ADC pins are not 5V tolerant. Not recommended because it's possible to damage the CPU by going over 500°C.
* 201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x
*
* Custom/Dummy/Other Thermos
* Custom/Dummy/Other Thermal Sensors
* ------
* 0 : not used
* 1000 : Custom - Specify parameters in Configuration_adv.h
@ -482,7 +491,7 @@
* 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_2 0
#define TEMP_SENSOR_3 0
@ -490,10 +499,11 @@
#define TEMP_SENSOR_5 0
#define TEMP_SENSOR_6 0
#define TEMP_SENSOR_7 0
#define TEMP_SENSOR_BED 0
#define TEMP_SENSOR_BED 11
#define TEMP_SENSOR_PROBE 0
#define TEMP_SENSOR_CHAMBER 0
#define TEMP_SENSOR_COOLER 0
#define TEMP_SENSOR_BOARD 0
#define TEMP_SENSOR_REDUNDANT 0
// Dummy thermistor constant temperature readings, for use with 998 and 999
@ -526,17 +536,11 @@
* the print will be aborted. Whichever sensor is selected will have its normal functions disabled; i.e. selecting
* the Bed sensor (-1) will disable bed heating/monitoring.
*
* Use the following to select temp sensors:
* -5 : Cooler
* -4 : Probe
* -3 : not used
* -2 : Chamber
* -1 : Bed
* 0-7 : E0 through E7
* For selecting source/target use: COOLER, PROBE, BOARD, CHAMBER, BED, E0, E1, E2, E3, E4, E5, E6, E7
*/
#if TEMP_SENSOR_REDUNDANT
#define TEMP_SENSOR_REDUNDANT_SOURCE 1 // The sensor that will provide the redundant reading.
#define TEMP_SENSOR_REDUNDANT_TARGET 0 // The sensor that we are providing a redundant reading for.
#define TEMP_SENSOR_REDUNDANT_SOURCE E1 // The sensor that will provide the redundant reading.
#define TEMP_SENSOR_REDUNDANT_TARGET E0 // The sensor that we are providing a redundant reading for.
#define TEMP_SENSOR_REDUNDANT_MAX_DIFF 10 // (°C) Temperature difference that will trigger a print abort.
#endif
@ -595,8 +599,8 @@
// Set/get with gcode: M301 E[extruder number, 0-2]
#if ENABLED(PID_PARAMS_PER_HOTEND)
// Specify between 1 and HOTENDS values per array.
// If fewer than EXTRUDER values are provided, the last element will be repeated.
// Specify up to one value per hotend here, according to your setup.
// If there are fewer values, the last one applies to the remaining hotends.
#define DEFAULT_Kp_LIST { 22.20, 22.20 }
#define DEFAULT_Ki_LIST { 1.08, 1.08 }
#define DEFAULT_Kd_LIST { 114.00, 114.00 }
@ -750,13 +754,24 @@
// Enable one of the options below for CoreXY, CoreXZ, or CoreYZ kinematics,
// either in the usual order or reversed
//#define COREXY
#define COREXY
//#define COREXZ
//#define COREYZ
//#define COREYX
//#define COREZX
//#define COREZY
//#define MARKFORGED_XY // MarkForged. See https://reprap.org/forum/read.php?152,504042
//#define MARKFORGED_YX
// Enable for a belt style printer with endless "Z" motion
//#define BELTPRINTER
// Enable for Polargraph Kinematics
//#define POLARGRAPH
#if ENABLED(POLARGRAPH)
#define POLARGRAPH_MAX_BELT_LEN 1035.0
#define POLAR_SEGMENTS_PER_SECOND 5
#endif
//===========================================================================
//============================== Endstop Settings ===========================
@ -784,18 +799,18 @@
#define ENDSTOPPULLUPS
#if DISABLED(ENDSTOPPULLUPS)
// Disable ENDSTOPPULLUPS to set pullups individually
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
//#define ENDSTOPPULLUP_IMAX
//#define ENDSTOPPULLUP_JMAX
//#define ENDSTOPPULLUP_KMAX
//#define ENDSTOPPULLUP_XMIN
//#define ENDSTOPPULLUP_YMIN
//#define ENDSTOPPULLUP_ZMIN
//#define ENDSTOPPULLUP_IMIN
//#define ENDSTOPPULLUP_JMIN
//#define ENDSTOPPULLUP_KMIN
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
//#define ENDSTOPPULLUP_IMAX
//#define ENDSTOPPULLUP_JMAX
//#define ENDSTOPPULLUP_KMAX
//#define ENDSTOPPULLUP_ZMIN_PROBE
#endif
@ -803,25 +818,25 @@
//#define ENDSTOPPULLDOWNS
#if DISABLED(ENDSTOPPULLDOWNS)
// Disable ENDSTOPPULLDOWNS to set pulldowns individually
//#define ENDSTOPPULLDOWN_XMAX
//#define ENDSTOPPULLDOWN_YMAX
//#define ENDSTOPPULLDOWN_ZMAX
//#define ENDSTOPPULLDOWN_IMAX
//#define ENDSTOPPULLDOWN_JMAX
//#define ENDSTOPPULLDOWN_KMAX
//#define ENDSTOPPULLDOWN_XMIN
//#define ENDSTOPPULLDOWN_YMIN
//#define ENDSTOPPULLDOWN_ZMIN
//#define ENDSTOPPULLDOWN_IMIN
//#define ENDSTOPPULLDOWN_JMIN
//#define ENDSTOPPULLDOWN_KMIN
//#define ENDSTOPPULLDOWN_XMAX
//#define ENDSTOPPULLDOWN_YMAX
//#define ENDSTOPPULLDOWN_ZMAX
//#define ENDSTOPPULLDOWN_IMAX
//#define ENDSTOPPULLDOWN_JMAX
//#define ENDSTOPPULLDOWN_KMAX
//#define ENDSTOPPULLDOWN_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define I_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define J_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define K_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
@ -851,9 +866,9 @@
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'L6474', 'POWERSTEP01', '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 Y_DRIVER_TYPE A4988
#define Z_DRIVER_TYPE A4988
#define X_DRIVER_TYPE TMC2209
#define Y_DRIVER_TYPE TMC2209
#define Z_DRIVER_TYPE TMC2209
//#define X2_DRIVER_TYPE A4988
//#define Y2_DRIVER_TYPE A4988
//#define Z2_DRIVER_TYPE A4988
@ -862,7 +877,7 @@
//#define I_DRIVER_TYPE A4988
//#define J_DRIVER_TYPE A4988
//#define K_DRIVER_TYPE A4988
#define E0_DRIVER_TYPE A4988
#define E0_DRIVER_TYPE TMC2209
//#define E1_DRIVER_TYPE A4988
//#define E2_DRIVER_TYPE A4988
//#define E3_DRIVER_TYPE A4988
@ -917,18 +932,18 @@
* Override with M92
* 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 { 79, 79, 400, 415 }
/**
* Default Max Feed Rate (mm/s)
* Override with M203
* X, Y, Z [, I [, J [, K]]], E0 [, E1[, E2...]]
*/
#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 }
#define DEFAULT_MAX_FEEDRATE { 300, 300, 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)
#define MAX_FEEDRATE_EDIT_VALUES { 600, 600, 10, 50 } // ...or, set your own edit limits
#define MAX_FEEDRATE_EDIT_VALUES { 2400, 2400, 25, 50 } // ...or, set your own edit limits
#endif
/**
@ -939,7 +954,7 @@
*/
#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 }
//#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
#if ENABLED(LIMITED_MAX_ACCEL_EDITING)
#define MAX_ACCEL_EDIT_VALUES { 6000, 6000, 200, 20000 } // ...or, set your own edit limits
#endif
@ -1020,10 +1035,10 @@
* The probe replaces the Z-MIN endstop and is used 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
//#define USE_PROBE_FOR_Z_HOMING
#define USE_PROBE_FOR_Z_HOMING
/**
* Z_MIN_PROBE_PIN
@ -1077,7 +1092,7 @@
/**
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#define BLTOUCH
/**
* Touch-MI Probe by hotends.fr
@ -1111,7 +1126,7 @@
#endif
// Duet Smart Effector (for delta printers) - https://bit.ly/2ul5U7J
// When the pin is defined you can use M672 to set/reset the probe sensivity.
// When the pin is defined you can use M672 to set/reset the probe sensitivity.
//#define DUET_SMART_EFFECTOR
#if ENABLED(DUET_SMART_EFFECTOR)
#define SMART_EFFECTOR_MOD_PIN -1 // Connect a GPIO pin to the Smart Effector MOD pin
@ -1169,7 +1184,7 @@
* | [-] |
* O-- FRONT --+
*/
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#define NOZZLE_TO_PROBE_OFFSET { -20, 14, -1.475 }
// 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.
@ -1211,6 +1226,15 @@
#endif
#endif
/**
* Probe Enable / Disable
* The probe only provides a triggered signal when enabled.
*/
//#define PROBE_ENABLE_DISABLE
#if ENABLED(PROBE_ENABLE_DISABLE)
//#define PROBE_ENABLE_PIN -1 // Override the default pin here
#endif
/**
* Multiple Probing
*
@ -1312,7 +1336,7 @@
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false
#define INVERT_Y_DIR true
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
//#define INVERT_I_DIR false
//#define INVERT_J_DIR false
@ -1321,7 +1345,7 @@
// @section extruder
// 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_E2_DIR false
#define INVERT_E3_DIR false
@ -1359,16 +1383,16 @@
// @section machine
// The size of the printable area
#define X_BED_SIZE 200
#define Y_BED_SIZE 200
#define X_BED_SIZE 300
#define Y_BED_SIZE 300
// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define X_MIN_POS -7
#define Y_MIN_POS -17
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 200
#define Z_MAX_POS 320
//#define I_MIN_POS 0
//#define I_MAX_POS 50
//#define J_MIN_POS 0
@ -1408,7 +1432,7 @@
#endif
#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
//#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
#endif
/**
@ -1527,7 +1551,7 @@
//#define AUTO_BED_LEVELING_3POINT
//#define AUTO_BED_LEVELING_LINEAR
//#define AUTO_BED_LEVELING_BILINEAR
//#define AUTO_BED_LEVELING_UBL
#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING
/**
@ -1535,7 +1559,7 @@
* these options to restore the prior leveling state or to always enable
* leveling immediately after G28.
*/
//#define RESTORE_LEVELING_AFTER_G28
#define RESTORE_LEVELING_AFTER_G28
//#define ENABLE_LEVELING_AFTER_G28
/**
@ -1577,14 +1601,14 @@
/**
* Enable the G26 Mesh Validation Pattern tool.
*/
//#define G26_MESH_VALIDATION
#define G26_MESH_VALIDATION
#if ENABLED(G26_MESH_VALIDATION)
#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_HOTEND_TEMP 205 // (°C) Default nozzle temperature for G26.
#define MESH_TEST_HOTEND_TEMP 200 // (°C) Default nozzle temperature for G26.
#define MESH_TEST_BED_TEMP 60 // (°C) Default bed temperature for G26.
#define G26_XY_FEEDRATE 20 // (mm/s) Feedrate for G26 XY moves.
#define G26_XY_FEEDRATE_TRAVEL 100 // (mm/s) Feedrate for G26 XY travel moves.
#define G26_XY_FEEDRATE 50 // (mm/s) Feedrate for G26 XY moves.
#define G26_XY_FEEDRATE_TRAVEL 200 // (mm/s) Feedrate for G26 XY travel moves.
#define G26_RETRACT_MULTIPLIER 1.0 // G26 Q (retraction) used by default between mesh test elements.
#endif
@ -1623,13 +1647,13 @@
//========================= 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 GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_X 15 // Don't use more than 15 points per axis, implementation limited.
#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
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
@ -1666,7 +1690,7 @@
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
#define LEVEL_BED_CORNERS
#if ENABLED(LEVEL_BED_CORNERS)
#define LEVEL_CORNERS_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets
@ -1727,7 +1751,7 @@
* - Allows Z homing only when XY positions are known and trusted.
* - 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)
#define Z_SAFE_HOMING_X_POINT X_CENTER // X point for Z homing
@ -1735,7 +1759,7 @@
#endif
// Homing speeds (mm/min)
#define HOMING_FEEDRATE_MM_M { (50*60), (50*60), (4*60) }
#define HOMING_FEEDRATE_MM_M { (30*60), (30*60), (4*60) }
// Validate that endstops are triggered on homing moves
#define VALIDATE_HOMING_ENDSTOPS
@ -1812,12 +1836,13 @@
* M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes)
* 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 PROGMEM. Disable for release!
#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
#if ENABLED(EEPROM_SETTINGS)
//#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors.
//#define EEPROM_INIT_NOW // Init EEPROM on first boot after a new build.
#endif
//
@ -1846,8 +1871,8 @@
// Preheat Constants - Up to 5 are supported without changes
//
#define PREHEAT_1_LABEL "PLA"
#define PREHEAT_1_TEMP_HOTEND 180
#define PREHEAT_1_TEMP_BED 70
#define PREHEAT_1_TEMP_HOTEND 200
#define PREHEAT_1_TEMP_BED 60
#define PREHEAT_1_TEMP_CHAMBER 35
#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
@ -1868,7 +1893,7 @@
* P1 Raise the nozzle always to Z-park height.
* 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)
// Specify a park position as { X, Y, Z_raise }
@ -2041,10 +2066,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
* en, an, bg, ca, cz, da, de, el, el_gr, es, eu, fi, fr, gl, hr, hu, it,
* en, an, bg, ca, cz, da, de, el, el_CY, es, eu, fi, fr, gl, hr, hu, it,
* jp_kana, ko_KR, nl, pl, pt, pt_br, ro, ru, sk, sv, tr, uk, vi, zh_CN, zh_TW
*
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el_gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'hu':'Hungarian', 'it':'Italian', 'jp_kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt_br':'Portuguese (Brazilian)', 'ro':'Romanian', 'ru':'Russian', 'sk':'Slovak', 'sv':'Swedish', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)' }
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek (Greece)', 'el_CY':'Greek (Cyprus)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'hu':'Hungarian', 'it':'Italian', 'jp_kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt_br':'Portuguese (Brazilian)', 'ro':'Romanian', 'ru':'Russian', 'sk':'Slovak', 'sv':'Swedish', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)' }
*/
#define LCD_LANGUAGE en
@ -2085,7 +2110,7 @@
* SD Card support is disabled by default. If your controller has an SD slot,
* you must uncomment the following option or it won't work.
*/
//#define SDSUPPORT
#define SDSUPPORT
/**
* SD CARD: ENABLE CRC
@ -2156,6 +2181,7 @@
// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
//
//#define INDIVIDUAL_AXIS_HOMING_MENU
//#define INDIVIDUAL_AXIS_HOMING_SUBMENU
//
// SPEAKER/BUZZER
@ -2344,7 +2370,7 @@
// RepRapDiscount FULL GRAPHIC Smart Controller
// https://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
//
//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
//
// K.3D Full Graphic Smart Controller
@ -2365,6 +2391,11 @@
//#define VIKI2
//#define miniVIKI
//
// Alfawise Ex8 printer LCD marked as WYH L12864 COG
//
//#define WYH_L12864
//
// MakerLab Mini Panel with graphic
// controller and SD support - https://reprap.org/wiki/Mini_panel
@ -2434,6 +2465,11 @@
//#define FYSETC_MINI_12864_2_1 // Type A/B. NeoPixel RGB Backlight
//#define FYSETC_GENERIC_12864_1_1 // Larger display with basic ON/OFF backlight.
//
// BigTreeTech Mini 12864 V1.0 is an alias for FYSETC_MINI_12864_2_1. Type A/B. NeoPixel RGB Backlight.
//
//#define BTT_MINI_12864_V1
//
// Factory display for Creality CR-10
// https://www.aliexpress.com/item/32833148327.html
@ -2537,12 +2573,39 @@
// DGUS Touch Display with DWIN OS. (Choose one.)
// ORIGIN : https://www.aliexpress.com/item/32993409517.html
// FYSETC : https://www.aliexpress.com/item/32961471929.html
// MKS : https://www.aliexpress.com/item/1005002008179262.html
//
// Flash display with DGUS Displays for Marlin:
// - Format the SD card to FAT32 with an allocation size of 4kb.
// - Download files as specified for your type of display.
// - Plug the microSD card into the back of the display.
// - Boot the display and wait for the update to complete.
//
// ORIGIN (Marlin DWIN_SET)
// - Download https://github.com/coldtobi/Marlin_DGUS_Resources
// - Copy the downloaded DWIN_SET folder to the SD card.
//
// FYSETC (Supplier default)
// - Download https://github.com/FYSETC/FYSTLCD-2.0
// - Copy the downloaded SCREEN folder to the SD card.
//
// HIPRECY (Supplier default)
// - Download https://github.com/HiPrecy/Touch-Lcd-LEO
// - Copy the downloaded DWIN_SET folder to the SD card.
//
// MKS (MKS-H43) (Supplier default)
// - Download https://github.com/makerbase-mks/MKS-H43
// - Copy the downloaded DWIN_SET folder to the SD card.
//
// RELOADED (T5UID1)
// - Download https://github.com/Desuuuu/DGUS-reloaded/releases
// - Copy the downloaded DWIN_SET folder to the SD card.
//
//#define DGUS_LCD_UI_ORIGIN
//#define DGUS_LCD_UI_FYSETC
//#define DGUS_LCD_UI_HIPRECY
//#define DGUS_LCD_UI_MKS
//#define DGUS_LCD_UI_RELOADED
#if ENABLED(DGUS_LCD_UI_MKS)
#define USE_MKS_GREEN_UI
#endif
@ -2599,32 +2662,32 @@
*/
//
// 480x320, 3.5", SPI Display From MKS
// Normally used in MKS Robin Nano V2
// 480x320, 3.5", SPI Display with Rotary Encoder from MKS
// Usually paired with MKS Robin Nano V2 & V3
//
//#define MKS_TS35_V2_0
//
// 320x240, 2.4", FSMC Display From MKS
// Normally used in MKS Robin Nano V1.2
// Usually paired with MKS Robin Nano V1.2
//
//#define MKS_ROBIN_TFT24
//
// 320x240, 2.8", FSMC Display From MKS
// Normally used in MKS Robin Nano V1.2
// Usually paired with MKS Robin Nano V1.2
//
//#define MKS_ROBIN_TFT28
//
// 320x240, 3.2", FSMC Display From MKS
// Normally used in MKS Robin Nano V1.2
// Usually paired with MKS Robin Nano V1.2
//
//#define MKS_ROBIN_TFT32
//
// 480x320, 3.5", FSMC Display From MKS
// Normally used in MKS Robin Nano V1.2
// Usually paired with MKS Robin Nano V1.2
//
//#define MKS_ROBIN_TFT35
@ -2635,7 +2698,7 @@
//
// 320x240, 3.2", FSMC Display From MKS
// Normally used in MKS Robin
// Usually paired with MKS Robin
//
//#define MKS_ROBIN_TFT_V1_1R
@ -2665,10 +2728,15 @@
//#define ANET_ET5_TFT35
//
// 1024x600, 7", RGB Stock Display from BIQU-BX
// 1024x600, 7", RGB Stock Display with Rotary Encoder from BIQU-BX
//
//#define BIQU_BX_TFT70
//
// 480x320, 3.5", SPI Stock Display with Rotary Encoder from BIQU B1 SE Series
//
//#define BTT_TFT35_SPI_V1_0
//
// Generic TFT with detailed options
//
@ -2685,6 +2753,7 @@
//#define TFT_RES_320x240
//#define TFT_RES_480x272
//#define TFT_RES_480x320
//#define TFT_RES_1024x600
#endif
/**
@ -2722,7 +2791,11 @@
//
// Ender-3 v2 OEM display. A DWIN display with Rotary Encoder.
//
//#define DWIN_CREALITY_LCD
//#define DWIN_CREALITY_LCD // Creality UI
//#define DWIN_CREALITY_LCD_ENHANCED // Enhanced UI
//#define DWIN_CREALITY_LCD_JYERSUI // Jyers UI by Jacob Myers
//#define DWIN_MARLINUI_PORTRAIT // MarlinUI (portrait orientation)
//#define DWIN_MARLINUI_LANDSCAPE // MarlinUI (landscape orientation)
//
// Touch Screen Settings
@ -2732,6 +2805,8 @@
#define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens
#define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus
//#define TOUCH_IDLE_SLEEP 300 // (secs) Turn off the TFT backlight if set (5mn)
#define TOUCH_SCREEN_CALIBRATION
//#define TOUCH_CALIBRATION_X 12316
@ -2756,6 +2831,11 @@
//#define REPRAPWORLD_KEYPAD
//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // (mm) Distance to move per key-press
//
// EasyThreeD ET-4000+ with button input and status LED
//
//#define EASYTHREED_UI
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@ -2766,9 +2846,6 @@
// :[1,2,3,4,5,6,7,8]
//#define NUM_M106_FANS 1
// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
//#define FAST_PWM_FAN
// 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
// is too low, you should also increment SOFT_PWM_SCALE.
@ -2886,9 +2963,9 @@
* Set this manually if there are extra servos needing manual control.
* Set to 0 to turn off servo support.
*/
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
//#define NUM_SERVOS 3 // Note: Servo index starts with 0 for M280-M282 commands
// (ms) Delay before the next move will start, to give the servo time to reach its target angle.
// (ms) Delay before the next move will start, to give the servo time to reach its target angle.
// 300ms is a good value but you can try less delay.
// If the servo can't reach the requested position, increase it.
#define SERVO_DELAY { 300 }
@ -2898,3 +2975,6 @@
// Edit servo angles with M281 and save to EEPROM with M500
//#define EDITABLE_SERVO_ANGLES
// Disable servo with M282 to reduce power consumption, noise, and heat when not in use
//#define SERVO_DETACH_GCODE

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,7 @@
*
* Basic settings can be found in Configuration.h
*/
#define CONFIGURATION_ADV_H_VERSION 02000901
#define CONFIGURATION_ADV_H_VERSION 02000903
//===========================================================================
//============================= Thermal Settings ============================
@ -125,6 +125,12 @@
#define PROBE_BETA 3950 // Beta value
#endif
#if TEMP_SENSOR_BOARD == 1000
#define BOARD_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
#define BOARD_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
#define BOARD_BETA 3950 // Beta value
#endif
#if TEMP_SENSOR_REDUNDANT == 1000
#define REDUNDANT_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
#define REDUNDANT_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
@ -136,11 +142,20 @@
* FORCE_HW_SPI: Ignore SCK/MOSI/MISO pins and just use the CS pin & default SPI bus.
* MAX31865_WIRES: Set the number of wires for the probe connected to a MAX31865 board, 2-4. Default: 2
* MAX31865_50HZ: Enable 50Hz filter instead of the default 60Hz.
* MAX31865_USE_READ_ERROR_DETECTION: Detects random read errors from value spikes (a 20°C difference in less than 1sec)
* MAX31865_USE_AUTO_MODE: Faster and more frequent reads than 1-shot, but bias voltage always on, slightly affecting RTD temperature.
* MAX31865_MIN_SAMPLING_TIME_MSEC: in 1-shot mode, the minimum time between subsequent reads. This reduces the effect of bias voltage by leaving the sensor unpowered for longer intervals.
* MAX31865_WIRE_OHMS: In 2-wire configurations, manually set the wire resistance for more accurate readings
*/
//#define TEMP_SENSOR_FORCE_HW_SPI
//#define MAX31865_SENSOR_WIRES_0 2
//#define MAX31865_SENSOR_WIRES_1 2
//#define MAX31865_50HZ_FILTER
//#define MAX31865_USE_READ_ERROR_DETECTION
//#define MAX31865_USE_AUTO_MODE
//#define MAX31865_MIN_SAMPLING_TIME_MSEC 100
//#define MAX31865_WIRE_OHMS_0 0.0f
//#define MAX31865_WIRE_OHMS_1 0.0f
/**
* Hephestos 2 24V heated bed upgrade kit.
@ -180,7 +195,8 @@
//#define CHAMBER_FAN // Enable a fan on the chamber
#if ENABLED(CHAMBER_FAN)
#define CHAMBER_FAN_MODE 2 // Fan control mode: 0=Static; 1=Linear increase when temp is higher than target; 2=V-shaped curve; 3=similar to 1 but fan is always on.
//#define CHAMBER_FAN_INDEX 2 // Index of a fan to repurpose as the chamber fan. (Default: first unused fan)
#define CHAMBER_FAN_MODE 2 // Fan control mode: 0=Static; 1=Linear increase when temp is higher than target; 2=V-shaped curve; 3=similar to 1 but fan is always on.
#if CHAMBER_FAN_MODE == 0
#define CHAMBER_FAN_BASE 255 // Chamber fan PWM (0-255)
#elif CHAMBER_FAN_MODE == 1
@ -224,6 +240,18 @@
#endif
#endif
//
// Motherboard Sensor options
//
#if TEMP_SENSOR_BOARD
#define THERMAL_PROTECTION_BOARD // Halt the printer if the board sensor leaves the temp range below.
#define BOARD_MINTEMP 8 // (°C)
#define BOARD_MAXTEMP 70 // (°C)
#ifndef TEMP_BOARD_PIN
//#define TEMP_BOARD_PIN -1 // Board temp sensor pin, if not set in pins file.
#endif
#endif
//
// Laser Coolant Flow Meter
//
@ -311,14 +339,14 @@
* Thermal Protection parameters for the laser cooler.
*/
#if ENABLED(THERMAL_PROTECTION_COOLER)
#define THERMAL_PROTECTION_COOLER_PERIOD 10 // Seconds
#define THERMAL_PROTECTION_COOLER_HYSTERESIS 3 // Degrees Celsius
#define THERMAL_PROTECTION_COOLER_PERIOD 10 // Seconds
#define THERMAL_PROTECTION_COOLER_HYSTERESIS 3 // Degrees Celsius
/**
* Laser cooling watch settings (M143/M193).
*/
#define WATCH_COOLER_TEMP_PERIOD 60 // Seconds
#define WATCH_COOLER_TEMP_INCREASE 3 // Degrees Celsius
#define WATCH_COOLER_TEMP_PERIOD 60 // Seconds
#define WATCH_COOLER_TEMP_INCREASE 3 // Degrees Celsius
#endif
#if ENABLED(PIDTEMP)
@ -396,7 +424,7 @@
*/
#define AUTOTEMP
#if ENABLED(AUTOTEMP)
#define AUTOTEMP_OLDWEIGHT 0.98
#define AUTOTEMP_OLDWEIGHT 0.98 // Factor used to weight previous readings (0.0 < value < 1.0)
// Turn on AUTOTEMP on M104/M109 by default using proportions set here
//#define AUTOTEMP_PROPORTIONAL
#if ENABLED(AUTOTEMP_PROPORTIONAL)
@ -480,16 +508,20 @@
*/
//#define USE_CONTROLLER_FAN
#if ENABLED(USE_CONTROLLER_FAN)
//#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
//#define CONTROLLER_FAN_USE_Z_ONLY // With this option only the Z axis is considered
//#define CONTROLLER_FAN_IGNORE_Z // Ignore Z stepper. Useful when stepper timeout is disabled.
#define CONTROLLERFAN_SPEED_MIN 0 // (0-255) Minimum speed. (If set below this value the fan is turned off.)
#define CONTROLLERFAN_SPEED_ACTIVE 255 // (0-255) Active speed, used when any motor is enabled
#define CONTROLLERFAN_SPEED_IDLE 0 // (0-255) Idle speed, used when motors are disabled
#define CONTROLLERFAN_IDLE_TIME 60 // (seconds) Extra time to keep the fan running after disabling motors
//#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings
//#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
//#define CONTROLLER_FAN_USE_Z_ONLY // With this option only the Z axis is considered
//#define CONTROLLER_FAN_IGNORE_Z // Ignore Z stepper. Useful when stepper timeout is disabled.
#define CONTROLLERFAN_SPEED_MIN 0 // (0-255) Minimum speed. (If set below this value the fan is turned off.)
#define CONTROLLERFAN_SPEED_ACTIVE 255 // (0-255) Active speed, used when any motor is enabled
#define CONTROLLERFAN_SPEED_IDLE 0 // (0-255) Idle speed, used when motors are disabled
#define CONTROLLERFAN_IDLE_TIME 60 // (seconds) Extra time to keep the fan running after disabling motors
// Use TEMP_SENSOR_BOARD as a trigger for enabling the controller fan
//#define CONTROLLER_FAN_MIN_BOARD_TEMP 40 // (°C) Turn on the fan if the board reaches this temperature
//#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings
#if ENABLED(CONTROLLER_FAN_EDITABLE)
#define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu
#define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu
#endif
#endif
@ -517,18 +549,21 @@
//#define FAN_MAX_PWM 128
/**
* FAST PWM FAN Settings
* Fan Fast PWM
*
* Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
* Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
* frequency as close as possible to the desired frequency.
* Combinations of PWM Modes, prescale values and TOP resolutions are used internally
* to produce a frequency as close as possible to the desired frequency.
*
* FAST_PWM_FAN_FREQUENCY [undefined by default]
* FAST_PWM_FAN_FREQUENCY
* Set this to your desired frequency.
* If left undefined this defaults to F = F_CPU/(2*255*1)
* i.e., F = 31.4kHz on 16MHz microcontrollers or F = 39.2kHz on 20MHz microcontrollers.
* These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
* For AVR, if left undefined this defaults to F = F_CPU/(2*255*1)
* i.e., F = 31.4kHz on 16MHz microcontrollers or F = 39.2kHz on 20MHz microcontrollers.
* For non AVR, if left undefined this defaults to F = 1Khz.
* This F value is only to protect the hardware from an absence of configuration
* and not to complete it when users are not aware that the frequency must be specifically set to support the target board.
*
* NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior.
* Setting very high frequencies can damage your hardware.
*
* USE_OCR2A_AS_TOP [undefined by default]
* Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
@ -538,9 +573,17 @@
* PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
* USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
*/
//#define FAST_PWM_FAN // Increase the fan PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
#if ENABLED(FAST_PWM_FAN)
//#define FAST_PWM_FAN_FREQUENCY 31400
//#define FAST_PWM_FAN_FREQUENCY 31400 // Define here to override the defaults below
//#define USE_OCR2A_AS_TOP
#ifndef FAST_PWM_FAN_FREQUENCY
#ifdef __AVR__
#define FAST_PWM_FAN_FREQUENCY ((F_CPU) / (2 * 255 * 1))
#else
#define FAST_PWM_FAN_FREQUENCY 1000U
#endif
#endif
#endif
/**
@ -562,7 +605,7 @@
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN -1
#define E0_AUTO_FAN_PIN FAN1_PIN
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
@ -581,6 +624,40 @@
#define COOLER_AUTO_FAN_TEMPERATURE 18
#define COOLER_AUTO_FAN_SPEED 255
/**
* Hotend Cooling Fans tachometers
*
* Define one or more tachometer pins to enable fan speed
* monitoring, and reporting of fan speeds with M123.
*
* NOTE: Only works with fans up to 7000 RPM.
*/
//#define FOURWIRES_FANS // Needed with AUTO_FAN when 4-wire PWM fans are installed
//#define E0_FAN_TACHO_PIN -1
//#define E0_FAN_TACHO_PULLUP
//#define E0_FAN_TACHO_PULLDOWN
//#define E1_FAN_TACHO_PIN -1
//#define E1_FAN_TACHO_PULLUP
//#define E1_FAN_TACHO_PULLDOWN
//#define E2_FAN_TACHO_PIN -1
//#define E2_FAN_TACHO_PULLUP
//#define E2_FAN_TACHO_PULLDOWN
//#define E3_FAN_TACHO_PIN -1
//#define E3_FAN_TACHO_PULLUP
//#define E3_FAN_TACHO_PULLDOWN
//#define E4_FAN_TACHO_PIN -1
//#define E4_FAN_TACHO_PULLUP
//#define E4_FAN_TACHO_PULLDOWN
//#define E5_FAN_TACHO_PIN -1
//#define E5_FAN_TACHO_PULLUP
//#define E5_FAN_TACHO_PULLDOWN
//#define E6_FAN_TACHO_PIN -1
//#define E6_FAN_TACHO_PULLUP
//#define E6_FAN_TACHO_PULLDOWN
//#define E7_FAN_TACHO_PIN -1
//#define E7_FAN_TACHO_PULLUP
//#define E7_FAN_TACHO_PULLDOWN
/**
* Part-Cooling Fan Multiplexer
*
@ -764,7 +841,7 @@
//#define SENSORLESS_BACKOFF_MM { 2, 2, 0 } // (mm) Backoff from endstops before sensorless homing
#define HOMING_BUMP_MM { 5, 5, 2 } // (mm) Backoff from endstops after first bump
#define HOMING_BUMP_MM { 0, 0, 2 } // (mm) Backoff from endstops after first bump
#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define HOMING_BACKOFF_POST_MM { 2, 2, 2 } // (mm) Backoff from endstops after homing
@ -831,12 +908,14 @@
//#define BLTOUCH_FORCE_MODE_SET
/**
* Use "HIGH SPEED" mode for probing.
* Enable "HIGH SPEED" option for probing.
* Danger: Disable if your probe sometimes fails. Only suitable for stable well-adjusted systems.
* This feature was designed for Deltabots with very fast Z moves; however, higher speed Cartesians
* might be able to use it. If the machine can't raise Z fast enough the BLTouch may go into ALARM.
*
* Set the default state here, change with 'M401 S' or UI, use M500 to save, M502 to reset.
*/
//#define BLTOUCH_HS_MODE
//#define BLTOUCH_HS_MODE true
// Safety: Enable voltage mode settings in the LCD menu.
//#define BLTOUCH_LCD_VOLTAGE_MENU
@ -1174,7 +1253,7 @@
// @section lcd
#if EITHER(IS_ULTIPANEL, EXTENSIBLE_UI)
#if ANY(HAS_LCD_MENU, EXTENSIBLE_UI, HAS_DWIN_E3V2)
#define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 2*60 } // (mm/min) Feedrates for manual moves along X, Y, Z, E from panel
#define FINE_MANUAL_MOVE 0.025 // (mm) Smallest manual move (< 0.1mm) applying to Z on most machines
#if IS_ULTIPANEL
@ -1213,6 +1292,22 @@
// Set a convenient position to do the calibration (probing point and nozzle/bed-distance)
//#define PROBE_OFFSET_WIZARD_XY_POS { X_CENTER, Y_CENTER }
#endif
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Add a calibration procedure in the Probe Offsets menu
// to compensate for twist in the X-axis.
//#define X_AXIS_TWIST_COMPENSATION
#if ENABLED(X_AXIS_TWIST_COMPENSATION)
/**
* Enable to init the Probe Z-Offset when starting the Wizard.
* Use a height slightly above the estimated nozzle-to-probe Z offset.
* For example, with an offset of -5, consider a starting height of -4.
*/
#define XATC_START_Z 0.0
#define XATC_MAX_POINTS 3 // Number of points to probe in the wizard
#define XATC_Y_POSITION Y_CENTER // (mm) Y position to probe
#endif
#endif
#endif
// Include a page of printer information in the LCD Main Menu
@ -1224,9 +1319,6 @@
// BACK menu items keep the highlight at the top
//#define TURBO_BACK_MENU_ITEM
// Add a mute option to the LCD menu
//#define SOUND_MENU_ITEM
/**
* LED Control Menu
* Add LED Control to the LCD menu
@ -1258,7 +1350,11 @@
#endif // HAS_LCD_MENU
#if HAS_DISPLAY
#if ANY(HAS_DISPLAY, DWIN_CREALITY_LCD_ENHANCED, DWIN_CREALITY_LCD_JYERSUI)
//#define SOUND_MENU_ITEM // Add a mute option to the LCD menu
#endif
#if EITHER(HAS_DISPLAY, DWIN_CREALITY_LCD_ENHANCED)
// The timeout (in ms) to return to the status screen from sub-menus
//#define LCD_TIMEOUT_TO_STATUS 15000
@ -1282,11 +1378,14 @@
//#define LCD_SHOW_E_TOTAL
#endif
#if EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY) && ANY(HAS_MARLINUI_U8GLIB, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL, EXTENSIBLE_UI)
//#define SHOW_REMAINING_TIME // Display estimated time to completion
#if ENABLED(SHOW_REMAINING_TIME)
//#define USE_M73_REMAINING_TIME // Use remaining time from M73 command instead of estimation
//#define ROTATE_PROGRESS_DISPLAY // Display (P)rogress, (E)lapsed, and (R)emaining time
// LCD Print Progress options
#if EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
#if CAN_SHOW_REMAINING_TIME
//#define SHOW_REMAINING_TIME // Display estimated time to completion
#if ENABLED(SHOW_REMAINING_TIME)
//#define USE_M73_REMAINING_TIME // Use remaining time from M73 command instead of estimation
//#define ROTATE_PROGRESS_DISPLAY // Display (P)rogress, (E)lapsed, and (R)emaining time
#endif
#endif
#if EITHER(HAS_MARLINUI_U8GLIB, EXTENSIBLE_UI)
@ -1424,7 +1523,7 @@
//#define UTF_FILENAME_SUPPORT
// This allows hosts to request long names for files and folders with M33
//#define LONG_FILENAME_HOST_SUPPORT
#define LONG_FILENAME_HOST_SUPPORT
// Enable this option to scroll long filenames in the SD card menu
//#define SCROLL_LONG_FILENAMES
@ -1449,7 +1548,7 @@
/**
* Auto-report SdCard status with M27 S<seconds>
*/
//#define AUTO_REPORT_SD_STATUS
#define AUTO_REPORT_SD_STATUS
/**
* Support for USB thumb drives using an Arduino USB Host Shield or
@ -1507,6 +1606,14 @@
#define SD_FIRMWARE_UPDATE_INACTIVE_VALUE 0xFF
#endif
/**
* Enable this option if you have more than ~3K of unused flash space.
* Marlin will embed all settings in the firmware binary as compressed data.
* Use 'M503 C' to write the settings out to the SD Card as 'mc.zip'.
* See docs/ConfigEmbedding.md for details on how to use 'mc-apply.py'.
*/
//#define CONFIGURATION_EMBEDDING
// Add an optimized binary file transfer mode, initiated with 'M28 B1'
//#define BINARY_FILE_TRANSFER
@ -1519,7 +1626,7 @@
*
* :[ 'LCD', 'ONBOARD', 'CUSTOM_CABLE' ]
*/
//#define SDCARD_CONNECTION LCD
#define SDCARD_CONNECTION LCD
// Enable if SD detect is rendered useless (e.g., by using an SD extender)
//#define NO_SD_DETECT
@ -1554,16 +1661,10 @@
* printing performance versus fast display updates.
*/
#if HAS_MARLINUI_U8GLIB
// Show SD percentage next to the progress bar
//#define DOGM_SD_PERCENT
// Save many cycles by drawing a hollow frame or no frame on the Info Screen
//#define XYZ_NO_FRAME
#define XYZ_HOLLOW_FRAME
// Enable to save many cycles by drawing a hollow frame on Menu Screens
#define MENU_HOLLOW_FRAME
// A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
//#define USE_BIG_EDIT_FONT
@ -1572,9 +1673,6 @@
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
//#define USE_SMALL_INFOFONT
// Swap the CW/CCW indicators in the graphics overlay
//#define OVERLAY_GFX_REVERSE
/**
* ST7920-based LCDs can emulate a 16 x 4 character display using
* the ST7920 character-generator for very fast screen updates.
@ -1587,7 +1685,7 @@
* Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
* This will prevent position updates from being displayed.
*/
#if ENABLED(U8GLIB_ST7920)
#if IS_U8GLIB_ST7920
// Enable this option and reduce the value to optimize screen updates.
// The normal delay is 10µs. Use the lowest value that still gives a reliable display.
//#define DOGM_SPI_DELAY_US 5
@ -1616,7 +1714,7 @@
//#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
//#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of PROGMEM.
//#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of PROGMEM.
// Frivolous Game Options
//#define MARLIN_BRICKOUT
@ -1626,6 +1724,17 @@
#endif // HAS_MARLINUI_U8GLIB
#if HAS_MARLINUI_U8GLIB || IS_DWIN_MARLINUI
// Show SD percentage next to the progress bar
//#define SHOW_SD_PERCENT
// Enable to save many cycles by drawing a hollow frame on Menu Screens
#define MENU_HOLLOW_FRAME
// Swap the CW/CCW indicators in the graphics overlay
//#define OVERLAY_GFX_REVERSE
#endif
//
// Additional options for DGUS / DWIN displays
//
@ -1691,7 +1800,7 @@
//
// Specify additional languages for the UI. Default specified by LCD_LANGUAGE.
//
#if ANY(DOGLCD, TFT_COLOR_UI, TOUCH_UI_FTDI_EVE)
#if ANY(DOGLCD, TFT_COLOR_UI, TOUCH_UI_FTDI_EVE, IS_DWIN_MARLINUI)
//#define LCD_LANGUAGE_2 fr
//#define LCD_LANGUAGE_3 de
//#define LCD_LANGUAGE_4 es
@ -1710,7 +1819,7 @@
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
//#define LCD_LULZBOT_CLCD_UI // LulzBot Color LCD UI
//#define LCD_FYSETC_TFT81050 // FYSETC with 5" (800x480)
//#define LCD_EVE3_50G // Matrix Orbital 5.0", 800x480, BT815
//#define LCD_EVE2_50G // Matrix Orbital 5.0", 800x480, FT813
@ -1721,8 +1830,8 @@
//#define TOUCH_UI_800x480
// Mappings for boards with a standard RepRapDiscount Display connector
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
//#define AO_EXP1_PINMAP // LulzBot CLCD UI EXP1 mapping
//#define AO_EXP2_PINMAP // LulzBot CLCD UI EXP2 mapping
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
//#define S6_TFT_PINMAP // FYSETC S6 pin mapping
//#define F6_TFT_PINMAP // FYSETC F6 pin mapping
@ -1833,7 +1942,7 @@
*
* Warning: Does not respect endstops!
*/
//#define BABYSTEPPING
#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
//#define INTEGRATED_BABYSTEPPING // EXPERIMENTAL integration of babystepping into the Stepper ISR
//#define BABYSTEP_WITHOUT_HOMING
@ -1854,7 +1963,7 @@
#endif
#endif
//#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28
#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28
//#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
@ -1886,6 +1995,7 @@
#define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
//#define LA_DEBUG // If enabled, this will generate debug information output over USB.
//#define EXPERIMENTAL_SCURVE // Enable this option to permit S-Curve Acceleration
//#define ALLOW_LOW_EJERK // Allow a DEFAULT_EJERK value of <10. Recommended for direct drive hotends.
#endif
// @section leveling
@ -1961,59 +2071,69 @@
/**
* Thermal Probe Compensation
* Probe measurements are adjusted to compensate for temperature distortion.
* Use G76 to calibrate this feature. Use M871 to set values manually.
* For a more detailed explanation of the process see G76_M871.cpp.
*
* Adjust probe measurements to compensate for distortion associated with the temperature
* of the probe, bed, and/or hotend.
* Use G76 to automatically calibrate this feature for probe and bed temperatures.
* (Extruder temperature/offset values must be calibrated manually.)
* Use M871 to set temperature/offset values manually.
* For more details see https://marlinfw.org/docs/features/probe_temp_compensation.html
*/
#if HAS_BED_PROBE && TEMP_SENSOR_PROBE && TEMP_SENSOR_BED
// Enable thermal first layer compensation using bed and probe temperatures
#define PROBE_TEMP_COMPENSATION
//#define PTC_PROBE // Compensate based on probe temperature
//#define PTC_BED // Compensate based on bed temperature
//#define PTC_HOTEND // Compensate based on hotend temperature
// Add additional compensation depending on hotend temperature
// Note: this values cannot be calibrated and have to be set manually
#if ENABLED(PROBE_TEMP_COMPENSATION)
#if ANY(PTC_PROBE, PTC_BED, PTC_HOTEND)
/**
* If the probe is outside the defined range, use linear extrapolation with the closest
* point and the point with index PTC_LINEAR_EXTRAPOLATION. e.g., If set to 4 it will use the
* linear extrapolation between data[0] and data[4] for values below PTC_PROBE_START.
*/
//#define PTC_LINEAR_EXTRAPOLATION 4
#if ENABLED(PTC_PROBE)
// Probe temperature calibration generates a table of values starting at PTC_PROBE_START
// (e.g., 30), in steps of PTC_PROBE_RES (e.g., 5) with PTC_PROBE_COUNT (e.g., 10) samples.
#define PTC_PROBE_START 30 // (°C)
#define PTC_PROBE_RES 5 // (°C)
#define PTC_PROBE_COUNT 10
#define PTC_PROBE_ZOFFS { 0 } // (µm) Z adjustments per sample
#endif
#if ENABLED(PTC_BED)
// Bed temperature calibration builds a similar table.
#define PTC_BED_START 60 // (°C)
#define PTC_BED_RES 5 // (°C)
#define PTC_BED_COUNT 10
#define PTC_BED_ZOFFS { 0 } // (µm) Z adjustments per sample
#endif
#if ENABLED(PTC_HOTEND)
// Note: There is no automatic calibration for the hotend. Use M871.
#define PTC_HOTEND_START 180 // (°C)
#define PTC_HOTEND_RES 5 // (°C)
#define PTC_HOTEND_COUNT 20
#define PTC_HOTEND_ZOFFS { 0 } // (µm) Z adjustments per sample
#endif
// G76 options
#if BOTH(PTC_PROBE, PTC_BED)
// Park position to wait for probe cooldown
#define PTC_PARK_POS { 0, 0, 100 }
// Probe position to probe and wait for probe to reach target temperature
//#define PTC_PROBE_POS { 12.0f, 7.3f } // Example: MK52 magnetic heatbed
#define PTC_PROBE_POS { 90, 100 }
// Enable additional compensation using hotend temperature
// Note: this values cannot be calibrated automatically but have to be set manually
//#define USE_TEMP_EXT_COMPENSATION
// Probe temperature calibration generates a table of values starting at PTC_SAMPLE_START
// (e.g., 30), in steps of PTC_SAMPLE_RES (e.g., 5) with PTC_SAMPLE_COUNT (e.g., 10) samples.
//#define PTC_SAMPLE_START 30 // (°C)
//#define PTC_SAMPLE_RES 5 // (°C)
//#define PTC_SAMPLE_COUNT 10
// Bed temperature calibration builds a similar table.
//#define BTC_SAMPLE_START 60 // (°C)
//#define BTC_SAMPLE_RES 5 // (°C)
//#define BTC_SAMPLE_COUNT 10
// The temperature the probe should be at while taking measurements during bed temperature
// calibration.
//#define BTC_PROBE_TEMP 30 // (°C)
// The temperature the probe should be at while taking measurements during
// bed temperature calibration.
#define PTC_PROBE_TEMP 30 // (°C)
// Height above Z=0.0 to raise the nozzle. Lowering this can help the probe to heat faster.
// Note: the Z=0.0 offset is determined by the probe offset which can be set using M851.
//#define PTC_PROBE_HEATING_OFFSET 0.5
// Height to raise the Z-probe between heating and taking the next measurement. Some probes
// may fail to untrigger if they have been triggered for a long time, which can be solved by
// increasing the height the probe is raised to.
//#define PTC_PROBE_RAISE 15
// If the probe is outside of the defined range, use linear extrapolation using the closest
// point and the PTC_LINEAR_EXTRAPOLATION'th next point. E.g. if set to 4 it will use data[0]
// and data[4] to perform linear extrapolation for values below PTC_SAMPLE_START.
//#define PTC_LINEAR_EXTRAPOLATION 4
// Note: The Z=0.0 offset is determined by the probe Z offset (e.g., as set with M851 Z).
#define PTC_PROBE_HEATING_OFFSET 0.5
#endif
#endif
#endif // PTC_PROBE || PTC_BED || PTC_HOTEND
// @section extras
@ -2025,20 +2145,23 @@
//
// G2/G3 Arc Support
//
#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
#define ARC_SUPPORT // Requires ~3226 bytes
#if ENABLED(ARC_SUPPORT)
#define MM_PER_ARC_SEGMENT 1 // (mm) Length (or minimum length) of each arc segment
//#define ARC_SEGMENTS_PER_R 1 // Max segment length, MM_PER = Min
#define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle
//#define ARC_SEGMENTS_PER_SEC 50 // Use feedrate to choose segment length (with MM_PER_ARC_SEGMENT as the minimum)
#define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections
//#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
//#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes
//#define SF_ARC_FIX // Enable only if using SkeinForge with "Arc Point" fillet procedure
#define MIN_ARC_SEGMENT_MM 0.1 // (mm) Minimum length of each arc segment
#define MAX_ARC_SEGMENT_MM 1.0 // (mm) Maximum length of each arc segment
#define MIN_CIRCLE_SEGMENTS 72 // Minimum number of segments in a complete circle
//#define ARC_SEGMENTS_PER_SEC 50 // Use the feedrate to choose the segment length
#define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections
//#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
//#define SF_ARC_FIX // Enable only if using SkeinForge with "Arc Point" fillet procedure
#endif
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
//#define BEZIER_CURVE_SUPPORT
// G5 Bézier Curve Support with XYZE destination and IJPQ offsets
//#define BEZIER_CURVE_SUPPORT // Requires ~2666 bytes
#if EITHER(ARC_SUPPORT, BEZIER_CURVE_SUPPORT)
//#define CNC_WORKSPACE_PLANES // Allow G2/G3/G5 to operate in XY, ZX, or YZ planes
#endif
/**
* Direct Stepping
@ -2181,7 +2304,7 @@
* Currently handles M108, M112, M410, M876
* NOTE: Not yet implemented for all platforms.
*/
//#define EMERGENCY_PARSER
#define EMERGENCY_PARSER
/**
* Realtime Reporting (requires EMERGENCY_PARSER)
@ -2217,7 +2340,7 @@
#define SERIAL_OVERRUN_PROTECTION
// For serial echo, the number of digits after the decimal point
//#define SERIAL_FLOAT_PRECISION 4
#define SERIAL_FLOAT_PRECISION 4
// @section extras
@ -2283,6 +2406,7 @@
*/
//#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG1 A0" // Extra G-code to run while executing tool-change command T0
//#define EVENT_GCODE_TOOLCHANGE_T1 "G1 A10" // Extra G-code to run while executing tool-change command T1
//#define EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN // Always execute above G-code sequences. Use with caution!
/**
* Tool Sensors detect when tools have been picked up or dropped.
@ -2305,7 +2429,7 @@
// Longer prime to clean out a SINGLENOZZLE
#define TOOLCHANGE_FS_EXTRA_PRIME 0 // (mm) Extra priming length
#define TOOLCHANGE_FS_PRIME_SPEED (4.6*60) // (mm/min) Extra priming feedrate
#define TOOLCHANGE_FS_WIPE_RETRACT 0 // (mm/min) Retract before cooling for less stringing, better wipe, etc.
#define TOOLCHANGE_FS_WIPE_RETRACT 0 // (mm) Retract before cooling for less stringing, better wipe, etc.
// Cool after prime to reduce stringing
#define TOOLCHANGE_FS_FAN -1 // Fan index or -1 to skip
@ -2358,14 +2482,14 @@
*
* Enable PARK_HEAD_ON_PAUSE to add the G-code M125 Pause and Park.
*/
//#define ADVANCED_PAUSE_FEATURE
#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
#define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
// This short retract is done immediately, before parking the nozzle.
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
#define FILAMENT_CHANGE_UNLOAD_LENGTH 95 // (mm) The length of filament for a complete unload.
// For Bowden, the full length of the tube and nozzle.
// For direct drive, the full length of the nozzle.
// Set to 0 for manual unloading.
@ -2395,11 +2519,13 @@
#define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
#define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
//#define FILAMENT_CHANGE_RESUME_ON_INSERT // Automatically continue / load filament when runout sensor is triggered again.
//#define PAUSE_REHEAT_FAST_RESUME // Reduce number of waits by not prompting again post-timeout before continuing.
//#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
//#define HOME_BEFORE_FILAMENT_CHANGE // If needed, home before parking for filament change
//#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
//#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
@ -2564,6 +2690,7 @@
#define X_RSENSE 0.11
#define X_CHAIN_POS -1 // -1..0: Not chained. 1: MCU MOSI connected. 2: Next in chain, ...
//#define X_INTERPOLATE true // Enable to override 'INTERPOLATE' for the X axis
//#define X_HOLD_MULTIPLIER 0.5 // Enable to override 'HOLD_MULTIPLIER' for the X axis
#endif
#if AXIS_IS_TMC(X2)
@ -2573,6 +2700,7 @@
#define X2_RSENSE 0.11
#define X2_CHAIN_POS -1
//#define X2_INTERPOLATE true
//#define X2_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(Y)
@ -2582,6 +2710,7 @@
#define Y_RSENSE 0.11
#define Y_CHAIN_POS -1
//#define Y_INTERPOLATE true
//#define Y_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(Y2)
@ -2591,6 +2720,7 @@
#define Y2_RSENSE 0.11
#define Y2_CHAIN_POS -1
//#define Y2_INTERPOLATE true
//#define Y2_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(Z)
@ -2600,6 +2730,7 @@
#define Z_RSENSE 0.11
#define Z_CHAIN_POS -1
//#define Z_INTERPOLATE true
//#define Z_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(Z2)
@ -2609,6 +2740,7 @@
#define Z2_RSENSE 0.11
#define Z2_CHAIN_POS -1
//#define Z2_INTERPOLATE true
//#define Z2_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(Z3)
@ -2618,6 +2750,7 @@
#define Z3_RSENSE 0.11
#define Z3_CHAIN_POS -1
//#define Z3_INTERPOLATE true
//#define Z3_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(Z4)
@ -2627,6 +2760,7 @@
#define Z4_RSENSE 0.11
#define Z4_CHAIN_POS -1
//#define Z4_INTERPOLATE true
//#define Z4_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(I)
@ -2636,6 +2770,7 @@
#define I_RSENSE 0.11
#define I_CHAIN_POS -1
//#define I_INTERPOLATE true
//#define I_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(J)
@ -2645,6 +2780,7 @@
#define J_RSENSE 0.11
#define J_CHAIN_POS -1
//#define J_INTERPOLATE true
//#define J_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(K)
@ -2654,6 +2790,7 @@
#define K_RSENSE 0.11
#define K_CHAIN_POS -1
//#define K_INTERPOLATE true
//#define K_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(E0)
@ -2662,6 +2799,7 @@
#define E0_RSENSE 0.11
#define E0_CHAIN_POS -1
//#define E0_INTERPOLATE true
//#define E0_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(E1)
@ -2670,6 +2808,7 @@
#define E1_RSENSE 0.11
#define E1_CHAIN_POS -1
//#define E1_INTERPOLATE true
//#define E1_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(E2)
@ -2678,6 +2817,7 @@
#define E2_RSENSE 0.11
#define E2_CHAIN_POS -1
//#define E2_INTERPOLATE true
//#define E2_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(E3)
@ -2686,6 +2826,7 @@
#define E3_RSENSE 0.11
#define E3_CHAIN_POS -1
//#define E3_INTERPOLATE true
//#define E3_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(E4)
@ -2694,6 +2835,7 @@
#define E4_RSENSE 0.11
#define E4_CHAIN_POS -1
//#define E4_INTERPOLATE true
//#define E4_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(E5)
@ -2702,6 +2844,7 @@
#define E5_RSENSE 0.11
#define E5_CHAIN_POS -1
//#define E5_INTERPOLATE true
//#define E5_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(E6)
@ -2710,6 +2853,7 @@
#define E6_RSENSE 0.11
#define E6_CHAIN_POS -1
//#define E6_INTERPOLATE true
//#define E6_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(E7)
@ -2718,6 +2862,7 @@
#define E7_RSENSE 0.11
#define E7_CHAIN_POS -1
//#define E7_INTERPOLATE true
//#define E7_HOLD_MULTIPLIER 0.5
#endif
/**
@ -2821,7 +2966,7 @@
* Define your own with:
* { <off_time[1..15]>, <hysteresis_end[-3..12]>, hysteresis_start[1..8] }
*/
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V // All axes (override below)
#define CHOPPER_TIMING CHOPPER_DEFAULT_24V // All axes (override below)
//#define CHOPPER_TIMING_X CHOPPER_TIMING // For X Axes (override below)
//#define CHOPPER_TIMING_X2 CHOPPER_TIMING_X
//#define CHOPPER_TIMING_Y CHOPPER_TIMING // For Y Axes (override below)
@ -2830,6 +2975,9 @@
//#define CHOPPER_TIMING_Z2 CHOPPER_TIMING_Z
//#define CHOPPER_TIMING_Z3 CHOPPER_TIMING_Z
//#define CHOPPER_TIMING_Z4 CHOPPER_TIMING_Z
//#define CHOPPER_TIMING_I CHOPPER_TIMING
//#define CHOPPER_TIMING_J CHOPPER_TIMING
//#define CHOPPER_TIMING_K CHOPPER_TIMING
//#define CHOPPER_TIMING_E CHOPPER_TIMING // For Extruders (override below)
//#define CHOPPER_TIMING_E1 CHOPPER_TIMING_E
//#define CHOPPER_TIMING_E2 CHOPPER_TIMING_E
@ -2850,7 +2998,7 @@
* M912 - Clear stepper driver overtemperature pre-warn condition flag.
* M122 - Report driver parameters (Requires TMC_DEBUG)
*/
//#define MONITOR_DRIVER_STATUS
#define MONITOR_DRIVER_STATUS
#if ENABLED(MONITOR_DRIVER_STATUS)
#define CURRENT_STEP_DOWN 50 // [mA]
@ -2912,7 +3060,7 @@
*
* Comment *_STALL_SENSITIVITY to disable sensorless homing for that axis.
*/
//#define SENSORLESS_HOMING // StallGuard capable drivers only
#define SENSORLESS_HOMING // StallGuard capable drivers only
#if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
// TMC2209: 0...255. TMC2130: -64...63
@ -3293,11 +3441,13 @@
//#define SPINDLE_FEATURE
//#define LASER_FEATURE
#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
#define SPINDLE_LASER_ACTIVE_STATE LOW // Set to "HIGH" if the on/off function is active HIGH
#define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power
#define SPINDLE_LASER_PWM_INVERT false // Set to "true" if the speed/power goes up when you want it to go slower
#define SPINDLE_LASER_ACTIVE_STATE LOW // Set to "HIGH" if SPINDLE_LASER_ENA_PIN is active HIGH
#define SPINDLE_LASER_FREQUENCY 2500 // (Hz) Spindle/laser frequency (only on supported HALs: AVR and LPC)
#define SPINDLE_LASER_USE_PWM // Enable if your controller supports setting the speed/power
#if ENABLED(SPINDLE_LASER_USE_PWM)
#define SPINDLE_LASER_PWM_INVERT false // Set to "true" if the speed/power goes up when you want it to go slower
#define SPINDLE_LASER_FREQUENCY 2500 // (Hz) Spindle/laser frequency (only on supported HALs: AVR and LPC)
#endif
//#define AIR_EVACUATION // Cutter Vacuum / Laser Blower motor control with G-codes M10-M11
#if ENABLED(AIR_EVACUATION)
@ -3353,17 +3503,21 @@
* Speed/Power = (PWMDC / 255 * 100 - SPEED_POWER_INTERCEPT) / SPEED_POWER_SLOPE
* PWMDC = (spdpwr - SPEED_POWER_MIN) / (SPEED_POWER_MAX - SPEED_POWER_MIN) / SPEED_POWER_SLOPE
*/
#define SPEED_POWER_INTERCEPT 0 // (%) 0-100 i.e., Minimum power percentage
#define SPEED_POWER_MIN 5000 // (RPM)
#define SPEED_POWER_MAX 30000 // (RPM) SuperPID router controller 0 - 30,000 RPM
#define SPEED_POWER_STARTUP 25000 // (RPM) M3/M4 speed/power default (with no arguments)
#if ENABLED(SPINDLE_LASER_USE_PWM)
#define SPEED_POWER_INTERCEPT 0 // (%) 0-100 i.e., Minimum power percentage
#define SPEED_POWER_MIN 5000 // (RPM)
#define SPEED_POWER_MAX 30000 // (RPM) SuperPID router controller 0 - 30,000 RPM
#define SPEED_POWER_STARTUP 25000 // (RPM) M3/M4 speed/power default (with no arguments)
#endif
#else
#define SPEED_POWER_INTERCEPT 0 // (%) 0-100 i.e., Minimum power percentage
#define SPEED_POWER_MIN 0 // (%) 0-100
#define SPEED_POWER_MAX 100 // (%) 0-100
#define SPEED_POWER_STARTUP 80 // (%) M3/M4 speed/power default (with no arguments)
#if ENABLED(SPINDLE_LASER_USE_PWM)
#define SPEED_POWER_INTERCEPT 0 // (%) 0-100 i.e., Minimum power percentage
#define SPEED_POWER_MIN 0 // (%) 0-100
#define SPEED_POWER_MAX 100 // (%) 0-100
#define SPEED_POWER_STARTUP 80 // (%) M3/M4 speed/power default (with no arguments)
#endif
// Define the minimum and maximum test pulse time values for a laser test fire function
#define LASER_TEST_PULSE_MIN 1 // Used with Laser Control Menu
@ -3556,6 +3710,12 @@
*/
//#define CNC_COORDINATE_SYSTEMS
/**
* Auto-report fan speed with M123 S<seconds>
* Requires fans with tachometer pins
*/
//#define AUTO_REPORT_FANS
/**
* Auto-report temperatures with M155 S<seconds>
*/
@ -3564,14 +3724,14 @@
/**
* Auto-report position with M154 S<seconds>
*/
//#define AUTO_REPORT_POSITION
#define AUTO_REPORT_POSITION
/**
* Include capabilities in M115 output
*/
#define EXTENDED_CAPABILITIES_REPORT
#if ENABLED(EXTENDED_CAPABILITIES_REPORT)
//#define M115_GEOMETRY_REPORT
#define M115_GEOMETRY_REPORT
#endif
/**
@ -3619,11 +3779,11 @@
//#define NO_WORKSPACE_OFFSETS
// Extra options for the M114 "Current Position" report
//#define M114_DETAIL // Use 'M114` for details to check planner calculations
#define M114_DETAIL // Use 'M114` for details to check planner calculations
//#define M114_REALTIME // Real current position based on forward kinematics
//#define M114_LEGACY // M114 used to synchronize on every call. Enable if needed.
//#define REPORT_FAN_CHANGE // Report the new fan speed when changed by M106 (and others)
#define REPORT_FAN_CHANGE // Report the new fan speed when changed by M106 (and others)
/**
* Set the number of proportional font spaces required to fill up a typical character space.
@ -3795,10 +3955,12 @@
* Host Prompt Support enables Marlin to use the host for user prompts so
* filament runout and other processes can be managed from the host side.
*/
//#define HOST_ACTION_COMMANDS
#define HOST_ACTION_COMMANDS
#if ENABLED(HOST_ACTION_COMMANDS)
//#define HOST_PROMPT_SUPPORT
//#define HOST_START_MENU_ITEM // Add a menu item that tells the host to start
//#define HOST_PAUSE_M76
#define HOST_PROMPT_SUPPORT
//#define HOST_START_MENU_ITEM // Add a menu item that tells the host to start
//#define HOST_SHUTDOWN_MENU_ITEM // Add a menu item that tells the host to shut down
#endif
/**
@ -3886,7 +4048,7 @@
*/
#define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
// Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
// Use a rolling average to identify persistent errors that indicate skips, as opposed to vibration and noise.
#define I2CPE_ERR_ROLLING_AVERAGE
#endif // I2C_POSITION_ENCODERS
@ -4152,6 +4314,14 @@
// Enable Marlin dev mode which adds some special commands
//#define MARLIN_DEV_MODE
#if ENABLED(MARLIN_DEV_MODE)
/**
* D576 - Buffer Monitoring
* To help diagnose print quality issues stemming from empty command buffers.
*/
//#define BUFFER_MONITORING
#endif
/**
* Postmortem Debugging captures misbehavior and outputs the CPU status and backtrace to serial.
* When running in the debugger it will break for debugging. This is useful to help understand
@ -4164,3 +4334,6 @@
*/
//#define SOFT_RESET_VIA_SERIAL // 'KILL' and '^X' commands will soft-reset the controller
//#define SOFT_RESET_ON_KILL // Use a digital button to soft-reset the controller after KILL
// Report uncleaned reset reason from register r2 instead of MCUSR. Supported by Optiboot on AVR.
//#define OPTIBOOT_RESET_REASON

File diff suppressed because it is too large Load Diff

View File

@ -110,7 +110,7 @@ LIQUID_TWI2 ?= 0
WIRE ?= 0
# This defines if Tone is needed (i.e SPEAKER is defined in Configuration.h)
# Disabling this (and SPEAKER) saves approximatively 350 bytes of memory.
# Disabling this (and SPEAKER) saves approximately 350 bytes of memory.
TONE ?= 1
# This defines if U8GLIB is needed (may require RELOC_WORKAROUND)
@ -191,6 +191,134 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1034)
# RAMPS Derivatives - ATmega1280, ATmega2560
#
# 3Drag Controller
else ifeq ($(HARDWARE_MOTHERBOARD),1100)
# Velleman K8200 Controller (derived from 3Drag Controller)
else ifeq ($(HARDWARE_MOTHERBOARD),1101)
# Velleman K8400 Controller (derived from 3Drag Controller)
else ifeq ($(HARDWARE_MOTHERBOARD),1102)
# Velleman K8600 Controller (Vertex Nano)
else ifeq ($(HARDWARE_MOTHERBOARD),1103)
# Velleman K8800 Controller (Vertex Delta)
else ifeq ($(HARDWARE_MOTHERBOARD),1104)
# 2PrintBeta BAM&DICE with STK drivers
else ifeq ($(HARDWARE_MOTHERBOARD),1105)
# 2PrintBeta BAM&DICE Due with STK drivers
else ifeq ($(HARDWARE_MOTHERBOARD),1106)
# MKS BASE v1.0
else ifeq ($(HARDWARE_MOTHERBOARD),1107)
# MKS BASE v1.4 with Allegro A4982 stepper drivers
else ifeq ($(HARDWARE_MOTHERBOARD),1108)
# MKS BASE v1.5 with Allegro A4982 stepper drivers
else ifeq ($(HARDWARE_MOTHERBOARD),1109)
# MKS BASE v1.6 with Allegro A4982 stepper drivers
else ifeq ($(HARDWARE_MOTHERBOARD),1110)
# MKS BASE 1.0 with Heroic HR4982 stepper drivers
else ifeq ($(HARDWARE_MOTHERBOARD),1111)
# MKS GEN v1.3 or 1.4
else ifeq ($(HARDWARE_MOTHERBOARD),1112)
# MKS GEN L
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
# BigTreeTech or BIQU KFB2.0
else ifeq ($(HARDWARE_MOTHERBOARD),1114)
# zrib V2.0 (Chinese RAMPS replica)
else ifeq ($(HARDWARE_MOTHERBOARD),1115)
# zrib V5.2 (Chinese RAMPS replica)
else ifeq ($(HARDWARE_MOTHERBOARD),1116)
# Felix 2.0+ Electronics Board (RAMPS like)
else ifeq ($(HARDWARE_MOTHERBOARD),1117)
# Invent-A-Part RigidBoard
else ifeq ($(HARDWARE_MOTHERBOARD),1118)
# Invent-A-Part RigidBoard V2
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
# Sainsmart 2-in-1 board
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
# Ultimaker
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
else ifeq ($(HARDWARE_MOTHERBOARD),1122)
MCU ?= atmega1280
PROG_MCU ?= m1280
# Azteeg X3
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
# Azteeg X3 Pro
else ifeq ($(HARDWARE_MOTHERBOARD),1124)
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
else ifeq ($(HARDWARE_MOTHERBOARD),1125)
# Rumba
else ifeq ($(HARDWARE_MOTHERBOARD),1126)
# Raise3D N series Rumba derivative
else ifeq ($(HARDWARE_MOTHERBOARD),1127)
# Rapide Lite 200 (v1, low-cost RUMBA clone with drv)
else ifeq ($(HARDWARE_MOTHERBOARD),1128)
# Formbot T-Rex 2 Plus
else ifeq ($(HARDWARE_MOTHERBOARD),1129)
# Formbot T-Rex 3
else ifeq ($(HARDWARE_MOTHERBOARD),1130)
# Formbot Raptor
else ifeq ($(HARDWARE_MOTHERBOARD),1131)
# Formbot Raptor 2
else ifeq ($(HARDWARE_MOTHERBOARD),1132)
# bq ZUM Mega 3D
else ifeq ($(HARDWARE_MOTHERBOARD),1133)
# MakeBoard Mini v2.1.2 by MicroMake
else ifeq ($(HARDWARE_MOTHERBOARD),1134)
# TriGorilla Anycubic version 1.3-based on RAMPS EFB
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
# ... Ver 1.4
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
# ... Rev 1.1 (new servo pin order)
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
# Creality: Ender-4, CR-8
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
# Creality: CR10S, CR20, CR-X
else ifeq ($(HARDWARE_MOTHERBOARD),1139)
# Dagoma F5
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
# FYSETC F6 1.3
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
# FYSETC F6 1.4
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
# Wanhao Duplicator i3 Plus
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
# VORON Design
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
# Tronxy TRONXY-V3-1.0
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
# Z-Bolt X Series
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
# TT OSCAR
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
# Overlord/Overlord Pro
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
# ADIMLab Gantry v1
else ifeq ($(HARDWARE_MOTHERBOARD),1149)
# ADIMLab Gantry v2
else ifeq ($(HARDWARE_MOTHERBOARD),1150)
# BIQU Tango V1
else ifeq ($(HARDWARE_MOTHERBOARD),1151)
# MKS GEN L V2
else ifeq ($(HARDWARE_MOTHERBOARD),1152)
# MKS GEN L V2.1
else ifeq ($(HARDWARE_MOTHERBOARD),1153)
# Copymaster 3D
else ifeq ($(HARDWARE_MOTHERBOARD),1154)
# Ortur 4
else ifeq ($(HARDWARE_MOTHERBOARD),1155)
# Tenlog D3 Hero IDEX printer
else ifeq ($(HARDWARE_MOTHERBOARD),1156)
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),1157)
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),1158)
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),1159)
# Longer LK1 PRO / Alfawise U20 Pro (PRO version)
else ifeq ($(HARDWARE_MOTHERBOARD),1160)
# Longer LKx PRO / Alfawise Uxx Pro (PRO version)
else ifeq ($(HARDWARE_MOTHERBOARD),1161)
# 3Drag Controller
else ifeq ($(HARDWARE_MOTHERBOARD),1100)
# Velleman K8200 Controller (derived from 3Drag Controller)
@ -358,20 +486,38 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1311)
else ifeq ($(HARDWARE_MOTHERBOARD),1312)
# Mega controller
else ifeq ($(HARDWARE_MOTHERBOARD),1313)
# Geeetech GT2560 Rev B for Mecreator2
# Geeetech GT2560 Rev A
else ifeq ($(HARDWARE_MOTHERBOARD),1314)
# Geeetech GT2560 Rev. A
# Geeetech GT2560 Rev A+ (with auto level probe)
else ifeq ($(HARDWARE_MOTHERBOARD),1315)
# Geeetech GT2560 Rev. A+ (with auto level probe)
# Geeetech GT2560 Rev B
else ifeq ($(HARDWARE_MOTHERBOARD),1316)
# Geeetech GT2560 Rev B for A10(M/D)
# Geeetech GT2560 Rev B for A10(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1317)
# Geeetech GT2560 Rev B for A20(M/D)
# Geeetech GT2560 Rev B for A10(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
# Einstart retrofit
# Geeetech GT2560 Rev B for Mecreator2
else ifeq ($(HARDWARE_MOTHERBOARD),1319)
# Wanhao 0ne+ i3 Mini
# Geeetech GT2560 Rev B for A20(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1320)
# Einstart retrofit
else ifeq ($(HARDWARE_MOTHERBOARD),1321)
# Wanhao 0ne+ i3 Mini
else ifeq ($(HARDWARE_MOTHERBOARD),1322)
# Leapfrog Xeed 2015
else ifeq ($(HARDWARE_MOTHERBOARD),1323)
# PICA Shield (original version)
else ifeq ($(HARDWARE_MOTHERBOARD),1324)
# PICA Shield (rev C or later)
else ifeq ($(HARDWARE_MOTHERBOARD),1325)
# Intamsys 4.0 (Funmat HT)
else ifeq ($(HARDWARE_MOTHERBOARD),1326)
# Malyan M180 Mainboard Version 2 (no display function, direct gcode only)
else ifeq ($(HARDWARE_MOTHERBOARD),1327)
# Geeetech GT2560 Rev B for A20(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1328)
# Mega controller & Protoneer CNC Shield V3.00
else ifeq ($(HARDWARE_MOTHERBOARD),1329)
#
# ATmega1281, ATmega2561
@ -445,6 +591,11 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1510)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
PROG_MCU ?= m1284p
# ZoneStar ZMIB V2
else ifeq ($(HARDWARE_MOTHERBOARD),1511)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
PROG_MCU ?= m1284p
#
# Other ATmega644P, ATmega644, ATmega1284P

View File

@ -28,7 +28,7 @@
/**
* Marlin release version identifier
*/
//#define SHORT_BUILD_VERSION "2.0.9.1"
//#define SHORT_BUILD_VERSION "2.0.9.3"
/**
* Verbose version identifier which should contain a reference to the location
@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2021-06-27"
//#define STRING_DISTRIBUTION_DATE "2021-12-25"
/**
* Defines a generic printer name to be output to the LCD after booting Marlin.

View File

@ -35,12 +35,31 @@
// Public Variables
// ------------------------
//uint8_t MCUSR;
// Don't initialize/override variable (which would happen in .init4)
uint8_t reset_reason __attribute__((section(".noinit")));
// ------------------------
// Public functions
// ------------------------
__attribute__((naked)) // Don't output function pro- and epilogue
__attribute__((used)) // Output the function, even if "not used"
__attribute__((section(".init3"))) // Put in an early user definable section
void HAL_save_reset_reason() {
#if ENABLED(OPTIBOOT_RESET_REASON)
__asm__ __volatile__(
A("STS %0, r2")
: "=m"(reset_reason)
);
#else
reset_reason = MCUSR;
#endif
// Clear within 16ms since WDRF bit enables a 16ms watchdog timer -> Boot loop
MCUSR = 0;
wdt_disable();
}
void HAL_init() {
// Init Servo Pins
#define INIT_SERVO(N) OUT_WRITE(SERVO##N##_PIN, LOW)

View File

@ -39,6 +39,19 @@
#include <avr/interrupt.h>
#include <avr/io.h>
//
// Default graphical display delays
//
#if F_CPU >= 20000000
#define CPU_ST7920_DELAY_1 150
#define CPU_ST7920_DELAY_2 0
#define CPU_ST7920_DELAY_3 150
#elif F_CPU == 16000000
#define CPU_ST7920_DELAY_1 125
#define CPU_ST7920_DELAY_2 0
#define CPU_ST7920_DELAY_3 188
#endif
#ifndef pgm_read_ptr
// Compatibility for avr-libc 1.8.0-4.1 included with Ubuntu for
// Windows Subsystem for Linux on Windows 10 as of 10/18/2019
@ -78,7 +91,7 @@ typedef int8_t pin_t;
// Public Variables
// ------------------------
//extern uint8_t MCUSR;
extern uint8_t reset_reason;
// Serial ports
#ifdef USBCON
@ -139,21 +152,19 @@ void HAL_init();
//void _delay_ms(const int delay);
inline void HAL_clear_reset_source() { MCUSR = 0; }
inline uint8_t HAL_get_reset_source() { return MCUSR; }
inline void HAL_clear_reset_source() { }
inline uint8_t HAL_get_reset_source() { return reset_reason; }
void HAL_reboot();
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
extern "C" int freeMemory();
#if GCC_VERSION <= 50000
#pragma GCC diagnostic pop
#endif
#pragma GCC diagnostic pop
// ADC
#ifdef DIDR2
@ -210,7 +221,7 @@ void set_pwm_frequency(const pin_t pin, int f_desired);
/**
* set_pwm_duty
* Sets the PWM duty cycle of the provided pin to the provided value
* Set the PWM duty cycle of the provided pin to the provided value
* Optionally allows inverting the duty cycle [default = false]
* Optionally allows changing the maximum size of the provided value to enable finer PWM duty control [default = 255]
*/

View File

@ -34,7 +34,9 @@
#include "../../inc/MarlinConfig.h"
void spiBegin() {
OUT_WRITE(SD_SS_PIN, HIGH);
#if PIN_EXISTS(SD_SS)
OUT_WRITE(SD_SS_PIN, HIGH);
#endif
SET_OUTPUT(SD_SCK_PIN);
SET_INPUT(SD_MISO_PIN);
SET_OUTPUT(SD_MOSI_PIN);
@ -74,7 +76,8 @@ void spiBegin() {
#elif defined(PRR0)
PRR0
#endif
, PRSPI);
, PRSPI
);
SPCR = _BV(SPE) | _BV(MSTR) | (spiRate >> 1);
SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X);

View File

@ -0,0 +1,26 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 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
#include <SPI.h>
using MarlinSPI = SPIClass;

View File

@ -217,7 +217,7 @@
#endif
enum { HasEmergencyParser = Cfg::EMERGENCYPARSER };
static inline bool emergency_parser_enabled() { return Cfg::EMERGENCYPARSER; }
static bool emergency_parser_enabled() { return Cfg::EMERGENCYPARSER; }
FORCE_INLINE static uint8_t dropped() { return Cfg::DROPPED_RX ? rx_dropped_bytes : 0; }
FORCE_INLINE static uint8_t buffer_overruns() { return Cfg::RX_OVERRUNS ? rx_buffer_overruns : 0; }

View File

@ -22,11 +22,10 @@
#ifdef __AVR__
#include "../../inc/MarlinConfigPre.h"
#include "HAL.h"
#if NEEDS_HARDWARE_PWM // Specific meta-flag for features that mandate PWM
#include "HAL.h"
struct Timer {
volatile uint8_t* TCCRnQ[3]; // max 3 TCCR registers per timer
volatile uint16_t* OCRnQ[3]; // max 3 OCR registers per timer
@ -55,8 +54,8 @@ Timer get_pwm_timer(const pin_t pin) {
case TIMER1A: case TIMER1B:
#endif
break;
#if defined(TCCR2) || defined(TCCR2A)
#ifdef TCCR2
#if HAS_TCCR2 || defined(TCCR2A)
#if HAS_TCCR2
case TIMER2: {
Timer timer = {
/*TCCRnQ*/ { &TCCR2, nullptr, nullptr },
@ -153,7 +152,7 @@ Timer get_pwm_timer(const pin_t pin) {
void set_pwm_frequency(const pin_t pin, int f_desired) {
Timer timer = get_pwm_timer(pin);
if (timer.n == 0) return; // Don't proceed if protected timer or not recognised
if (timer.n == 0) return; // Don't proceed if protected timer or not recognized
uint16_t size;
if (timer.n == 2) size = 255; else size = 65535;
@ -201,16 +200,10 @@ void set_pwm_frequency(const pin_t pin, int f_desired) {
res = res_temp_fast;
j = i;
// Set the Wave Generation Mode to FAST PWM
if (timer.n == 2) {
wgm = (
#if ENABLED(USE_OCR2A_AS_TOP)
WGM2_FAST_PWM_OCR2A
#else
WGM2_FAST_PWM
#endif
);
}
else wgm = WGM_FAST_PWM_ICRn;
if (timer.n == 2)
wgm = TERN(USE_OCR2A_AS_TOP, WGM2_FAST_PWM_OCR2A, WGM2_FAST_PWM);
else
wgm = WGM_FAST_PWM_ICRn;
}
// If PHASE CORRECT values are closes to desired f
else if (f_phase_diff < f_diff) {
@ -218,16 +211,10 @@ void set_pwm_frequency(const pin_t pin, int f_desired) {
res = res_temp_phase_correct;
j = i;
// Set the Wave Generation Mode to PWM PHASE CORRECT
if (timer.n == 2) {
wgm = (
#if ENABLED(USE_OCR2A_AS_TOP)
WGM2_PWM_PC_OCR2A
#else
WGM2_PWM_PC
#endif
);
}
else wgm = WGM_PWM_PC_ICRn;
if (timer.n == 2)
wgm = TERN(USE_OCR2A_AS_TOP, WGM2_PWM_PC_OCR2A, WGM2_FAST_PWM);
else
wgm = WGM_PWM_PC_ICRn;
}
}
}
@ -235,48 +222,39 @@ void set_pwm_frequency(const pin_t pin, int f_desired) {
_SET_CSn(timer.TCCRnQ, j);
if (timer.n == 2) {
#if ENABLED(USE_OCR2A_AS_TOP)
_SET_OCRnQ(timer.OCRnQ, 0, res); // Set OCR2A value (TOP) = res
#endif
TERN_(USE_OCR2A_AS_TOP, _SET_OCRnQ(timer.OCRnQ, 0, res)); // Set OCR2A value (TOP) = res
}
else
_SET_ICRn(timer.ICRn, res); // Set ICRn value (TOP) = res
}
#endif // NEEDS_HARDWARE_PWM
void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
// If v is 0 or v_size (max), digitalWrite to LOW or HIGH.
// Note that digitalWrite also disables pwm output for us (sets COM bit to 0)
if (v == 0)
digitalWrite(pin, invert);
else if (v == v_size)
digitalWrite(pin, !invert);
else {
Timer timer = get_pwm_timer(pin);
if (timer.n == 0) return; // Don't proceed if protected timer or not recognised
// Set compare output mode to CLEAR -> SET or SET -> CLEAR (if inverted)
_SET_COMnQ(timer.TCCRnQ, (timer.q
#ifdef TCCR2
+ (timer.q == 2) // COM20 is on bit 4 of TCCR2, thus requires q + 1 in the macro
#endif
), COM_CLEAR_SET + invert
);
#if NEEDS_HARDWARE_PWM
uint16_t top;
if (timer.n == 2) { // if TIMER2
top = (
#if ENABLED(USE_OCR2A_AS_TOP)
*timer.OCRnQ[0] // top = OCR2A
#else
255 // top = 0xFF (max)
#endif
);
// If v is 0 or v_size (max), digitalWrite to LOW or HIGH.
// Note that digitalWrite also disables pwm output for us (sets COM bit to 0)
if (v == 0)
digitalWrite(pin, invert);
else if (v == v_size)
digitalWrite(pin, !invert);
else {
Timer timer = get_pwm_timer(pin);
if (timer.n == 0) return; // Don't proceed if protected timer or not recognized
// Set compare output mode to CLEAR -> SET or SET -> CLEAR (if inverted)
_SET_COMnQ(timer.TCCRnQ, timer.q TERN_(HAS_TCCR2, + (timer.q == 2)), COM_CLEAR_SET + invert); // COM20 is on bit 4 of TCCR2, so +1 for q==2
const uint16_t top = timer.n == 2 ? TERN(USE_OCR2A_AS_TOP, *timer.OCRnQ[0], 255) : *timer.ICRn;
_SET_OCRnQ(timer.OCRnQ, timer.q, uint16_t(uint32_t(v) * top / v_size)); // Scale 8/16-bit v to top value
}
else
top = *timer.ICRn; // top = ICRn
_SET_OCRnQ(timer.OCRnQ, timer.q, v * float(top) / float(v_size)); // Scale 8/16-bit v to top value
}
#else
analogWrite(pin, v);
UNUSED(v_size);
UNUSED(invert);
#endif
}
#endif // NEEDS_HARDWARE_PWM
#endif // __AVR__

View File

@ -267,11 +267,11 @@ uint16_t set_pwm_frequency_hz(const_float_t hz, const float dca, const float dcb
SET_WGM(5, FAST_PWM_ICRn); // Fast PWM with ICR5 as TOP
//SERIAL_ECHOLNPGM("Timer 5 Settings:");
//SERIAL_ECHOLNPAIR(" Prescaler=", prescaler);
//SERIAL_ECHOLNPAIR(" TOP=", ICR5);
//SERIAL_ECHOLNPAIR(" OCR5A=", OCR5A);
//SERIAL_ECHOLNPAIR(" OCR5B=", OCR5B);
//SERIAL_ECHOLNPAIR(" OCR5C=", OCR5C);
//SERIAL_ECHOLNPGM(" Prescaler=", prescaler);
//SERIAL_ECHOLNPGM(" TOP=", ICR5);
//SERIAL_ECHOLNPGM(" OCR5A=", OCR5A);
//SERIAL_ECHOLNPGM(" OCR5B=", OCR5B);
//SERIAL_ECHOLNPGM(" OCR5C=", OCR5C);
}
else {
// Restore the default for Timer 5

View File

@ -211,32 +211,32 @@ enum ClockSource2 : char {
// Set Clock Select bits
// Ex: SET_CS3(PRESCALER_64);
#ifdef TCCR2
#define HAS_TCCR2 1
#endif
#define _SET_CS(T,V) (TCCR##T##B = (TCCR##T##B & ~(0x7 << CS##T##0)) | ((int(V) & 0x7) << CS##T##0))
#define _SET_CS0(V) _SET_CS(0,V)
#define _SET_CS1(V) _SET_CS(1,V)
#ifdef TCCR2
#define _SET_CS2(V) (TCCR2 = (TCCR2 & ~(0x7 << CS20)) | (int(V) << CS20))
#else
#define _SET_CS2(V) _SET_CS(2,V)
#endif
#define _SET_CS3(V) _SET_CS(3,V)
#define _SET_CS4(V) _SET_CS(4,V)
#define _SET_CS5(V) _SET_CS(5,V)
#define SET_CS0(V) _SET_CS0(CS_##V)
#define SET_CS1(V) _SET_CS1(CS_##V)
#ifdef TCCR2
#if HAS_TCCR2
#define _SET_CS2(V) (TCCR2 = (TCCR2 & ~(0x7 << CS20)) | (int(V) << CS20))
#define SET_CS2(V) _SET_CS2(CS2_##V)
#else
#define _SET_CS2(V) _SET_CS(2,V)
#define SET_CS2(V) _SET_CS2(CS_##V)
#endif
#define SET_CS3(V) _SET_CS3(CS_##V)
#define SET_CS4(V) _SET_CS4(CS_##V)
#define SET_CS5(V) _SET_CS5(CS_##V)
#define SET_CS(T,V) SET_CS##T(V)
// Runtime (see set_pwm_frequency)
#define _SET_CSn(TCCRnQ, V) do{ \
(*(TCCRnQ)[1] = (*(TCCRnQ[1]) & ~(0x7 << 0)) | ((int(V) & 0x7) << 0)); \
}while(0)
#define _SET_CSn(TCCRnQ, V) (*(TCCRnQ)[1] = (*(TCCRnQ[1]) & ~(0x7 << 0)) | ((int(V) & 0x7) << 0))
// Set Compare Mode bits
// Ex: SET_COMS(4,CLEAR_SET,CLEAR_SET,CLEAR_SET);
@ -247,21 +247,15 @@ enum ClockSource2 : char {
#define SET_COMC(T,V) SET_COM(T,C,V)
#define SET_COMS(T,V1,V2,V3) do{ SET_COMA(T,V1); SET_COMB(T,V2); SET_COMC(T,V3); }while(0)
// Runtime (see set_pwm_duty)
#define _SET_COMnQ(TCCRnQ, Q, V) do{ \
(*(TCCRnQ)[0] = (*(TCCRnQ)[0] & ~(0x3 << (6-2*(Q)))) | (int(V) << (6-2*(Q)))); \
}while(0)
#define _SET_COMnQ(TCCRnQ, Q, V) (*(TCCRnQ)[0] = (*(TCCRnQ)[0] & ~(0x3 << (6-2*(Q)))) | (int(V) << (6-2*(Q))))
// Set OCRnQ register
// Runtime (see set_pwm_duty):
#define _SET_OCRnQ(OCRnQ, Q, V) do{ \
(*(OCRnQ)[(Q)] = (0x0000) | (int(V) & 0xFFFF)); \
}while(0)
#define _SET_OCRnQ(OCRnQ, Q, V) (*(OCRnQ)[Q] = int(V) & 0xFFFF)
// Set ICRn register (one per timer)
// Runtime (see set_pwm_frequency)
#define _SET_ICRn(ICRn, V) do{ \
(*(ICRn) = (0x0000) | (int(V) & 0xFFFF)); \
}while(0)
#define _SET_ICRn(ICRn, V) (*(ICRn) = int(V) & 0xFFFF)
// Set Noise Canceler bit
// Ex: SET_ICNC(2,1)
@ -284,7 +278,7 @@ enum ClockSource2 : char {
* PWM availability macros
*/
// Determine which harware PWMs are already in use
// Determine which hardware PWMs are already in use
#define _PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == E6_AUTO_FAN_PIN || P == E7_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN || P == COOLER_AUTO_FAN_PIN)
#if PIN_EXISTS(CONTROLLER_FAN)
#define PWM_CHK_FAN_B(P) (_PWM_CHK_FAN_B(P) || P == CONTROLLER_FAN_PIN)

View File

@ -28,14 +28,14 @@
/**
* Checks for FAST PWM
*/
#if ENABLED(FAST_PWM_FAN) && (ENABLED(USE_OCR2A_AS_TOP) && defined(TCCR2))
#if ALL(FAST_PWM_FAN, USE_OCR2A_AS_TOP, HAS_TCCR2)
#error "USE_OCR2A_AS_TOP does not apply to devices with a single output TIMER2"
#endif
/**
* Sanity checks for Spindle / Laser PWM
*/
#if ENABLED(SPINDLE_LASER_PWM)
#if ENABLED(SPINDLE_LASER_USE_PWM)
#include "../ServoTimers.h" // Needed to check timer availability (_useTimer3)
#if SPINDLE_LASER_PWM_PIN == 4 || WITHIN(SPINDLE_LASER_PWM_PIN, 11, 13)
#error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by a system interrupt."
@ -43,7 +43,7 @@
#error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by the servo system."
#endif
#elif defined(SPINDLE_LASER_FREQUENCY)
#error "SPINDLE_LASER_FREQUENCY requires SPINDLE_LASER_PWM."
#error "SPINDLE_LASER_FREQUENCY requires SPINDLE_LASER_USE_PWM."
#endif
/**

View File

@ -2,6 +2,9 @@
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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
@ -99,7 +102,7 @@ void PRINT_ARRAY_NAME(uint8_t x) {
return true; \
} else return false
#define ABTEST(N) defined(TCCR##N##A) && defined(COM##N##A1)
/**
* Print a pin's PWM status.
@ -110,7 +113,7 @@ static bool pwm_status(uint8_t pin) {
switch (digitalPinToTimer_DEBUG(pin)) {
#if defined(TCCR0A) && defined(COM0A1)
#if ABTEST(0)
#ifdef TIMER0A
#if !AVR_AT90USB1286_FAMILY // not available in Teensyduino type IDEs
PWM_CASE(0, A);
@ -119,20 +122,20 @@ static bool pwm_status(uint8_t pin) {
PWM_CASE(0, B);
#endif
#if defined(TCCR1A) && defined(COM1A1)
#if ABTEST(1)
PWM_CASE(1, A);
PWM_CASE(1, B);
#if defined(COM1C1) && defined(TIMER1C)
PWM_CASE(1, C);
#endif
#if defined(COM1C1) && defined(TIMER1C)
PWM_CASE(1, C);
#endif
#endif
#if defined(TCCR2A) && defined(COM2A1)
#if ABTEST(2)
PWM_CASE(2, A);
PWM_CASE(2, B);
#endif
#if defined(TCCR3A) && defined(COM3A1)
#if ABTEST(3)
PWM_CASE(3, A);
PWM_CASE(3, B);
#ifdef COM3C1
@ -146,7 +149,7 @@ static bool pwm_status(uint8_t pin) {
PWM_CASE(4, C);
#endif
#if defined(TCCR5A) && defined(COM5A1)
#if ABTEST(5)
PWM_CASE(5, A);
PWM_CASE(5, B);
PWM_CASE(5, C);
@ -163,16 +166,16 @@ static bool pwm_status(uint8_t pin) {
const volatile uint8_t* const PWM_other[][3] PROGMEM = {
{ &TCCR0A, &TCCR0B, &TIMSK0 },
{ &TCCR1A, &TCCR1B, &TIMSK1 },
#if defined(TCCR2A) && defined(COM2A1)
#if ABTEST(2)
{ &TCCR2A, &TCCR2B, &TIMSK2 },
#endif
#if defined(TCCR3A) && defined(COM3A1)
#if ABTEST(3)
{ &TCCR3A, &TCCR3B, &TIMSK3 },
#endif
#ifdef TCCR4A
{ &TCCR4A, &TCCR4B, &TIMSK4 },
#endif
#if defined(TCCR5A) && defined(COM5A1)
#if ABTEST(5)
{ &TCCR5A, &TCCR5B, &TIMSK5 },
#endif
};
@ -192,11 +195,11 @@ const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
{ (const uint8_t*)&OCR1A, (const uint8_t*)&OCR1B, 0 },
#endif
#if defined(TCCR2A) && defined(COM2A1)
#if ABTEST(2)
{ &OCR2A, &OCR2B, 0 },
#endif
#if defined(TCCR3A) && defined(COM3A1)
#if ABTEST(3)
#ifdef COM3C1
{ (const uint8_t*)&OCR3A, (const uint8_t*)&OCR3B, (const uint8_t*)&OCR3C },
#else
@ -208,7 +211,7 @@ const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
{ (const uint8_t*)&OCR4A, (const uint8_t*)&OCR4B, (const uint8_t*)&OCR4C },
#endif
#if defined(TCCR5A) && defined(COM5A1)
#if ABTEST(5)
{ (const uint8_t*)&OCR5A, (const uint8_t*)&OCR5B, (const uint8_t*)&OCR5C },
#endif
};
@ -235,9 +238,9 @@ static void print_is_also_tied() { SERIAL_ECHOPGM(" is also tied to this pin");
inline void com_print(const uint8_t N, const uint8_t Z) {
const uint8_t *TCCRA = (uint8_t*)TCCR_A(N);
SERIAL_ECHOPAIR(" COM", AS_CHAR('0' + N));
SERIAL_ECHOPGM(" COM", AS_DIGIT(N));
SERIAL_CHAR(Z);
SERIAL_ECHOPAIR(": ", int((*TCCRA >> (6 - Z * 2)) & 0x03));
SERIAL_ECHOPGM(": ", int((*TCCRA >> (6 - Z * 2)) & 0x03));
}
void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N - WGM bit layout
@ -247,7 +250,7 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N -
uint8_t WGM = (((*TCCRB & _BV(WGM_2)) >> 1) | (*TCCRA & (_BV(WGM_0) | _BV(WGM_1))));
if (N == 4) WGM |= ((*TCCRB & _BV(WGM_3)) >> 1);
SERIAL_ECHOPAIR(" TIMER", AS_CHAR(T + '0'));
SERIAL_ECHOPGM(" TIMER", AS_DIGIT(T));
SERIAL_CHAR(L);
SERIAL_ECHO_SP(3);
@ -259,14 +262,14 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N -
const uint16_t *OCRVAL16 = (uint16_t*)OCR_VAL(T, L - 'A');
PWM_PRINT(*OCRVAL16);
}
SERIAL_ECHOPAIR(" WGM: ", WGM);
SERIAL_ECHOPGM(" WGM: ", WGM);
com_print(T,L);
SERIAL_ECHOPAIR(" CS: ", (*TCCRB & (_BV(CS_0) | _BV(CS_1) | _BV(CS_2)) ));
SERIAL_ECHOPAIR(" TCCR", AS_CHAR(T + '0'), "A: ", *TCCRA);
SERIAL_ECHOPAIR(" TCCR", AS_CHAR(T + '0'), "B: ", *TCCRB);
SERIAL_ECHOPGM(" CS: ", (*TCCRB & (_BV(CS_0) | _BV(CS_1) | _BV(CS_2)) ));
SERIAL_ECHOPGM(" TCCR", AS_DIGIT(T), "A: ", *TCCRA);
SERIAL_ECHOPGM(" TCCR", AS_DIGIT(T), "B: ", *TCCRB);
const uint8_t *TMSK = (uint8_t*)TIMSK(T);
SERIAL_ECHOPAIR(" TIMSK", AS_CHAR(T + '0'), ": ", *TMSK);
SERIAL_ECHOPGM(" TIMSK", AS_DIGIT(T), ": ", *TMSK);
const uint8_t OCIE = L - 'A' + 1;
if (N == 3) { if (WGM == 0 || WGM == 2 || WGM == 4 || WGM == 6) err_is_counter(); }
@ -278,7 +281,7 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N -
static void pwm_details(uint8_t pin) {
switch (digitalPinToTimer_DEBUG(pin)) {
#if defined(TCCR0A) && defined(COM0A1)
#if ABTEST(0)
#ifdef TIMER0A
#if !AVR_AT90USB1286_FAMILY // not available in Teensyduino type IDEs
case TIMER0A: timer_prefix(0, 'A', 3); break;
@ -287,7 +290,7 @@ static void pwm_details(uint8_t pin) {
case TIMER0B: timer_prefix(0, 'B', 3); break;
#endif
#if defined(TCCR1A) && defined(COM1A1)
#if ABTEST(1)
case TIMER1A: timer_prefix(1, 'A', 4); break;
case TIMER1B: timer_prefix(1, 'B', 4); break;
#if defined(COM1C1) && defined(TIMER1C)
@ -295,12 +298,12 @@ static void pwm_details(uint8_t pin) {
#endif
#endif
#if defined(TCCR2A) && defined(COM2A1)
#if ABTEST(2)
case TIMER2A: timer_prefix(2, 'A', 3); break;
case TIMER2B: timer_prefix(2, 'B', 3); break;
#endif
#if defined(TCCR3A) && defined(COM3A1)
#if ABTEST(3)
case TIMER3A: timer_prefix(3, 'A', 4); break;
case TIMER3B: timer_prefix(3, 'B', 4); break;
#ifdef COM3C1
@ -314,7 +317,7 @@ static void pwm_details(uint8_t pin) {
case TIMER4C: timer_prefix(4, 'C', 4); break;
#endif
#if defined(TCCR5A) && defined(COM5A1)
#if ABTEST(5)
case TIMER5A: timer_prefix(5, 'A', 4); break;
case TIMER5B: timer_prefix(5, 'B', 4); break;
case TIMER5C: timer_prefix(5, 'C', 4); break;
@ -348,7 +351,6 @@ static void pwm_details(uint8_t pin) {
#endif
} // pwm_details
#ifndef digitalRead_mod // Use Teensyduino's version of digitalRead - it doesn't disable the PWMs
int digitalRead_mod(const int8_t pin) { // same as digitalRead except the PWM stop section has been removed
const uint8_t port = digitalPinToPort_DEBUG(pin);
@ -393,3 +395,6 @@ static void pwm_details(uint8_t pin) {
#endif
#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)
#undef ABTEST

View File

@ -2,6 +2,9 @@
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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

View File

@ -2,6 +2,9 @@
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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

View File

@ -34,14 +34,14 @@ typedef uint16_t hal_timer_t;
#define HAL_TIMER_RATE ((F_CPU) / 8) // i.e., 2MHz or 2.5MHz
#ifndef STEP_TIMER_NUM
#define STEP_TIMER_NUM 1
#ifndef MF_TIMER_STEP
#define MF_TIMER_STEP 1
#endif
#ifndef PULSE_TIMER_NUM
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#ifndef MF_TIMER_PULSE
#define MF_TIMER_PULSE MF_TIMER_STEP
#endif
#ifndef TEMP_TIMER_NUM
#define TEMP_TIMER_NUM 0
#ifndef MF_TIMER_TEMP
#define MF_TIMER_TEMP 0
#endif
#define TEMP_TIMER_FREQUENCY ((F_CPU) / 64.0 / 256.0)
@ -64,7 +64,7 @@ typedef uint16_t hal_timer_t;
FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t) {
switch (timer_num) {
case STEP_TIMER_NUM:
case MF_TIMER_STEP:
// waveform generation = 0100 = CTC
SET_WGM(1, CTC_OCRnA);
@ -84,7 +84,7 @@ FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t) {
TCNT1 = 0;
break;
case TEMP_TIMER_NUM:
case MF_TIMER_TEMP:
// Use timer0 for temperature measurement
// Interleave temperature interrupt with millies interrupt
OCR0B = 128;
@ -109,8 +109,8 @@ FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t) {
* (otherwise, characters will be lost due to UART overflow).
* Then: Stepper, Endstops, Temperature, and -finally- all others.
*/
#define HAL_timer_isr_prologue(TIMER_NUM)
#define HAL_timer_isr_epilogue(TIMER_NUM)
#define HAL_timer_isr_prologue(T)
#define HAL_timer_isr_epilogue(T)
/* 18 cycles maximum latency */
#ifndef HAL_STEP_TIMER_ISR

View File

@ -64,8 +64,8 @@
#include <U8glib-HAL.h>
uint8_t u8g_bitData, u8g_bitNotData, u8g_bitClock, u8g_bitNotClock;
volatile uint8_t *u8g_outData, *u8g_outClock;
static uint8_t u8g_bitData, u8g_bitNotData, u8g_bitClock, u8g_bitNotClock;
static volatile uint8_t *u8g_outData, *u8g_outClock;
static void u8g_com_arduino_init_shift_out(uint8_t dataPin, uint8_t clockPin) {
u8g_outData = portOutputRegister(digitalPinToPort(dataPin));

View File

@ -144,6 +144,11 @@ inline void HAL_adc_init() {}//todo
void HAL_adc_start_conversion(const uint8_t ch);
uint16_t HAL_adc_get_result();
//
// PWM
//
inline void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t=255, const bool=false) { analogWrite(pin, v); }
//
// Pin Map
//
@ -168,16 +173,14 @@ void HAL_init();
//
void _delay_ms(const int delay);
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
int freeMemory();
#if GCC_VERSION <= 50000
#pragma GCC diagnostic pop
#endif
#pragma GCC diagnostic pop
#ifdef __cplusplus
extern "C" {

View File

@ -437,7 +437,7 @@
} while (--todo);
}
// Pointers to generic functions for block tranfers
// Pointers to generic functions for block transfers
static pfnSpiTxBlock spiTxBlock = (pfnSpiTxBlock)spiTxBlockX;
static pfnSpiRxBlock spiRxBlock = (pfnSpiRxBlock)spiRxBlockX;
@ -594,18 +594,14 @@
SPI_Configure(SPI0, ID_SPI0, SPI_MR_MSTR | SPI_MR_MODFDIS | SPI_MR_PS);
SPI_Enable(SPI0);
SET_OUTPUT(DAC0_SYNC);
SET_OUTPUT(DAC0_SYNC_PIN);
#if HAS_MULTI_EXTRUDER
SET_OUTPUT(DAC1_SYNC);
WRITE(DAC1_SYNC, HIGH);
OUT_WRITE(DAC1_SYNC_PIN, HIGH);
#endif
SET_OUTPUT(SPI_EEPROM1_CS);
SET_OUTPUT(SPI_EEPROM2_CS);
SET_OUTPUT(SPI_FLASH_CS);
WRITE(DAC0_SYNC, HIGH);
WRITE(SPI_EEPROM1_CS, HIGH);
WRITE(SPI_EEPROM2_CS, HIGH);
WRITE(SPI_FLASH_CS, HIGH);
WRITE(DAC0_SYNC_PIN, HIGH);
OUT_WRITE(SPI_EEPROM1_CS_PIN, HIGH);
OUT_WRITE(SPI_EEPROM2_CS_PIN, HIGH);
OUT_WRITE(SPI_FLASH_CS_PIN, HIGH);
WRITE(SD_SS_PIN, HIGH);
OUT_WRITE(SDSS, LOW);

View File

@ -0,0 +1,26 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 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
#include <SPI.h>
using MarlinSPI = SPIClass;

View File

@ -118,7 +118,7 @@ public:
static size_t write(const uint8_t c);
static void flushTX();
static inline bool emergency_parser_enabled() { return Cfg::EMERGENCYPARSER; }
static bool emergency_parser_enabled() { return Cfg::EMERGENCYPARSER; }
FORCE_INLINE static uint8_t dropped() { return Cfg::DROPPED_RX ? rx_dropped_bytes : 0; }
FORCE_INLINE static uint8_t buffer_overruns() { return Cfg::RX_OVERRUNS ? rx_buffer_overruns : 0; }

View File

@ -41,7 +41,7 @@ extern "C" {
int udi_cdc_getc();
bool udi_cdc_is_tx_ready();
int udi_cdc_putc(int value);
};
}
// Pending character
static int pending_char = -1;

View File

@ -38,17 +38,17 @@ volatile static int32_t toggles;
void tone(const pin_t _pin, const unsigned int frequency, const unsigned long duration) {
tone_pin = _pin;
toggles = 2 * frequency * duration / 1000;
HAL_timer_start(TONE_TIMER_NUM, 2 * frequency);
HAL_timer_start(MF_TIMER_TONE, 2 * frequency);
}
void noTone(const pin_t _pin) {
HAL_timer_disable_interrupt(TONE_TIMER_NUM);
HAL_timer_disable_interrupt(MF_TIMER_TONE);
extDigitalWrite(_pin, LOW);
}
HAL_TONE_TIMER_ISR() {
static uint8_t pin_state = 0;
HAL_timer_isr_prologue(TONE_TIMER_NUM);
HAL_timer_isr_prologue(MF_TIMER_TONE);
if (toggles) {
toggles--;

View File

@ -20,7 +20,6 @@
*
*/
/**
* Based on u8g_com_msp430_hw_spi.c
*

View File

@ -57,7 +57,7 @@
#include "../../../inc/MarlinConfigPre.h"
#if ENABLED(U8GLIB_ST7920)
#if IS_U8GLIB_ST7920
#include "../../../inc/MarlinConfig.h"
#include "../../shared/Delay.h"
@ -182,5 +182,5 @@ uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_va
}
#endif // LIGHTWEIGHT_UI
#endif // U8GLIB_ST7920
#endif // IS_U8GLIB_ST7920
#endif // ARDUINO_ARCH_SAM

View File

@ -57,7 +57,7 @@
#include "../../../inc/MarlinConfigPre.h"
#if HAS_MARLINUI_U8GLIB && DISABLED(U8GLIB_ST7920)
#if HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
#include "u8g_com_HAL_DUE_sw_spi_shared.h"
@ -141,5 +141,5 @@ uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
return 1;
}
#endif // HAS_MARLINUI_U8GLIB && !U8GLIB_ST7920
#endif // HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
#endif // ARDUINO_ARCH_SAM

View File

@ -200,9 +200,9 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
pageContents[i] = (((uint32_t*)data)[i]) | (~(pageContents[i] ^ ((uint32_t*)data)[i]));
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM PageWrite ", page);
DEBUG_ECHOLNPAIR(" in FLASH address ", (uint32_t)addrflash);
DEBUG_ECHOLNPAIR(" base address ", (uint32_t)getFlashStorage(0));
DEBUG_ECHOLNPGM("EEPROM PageWrite ", page);
DEBUG_ECHOLNPGM(" in FLASH address ", (uint32_t)addrflash);
DEBUG_ECHOLNPGM(" base address ", (uint32_t)getFlashStorage(0));
DEBUG_FLUSH();
// Get the page relative to the start of the EFC controller, and the EFC controller to use
@ -246,7 +246,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
__enable_irq();
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Unlock failure for page ", page);
DEBUG_ECHOLNPGM("EEPROM Unlock failure for page ", page);
return false;
}
@ -271,7 +271,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
__enable_irq();
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Write failure for page ", page);
DEBUG_ECHOLNPGM("EEPROM Write failure for page ", page);
return false;
}
@ -287,7 +287,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
#ifdef EE_EMU_DEBUG
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Verify Write failure for page ", page);
DEBUG_ECHOLNPGM("EEPROM Verify Write failure for page ", page);
ee_Dump( page, (uint32_t *)addrflash);
ee_Dump(-page, data);
@ -306,7 +306,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
}
}
}
DEBUG_ECHOLNPAIR("--> Differing bits: ", count);
DEBUG_ECHOLNPGM("--> Differing bits: ", count);
#endif
return false;
@ -326,9 +326,9 @@ static bool ee_PageErase(uint16_t page) {
uint32_t addrflash = uint32_t(getFlashStorage(page));
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM PageErase ", page);
DEBUG_ECHOLNPAIR(" in FLASH address ", (uint32_t)addrflash);
DEBUG_ECHOLNPAIR(" base address ", (uint32_t)getFlashStorage(0));
DEBUG_ECHOLNPGM("EEPROM PageErase ", page);
DEBUG_ECHOLNPGM(" in FLASH address ", (uint32_t)addrflash);
DEBUG_ECHOLNPGM(" base address ", (uint32_t)getFlashStorage(0));
DEBUG_FLUSH();
// Get the page relative to the start of the EFC controller, and the EFC controller to use
@ -371,7 +371,7 @@ static bool ee_PageErase(uint16_t page) {
__enable_irq();
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Unlock failure for page ",page);
DEBUG_ECHOLNPGM("EEPROM Unlock failure for page ",page);
return false;
}
@ -395,7 +395,7 @@ static bool ee_PageErase(uint16_t page) {
__enable_irq();
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Erase failure for page ",page);
DEBUG_ECHOLNPGM("EEPROM Erase failure for page ",page);
return false;
}
@ -411,7 +411,7 @@ static bool ee_PageErase(uint16_t page) {
for (i = 0; i < PageSize >> 2; i++) {
if (*aligned_src++ != 0xFFFFFFFF) {
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Verify Erase failure for page ",page);
DEBUG_ECHOLNPGM("EEPROM Verify Erase failure for page ",page);
ee_Dump(page, (uint32_t *)addrflash);
return false;
}
@ -922,7 +922,7 @@ static void ee_Init() {
if (curGroup >= GroupCount) curGroup = 0;
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Current Group: ",curGroup);
DEBUG_ECHOLNPGM("EEPROM Current Group: ",curGroup);
DEBUG_FLUSH();
// Now, validate that all the other group pages are empty
@ -932,7 +932,7 @@ static void ee_Init() {
for (int page = 0; page < PagesPerGroup; page++) {
if (!ee_IsPageClean(grp * PagesPerGroup + page)) {
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Page ", page, " not clean on group ", grp);
DEBUG_ECHOLNPGM("EEPROM Page ", page, " not clean on group ", grp);
DEBUG_FLUSH();
ee_PageErase(grp * PagesPerGroup + page);
}
@ -949,14 +949,14 @@ static void ee_Init() {
}
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Active page: ", curPage);
DEBUG_ECHOLNPGM("EEPROM Active page: ", curPage);
DEBUG_FLUSH();
// Make sure the pages following the first clean one are also clean
for (int page = curPage + 1; page < PagesPerGroup; page++) {
if (!ee_IsPageClean(curGroup * PagesPerGroup + page)) {
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Page ", page, " not clean on active group ", curGroup);
DEBUG_ECHOLNPGM("EEPROM Page ", page, " not clean on active group ", curGroup);
DEBUG_FLUSH();
ee_Dump(curGroup * PagesPerGroup + page, getFlashStorage(curGroup * PagesPerGroup + page));
ee_PageErase(curGroup * PagesPerGroup + page);

View File

@ -2,6 +2,9 @@
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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
@ -64,6 +67,7 @@
#define PRINT_PORT(p)
#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("%02d"), p); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
#define 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 ? 1 : 0)
@ -86,7 +90,7 @@ bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
void pwm_details(int32_t pin) {
if (pwm_status(pin)) {
uint32_t chan = g_APinDescription[pin].ulPWMChannel;
SERIAL_ECHOPAIR("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY);
SERIAL_ECHOPGM("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY);
}
}

View File

@ -42,7 +42,7 @@
// Private Variables
// ------------------------
const tTimerConfig TimerConfig [NUM_HARDWARE_TIMERS] = {
const tTimerConfig timer_config[NUM_HARDWARE_TIMERS] = {
{ TC0, 0, TC0_IRQn, 3}, // 0 - [servo timer5]
{ TC0, 1, TC1_IRQn, 0}, // 1
{ TC0, 2, TC2_IRQn, 2}, // 2 - stepper
@ -66,9 +66,9 @@ const tTimerConfig TimerConfig [NUM_HARDWARE_TIMERS] = {
*/
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
Tc *tc = TimerConfig[timer_num].pTimerRegs;
IRQn_Type irq = TimerConfig[timer_num].IRQ_Id;
uint32_t channel = TimerConfig[timer_num].channel;
Tc *tc = timer_config[timer_num].pTimerRegs;
IRQn_Type irq = timer_config[timer_num].IRQ_Id;
uint32_t channel = timer_config[timer_num].channel;
// Disable interrupt, just in case it was already enabled
NVIC_DisableIRQ(irq);
@ -86,7 +86,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
pmc_set_writeprotect(false);
pmc_enable_periph_clk((uint32_t)irq);
NVIC_SetPriority(irq, TimerConfig [timer_num].priority);
NVIC_SetPriority(irq, timer_config[timer_num].priority);
// wave mode, reset counter on match with RC,
TC_Configure(tc, channel, TC_CMR_WAVE | TC_CMR_WAVSEL_UP_RC | TC_CMR_TCCLKS_TIMER_CLOCK1);
@ -105,12 +105,12 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
}
void HAL_timer_enable_interrupt(const uint8_t timer_num) {
IRQn_Type irq = TimerConfig[timer_num].IRQ_Id;
IRQn_Type irq = timer_config[timer_num].IRQ_Id;
NVIC_EnableIRQ(irq);
}
void HAL_timer_disable_interrupt(const uint8_t timer_num) {
IRQn_Type irq = TimerConfig[timer_num].IRQ_Id;
IRQn_Type irq = timer_config[timer_num].IRQ_Id;
NVIC_DisableIRQ(irq);
// We NEED memory barriers to ensure Interrupts are actually disabled!
@ -125,7 +125,7 @@ static bool NVIC_GetEnabledIRQ(IRQn_Type IRQn) {
}
bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
IRQn_Type irq = TimerConfig[timer_num].IRQ_Id;
IRQn_Type irq = timer_config[timer_num].IRQ_Id;
return NVIC_GetEnabledIRQ(irq);
}

View File

@ -37,35 +37,35 @@ typedef uint32_t hal_timer_t;
#define HAL_TIMER_RATE ((F_CPU) / 2) // frequency of timers peripherals
#ifndef STEP_TIMER_NUM
#define STEP_TIMER_NUM 2 // Timer Index for Stepper
#ifndef MF_TIMER_STEP
#define MF_TIMER_STEP 2 // Timer Index for Stepper
#endif
#ifndef PULSE_TIMER_NUM
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#ifndef MF_TIMER_PULSE
#define MF_TIMER_PULSE MF_TIMER_STEP
#endif
#ifndef TEMP_TIMER_NUM
#define TEMP_TIMER_NUM 4 // Timer Index for Temperature
#ifndef MF_TIMER_TEMP
#define MF_TIMER_TEMP 4 // Timer Index for Temperature
#endif
#ifndef TONE_TIMER_NUM
#define TONE_TIMER_NUM 6 // index of timer to use for beeper tones
#ifndef MF_TIMER_TONE
#define MF_TIMER_TONE 6 // index of timer to use for beeper tones
#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 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 // frequency of pulse timer
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
#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(STEP_TIMER_NUM)
#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(STEP_TIMER_NUM)
#define STEPPER_ISR_ENABLED() HAL_timer_interrupt_enabled(STEP_TIMER_NUM)
#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(TEMP_TIMER_NUM)
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_TEMP)
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(MF_TIMER_TEMP)
#ifndef HAL_STEP_TIMER_ISR
#define HAL_STEP_TIMER_ISR() void TC2_Handler()
@ -92,7 +92,7 @@ typedef struct {
// Public Variables
// ------------------------
extern const tTimerConfig TimerConfig[];
extern const tTimerConfig timer_config[];
// ------------------------
// Public functions
@ -101,17 +101,17 @@ extern const tTimerConfig TimerConfig[];
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) {
const tTimerConfig * const pConfig = &TimerConfig[timer_num];
const tTimerConfig * const pConfig = &timer_config[timer_num];
pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_RC = compare;
}
FORCE_INLINE static hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
const tTimerConfig * const pConfig = &TimerConfig[timer_num];
const tTimerConfig * const pConfig = &timer_config[timer_num];
return pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_RC;
}
FORCE_INLINE static hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
const tTimerConfig * const pConfig = &TimerConfig[timer_num];
const tTimerConfig * const pConfig = &timer_config[timer_num];
return pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_CV;
}
@ -120,9 +120,9 @@ 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) {
const tTimerConfig * const pConfig = &TimerConfig[timer_num];
const tTimerConfig * const pConfig = &timer_config[timer_num];
// Reading the status register clears the interrupt flag
pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_SR;
}
#define HAL_timer_isr_epilogue(TIMER_NUM)
#define HAL_timer_isr_epilogue(T)

View File

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

View File

@ -71,7 +71,7 @@
/* ------------------------------------------------------------------------ */
/**
* \page arduino_due_x_board_info "Arduino Due/X - Board informations"
* \page arduino_due_x_board_info "Arduino Due/X - Board information"
* This page lists several definition related to the board description.
*
*/

View File

@ -10,7 +10,7 @@
#include "../../../sd/cardreader.h"
extern "C" {
#include "sd_mmc_spi_mem.h"
#include "sd_mmc_spi_mem.h"
}
#define SD_MMC_BLOCK_SIZE 512

View File

@ -90,7 +90,7 @@ typedef struct {
//! This buffer must be word align for DATA IN phase (use prefix COMPILER_WORD_ALIGNED for buffer)
uint8_t *payload;
//! Size of buffer to send or fill, and content the number of byte transfered
//! Size of buffer to send or fill, and content the number of byte transferred
uint16_t payload_size;
//! Callback called after reception of ZLP from setup request
@ -132,7 +132,7 @@ typedef void (*udd_callback_halt_cleared_t)(void);
*
* \param status UDD_EP_TRANSFER_OK, if transfer is complete
* \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted
* \param n number of data transfered
* \param n number of data transferred
*/
typedef void (*udd_callback_trans_t) (udd_ep_status_t status,
iram_size_t nb_transferred, udd_ep_id_t ep);
@ -303,7 +303,7 @@ bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
* The driver uses a specific DMA USB to transfer data
* from internal RAM to endpoint, if this one is available.
* When the transfer is finished or aborted (stall, reset, ...), the \a callback is called.
* The \a callback returns the transfer status and eventually the number of byte transfered.
* The \a callback returns the transfer status and eventually the number of byte transferred.
* Note: The control endpoint is not authorized.
*
* \param ep The ID of the endpoint to use

View File

@ -162,7 +162,7 @@ static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep);
*
* \param status UDD_EP_TRANSFER_OK, if transfer finished
* \param status UDD_EP_TRANSFER_ABORT, if transfer aborted
* \param n number of data transfered
* \param n number of data transferred
*/
static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep);
@ -200,7 +200,7 @@ static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_
*
* \param status UDD_EP_TRANSFER_OK, if transfer finished
* \param status UDD_EP_TRANSFER_ABORT, if transfer aborted
* \param n number of data transfered
* \param n number of data transferred
*/
static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep);

View File

@ -106,7 +106,7 @@ extern "C" {
*/
//@{
# if UDI_CDC_PORT_NB > 2
# error USBB, UDP, UDPHS and UOTGHS interfaces have not enought endpoints.
# error USBB, UDP, UDPHS and UOTGHS interfaces have not enough endpoints.
# endif
#define UDI_CDC_DATA_EP_IN_0 (1 | USB_EP_DIR_IN) // TX
#define UDI_CDC_DATA_EP_OUT_0 (2 | USB_EP_DIR_OUT) // RX

View File

@ -173,7 +173,7 @@ static void udi_msc_cbw_wait(void);
*
* \param status UDD_EP_TRANSFER_OK, if transfer is finished
* \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted
* \param nb_received number of data transfered
* \param nb_received number of data transferred
*/
static void udi_msc_cbw_received(udd_ep_status_t status,
iram_size_t nb_received, udd_ep_id_t ep);
@ -211,7 +211,7 @@ static void udi_msc_data_send(uint8_t * buffer, uint8_t buf_size);
*
* \param status UDD_EP_TRANSFER_OK, if transfer finish
* \param status UDD_EP_TRANSFER_ABORT, if transfer aborted
* \param nb_sent number of data transfered
* \param nb_sent number of data transferred
*/
static void udi_msc_data_sent(udd_ep_status_t status, iram_size_t nb_sent,
udd_ep_id_t ep);
@ -244,7 +244,7 @@ void udi_msc_csw_send(void);
*
* \param status UDD_EP_TRANSFER_OK, if transfer is finished
* \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted
* \param nb_sent number of data transfered
* \param nb_sent number of data transferred
*/
static void udi_msc_csw_sent(udd_ep_status_t status, iram_size_t nb_sent,
udd_ep_id_t ep);
@ -463,7 +463,7 @@ uint8_t udi_msc_getsetting(void)
static void udi_msc_cbw_invalid(void)
{
if (!udi_msc_b_cbw_invalid)
return; // Don't re-stall endpoint if error reseted by setup
return; // Don't re-stall endpoint if error reset by setup
udd_ep_set_halt(UDI_MSC_EP_OUT);
// If stall cleared then re-stall it. Only Setup MSC Reset can clear it
udd_ep_wait_stall_clear(UDI_MSC_EP_OUT, udi_msc_cbw_invalid);
@ -472,7 +472,7 @@ static void udi_msc_cbw_invalid(void)
static void udi_msc_csw_invalid(void)
{
if (!udi_msc_b_cbw_invalid)
return; // Don't re-stall endpoint if error reseted by setup
return; // Don't re-stall endpoint if error reset by setup
udd_ep_set_halt(UDI_MSC_EP_IN);
// If stall cleared then re-stall it. Only Setup MSC Reset can clear it
udd_ep_wait_stall_clear(UDI_MSC_EP_IN, udi_msc_csw_invalid);

View File

@ -325,7 +325,7 @@ static void udd_sleep_mode(bool b_idle)
/**
* \name Control endpoint low level management routine.
*
* This function performs control endpoint mangement.
* This function performs control endpoint management.
* It handle the SETUP/DATA/HANDSHAKE phases of a control transaction.
*/
//@{
@ -397,9 +397,9 @@ static void udd_ctrl_endofrequest(void);
/**
* \brief Main interrupt routine for control endpoint
*
* This switchs control endpoint events to correct sub function.
* This switches control endpoint events to correct sub function.
*
* \return \c 1 if an event about control endpoint is occured, otherwise \c 0.
* \return \c 1 if an event about control endpoint is occurred, otherwise \c 0.
*/
static bool udd_ctrl_interrupt(void);
@ -410,7 +410,7 @@ static bool udd_ctrl_interrupt(void);
* \name Management of bulk/interrupt/isochronous endpoints
*
* The UDD manages the data transfer on endpoints:
* - Start data tranfer on endpoint with USB Device DMA
* - Start data transfer on endpoint with USB Device DMA
* - Send a ZLP packet if requested
* - Call callback registered to signal end of transfer
* The transfer abort and stall feature are supported.
@ -431,7 +431,7 @@ typedef struct {
uint8_t *buf;
//! Size of buffer to send or fill
iram_size_t buf_size;
//!< Size of data transfered
//!< Size of data transferred
iram_size_t buf_cnt;
//!< Size of data loaded (or prepared for DMA) last time
iram_size_t buf_load;
@ -486,7 +486,7 @@ static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_n
#ifdef UDD_EP_DMA_SUPPORTED
/**
* \brief Start the next transfer if necessary or complet the job associated.
* \brief Start the next transfer if necessary or complete the job associated.
*
* \param ep endpoint number without direction flag
*/
@ -496,9 +496,9 @@ static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_n
/**
* \brief Main interrupt routine for bulk/interrupt/isochronous endpoints
*
* This switchs endpoint events to correct sub function.
* This switches endpoint events to correct sub function.
*
* \return \c 1 if an event about bulk/interrupt/isochronous endpoints has occured, otherwise \c 0.
* \return \c 1 if an event about bulk/interrupt/isochronous endpoints has occurred, otherwise \c 0.
*/
static bool udd_ep_interrupt(void);
@ -520,7 +520,7 @@ static bool udd_ep_interrupt(void);
*
* Note:
* Here, the global interrupt mask is not clear when an USB interrupt is enabled
* because this one can not be occured during the USB ISR (=during INTX is masked).
* because this one can not be occurred during the USB ISR (=during INTX is masked).
* See Technical reference $3.8.3 Masking interrupt requests in peripheral modules.
*/
#ifdef UHD_ENABLE
@ -787,7 +787,7 @@ void udd_attach(void)
udd_sleep_mode(true);
otg_unfreeze_clock();
// This section of clock check can be improved with a chek of
// This section of clock check can be improved with a check of
// USB clock source via sysclk()
// Check USB clock because the source can be a PLL
while (!Is_otg_clock_usable());
@ -803,7 +803,7 @@ void udd_attach(void)
#ifdef USB_DEVICE_HS_SUPPORT
udd_enable_msof_interrupt();
#endif
// Reset following interupts flag
// Reset following interrupts flag
udd_ack_reset();
udd_ack_sof();
udd_ack_msof();
@ -902,7 +902,7 @@ bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes,
}
dbg_print("alloc(%x, %d) ", ep, MaxEndpointSize);
// Bank choise
// Bank choice
switch (bmAttributes & USB_EP_TYPE_MASK) {
case USB_EP_TYPE_ISOCHRONOUS:
nb_bank = UDD_ISOCHRONOUS_NB_BANK(ep);
@ -1228,7 +1228,7 @@ bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
if (Is_udd_endpoint_stall_requested(ep)
|| ptr_job->stall_requested) {
// Endpoint halted then registes the callback
// Endpoint halted then registers the callback
ptr_job->busy = true;
ptr_job->call_nohalt = callback;
} else {
@ -1386,7 +1386,7 @@ static void udd_ctrl_setup_received(void)
// Decode setup request
if (udc_process_setup() == false) {
// Setup request unknow then stall it
// Setup request unknown then stall it
udd_ctrl_stall_data();
udd_ack_setup_received(0);
return;
@ -1447,7 +1447,7 @@ static void udd_ctrl_in_sent(void)
udd_ctrl_prev_payload_buf_cnt += udd_ctrl_payload_buf_cnt;
if ((udd_g_ctrlreq.req.wLength == udd_ctrl_prev_payload_buf_cnt)
|| b_shortpacket) {
// All data requested are transfered or a short packet has been sent
// All data requested are transferred or a short packet has been sent
// then it is the end of data phase.
// Generate an OUT ZLP for handshake phase.
udd_ctrl_send_zlp_out();
@ -1516,7 +1516,7 @@ static void udd_ctrl_out_received(void)
// End of SETUP request:
// - Data IN Phase aborted,
// - or last Data IN Phase hidden by ZLP OUT sending quiclky,
// - or ZLP OUT received normaly.
// - or ZLP OUT received normally.
udd_ctrl_endofrequest();
} else {
// Protocol error during SETUP request
@ -1544,7 +1544,7 @@ static void udd_ctrl_out_received(void)
(udd_ctrl_prev_payload_buf_cnt +
udd_ctrl_payload_buf_cnt))) {
// End of reception because it is a short packet
// Before send ZLP, call intermediat calback
// Before send ZLP, call intermediate callback
// in case of data receiv generate a stall
udd_g_ctrlreq.payload_size = udd_ctrl_payload_buf_cnt;
if (NULL != udd_g_ctrlreq.over_under_run) {
@ -1565,7 +1565,7 @@ static void udd_ctrl_out_received(void)
if (udd_g_ctrlreq.payload_size == udd_ctrl_payload_buf_cnt) {
// Overrun then request a new payload buffer
if (!udd_g_ctrlreq.over_under_run) {
// No callback availabled to request a new payload buffer
// No callback available to request a new payload buffer
udd_ctrl_stall_data();
// Ack reception of OUT to replace NAK by a STALL
udd_ack_out_received(0);
@ -1805,7 +1805,7 @@ static void udd_ep_trans_done(udd_ep_id_t ep)
// transfer size of UDD_ENDPOINT_MAX_TRANS Bytes
next_trans = UDD_ENDPOINT_MAX_TRANS;
// Set 0 to tranfer the maximum
// Set 0 to transfer the maximum
udd_dma_ctrl = UOTGHS_DEVDMACONTROL_BUFF_LENGTH(0);
} else {
udd_dma_ctrl = UOTGHS_DEVDMACONTROL_BUFF_LENGTH(next_trans);
@ -1850,7 +1850,7 @@ static void udd_ep_trans_done(udd_ep_id_t ep)
}
cpu_irq_restore(flags);
// Here a ZLP has been recieved
// Here a ZLP has been received
// and the DMA transfer must be not started.
// It is the end of transfer
ptr_job->buf_size = ptr_job->buf_cnt;
@ -1991,13 +1991,13 @@ static bool udd_ep_interrupt(void)
}
dbg_print("dma%x: ", ep);
udd_disable_endpoint_dma_interrupt(ep);
// Save number of data no transfered
// Save number of data no transferred
nb_remaining = (udd_endpoint_dma_get_status(ep) &
UOTGHS_DEVDMASTATUS_BUFF_COUNT_Msk)
>> UOTGHS_DEVDMASTATUS_BUFF_COUNT_Pos;
if (nb_remaining) {
// Transfer no complete (short packet or ZLP) then:
// Update number of data transfered
// Update number of data transferred
ptr_job->buf_cnt -= nb_remaining;
// Set transfer complete to stop the transfer
ptr_job->buf_size = ptr_job->buf_cnt;
@ -2056,7 +2056,7 @@ static bool udd_ep_interrupt(void)
udd_disable_endpoint_interrupt(ep);
Assert(ptr_job->stall_requested);
// A stall has been requested during backgound transfer
// A stall has been requested during background transfer
ptr_job->stall_requested = false;
udd_disable_endpoint_bank_autoswitch(ep);
udd_enable_stall_handshake(ep);

View File

@ -130,7 +130,7 @@ struct usb_msc_cbw {
struct usb_msc_csw {
le32_t dCSWSignature; //!< Must contain 'USBS'
le32_t dCSWTag; //!< Same as dCBWTag
le32_t dCSWDataResidue; //!< Number of bytes not transfered
le32_t dCSWDataResidue; //!< Number of bytes not transferred
uint8_t bCSWStatus; //!< Status code
};

View File

@ -28,6 +28,10 @@
#include <esp_adc_cal.h>
#include <HardwareSerial.h>
#if ENABLED(USE_ESP32_TASK_WDT)
#include <esp_task_wdt.h>
#endif
#if ENABLED(WIFISUPPORT)
#include <ESPAsyncWebServer.h>
#include "wifi.h"
@ -90,8 +94,24 @@ volatile int numPWMUsed = 0,
#endif
void HAL_init_board() {
#if ENABLED(USE_ESP32_EXIO)
HardwareSerial YSerial2(2);
void Write_EXIO(uint8_t IO, uint8_t v) {
if (ISRS_ENABLED()) {
DISABLE_ISRS();
YSerial2.write(0x80 | (((char)v) << 5) | (IO - 100));
ENABLE_ISRS();
}
else
YSerial2.write(0x80 | (((char)v) << 5) | (IO - 100));
}
#endif
void HAL_init_board() {
#if ENABLED(USE_ESP32_TASK_WDT)
esp_task_wdt_init(10, true);
#endif
#if ENABLED(ESP3D_WIFISUPPORT)
esp3dlib.init();
#elif ENABLED(WIFISUPPORT)
@ -127,7 +147,11 @@ void HAL_init_board() {
// Initialize the i2s peripheral only if the I2S stepper stream is enabled.
// The following initialization is performed after Serial1 and Serial2 are defined as
// their native pins might conflict with the i2s stream even when they are remapped.
TERN_(I2S_STEPPER_STREAM, i2s_init());
#if ENABLED(USE_ESP32_EXIO)
YSerial2.begin(460800 * 3, SERIAL_8N1, 16, 17);
#elif ENABLED(I2S_STEPPER_STREAM)
i2s_init();
#endif
}
void HAL_idletask() {
@ -252,7 +276,7 @@ void analogWrite(pin_t pin, int value) {
idx = numPWMUsed;
pwmPins[idx] = pin;
// Start timer on first use
if (idx == 0) HAL_timer_start(PWM_TIMER_NUM, PWM_TIMER_FREQUENCY);
if (idx == 0) HAL_timer_start(MF_TIMER_PWM, PWM_TIMER_FREQUENCY);
++numPWMUsed;
}
@ -263,7 +287,7 @@ void analogWrite(pin_t pin, int value) {
// Handle PWM timer interrupt
HAL_PWM_TIMER_ISR() {
HAL_timer_isr_prologue(PWM_TIMER_NUM);
HAL_timer_isr_prologue(MF_TIMER_PWM);
static uint8_t count = 0;
@ -277,7 +301,7 @@ HAL_PWM_TIMER_ISR() {
// 128 for 7 Bit resolution
count = (count + 1) & 0x7F;
HAL_timer_isr_epilogue(PWM_TIMER_NUM);
HAL_timer_isr_epilogue(MF_TIMER_PWM);
}
#endif // ARDUINO_ARCH_ESP32

View File

@ -105,16 +105,14 @@ void HAL_reboot();
void _delay_ms(int delay);
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
int freeMemory();
#if GCC_VERSION <= 50000
#pragma GCC diagnostic pop
#endif
#pragma GCC diagnostic pop
void analogWrite(pin_t pin, int value);
@ -131,6 +129,10 @@ void HAL_adc_init();
void HAL_adc_start_conversion(const uint8_t adc_pin);
// PWM
inline void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t=255, const bool=false) { analogWrite(pin, v); }
// Pin Map
#define GET_PIN_MAP_PIN(index) index
#define GET_PIN_MAP_INDEX(pin) pin
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
@ -142,6 +144,10 @@ void HAL_idletask();
inline void HAL_init() {}
void HAL_init_board();
#if ENABLED(USE_ESP32_EXIO)
void Write_EXIO(uint8_t IO, uint8_t v);
#endif
//
// Delay in cycles (used by DELAY_NS / DELAY_US)
//

View File

@ -53,11 +53,9 @@ static SPISettings spiConfig;
// ------------------------
void spiBegin() {
#if !PIN_EXISTS(SD_SS)
#error "SD_SS_PIN not defined!"
#if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_SS)
OUT_WRITE(SD_SS_PIN, HIGH);
#endif
OUT_WRITE(SD_SS_PIN, HIGH);
}
void spiInit(uint8_t spiRate) {

View File

@ -0,0 +1,26 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 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
#include <SPI.h>
using MarlinSPI = SPIClass;

View File

@ -38,16 +38,16 @@ volatile static int32_t toggles;
void tone(const pin_t _pin, const unsigned int frequency, const unsigned long duration) {
tone_pin = _pin;
toggles = 2 * frequency * duration / 1000;
HAL_timer_start(TONE_TIMER_NUM, 2 * frequency);
HAL_timer_start(MF_TIMER_TONE, 2 * frequency);
}
void noTone(const pin_t _pin) {
HAL_timer_disable_interrupt(TONE_TIMER_NUM);
HAL_timer_disable_interrupt(MF_TIMER_TONE);
WRITE(_pin, LOW);
}
HAL_TONE_TIMER_ISR() {
HAL_timer_isr_prologue(TONE_TIMER_NUM);
HAL_timer_isr_prologue(MF_TIMER_TONE);
if (toggles) {
toggles--;

View File

@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x180000,
app1, app, ota_1, 0x190000, 0x180000,
spiffs, data, spiffs, 0x310000, 0xF0000,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x5000
3 otadata data ota 0xe000 0x2000
4 app0 app ota_0 0x10000 0x180000
5 app1 app ota_1 0x190000 0x180000
6 spiffs data spiffs 0x310000 0xF0000

View File

@ -40,13 +40,19 @@
// Set pin as input with pullup mode
#define _PULLUP(IO, v) pinMode(IO, v ? INPUT_PULLUP : INPUT)
// Read a pin wrapper
#define READ(IO) (IS_I2S_EXPANDER_PIN(IO) ? i2s_state(I2S_EXPANDER_PIN_INDEX(IO)) : digitalRead(IO))
#if ENABLED(USE_ESP32_EXIO)
// Read a pin wrapper
#define READ(IO) digitalRead(IO)
// Write to a pin wrapper
#define WRITE(IO, v) (IO >= 100 ? Write_EXIO(IO, v) : digitalWrite(IO, v))
#else
// Read a pin wrapper
#define READ(IO) (IS_I2S_EXPANDER_PIN(IO) ? i2s_state(I2S_EXPANDER_PIN_INDEX(IO)) : digitalRead(IO))
// Write to a pin wrapper
#define WRITE(IO, v) (IS_I2S_EXPANDER_PIN(IO) ? i2s_write(I2S_EXPANDER_PIN_INDEX(IO), v) : digitalWrite(IO, v))
#endif
// Write to a pin wrapper
#define WRITE(IO, v) (IS_I2S_EXPANDER_PIN(IO) ? i2s_write(I2S_EXPANDER_PIN_INDEX(IO), v) : digitalWrite(IO, v))
// Set pin as input wrapper
// Set pin as input wrapper (0x80 | (v << 5) | (IO - 100))
#define SET_INPUT(IO) _SET_INPUT(IO)
// Set pin as input with pullup wrapper

View File

@ -23,6 +23,8 @@
#include "../../inc/MarlinConfigPre.h"
#if DISABLED(USE_ESP32_EXIO)
#include "i2s.h"
#include "../shared/Marduino.h"
@ -62,12 +64,9 @@ uint32_t i2s_port_data = 0;
#define I2S_EXIT_CRITICAL() portEXIT_CRITICAL(&i2s_spinlock[i2s_num])
static inline void gpio_matrix_out_check(uint32_t gpio, uint32_t signal_idx, bool out_inv, bool oen_inv) {
//if pin = -1, do not need to configure
if (gpio != -1) {
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[gpio], PIN_FUNC_GPIO);
gpio_set_direction((gpio_num_t)gpio, (gpio_mode_t)GPIO_MODE_DEF_OUTPUT);
gpio_matrix_out(gpio, signal_idx, out_inv, oen_inv);
}
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[gpio], PIN_FUNC_GPIO);
gpio_set_direction((gpio_num_t)gpio, (gpio_mode_t)GPIO_MODE_DEF_OUTPUT);
gpio_matrix_out(gpio, signal_idx, out_inv, oen_inv);
}
static esp_err_t i2s_reset_fifo(i2s_port_t i2s_num) {
@ -254,13 +253,7 @@ int i2s_init() {
I2S0.fifo_conf.dscr_en = 0;
I2S0.conf_chan.tx_chan_mod = (
#if ENABLED(I2S_STEPPER_SPLIT_STREAM)
4
#else
0
#endif
);
I2S0.conf_chan.tx_chan_mod = TERN(I2S_STEPPER_SPLIT_STREAM, 4, 0);
I2S0.fifo_conf.tx_fifo_mod = 0;
I2S0.conf.tx_mono = 0;
@ -311,9 +304,16 @@ int i2s_init() {
xTaskCreatePinnedToCore(stepperTask, "StepperTask", 10000, nullptr, 1, nullptr, CONFIG_ARDUINO_RUNNING_CORE); // run I2S stepper task on same core as rest of Marlin
// Route the i2s pins to the appropriate GPIO
gpio_matrix_out_check(I2S_DATA, I2S0O_DATA_OUT23_IDX, 0, 0);
gpio_matrix_out_check(I2S_BCK, I2S0O_BCK_OUT_IDX, 0, 0);
gpio_matrix_out_check(I2S_WS, I2S0O_WS_OUT_IDX, 0, 0);
// If a pin is not defined, no need to configure
#if defined(I2S_DATA) && I2S_DATA >= 0
gpio_matrix_out_check(I2S_DATA, I2S0O_DATA_OUT23_IDX, 0, 0);
#endif
#if defined(I2S_BCK) && I2S_BCK >= 0
gpio_matrix_out_check(I2S_BCK, I2S0O_BCK_OUT_IDX, 0, 0);
#endif
#if defined(I2S_WS) && I2S_WS >= 0
gpio_matrix_out_check(I2S_WS, I2S0O_WS_OUT_IDX, 0, 0);
#endif
// Start the I2S peripheral
return i2s_start(I2S_NUM_0);
@ -340,4 +340,5 @@ void i2s_push_sample() {
dma.current[dma.rw_pos++] = i2s_port_data;
}
#endif // !USE_ESP32_EXIO
#endif // ARDUINO_ARCH_ESP32

View File

@ -2,6 +2,9 @@
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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

View File

@ -41,7 +41,7 @@
static timg_dev_t *TG[2] = {&TIMERG0, &TIMERG1};
const tTimerConfig TimerConfig [NUM_HARDWARE_TIMERS] = {
const tTimerConfig timer_config[NUM_HARDWARE_TIMERS] = {
{ TIMER_GROUP_0, TIMER_0, STEPPER_TIMER_PRESCALE, stepTC_Handler }, // 0 - Stepper
{ TIMER_GROUP_0, TIMER_1, TEMP_TIMER_PRESCALE, tempTC_Handler }, // 1 - Temperature
{ TIMER_GROUP_1, TIMER_0, PWM_TIMER_PRESCALE, pwmTC_Handler }, // 2 - PWM
@ -53,7 +53,7 @@ const tTimerConfig TimerConfig [NUM_HARDWARE_TIMERS] = {
// ------------------------
void IRAM_ATTR timer_isr(void *para) {
const tTimerConfig& timer = TimerConfig[(int)para];
const tTimerConfig& timer = timer_config[(int)para];
// Retrieve the interrupt status and the counter value
// from the timer that reported the interrupt
@ -82,7 +82,7 @@ void IRAM_ATTR timer_isr(void *para) {
* @param frequency frequency of the timer
*/
void HAL_timer_start(const uint8_t timer_num, uint32_t frequency) {
const tTimerConfig timer = TimerConfig[timer_num];
const tTimerConfig timer = timer_config[timer_num];
timer_config_t config;
config.divider = timer.divider;
@ -115,7 +115,7 @@ void HAL_timer_start(const uint8_t timer_num, uint32_t frequency) {
* @param count threshold at which the interrupt is triggered
*/
void HAL_timer_set_compare(const uint8_t timer_num, hal_timer_t count) {
const tTimerConfig timer = TimerConfig[timer_num];
const tTimerConfig timer = timer_config[timer_num];
timer_set_alarm_value(timer.group, timer.idx, count);
}
@ -125,7 +125,7 @@ void HAL_timer_set_compare(const uint8_t timer_num, hal_timer_t count) {
* @return the timer current threshold for the alarm to be triggered
*/
hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
const tTimerConfig timer = TimerConfig[timer_num];
const tTimerConfig timer = timer_config[timer_num];
uint64_t alarm_value;
timer_get_alarm_value(timer.group, timer.idx, &alarm_value);
@ -139,7 +139,7 @@ hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
* @return the current counter of the alarm
*/
hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
const tTimerConfig timer = TimerConfig[timer_num];
const tTimerConfig timer = timer_config[timer_num];
uint64_t counter_value;
timer_get_counter_value(timer.group, timer.idx, &counter_value);
return counter_value;
@ -150,7 +150,7 @@ hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
* @param timer_num timer number to enable interrupts on
*/
void HAL_timer_enable_interrupt(const uint8_t timer_num) {
//const tTimerConfig timer = TimerConfig[timer_num];
//const tTimerConfig timer = timer_config[timer_num];
//timer_enable_intr(timer.group, timer.idx);
}
@ -159,12 +159,12 @@ void HAL_timer_enable_interrupt(const uint8_t timer_num) {
* @param timer_num timer number to disable interrupts on
*/
void HAL_timer_disable_interrupt(const uint8_t timer_num) {
//const tTimerConfig timer = TimerConfig[timer_num];
//const tTimerConfig timer = timer_config[timer_num];
//timer_disable_intr(timer.group, timer.idx);
}
bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
const tTimerConfig timer = TimerConfig[timer_num];
const tTimerConfig timer = timer_config[timer_num];
return TG[timer.group]->int_ena.val | BIT(timer_num);
}

View File

@ -32,20 +32,20 @@
typedef uint64_t hal_timer_t;
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFFFFFFFFFFULL
#ifndef STEP_TIMER_NUM
#define STEP_TIMER_NUM 0 // Timer Index for Stepper
#ifndef MF_TIMER_STEP
#define MF_TIMER_STEP 0 // Timer Index for Stepper
#endif
#ifndef PULSE_TIMER_NUM
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#ifndef MF_TIMER_PULSE
#define MF_TIMER_PULSE MF_TIMER_STEP
#endif
#ifndef TEMP_TIMER_NUM
#define TEMP_TIMER_NUM 1 // Timer Index for Temperature
#ifndef MF_TIMER_TEMP
#define MF_TIMER_TEMP 1 // Timer Index for Temperature
#endif
#ifndef PWM_TIMER_NUM
#define PWM_TIMER_NUM 2 // index of timer to use for PWM outputs
#ifndef MF_TIMER_PWM
#define MF_TIMER_PWM 2 // index of timer to use for PWM outputs
#endif
#ifndef TONE_TIMER_NUM
#define TONE_TIMER_NUM 3 // index of timer for beeper tones
#ifndef MF_TIMER_TONE
#define MF_TIMER_TONE 3 // index of timer for beeper tones
#endif
#define HAL_TIMER_RATE APB_CLK_FREQ // frequency of timer peripherals
@ -79,12 +79,12 @@ typedef uint64_t hal_timer_t;
#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(STEP_TIMER_NUM)
#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(STEP_TIMER_NUM)
#define STEPPER_ISR_ENABLED() HAL_timer_interrupt_enabled(STEP_TIMER_NUM)
#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(TEMP_TIMER_NUM)
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_TEMP)
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(MF_TIMER_TEMP)
#ifndef HAL_TEMP_TIMER_ISR
#define HAL_TEMP_TIMER_ISR() extern "C" void tempTC_Handler()
@ -121,7 +121,7 @@ typedef struct {
// Public Variables
// ------------------------
extern const tTimerConfig TimerConfig[];
extern const tTimerConfig timer_config[];
// ------------------------
// Public functions
@ -136,5 +136,5 @@ 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);
#define HAL_timer_isr_prologue(TIMER_NUM)
#define HAL_timer_isr_epilogue(TIMER_NUM)
#define HAL_timer_isr_prologue(T)
#define HAL_timer_isr_epilogue(T)

View File

@ -25,7 +25,7 @@
extern "C" {
#endif
esp_err_t esp_task_wdt_reset();
esp_err_t esp_task_wdt_reset();
#ifdef __cplusplus
}

View File

@ -59,7 +59,7 @@ void wifi_init() {
MDNS.addService("http", "tcp", 80);
SERIAL_ECHOLNPAIR("Successfully connected to WiFi with SSID '" WIFI_SSID "', hostname: '" WIFI_HOSTNAME "', IP address: ", WiFi.localIP().toString().c_str());
SERIAL_ECHOLNPGM("Successfully connected to WiFi with SSID '" WIFI_SSID "', hostname: '" WIFI_HOSTNAME "', IP address: ", WiFi.localIP().toString().c_str());
}
#endif // WIFISUPPORT

View File

@ -63,9 +63,9 @@ uint8_t _getc();
extern MSerialT usb_serial;
#define MYSERIAL1 usb_serial
#define ST7920_DELAY_1 DELAY_NS(600)
#define ST7920_DELAY_2 DELAY_NS(750)
#define ST7920_DELAY_3 DELAY_NS(750)
#define CPU_ST7920_DELAY_1 600
#define CPU_ST7920_DELAY_2 750
#define CPU_ST7920_DELAY_3 750
//
// Interrupts
@ -79,16 +79,14 @@ extern MSerialT usb_serial;
inline void HAL_init() {}
// Utility functions
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
int freeMemory();
#if GCC_VERSION <= 50000
#pragma GCC diagnostic pop
#endif
#pragma GCC diagnostic pop
// ADC
#define HAL_ADC_VREF 5.0
@ -103,6 +101,9 @@ void HAL_adc_enable_channel(const uint8_t ch);
void HAL_adc_start_conversion(const uint8_t ch);
uint16_t HAL_adc_get_result();
// PWM
inline void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t=255, const bool=false) { analogWrite(pin, v); }
// Reset source
inline void HAL_clear_reset_source(void) {}
inline uint8_t HAL_get_reset_source(void) { return RST_POWER_ON; }

View File

@ -0,0 +1,26 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 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
#include <SPI.h>
using MarlinSPI = SPIClass;

View File

@ -54,7 +54,7 @@ void Heater::update() {
}
void Heater::interrupt(GpioEvent ev) {
// ununsed
// unused
}
#endif // __PLAT_LINUX__

View File

@ -26,7 +26,7 @@
*/
// Emulating RAMPS
#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
#if ENABLED(SPINDLE_LASER_USE_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
#error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
#endif

View File

@ -55,7 +55,7 @@ constexpr bool VALID_PIN(const pin_t p) { return WITHIN(p, 0, NUM_DIGITAL_PINS);
// Test whether the pin is PWM
constexpr bool PWM_PIN(const pin_t p) { return false; }
// Test whether the pin is interruptable
// Test whether the pin is interruptible
constexpr bool INTERRUPT_PIN(const pin_t p) { return false; }
// Get the pin number at the given index

View File

@ -2,6 +2,9 @@
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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
@ -16,6 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifdef __PLAT_LINUX__
//#define GPIO_LOGGING // Full GPIO and Positional Logging

View File

@ -2,6 +2,9 @@
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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
@ -34,6 +37,7 @@
#define GET_ARRAY_PIN(p) pin_array[p].pin
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define 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 MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
// active ADC function/mode/code values for PINSEL registers

View File

@ -37,14 +37,14 @@ typedef uint32_t hal_timer_t;
#define HAL_TIMER_RATE ((SystemCoreClock) / 4) // frequency of timers peripherals
#ifndef STEP_TIMER_NUM
#define STEP_TIMER_NUM 0 // Timer Index for Stepper
#ifndef MF_TIMER_STEP
#define MF_TIMER_STEP 0 // Timer Index for Stepper
#endif
#ifndef PULSE_TIMER_NUM
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#ifndef MF_TIMER_PULSE
#define MF_TIMER_PULSE MF_TIMER_STEP
#endif
#ifndef TEMP_TIMER_NUM
#define TEMP_TIMER_NUM 1 // Timer Index for Temperature
#ifndef MF_TIMER_TEMP
#define MF_TIMER_TEMP 1 // Timer Index for Temperature
#endif
#define TEMP_TIMER_RATE 1000000
@ -58,12 +58,12 @@ typedef uint32_t hal_timer_t;
#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(STEP_TIMER_NUM)
#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(STEP_TIMER_NUM)
#define STEPPER_ISR_ENABLED() HAL_timer_interrupt_enabled(STEP_TIMER_NUM)
#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(TEMP_TIMER_NUM)
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_TEMP)
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(MF_TIMER_TEMP)
#ifndef HAL_STEP_TIMER_ISR
#define HAL_STEP_TIMER_ISR() extern "C" void TIMER0_IRQHandler()
@ -77,7 +77,6 @@ typedef uint32_t hal_timer_t;
#define HAL_PWM_TIMER_ISR() extern "C" void TIMER3_IRQHandler()
#define HAL_PWM_TIMER_IRQn
void HAL_timer_init();
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
@ -93,5 +92,5 @@ 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);
#define HAL_timer_isr_prologue(TIMER_NUM)
#define HAL_timer_isr_epilogue(TIMER_NUM)
#define HAL_timer_isr_prologue(T)
#define HAL_timer_isr_epilogue(T)

View File

@ -50,15 +50,9 @@ extern "C" volatile uint32_t _millis;
//
// Default graphical display delays
//
#ifndef ST7920_DELAY_1
#define ST7920_DELAY_1 DELAY_NS(600)
#endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(750)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(750)
#endif
#define CPU_ST7920_DELAY_1 600
#define CPU_ST7920_DELAY_2 750
#define CPU_ST7920_DELAY_3 750
typedef ForwardSerial1Class< decltype(UsbSerial) > DefaultSerial1;
extern DefaultSerial1 USBSerial;
@ -113,7 +107,7 @@ extern DefaultSerial1 USBSerial;
#error "LCD_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
#endif
#if HAS_DGUS_LCD
#define SERIAL_GET_TX_BUFFER_FREE() MSerial0.available()
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.available()
#endif
#endif
@ -129,16 +123,14 @@ extern DefaultSerial1 USBSerial;
//
// Utility functions
//
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
int freeMemory();
#if GCC_VERSION <= 50000
#pragma GCC diagnostic pop
#endif
#pragma GCC diagnostic pop
//
// ADC API
@ -162,17 +154,17 @@ int freeMemory();
using FilteredADC = LPC176x::ADC<ADC_LOWPASS_K_VALUE, ADC_MEDIAN_FILTER_SIZE>;
extern uint32_t HAL_adc_reading;
[[gnu::always_inline]] inline void HAL_start_adc(const pin_t pin) {
[[gnu::always_inline]] inline void HAL_adc_start_conversion(const pin_t pin) {
HAL_adc_reading = FilteredADC::read(pin) >> (16 - HAL_ADC_RESOLUTION); // returns 16bit value, reduce to required bits
}
[[gnu::always_inline]] inline uint16_t HAL_read_adc() {
[[gnu::always_inline]] inline uint16_t HAL_adc_get_result() {
return HAL_adc_reading;
}
#define HAL_adc_init()
#define HAL_ANALOG_SELECT(pin) FilteredADC::enable_channel(pin)
#define HAL_START_ADC(pin) HAL_start_adc(pin)
#define HAL_READ_ADC() HAL_read_adc()
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
#define HAL_READ_ADC() HAL_adc_get_result()
#define HAL_ADC_READY() (true)
// Test whether the pin is valid

View File

@ -46,6 +46,8 @@ public:
void end() {}
uint8_t availableForWrite(void) { /* flushTX(); */ return TX_BUFFER_SIZE; }
#if ENABLED(EMERGENCY_PARSER)
bool recv_callback(const char c) override;
#endif

View File

@ -1,10 +1,9 @@
/**
* Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2016 Victor Perez victor_pv@hotmail.com
*
* 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
@ -20,12 +19,19 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* Implementation of EEPROM settings in SD Card
*/
#ifdef TARGET_LPC1768
#include "../../inc/MarlinConfig.h"
#if ENABLED(SDCARD_EEPROM_EMULATION)
//#define DEBUG_SD_EEPROM_EMULATION
#include "../shared/eeprom_api.h"
#include <chanfs/diskio.h>
@ -38,9 +44,11 @@ FATFS fat_fs;
FIL eeprom_file;
bool eeprom_file_open = false;
#define EEPROM_FILENAME "eeprom.dat"
#ifndef MARLIN_EEPROM_SIZE
#define MARLIN_EEPROM_SIZE size_t(0x1000) // 4KiB of Emulated EEPROM
#endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
bool PersistentStore::access_start() {
@ -50,7 +58,7 @@ bool PersistentStore::access_start() {
MSC_Release_Lock();
return false;
}
FRESULT res = f_open(&eeprom_file, "eeprom.dat", FA_OPEN_ALWAYS | FA_WRITE | FA_READ);
FRESULT res = f_open(&eeprom_file, EEPROM_FILENAME, FA_OPEN_ALWAYS | FA_WRITE | FA_READ);
if (res) MSC_Release_Lock();
if (res == FR_OK) {
@ -81,18 +89,20 @@ bool PersistentStore::access_finish() {
// This extra chit-chat goes away soon, but is helpful for now
// to see errors that are happening in read_data / write_data
static void debug_rw(const bool write, int &pos, const uint8_t *value, const size_t size, const FRESULT s, const size_t total=0) {
PGM_P const rw_str = write ? PSTR("write") : PSTR("read");
SERIAL_CHAR(' ');
SERIAL_ECHOPGM_P(rw_str);
SERIAL_ECHOLNPAIR("_data(", pos, ",", value, ",", size, ", ...)");
if (total) {
SERIAL_ECHOPGM(" f_");
SERIAL_ECHOPGM_P(rw_str);
SERIAL_ECHOPAIR("()=", s, "\n size=", size, "\n bytes_");
SERIAL_ECHOLNPAIR_P(write ? PSTR("written=") : PSTR("read="), total);
}
else
SERIAL_ECHOLNPAIR(" f_lseek()=", s);
#if ENABLED(DEBUG_SD_EEPROM_EMULATION)
FSTR_P const rw_str = write ? F("write") : F("read");
SERIAL_CHAR(' ');
SERIAL_ECHOF(rw_str);
SERIAL_ECHOLNPGM("_data(", pos, ",", *value, ",", size, ", ...)");
if (total) {
SERIAL_ECHOPGM(" f_");
SERIAL_ECHOF(rw_str);
SERIAL_ECHOPGM("()=", s, "\n size=", size, "\n bytes_");
SERIAL_ECHOLNF(write ? F("written=") : F("read="), total);
}
else
SERIAL_ECHOLNPGM(" f_lseek()=", s);
#endif
}
// File function return codes for type FRESULT. This goes away soon, but

View File

@ -22,18 +22,20 @@
#ifdef TARGET_LPC1768
#include "../../inc/MarlinConfigPre.h"
#include <pwm.h>
void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
if (!LPC176x::pin_is_valid(pin)) return;
if (LPC176x::pwm_attach_pin(pin))
LPC176x::pwm_write_ratio(pin, invert ? 1.0f - (float)v / v_size : (float)v / v_size); // map 1-254 onto PWM range
}
#if NEEDS_HARDWARE_PWM // Specific meta-flag for features that mandate PWM
#include <pwm.h>
void set_pwm_frequency(const pin_t pin, int f_desired) {
LPC176x::pwm_set_frequency(pin, f_desired);
}
void set_pwm_frequency(const pin_t pin, int f_desired) {
LPC176x::pwm_set_frequency(pin, f_desired);
}
#endif
void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
LPC176x::pwm_write_ratio(pin, invert ? 1.0f - (float)v / v_size : (float)v / v_size);
}
#endif // NEEDS_HARDWARE_PWM
#endif // TARGET_LPC1768

View File

@ -67,7 +67,7 @@ static_assert(!(NUM_SERVOS && ENABLED(FAST_PWM_FAN)), "BLTOUCH and Servos are in
* Test LPC176x-specific configuration values for errors at compile-time.
*/
//#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
//#if ENABLED(SPINDLE_LASER_USE_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
// #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
//#endif

View File

@ -77,7 +77,7 @@ public:
//uint32_t spiRate() const { return spi_speed; }
static inline uint32_t spiRate2Clock(uint32_t spiRate) {
static uint32_t spiRate2Clock(uint32_t spiRate) {
uint32_t Marlin_speed[7]; // CPSR is always 2
Marlin_speed[0] = 8333333; //(SCR: 2) desired: 8,000,000 actual: 8,333,333 +4.2% SPI_FULL_SPEED
Marlin_speed[1] = 4166667; //(SCR: 5) desired: 4,000,000 actual: 4,166,667 +4.2% SPI_HALF_SPEED

View File

@ -2,6 +2,9 @@
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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
@ -33,8 +36,9 @@
#define PRINT_PORT(p)
#define GET_ARRAY_PIN(p) pin_array[p].pin
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%d.%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0)
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("P%d_%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR("_A%d "), LPC176x::pin_get_adc_channel(pin)); SERIAL_ECHO(buffer); }while(0)
#define MULTI_NAME_PAD 17 // space needed to be pretty if not first name assigned to a pin
// pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities
#ifndef M43_NEVER_TOUCH
@ -48,6 +52,4 @@ bool GET_PINMODE(const pin_t pin) {
return LPC176x::gpio_direction(pin);
}
bool GET_ARRAY_IS_DIGITAL(const pin_t pin) {
return (!LPC176x::pin_has_adc(pin) || !LPC176x::pin_adc_enabled(pin));
}
#define GET_ARRAY_IS_DIGITAL(x) ((bool) pin_array[x].is_digital)

View File

@ -26,39 +26,22 @@
#include "tft_spi.h"
//TFT_SPI tft;
SPIClass TFT_SPI::SPIx(1);
#define TFT_CS_H WRITE(TFT_CS_PIN, HIGH)
#define TFT_CS_L WRITE(TFT_CS_PIN, LOW)
#define TFT_DC_H WRITE(TFT_DC_PIN, HIGH)
#define TFT_DC_L WRITE(TFT_DC_PIN, LOW)
#define TFT_RST_H WRITE(TFT_RESET_PIN, HIGH)
#define TFT_RST_L WRITE(TFT_RESET_PIN, LOW)
#define TFT_BLK_H WRITE(TFT_BACKLIGHT_PIN, HIGH)
#define TFT_BLK_L WRITE(TFT_BACKLIGHT_PIN, LOW)
void TFT_SPI::Init() {
#if PIN_EXISTS(TFT_RESET)
SET_OUTPUT(TFT_RESET_PIN);
TFT_RST_H;
OUT_WRITE(TFT_RESET_PIN, HIGH);
delay(100);
#endif
#if PIN_EXISTS(TFT_BACKLIGHT)
SET_OUTPUT(TFT_BACKLIGHT_PIN);
TFT_BLK_H;
OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH);
#endif
SET_OUTPUT(TFT_DC_PIN);
SET_OUTPUT(TFT_CS_PIN);
TFT_DC_H;
TFT_CS_H;
WRITE(TFT_DC_PIN, HIGH);
WRITE(TFT_CS_PIN, HIGH);
/**
* STM32F1 APB2 = 72MHz, APB1 = 36MHz, max SPI speed of this MCU if 18Mhz
@ -97,7 +80,7 @@ void TFT_SPI::Init() {
void TFT_SPI::DataTransferBegin(uint16_t DataSize) {
SPIx.setDataSize(DataSize);
SPIx.begin();
TFT_CS_L;
WRITE(TFT_CS_PIN, LOW);
}
uint32_t TFT_SPI::GetID() {
@ -116,7 +99,7 @@ uint32_t TFT_SPI::ReadID(uint16_t Reg) {
SPIx.setDataSize(DATASIZE_8BIT);
SPIx.setClock(SPI_CLOCK_DIV64);
SPIx.begin();
TFT_CS_L;
WRITE(TFT_CS_PIN, LOW);
WriteReg(Reg);
LOOP_L_N(i, 4) {
@ -131,21 +114,15 @@ uint32_t TFT_SPI::ReadID(uint16_t Reg) {
return data >> 7;
}
bool TFT_SPI::isBusy() {
return false;
}
bool TFT_SPI::isBusy() { return false; }
void TFT_SPI::Abort() {
DataTransferEnd();
}
void TFT_SPI::Abort() { DataTransferEnd(); }
void TFT_SPI::Transmit(uint16_t Data) {
SPIx.transfer(Data);
}
void TFT_SPI::Transmit(uint16_t Data) { SPIx.transfer(Data); }
void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) {
DataTransferBegin(DATASIZE_16BIT); //16
TFT_DC_H;
DataTransferBegin(DATASIZE_16BIT);
WRITE(TFT_DC_PIN, HIGH);
SPIx.dmaSend(Data, Count, MemoryIncrease);
DataTransferEnd();
}

View File

@ -65,8 +65,8 @@ private:
static uint16_t getRawData(const XPTCoordinate coordinate);
static bool isTouched();
static inline void DataTransferBegin() { WRITE(TOUCH_CS_PIN, LOW); };
static inline void DataTransferEnd() { WRITE(TOUCH_CS_PIN, HIGH); };
static void DataTransferBegin() { WRITE(TOUCH_CS_PIN, LOW); };
static void DataTransferEnd() { WRITE(TOUCH_CS_PIN, HIGH); };
#if ENABLED(TOUCH_BUTTONS_HW_SPI)
static uint16_t HardwareIO(uint16_t data);
#endif

View File

@ -40,7 +40,7 @@ void HAL_timer_init() {
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
switch (timer_num) {
case 0:
case MF_TIMER_STEP:
LPC_TIM0->MCR = _BV(SBIT_MR0I) | _BV(SBIT_MR0R); // Match on MR0, reset on MR0, interrupts when NVIC enables them
LPC_TIM0->MR0 = uint32_t(STEPPER_TIMER_RATE) / frequency; // Match value (period) to set frequency
LPC_TIM0->TCR = _BV(SBIT_CNTEN); // Counter Enable
@ -49,7 +49,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
NVIC_EnableIRQ(TIMER0_IRQn);
break;
case 1:
case MF_TIMER_TEMP:
LPC_TIM1->MCR = _BV(SBIT_MR0I) | _BV(SBIT_MR0R); // Match on MR0, reset on MR0, interrupts when NVIC enables them
LPC_TIM1->MR0 = uint32_t(TEMP_TIMER_RATE) / frequency;
LPC_TIM1->TCR = _BV(SBIT_CNTEN); // Counter Enable

View File

@ -60,17 +60,17 @@ typedef uint32_t hal_timer_t;
#define HAL_TIMER_RATE ((F_CPU) / 4) // frequency of timers peripherals
#ifndef STEP_TIMER_NUM
#define STEP_TIMER_NUM 0 // Timer Index for Stepper
#ifndef MF_TIMER_STEP
#define MF_TIMER_STEP 0 // Timer Index for Stepper
#endif
#ifndef PULSE_TIMER_NUM
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#ifndef MF_TIMER_PULSE
#define MF_TIMER_PULSE MF_TIMER_STEP
#endif
#ifndef TEMP_TIMER_NUM
#define TEMP_TIMER_NUM 1 // Timer Index for Temperature
#ifndef MF_TIMER_TEMP
#define MF_TIMER_TEMP 1 // Timer Index for Temperature
#endif
#ifndef PWM_TIMER_NUM
#define PWM_TIMER_NUM 3 // Timer Index for PWM
#ifndef MF_TIMER_PWM
#define MF_TIMER_PWM 3 // Timer Index for PWM
#endif
#define TEMP_TIMER_RATE 1000000
@ -84,23 +84,23 @@ typedef uint32_t hal_timer_t;
#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(STEP_TIMER_NUM)
#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(STEP_TIMER_NUM)
#define STEPPER_ISR_ENABLED() HAL_timer_interrupt_enabled(STEP_TIMER_NUM)
#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(TEMP_TIMER_NUM)
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_TEMP)
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(MF_TIMER_TEMP)
#ifndef HAL_STEP_TIMER_ISR
#define HAL_STEP_TIMER_ISR() _HAL_TIMER_ISR(STEP_TIMER_NUM)
#define HAL_STEP_TIMER_ISR() _HAL_TIMER_ISR(MF_TIMER_STEP)
#endif
#ifndef HAL_TEMP_TIMER_ISR
#define HAL_TEMP_TIMER_ISR() _HAL_TIMER_ISR(TEMP_TIMER_NUM)
#define HAL_TEMP_TIMER_ISR() _HAL_TIMER_ISR(MF_TIMER_TEMP)
#endif
// Timer references by index
#define STEP_TIMER_PTR _HAL_TIMER(STEP_TIMER_NUM)
#define TEMP_TIMER_PTR _HAL_TIMER(TEMP_TIMER_NUM)
#define STEP_TIMER_PTR _HAL_TIMER(MF_TIMER_STEP)
#define TEMP_TIMER_PTR _HAL_TIMER(MF_TIMER_TEMP)
// ------------------------
// Public functions
@ -110,38 +110,38 @@ 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) {
switch (timer_num) {
case 0: STEP_TIMER_PTR->MR0 = compare; break; // Stepper Timer Match Register 0
case 1: TEMP_TIMER_PTR->MR0 = compare; break; // Temp Timer Match Register 0
case MF_TIMER_STEP: STEP_TIMER_PTR->MR0 = compare; break; // Stepper Timer Match Register 0
case MF_TIMER_TEMP: TEMP_TIMER_PTR->MR0 = compare; break; // Temp Timer Match Register 0
}
}
FORCE_INLINE static hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
switch (timer_num) {
case 0: return STEP_TIMER_PTR->MR0; // Stepper Timer Match Register 0
case 1: return TEMP_TIMER_PTR->MR0; // Temp Timer Match Register 0
case MF_TIMER_STEP: return STEP_TIMER_PTR->MR0; // Stepper Timer Match Register 0
case MF_TIMER_TEMP: return TEMP_TIMER_PTR->MR0; // Temp Timer Match Register 0
}
return 0;
}
FORCE_INLINE static hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
switch (timer_num) {
case 0: return STEP_TIMER_PTR->TC; // Stepper Timer Count
case 1: return TEMP_TIMER_PTR->TC; // Temp Timer Count
case MF_TIMER_STEP: return STEP_TIMER_PTR->TC; // Stepper Timer Count
case MF_TIMER_TEMP: return TEMP_TIMER_PTR->TC; // Temp Timer Count
}
return 0;
}
FORCE_INLINE static void HAL_timer_enable_interrupt(const uint8_t timer_num) {
switch (timer_num) {
case 0: NVIC_EnableIRQ(TIMER0_IRQn); break; // Enable interrupt handler
case 1: NVIC_EnableIRQ(TIMER1_IRQn); break; // Enable interrupt handler
case MF_TIMER_STEP: NVIC_EnableIRQ(TIMER0_IRQn); break; // Enable interrupt handler
case MF_TIMER_TEMP: NVIC_EnableIRQ(TIMER1_IRQn); break; // Enable interrupt handler
}
}
FORCE_INLINE static void HAL_timer_disable_interrupt(const uint8_t timer_num) {
switch (timer_num) {
case 0: NVIC_DisableIRQ(TIMER0_IRQn); break; // Disable interrupt handler
case 1: NVIC_DisableIRQ(TIMER1_IRQn); break; // Disable interrupt handler
case MF_TIMER_STEP: NVIC_DisableIRQ(TIMER0_IRQn); break; // Disable interrupt handler
case MF_TIMER_TEMP: NVIC_DisableIRQ(TIMER1_IRQn); break; // Disable interrupt handler
}
// We NEED memory barriers to ensure Interrupts are actually disabled!
@ -157,17 +157,17 @@ FORCE_INLINE static bool NVIC_GetEnableIRQ(IRQn_Type IRQn) {
FORCE_INLINE static bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
switch (timer_num) {
case 0: return NVIC_GetEnableIRQ(TIMER0_IRQn); // Check if interrupt is enabled or not
case 1: return NVIC_GetEnableIRQ(TIMER1_IRQn); // Check if interrupt is enabled or not
case MF_TIMER_STEP: return NVIC_GetEnableIRQ(TIMER0_IRQn); // Check if interrupt is enabled or not
case MF_TIMER_TEMP: return NVIC_GetEnableIRQ(TIMER1_IRQn); // Check if interrupt is enabled or not
}
return false;
}
FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
switch (timer_num) {
case 0: SBI(STEP_TIMER_PTR->IR, SBIT_CNTEN); break;
case 1: SBI(TEMP_TIMER_PTR->IR, SBIT_CNTEN); break;
case MF_TIMER_STEP: SBI(STEP_TIMER_PTR->IR, SBIT_CNTEN); break;
case MF_TIMER_TEMP: SBI(TEMP_TIMER_PTR->IR, SBIT_CNTEN); break;
}
}
#define HAL_timer_isr_epilogue(TIMER_NUM)
#define HAL_timer_isr_epilogue(T)

View File

@ -57,7 +57,7 @@
#include "../../../inc/MarlinConfigPre.h"
#if ENABLED(U8GLIB_ST7920)
#if IS_U8GLIB_ST7920
#include <U8glib-HAL.h>
#include <SoftwareSPI.h>
@ -143,5 +143,5 @@ uint8_t u8g_com_HAL_LPC1768_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t ar
return 1;
}
#endif // U8GLIB_ST7920
#endif // IS_U8GLIB_ST7920
#endif // TARGET_LPC1768

View File

@ -57,7 +57,7 @@
#include "../../../inc/MarlinConfigPre.h"
#if HAS_MARLINUI_U8GLIB && DISABLED(U8GLIB_ST7920)
#if HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
#include <SoftwareSPI.h>
#include "../../shared/HAL_SPI.h"
@ -205,5 +205,5 @@ uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val,
return 1;
}
#endif // HAS_MARLINUI_U8GLIB && !U8GLIB_ST7920
#endif // HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
#endif // TARGET_LPC1768

View File

@ -1,123 +1,127 @@
#
# sets output_port
# upload_extra_script.py
# set the output_port
# if target_filename is found then that drive is used
# else if target_drive is found then that drive is used
#
from __future__ import print_function
target_filename = "FIRMWARE.CUR"
target_drive = "REARM"
import pioutil
if pioutil.is_pio_build():
import os,getpass,platform
target_filename = "FIRMWARE.CUR"
target_drive = "REARM"
current_OS = platform.system()
Import("env")
import os,getpass,platform
def print_error(e):
print('\nUnable to find destination disk (%s)\n' \
'Please select it in platformio.ini using the upload_port keyword ' \
'(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' \
%(e, env.get('PIOENV')))
current_OS = platform.system()
Import("env")
def before_upload(source, target, env):
try:
#
# Find a disk for upload
#
upload_disk = 'Disk not found'
target_file_found = False
target_drive_found = False
if current_OS == 'Windows':
def print_error(e):
print('\nUnable to find destination disk (%s)\n' \
'Please select it in platformio.ini using the upload_port keyword ' \
'(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' \
%(e, env.get('PIOENV')))
def before_upload(source, target, env):
try:
#
# 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
import subprocess,string
from ctypes import windll
# Find a disk for upload
#
upload_disk = 'Disk not found'
target_file_found = False
target_drive_found = False
if current_OS == 'Windows':
#
# 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
import subprocess,string
from ctypes import windll
# getting list of drives
# https://stackoverflow.com/questions/827371/is-there-a-way-to-list-all-the-available-drive-letters-in-python
drives = []
bitmask = windll.kernel32.GetLogicalDrives()
for letter in string.ascii_uppercase:
if bitmask & 1:
drives.append(letter)
bitmask >>= 1
# getting list of drives
# https://stackoverflow.com/questions/827371/is-there-a-way-to-list-all-the-available-drive-letters-in-python
drives = []
bitmask = windll.kernel32.GetLogicalDrives()
for letter in string.ascii_uppercase:
if bitmask & 1:
drives.append(letter)
bitmask >>= 1
for drive in drives:
final_drive_name = drive + ':\\'
# print ('disc check: {}'.format(final_drive_name))
try:
volume_info = str(subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT))
except Exception as e:
print ('error:{}'.format(e))
continue
else:
if target_drive in volume_info and not target_file_found: # set upload if not found target file yet
target_drive_found = True
upload_disk = final_drive_name
if target_filename in volume_info:
if not target_file_found:
for drive in drives:
final_drive_name = drive + ':\\'
# print ('disc check: {}'.format(final_drive_name))
try:
volume_info = str(subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT))
except Exception as e:
print ('error:{}'.format(e))
continue
else:
if target_drive in volume_info and not target_file_found: # set upload if not found target file yet
target_drive_found = True
upload_disk = final_drive_name
target_file_found = True
if target_filename in volume_info:
if not target_file_found:
upload_disk = final_drive_name
target_file_found = True
elif current_OS == 'Linux':
#
# platformio.ini will accept this for a Linux upload port designation: 'upload_port = /media/media_name/drive'
#
drives = os.listdir(os.path.join(os.sep, 'media', getpass.getuser()))
if target_drive in drives: # If target drive is found, use it.
target_drive_found = True
upload_disk = os.path.join(os.sep, 'media', getpass.getuser(), target_drive) + os.sep
else:
elif current_OS == 'Linux':
#
# platformio.ini will accept this for a Linux upload port designation: 'upload_port = /media/media_name/drive'
#
drives = os.listdir(os.path.join(os.sep, 'media', getpass.getuser()))
if target_drive in drives: # If target drive is found, use it.
target_drive_found = True
upload_disk = os.path.join(os.sep, 'media', getpass.getuser(), target_drive) + os.sep
else:
for drive in drives:
try:
files = os.listdir(os.path.join(os.sep, 'media', getpass.getuser(), drive))
except:
continue
else:
if target_filename in files:
upload_disk = os.path.join(os.sep, 'media', getpass.getuser(), drive) + os.sep
target_file_found = True
break
#
# set upload_port to drive if found
#
if target_file_found or target_drive_found:
env.Replace(
UPLOAD_FLAGS="-P$UPLOAD_PORT"
)
elif current_OS == 'Darwin': # MAC
#
# platformio.ini will accept this for a OSX upload port designation: 'upload_port = /media/media_name/drive'
#
drives = os.listdir('/Volumes') # human readable names
if target_drive in drives and not target_file_found: # set upload if not found target file yet
target_drive_found = True
upload_disk = '/Volumes/' + target_drive + '/'
for drive in drives:
try:
files = os.listdir(os.path.join(os.sep, 'media', getpass.getuser(), drive))
filenames = os.listdir('/Volumes/' + drive + '/') # will get an error if the drive is protected
except:
continue
else:
if target_filename in files:
upload_disk = os.path.join(os.sep, 'media', getpass.getuser(), drive) + os.sep
if target_filename in filenames:
if not target_file_found:
upload_disk = '/Volumes/' + drive + '/'
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:
env.Replace(
UPLOAD_FLAGS="-P$UPLOAD_PORT"
)
env.Replace(UPLOAD_PORT=upload_disk)
print('\nUpload disk: ', upload_disk, '\n')
else:
print_error('Autodetect Error')
elif current_OS == 'Darwin': # MAC
#
# platformio.ini will accept this for a OSX upload port designation: 'upload_port = /media/media_name/drive'
#
drives = os.listdir('/Volumes') # human readable names
if target_drive in drives and not target_file_found: # set upload if not found target file yet
target_drive_found = True
upload_disk = '/Volumes/' + target_drive + '/'
for drive in drives:
try:
filenames = os.listdir('/Volumes/' + drive + '/') # will get an error if the drive is protected
except:
continue
else:
if target_filename in filenames:
if not target_file_found:
upload_disk = '/Volumes/' + drive + '/'
target_file_found = True
except Exception as e:
print_error(str(e))
#
# Set upload_port to drive if found
#
if target_file_found or target_drive_found:
env.Replace(UPLOAD_PORT=upload_disk)
print('\nUpload disk: ', upload_disk, '\n')
else:
print_error('Autodetect Error')
except Exception as e:
print_error(str(e))
env.AddPreAction("upload", before_upload)
env.AddPreAction("upload", before_upload)

View File

@ -99,9 +99,9 @@ extern MSerialT serial_stream_3;
#endif
#define ST7920_DELAY_1 DELAY_NS(600)
#define ST7920_DELAY_2 DELAY_NS(750)
#define ST7920_DELAY_3 DELAY_NS(750)
#define CPU_ST7920_DELAY_1 600
#define CPU_ST7920_DELAY_2 750
#define CPU_ST7920_DELAY_3 750
//
// Interrupts
@ -133,10 +133,15 @@ void HAL_adc_enable_channel(const uint8_t ch);
void HAL_adc_start_conversion(const uint8_t ch);
uint16_t HAL_adc_get_result();
// PWM
inline void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t=255, const bool=false) { analogWrite(pin, v); }
// Reset source
inline void HAL_clear_reset_source(void) {}
inline uint8_t HAL_get_reset_source(void) { return RST_POWER_ON; }
void HAL_reboot();
/* ---------------- Delay in cycles */
#define DELAY_CYCLES(x) Kernel::delayCycles(x)

View File

@ -26,7 +26,7 @@
*/
// Emulating RAMPS
#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
#if ENABLED(SPINDLE_LASER_USE_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
#error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
#endif

View File

@ -20,7 +20,6 @@
/**
* Support routines for X86_64
*/
#pragma once
/**
@ -36,6 +35,7 @@
#define GET_ARRAY_PIN(p) pin_array[p].pin
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define 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 MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
// active ADC function/mode/code values for PINSEL registers

View File

@ -62,8 +62,8 @@ private:
static uint16_t getRawData(const XPTCoordinate coordinate);
static bool isTouched();
static inline void DataTransferBegin();
static inline void DataTransferEnd();
static void DataTransferBegin();
static void DataTransferEnd();
#if ENABLED(TOUCH_BUTTONS_HW_SPI)
static uint16_t HardwareIO(uint16_t data);
#endif

View File

@ -37,17 +37,17 @@ typedef uint64_t hal_timer_t;
#define HAL_TIMER_RATE ((SystemCoreClock) / 4) // frequency of timers peripherals
#ifndef STEP_TIMER_NUM
#define STEP_TIMER_NUM 0 // Timer Index for Stepper
#ifndef MF_TIMER_STEP
#define MF_TIMER_STEP 0 // Timer Index for Stepper
#endif
#ifndef PULSE_TIMER_NUM
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#ifndef MF_TIMER_PULSE
#define MF_TIMER_PULSE MF_TIMER_STEP
#endif
#ifndef TEMP_TIMER_NUM
#define TEMP_TIMER_NUM 1 // Timer Index for Temperature
#ifndef MF_TIMER_TEMP
#define MF_TIMER_TEMP 1 // Timer Index for Temperature
#endif
#ifndef SYSTICK_TIMER_NUM
#define SYSTICK_TIMER_NUM 2 // Timer Index for Systick
#ifndef MF_TIMER_SYSTICK
#define MF_TIMER_SYSTICK 2 // Timer Index for Systick
#endif
#define SYSTICK_TIMER_FREQUENCY 1000
@ -62,12 +62,12 @@ typedef uint64_t hal_timer_t;
#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(STEP_TIMER_NUM)
#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(STEP_TIMER_NUM)
#define STEPPER_ISR_ENABLED() HAL_timer_interrupt_enabled(STEP_TIMER_NUM)
#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(TEMP_TIMER_NUM)
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_TEMP)
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(MF_TIMER_TEMP)
#ifndef HAL_STEP_TIMER_ISR
#define HAL_STEP_TIMER_ISR() extern "C" void TIMER0_IRQHandler()
@ -87,5 +87,5 @@ 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);
#define HAL_timer_isr_prologue(TIMER_NUM)
#define HAL_timer_isr_epilogue(TIMER_NUM)
#define HAL_timer_isr_prologue(T)
#define HAL_timer_isr_epilogue(T)

View File

@ -57,7 +57,7 @@
#include "../../../inc/MarlinConfig.h"
#if ENABLED(U8GLIB_ST7920)
#if IS_U8GLIB_ST7920
#include <U8glib-HAL.h>
#include "../../shared/Delay.h"
@ -167,5 +167,5 @@ uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
}
#endif
#endif // U8GLIB_ST7920
#endif // IS_U8GLIB_ST7920
#endif // TARGET_LPC1768

View File

@ -57,7 +57,7 @@
#include "../../../inc/MarlinConfig.h"
#if HAS_MARLINUI_U8GLIB && DISABLED(U8GLIB_ST7920)
#if HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
#undef SPI_SPEED
#define SPI_SPEED 2 // About 2 MHz
@ -208,8 +208,11 @@ uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_pt
}
#endif
#elif !ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI, HAS_MARLINUI_HD44780) && HAS_MARLINUI_U8GLIB
#elif NONE(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI, HAS_MARLINUI_HD44780) && HAS_MARLINUI_U8GLIB
#include <U8glib-HAL.h>
uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {return 0;}
#endif // HAS_MARLINUI_U8GLIB && !U8GLIB_ST7920
#endif // HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
#endif // __PLAT_NATIVE_SIM__

View File

@ -98,7 +98,7 @@
// Struct must be 32 bits aligned because of DMA accesses but fields needs to be 8 bits packed
typedef struct __attribute__((aligned(4), packed)) {
ADC_INPUTCTRL_Type INPUTCTRL;
} HAL_DMA_DAC_Registers; // DMA transfered registers
} HAL_DMA_DAC_Registers; // DMA transferred registers
#endif

View File

@ -127,6 +127,11 @@ void HAL_adc_init();
void HAL_adc_start_conversion(const uint8_t adc_pin);
//
// PWM
//
inline void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t=255, const bool=false) { analogWrite(pin, v); }
//
// Pin Map
//
@ -153,16 +158,14 @@ void HAL_idletask();
//
FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
int freeMemory();
#if GCC_VERSION <= 50000
#pragma GCC diagnostic pop
#endif
#pragma GCC diagnostic pop
#ifdef __cplusplus
extern "C" {

View File

@ -0,0 +1,26 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 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
#include <SPI.h>
using MarlinSPI = SPIClass;

View File

@ -25,7 +25,6 @@
*
* Derived from Adafruit_SPIFlash class with no SdFat references
*/
#pragma once
#include <Adafruit_SPIFlashBase.h>

View File

@ -53,7 +53,7 @@
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() {
Tc * const tc = TimerConfig[SERVO_TC].pTc;
Tc * const tc = timer_config[SERVO_TC].pTc;
tc->COUNT16.CTRLBSET.reg = TC_CTRLBCLR_CMD_READSYNC;
SYNC(tc->COUNT16.SYNCBUSY.bit.CTRLB || tc->COUNT16.SYNCBUSY.bit.COUNT);
@ -65,7 +65,7 @@ FORCE_INLINE static uint16_t getTimerCount() {
// Interrupt handler for the TC
// ----------------------------
HAL_SERVO_TIMER_ISR() {
Tc * const tc = TimerConfig[SERVO_TC].pTc;
Tc * const tc = timer_config[SERVO_TC].pTc;
const timer16_Sequence_t timer =
#ifndef _useTimer1
_timer2
@ -125,7 +125,7 @@ HAL_SERVO_TIMER_ISR() {
}
void initISR(timer16_Sequence_t timer) {
Tc * const tc = TimerConfig[SERVO_TC].pTc;
Tc * const tc = timer_config[SERVO_TC].pTc;
const uint8_t tcChannel = TIMER_TCCHANNEL(timer);
static bool initialized = false; // Servo TC has been initialized
@ -202,7 +202,7 @@ void initISR(timer16_Sequence_t timer) {
}
void finISR(timer16_Sequence_t timer) {
Tc * const tc = TimerConfig[SERVO_TC].pTc;
Tc * const tc = timer_config[SERVO_TC].pTc;
const uint8_t tcChannel = TIMER_TCCHANNEL(timer);
// Disable the match channel interrupt request

View File

@ -162,12 +162,14 @@ void setup_endstop_interrupts() {
#error "Z_MIN_PROBE_PIN has no EXTINT line available."
#endif
_ATTACH(Z_MIN_PROBE_PIN);
#elif HAS_I_MAX
#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);
#elif HAS_I_MIN
#endif
#if HAS_I_MIN
#if !AVAILABLE_EILINE(I_MIN_PIN)
#error "I_MIN_PIN has no EXTINT line available."
#endif
@ -178,7 +180,8 @@ void setup_endstop_interrupts() {
#error "J_MAX_PIN has no EXTINT line available."
#endif
attachInterrupt(J_MAX_PIN, endstop_ISR, CHANGE);
#elif HAS_J_MIN
#endif
#if HAS_J_MIN
#if !AVAILABLE_EILINE(J_MIN_PIN)
#error "J_MIN_PIN has no EXTINT line available."
#endif
@ -189,7 +192,8 @@ void setup_endstop_interrupts() {
#error "K_MAX_PIN has no EXTINT line available."
#endif
attachInterrupt(K_MAX_PIN, endstop_ISR, CHANGE);
#elif HAS_K_MIN
#endif
#if HAS_K_MIN
#if !AVAILABLE_EILINE(K_MIN_PIN)
#error "K_MIN_PIN has no EXTINT line available."
#endif

View File

@ -131,7 +131,7 @@
*/
#define PWM_PIN(P) (WITHIN(P, 2, 13) || WITHIN(P, 22, 23) || WITHIN(P, 44, 45) || P == 48)
// Return fullfilled ADCx->INPUTCTRL.reg
// Return fulfilled ADCx->INPUTCTRL.reg
#define PIN_TO_INPUTCTRL(P) ( (PIN_TO_AIN(P) == 0) ? ADC_INPUTCTRL_MUXPOS_AIN0 \
: (PIN_TO_AIN(P) == 1) ? ADC_INPUTCTRL_MUXPOS_AIN1 \
: (PIN_TO_AIN(P) == 2) ? ADC_INPUTCTRL_MUXPOS_AIN2 \

View File

@ -36,7 +36,7 @@
#error "OnBoard SPI BUS can't be shared with other devices."
#endif
#if SERVO_TC == RTC_TIMER_NUM
#if SERVO_TC == MF_TIMER_RTC
#error "Servos can't use RTC timer"
#endif

View File

@ -26,6 +26,7 @@
#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)
@ -47,7 +48,7 @@ bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
void pwm_details(int32_t pin) {
if (pwm_status(pin)) {
//uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative;
//SERIAL_ECHOPAIR("PWM = ", duty);
//SERIAL_ECHOPGM("PWM = ", duty);
}
}

View File

@ -31,13 +31,13 @@
// Local defines
// --------------------------------------------------------------------------
#define NUM_HARDWARE_TIMERS 8
#define NUM_HARDWARE_TIMERS 9
// --------------------------------------------------------------------------
// Private Variables
// --------------------------------------------------------------------------
const tTimerConfig TimerConfig[NUM_HARDWARE_TIMERS+1] = {
const tTimerConfig timer_config[NUM_HARDWARE_TIMERS] = {
{ {.pTc=TC0}, TC0_IRQn, TC_PRIORITY(0) }, // 0 - stepper (assigned priority 2)
{ {.pTc=TC1}, TC1_IRQn, TC_PRIORITY(1) }, // 1 - stepper (needed by 32 bit timers)
{ {.pTc=TC2}, TC2_IRQn, 5 }, // 2 - tone (reserved by framework and fixed assigned priority 5)
@ -67,13 +67,13 @@ FORCE_INLINE void Disable_Irq(IRQn_Type irq) {
// --------------------------------------------------------------------------
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
IRQn_Type irq = TimerConfig[timer_num].IRQ_Id;
IRQn_Type irq = timer_config[timer_num].IRQ_Id;
// Disable interrupt, just in case it was already enabled
Disable_Irq(irq);
if (timer_num == RTC_TIMER_NUM) {
Rtc * const rtc = TimerConfig[timer_num].pRtc;
if (timer_num == MF_TIMER_RTC) {
Rtc * const rtc = timer_config[timer_num].pRtc;
// Disable timer interrupt
rtc->MODE0.INTENCLR.reg = RTC_MODE0_INTENCLR_CMP0;
@ -101,13 +101,13 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
SYNC(rtc->MODE0.SYNCBUSY.bit.ENABLE);
}
else {
Tc * const tc = TimerConfig[timer_num].pTc;
Tc * const tc = timer_config[timer_num].pTc;
// Disable timer interrupt
tc->COUNT32.INTENCLR.reg = TC_INTENCLR_OVF; // disable overflow interrupt
// TCn clock setup
const uint8_t clockID = GCLK_CLKCTRL_IDs[TCC_INST_NUM + timer_num]; // TC clock are preceeded by TCC ones
const uint8_t clockID = GCLK_CLKCTRL_IDs[TCC_INST_NUM + timer_num]; // TC clock are preceded by TCC ones
GCLK->PCHCTRL[clockID].bit.CHEN = false;
SYNC(GCLK->PCHCTRL[clockID].bit.CHEN);
GCLK->PCHCTRL[clockID].reg = GCLK_PCHCTRL_GEN_GCLK0 | GCLK_PCHCTRL_CHEN; // 120MHz startup code programmed
@ -141,17 +141,17 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
}
// Finally, enable IRQ
NVIC_SetPriority(irq, TimerConfig[timer_num].priority);
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 = TimerConfig[timer_num].IRQ_Id;
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 = TimerConfig[timer_num].IRQ_Id;
const IRQn_Type irq = timer_config[timer_num].IRQ_Id;
Disable_Irq(irq);
}
@ -161,7 +161,7 @@ static bool NVIC_GetEnabledIRQ(IRQn_Type IRQn) {
}
bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
const IRQn_Type irq = TimerConfig[timer_num].IRQ_Id;
const IRQn_Type irq = timer_config[timer_num].IRQ_Id;
return NVIC_GetEnabledIRQ(irq);
}

View File

@ -25,21 +25,22 @@
// --------------------------------------------------------------------------
// Defines
// --------------------------------------------------------------------------
#define RTC_TIMER_NUM 8 // This is not a TC but a RTC
typedef uint32_t hal_timer_t;
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
#define HAL_TIMER_RATE F_CPU // frequency of timers peripherals
#ifndef STEP_TIMER_NUM
#define STEP_TIMER_NUM 0 // Timer Index for Stepper
#define MF_TIMER_RTC 8 // This is not a TC but a RTC
#ifndef MF_TIMER_STEP
#define MF_TIMER_STEP 0 // Timer Index for Stepper
#endif
#ifndef PULSE_TIMER_NUM
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#ifndef MF_TIMER_PULSE
#define MF_TIMER_PULSE MF_TIMER_STEP
#endif
#ifndef TEMP_TIMER_NUM
#define TEMP_TIMER_NUM RTC_TIMER_NUM // Timer Index for Temperature
#ifndef MF_TIMER_TEMP
#define MF_TIMER_TEMP MF_TIMER_RTC // Timer Index for Temperature
#endif
#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency
@ -52,30 +53,29 @@ typedef uint32_t hal_timer_t;
#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(STEP_TIMER_NUM)
#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(STEP_TIMER_NUM)
#define STEPPER_ISR_ENABLED() HAL_timer_interrupt_enabled(STEP_TIMER_NUM)
#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(TEMP_TIMER_NUM)
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
#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 == STEP_TIMER_NUM || t == PULSE_TIMER_NUM) ? 2 \
: (t == TEMP_TIMER_NUM) ? 6 \
: 7
#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(STEP_TIMER_NUM)
#define HAL_STEP_TIMER_ISR() TC_HANDLER(MF_TIMER_STEP)
#endif
#if STEP_TIMER_NUM != PULSE_TIMER_NUM
#define HAL_PULSE_TIMER_ISR() TC_HANDLER(PULSE_TIMER_NUM)
#if MF_TIMER_STEP != MF_TIMER_PULSE
#define HAL_PULSE_TIMER_ISR() TC_HANDLER(MF_TIMER_PULSE)
#endif
#if TEMP_TIMER_NUM == RTC_TIMER_NUM
#if MF_TIMER_TEMP == MF_TIMER_RTC
#define HAL_TEMP_TIMER_ISR() void RTC_Handler()
#else
#define HAL_TEMP_TIMER_ISR() TC_HANDLER(TEMP_TIMER_NUM)
#define HAL_TEMP_TIMER_ISR() TC_HANDLER(MF_TIMER_TEMP)
#endif
// --------------------------------------------------------------------------
@ -95,7 +95,7 @@ typedef struct {
// Public Variables
// --------------------------------------------------------------------------
extern const tTimerConfig TimerConfig[];
extern const tTimerConfig timer_config[];
// --------------------------------------------------------------------------
// Public functions
@ -104,20 +104,20 @@ extern const tTimerConfig TimerConfig[];
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 RTC_TIMER_NUM
Tc * const tc = TimerConfig[timer_num].pTc;
// 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 RTC_TIMER_NUM
Tc * const tc = TimerConfig[timer_num].pTc;
// 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 RTC_TIMER_NUM
Tc * const tc = TimerConfig[timer_num].pTc;
// Should never be called with timer MF_TIMER_RTC
Tc * const tc = timer_config[timer_num].pTc;
tc->COUNT32.CTRLBSET.reg = TC_CTRLBCLR_CMD_READSYNC;
SYNC(tc->COUNT32.SYNCBUSY.bit.CTRLB || tc->COUNT32.SYNCBUSY.bit.COUNT);
return tc->COUNT32.COUNT.reg;
@ -128,13 +128,13 @@ 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 == RTC_TIMER_NUM) {
Rtc * const rtc = TimerConfig[timer_num].pRtc;
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;
}
else {
Tc * const tc = TimerConfig[timer_num].pTc;
Tc * const tc = timer_config[timer_num].pTc;
// Clear interrupt flag
tc->COUNT32.INTFLAG.reg = TC_INTFLAG_OVF;
}

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