Compare commits

..

288 commits

Author SHA1 Message Date
Gonçalo Pereira
fbc2d2d726
Typo in MMU2 serial protocol description (#19949) 2020-11-13 01:23:05 -06:00
InsanityAutomation
1b0a5abd73
G34 Z stepper locking (#20091)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-12 22:54:18 -06:00
LinFor
99c377b4e4
Fix UTF filename scroll (#20121)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-12 22:49:19 -06:00
Jason Smith
288eb06708
UTF longname followup (#20115) 2020-11-12 22:26:49 -06:00
thinkyhead
eb3d6a5333 [cron] Bump distribution date (2020-11-13) 2020-11-13 00:10:25 +00:00
thinkyhead
37b56e09a3 [cron] Bump distribution date (2020-11-12) 2020-11-12 00:10:01 +00:00
Scott Lahteine
0cccc60409 Terse sanity messages 2020-11-11 16:58:54 -06:00
Scott Lahteine
2282801172
Add HOME_Z_FIRST option (#20113) 2020-11-11 16:58:34 -06:00
LinFor
f4e9f3654e
Fix MAX6675 SPI init, conflicts (#20086) 2020-11-11 16:27:45 -06:00
JoAnn Manges
40d442fde2
Fix MAX31865 on SPI (PT100/1000) support (#20074) 2020-11-11 15:52:35 -06:00
Hebezo
6ccb4b93b1
Option to ignore SD at startup (#20099)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-11 15:16:19 -06:00
Scott Lahteine
ddc23c6224 M32 followup 2020-11-11 14:39:39 -06:00
ellensp
7216b8f804
Fix compile with PLR, no fan (#20096) 2020-11-11 14:35:13 -06:00
Davidsg33k
bd6e60f56d
400 Z steps-per-mm (#20104) 2020-11-11 14:30:36 -06:00
LinFor
5b9aeb2e5f
Handle UTF in long filenames (#20087)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-11 14:14:39 -06:00
Costas Basdekis
0465e0ae3a
Distinct runout states (#19965)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-11 00:39:23 -06:00
Costas Basdekis
3b68e44d9a
Fix Linux GPIO logging (#20093)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-10 20:13:29 -06:00
ellensp
d4ba94479b
BTT driver expansion for SKR 1.3/1.4 (#20088)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-10 20:06:42 -06:00
Speaka
87ce545e15
Tramming Wizard wait position (#20063) 2020-11-10 19:41:21 -06:00
Victor Oliveira
f8ee6f8b31
Fix UI compile issues (#20092) 2020-11-10 19:39:34 -06:00
thinkyhead
f15fef90a9 [cron] Bump distribution date (2020-11-11) 2020-11-11 00:09:42 +00:00
Jason Smith
53e79224fc
Fix Arduino DUE compilation (#20058) 2020-11-10 03:32:08 -06:00
qwewer0
2abb674c87
What if 8 was 9? (#20076) 2020-11-10 03:27:34 -06:00
qwewer0
60aadd2a02
Update issues/support link (#20077)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-10 03:26:45 -06:00
Gustavo Alvarez
6ce1eeb4ae
Fix SKR E3 DIP pin CLCD_SPI_CS (#20078) 2020-11-10 03:22:08 -06:00
Tanguy Pruvot
a70fdfaeba
Fix 320x240 touch buttons Y (#20079) 2020-11-10 03:21:05 -06:00
Scott Lahteine
f17394d677 Ability to disable M32 2020-11-10 02:21:12 -06:00
thinkyhead
12ba2ad77e [cron] Bump distribution date (2020-11-10) 2020-11-10 00:11:19 +00:00
Scott Lahteine
59eca253e1 Simplified temp sensor conditionals 2020-11-09 01:17:37 -06:00
Hebezo
4ace02f4c2
Add POWER_OFF_DELAY option (#19987)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-08 18:37:41 -06:00
qwewer0
c753d2b7f4
Use extra G35 BLTouch HS Mode clearance in Tramming Wizard (#20057)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-08 18:31:14 -06:00
thinkyhead
d5fdc75c82 [cron] Bump distribution date (2020-11-09) 2020-11-09 00:11:21 +00:00
Alexander D. Kanevskiy
3c318d0dc7
POWER_LOSS_PIN for BTT SKR mini MZ / E3 2.0 (#20069) 2020-11-08 02:20:07 -06:00
Jason Smith
5013fdaf79
Fix tool-change servo index for E2 and up (#20060) 2020-11-08 02:15:30 -06:00
Scott Lahteine
06bf3ccfb7 Add alternative TERN macros 2020-11-07 22:19:25 -06:00
Scott Lahteine
dcb0f5dc3b Temperature 'autostart' => 'auto_job' 2020-11-07 21:21:19 -06:00
Scott Lahteine
18fb4b1ce1 MSG_AUTOSTART => MSG_RUN_AUTO_FILES 2020-11-07 21:21:19 -06:00
thinkyhead
45116128e8 [cron] Bump distribution date (2020-11-08) 2020-11-08 00:11:23 +00:00
Albert van Osch
7beebcd315
Zonestar Z8 XM2 support (#19991) 2020-11-07 16:59:19 -06:00
Scott Lahteine
883347bc11 Apply some pins formatting 2020-11-07 16:54:20 -06:00
Scott Lahteine
b5ef699523 TFT cleanup 2020-11-07 16:21:52 -06:00
LinFor
2da25d67e1
Fix Endstop Interrupts with SPI endstops, sanity checks (#20051)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-07 03:37:45 -06:00
Speaka
6954772ece
Tramming Wizard submenu option (#20000)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-07 03:20:27 -06:00
Victor Oliveira
2fdeceda58
Color UI single touch menu navigation (#20053) 2020-11-07 03:00:29 -06:00
Darren Horrocks
53cc8a0d6e
Optimized (non-optiboot) Melzi env (#20021)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-07 02:43:51 -06:00
Darren Horrocks
10fd9ed896
Anet 1.0 alternative graphical LCD wiring (#20022) 2020-11-07 02:42:14 -06:00
Scott Lahteine
bb7dbceb5c Add 'mfconfig' script used to manage configs 2020-11-07 02:39:02 -06:00
Jason Smith
a439892d7a
Sanity-check illegal native USB (#20047)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-07 00:48:17 -06:00
Jason Smith
bd872d5dcf
STM32F1 cleanup, incl. SoftwareSerial removal (#20046) 2020-11-06 23:51:52 -06:00
Jason Smith
bdfedf249a
Fix FYSETC S6 timer conflict (#20044) 2020-11-06 23:49:53 -06:00
George Fu
4785b04aa1
FYSETC E4 board support (#20032) 2020-11-06 23:48:52 -06:00
Scott Lahteine
8c052e43f1 Update some file headers 2020-11-06 23:46:56 -06:00
Victor Oliveira
85d094bbb4
Standardize Marlin SPI (part 1) (#19989) 2020-11-06 21:07:15 -06:00
Scott Lahteine
97d7af7a23 Use nullptr 2020-11-06 20:17:05 -06:00
Mauro
0a64f197d9
Fix E4d@box pins, stepper i2s (#20055) 2020-11-06 19:28:41 -06:00
Scott Lahteine
af75e24c2e Clean up corrected urls 2020-11-06 19:11:29 -06:00
thinkyhead
78e10d346a [cron] Bump distribution date (2020-11-07) 2020-11-07 00:10:42 +00:00
Marc Jovaní González
c574bcce88
Add Spanish translations (#20020) 2020-11-05 18:16:08 -06:00
Jason Smith
ce90447531
Fix 0 extruders & bed compile (#20030) 2020-11-05 18:15:29 -06:00
Sergey1560
f924344cc5
Don't close diveDir in fileExists (#20035) 2020-11-05 18:13:21 -06:00
thinkyhead
323b3a63d6 [cron] Bump distribution date (2020-11-06) 2020-11-06 00:10:33 +00:00
Jason Smith
077b9201ef
Fix BTT002 PeripheralPins PWM assignments (#20036) 2020-11-05 18:10:18 -06:00
Scott Lahteine
1f6612dfc4 Comment, spacing cleanup 2020-11-05 17:16:47 -06:00
Josh Schroeder
c43ca39ec2
Wiring warning for ANET_FULL_GRAPHICS_LCD on SKR 1.4 (#20011) 2020-11-04 21:15:25 -06:00
thinkyhead
0407828027 [cron] Bump distribution date (2020-11-05) 2020-11-05 00:10:28 +00:00
Victor
a1cce36c1e
FAST_PWM for STM32 (#20025) 2020-11-04 15:15:19 -06:00
Scott Lahteine
4fe1adc383 HAL support for 8s watchdog 2020-11-04 15:08:40 -06:00
thinkyhead
2a78fe0f81 [cron] Bump distribution date (2020-11-04) 2020-11-04 00:09:52 +00:00
Keith Bennett
ea5886c77d
Add note about TMC2225/6 (#20002) 2020-11-03 17:27:09 -06:00
Victor Oliveira
e9053654a7
Better Classic UI touch resolution (#20004) 2020-11-03 17:25:33 -06:00
Victor Oliveira
0be276482e
Show un-mounted media slot (#20005) 2020-11-03 17:21:15 -06:00
Scott Lahteine
7e55cbf798 DWIN cleanup, preserve Z offset 2020-11-03 17:18:05 -06:00
Victor Oliveira
f131f58124
Add a filament runout note (#19973)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-02 20:22:14 -06:00
thinkyhead
5a4a6285bb [cron] Bump distribution date (2020-11-03) 2020-11-03 00:09:58 +00:00
Victor Oliveira
e7ebb66200
Fix STM32 HW Serial + EP compile (#19990) 2020-11-01 20:38:10 -06:00
Victor Oliveira
5deca5a18f
Increase SPI Speed on LPC. Color and Classic UI for MKS SGEN L. (#19945) 2020-11-01 20:15:06 -06:00
thinkyhead
05033bb9d6 [cron] Bump distribution date (2020-11-02) 2020-11-02 00:09:42 +00:00
Alexander D. Kanevskiy
83097657d5
Y-center GLCD status logo, reorganize (#19954)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-01 17:44:46 -06:00
Victor Oliveira
12e8861a1c
Reset calibration screen touch timer on click (#19951) 2020-11-01 04:42:53 -06:00
Scott Lahteine
22bf2b49c6
Clean up SPI and ST7920 defines (#19956) 2020-11-01 04:40:59 -06:00
Jason Smith
4a39c8cd53
Get STM32 clock rates from framework (#19978)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-11-01 02:39:30 -06:00
thinkyhead
c05beb74a9 [cron] Bump distribution date (2020-11-01) 2020-11-01 00:10:34 +00:00
Alexander Semion
cd89fa141b
Add SPINDLE_SERVO option (#19971) 2020-10-31 17:42:05 -05:00
Victor Oliveira
76f4dd34e0
Put PIO "debug" build in the corner (#19975) 2020-10-31 17:14:10 -05:00
Nick
da60dcbf2e
Fix Chiron probe low point (#19962) 2020-10-31 16:54:31 -05:00
Scott Lahteine
368a581de9 Cutter power cleanup 2020-10-31 16:51:42 -05:00
Julien Lirochon
24c5259005 Fix SpindleLaser::cpwr_to_pct() maths (#19970) 2020-10-31 16:19:51 -05:00
Scott Lahteine
2110739138 Cutter enable inline at full power
Co-Authored-By: Luu Lac <45380455+shitcreek@users.noreply.github.com>
2020-10-31 16:17:48 -05:00
thinkyhead
a4a487b0cc [cron] Bump distribution date (2020-10-31) 2020-10-31 00:09:17 +00:00
thinkyhead
6071a0835a Fix bilinear_line_to_destination definition
See #19431
2020-10-30 00:18:46 -05:00
Orel
a272c019f9
Rename, adjust Dagoma F5 (#19947) 2020-10-29 20:02:29 -05:00
thinkyhead
dde86a4179 [cron] Bump distribution date (2020-10-30) 2020-10-30 00:10:04 +00:00
Scott Lahteine
f8d57370d0 gcode_D EEPROM size, cleanup
Fixes #19920

Co-Authored-By: Orel <37673727+0r31@users.noreply.github.com>
2020-10-29 17:34:17 -05:00
Victor
de315c97b1
FAST_PWM for STM32F1 (#19952) 2020-10-29 17:17:04 -05:00
Giuliano Zaro
1247f73754
Update Italian language (#19953) 2020-10-29 16:27:01 -05:00
Victor Oliveira
50ba20fe1f
PIO env for MKS Nano boards in STM32 (#19905) 2020-10-29 02:01:25 -05:00
Marcio Teixeira
b6856dcb99 Improvement and fixes to FTDI touch UI
- Fixed incorrect LCD text string
- Fixed incorrect refresh of filament change screens
- Allow host control via touch UI
- Updates to leveling menu
- Modified ExtUI::isPrinting() to check if the job timer is running
- Added ExtUI method to check whether a host print is paused
2020-10-29 01:14:15 -05:00
Scott Lahteine
54ec6a0ce2 Tweak code formatting 2020-10-29 01:14:15 -05:00
Victor Oliveira
dca7c5d1ad
Color UI for MKS SGen-L V2 (#19919) 2020-10-29 00:52:50 -05:00
Scott Lahteine
7473241438 .bin and .woff are binary 2020-10-29 00:49:18 -05:00
Scott Lahteine
be0c9ff705 Fix comments, spacing 2020-10-29 00:49:18 -05:00
Scott Lahteine
3f644b6275 Add a note about substitution chars 2020-10-29 00:21:41 -05:00
Victor Oliveira
838220e4b3
Keep SPI active on LPC176x (#19932) 2020-10-28 23:47:12 -05:00
Victor Oliveira
18a5000718
Permit spaces in dependencies g++ path (#19929) 2020-10-28 23:45:10 -05:00
thinkyhead
21674b2879 [cron] Bump distribution date (2020-10-29) 2020-10-29 00:16:59 +00:00
Alexander Fomichev
12dec2563a
Generalize BTT SKR E3-DIP version (#19910) 2020-10-27 21:59:22 -05:00
ellensp
603e4d66ac
AZTEEG X5 mini LED pins (#19909) 2020-10-27 21:57:32 -05:00
Gurmeet Athwal
90fcb82a3e
Update ExtUI path in config comment (#19908) 2020-10-27 21:55:49 -05:00
Victor Oliveira
94a6844521
Color UI circular task queue (#19918) 2020-10-27 21:54:30 -05:00
Jason Smith
bdb3f1ae2f
Fix LCD menus + DAC (#19907) 2020-10-27 21:40:12 -05:00
Orel
e3f1f7cd85
Fix DAC-related bugs (#19921)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-27 21:37:10 -05:00
Lucas Seiki Oshiro
c0b4f4eb47
"Sound: ON/OFF" menu item (#19901)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-27 20:41:12 -05:00
thinkyhead
68ef3ac675 [cron] Bump distribution date (2020-10-28) 2020-10-28 00:16:40 +00:00
Speaka
2cae26ee35
Fix G35 PROGMEM strings (#19926) 2020-10-27 17:25:01 -05:00
Scott Lahteine
83aa3dbfa6 Archim test matching env 2020-10-27 17:21:54 -05:00
Scott Lahteine
82ac8a1e76 Fix Archim 1, add Archim 1&2 tests 2020-10-27 16:21:03 -05:00
Victor Oliveira
c60696dbae
Keep watchdog refreshed in LVGL init (#19900) 2020-10-27 15:16:35 -05:00
Victor Oliveira
75b0e3246a
Fix some LVGL bugs (#19904) 2020-10-27 15:09:19 -05:00
Marcio Teixeira
a74e82fbae Fix NO_WORKSPACE_OFFSETS compile 2020-10-27 15:05:30 -05:00
thinkyhead
8cf672104e [cron] Bump distribution date (2020-10-27) 2020-10-27 00:16:29 +00:00
thinkyhead
8bdde8d7a0 [cron] Bump distribution date (2020-10-26) 2020-10-26 00:16:36 +00:00
Scott Lahteine
c4f3f67537 Followup for BTN_ENC_EN 2020-10-25 04:19:59 -05:00
Scott Lahteine
ec23e37a4a Clean up comments, USB flash, NULLs 2020-10-25 04:10:00 -05:00
Scott Lahteine
00fbe50bbe Format Nucleo F767ZI pins 2020-10-25 04:07:15 -05:00
ellensp
2e48d6cf70
Fix PASSWORD compile w/out LCD (#19888) 2020-10-25 03:46:21 -05:00
René Pasold
ec04517710
Support Fysetc Mini 12864 + GT2560 A(+) (#19878) 2020-10-25 03:43:21 -05:00
ellensp
8cc0369d97
Use LiquidCrystal_I2C@1.1.4 for RA_CONTROL_PANEL (#19875) 2020-10-24 19:46:27 -05:00
Jason Smith
f7cdc05937
Update ZMIB_V2 env names (#19886) 2020-10-24 19:44:46 -05:00
Jason Smith
ea0afd0b4d
Ignore NativeEthernet on AT90USB1286 (#19885) 2020-10-24 19:43:42 -05:00
Gurmeet Athwal
62ba799d72
Add 'BTN_ENC_EN' for SKR V1.4 with DOGM (#19796) 2020-10-24 19:41:52 -05:00
thinkyhead
b6508c4bd1 [cron] Bump distribution date (2020-10-25) 2020-10-25 00:16:51 +00:00
Victor Oliveira
853d01de68
More LVGL UI code reduction (#19879) 2020-10-24 17:28:31 -05:00
Nick
311b65b225
Fix Anycubic Chiron "Ready" detection (#19880)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-24 16:48:29 -05:00
Victor Oliveira
b632b52b11
Update PIO dependencies script 2020-10-24 16:25:14 -05:00
Victor Oliveira
9630c2683c
More MKS UI cleanup, optimization (#19869)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-23 23:37:45 -05:00
Keith Bennett
f53d5a0872
Fix Chitu V5/V6 FAN2 pins (#19874) 2020-10-23 23:29:58 -05:00
Scott Lahteine
5917b5cf5c Fix warning in gcode_D 2020-10-23 19:25:32 -05:00
thinkyhead
2a6d48bf9e [cron] Bump distribution date (2020-10-24) 2020-10-24 00:16:09 +00:00
Scott Lahteine
0967c87a8f
Pins post-process header (#19860) 2020-10-23 14:52:59 -05:00
Scott Lahteine
0ffee29a11
Case light brightness cleanup (#19856)
Co-authored-by: Chris <chris@chrisnovoa.com>
2020-10-22 22:31:48 -05:00
Scott Lahteine
c75e98dc84 Shorten a method name 2020-10-22 20:54:11 -05:00
qwewer0
c7f7f2403d
Fix Chopper Timing extra axis defaults (#19850) 2020-10-22 20:46:48 -05:00
Scott Lahteine
4533a197d5
Slim down MKS UI code (#19843) 2020-10-22 20:22:17 -05:00
thinkyhead
1ed853f5d6 [cron] Bump distribution date (2020-10-23) 2020-10-23 00:16:15 +00:00
George Fu
f83bbce3a3
Fix TMC serial port for FYSETC AIO_II (#19842) 2020-10-22 06:29:29 -05:00
ManuelMcLure
4fccb92e07
Configure TMC interpolation per driver (#19828) 2020-10-22 06:27:33 -05:00
thinkyhead
ec596315bd [cron] Bump distribution date (2020-10-22) 2020-10-22 00:16:17 +00:00
Foxies
9aee6674bb
FLSUN Delta QQS-Pro pins (#19793) 2020-10-21 19:00:57 -05:00
Scott Lahteine
7d64de646a
Add power-on/off G-code options (#19837)
Co-authored-by: Chris <chris@chrisnovoa.com>
2020-10-21 15:03:11 -05:00
Keith Bennett
1e4691f02a
BigTreeTech SKR Mini MZ V1 (#19818) 2020-10-21 14:14:19 -05:00
Mauro
4fe4fb0585
Fresh Web GUI (based on bootstrap.js) (#19812) 2020-10-21 13:51:14 -05:00
TheMichalcinOfficial
cf74248949
Support for Ramps-S v1.2 (#19815) 2020-10-21 13:44:55 -05:00
Scott Lahteine
072f996af7
General cleanup, mostly MKS UI (#19825) 2020-10-21 12:45:27 -05:00
Scott Lahteine
1f7c085527 ESP32: i2s_init requires I2S_STEPPER_STREAM 2020-10-20 22:36:31 -05:00
uwedamm
a596969049
Fix G2/G3 P<circles> E and Z motion (#19797)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-20 20:26:07 -05:00
thinkyhead
11badea962 [cron] Bump distribution date (2020-10-21) 2020-10-21 00:16:12 +00:00
Tanguy Pruvot
d04ec15849
Longer3D: LONGER_LK_TFT28 now set by config (#19817) 2020-10-20 15:06:06 -05:00
ellensp
69d55cabd4
Handle dependent Stepper Driver defaults later (#19820)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-20 15:01:46 -05:00
bilsef
9baa944460
Teensy 4.1 Ethernet support (#19801) 2020-10-20 14:35:29 -05:00
Scott Lahteine
92767f5513 Misc. cleanup, serial strings 2020-10-19 20:39:36 -05:00
thinkyhead
b320b1a3c2 [cron] Bump distribution date (2020-10-20) 2020-10-19 20:39:36 -05:00
Scott Lahteine
35b9e9b4a5 Tweak a host prompt call 2020-10-19 20:39:36 -05:00
Scott Lahteine
21ce39aa9b Use PGM serial strings 2020-10-19 04:25:48 -05:00
ellensp
ea80b2c8fc
Ensure A4988 for unspecified driver type (#19798)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-19 03:16:02 -05:00
Scott Lahteine
f501930728 Document M125 P 2020-10-19 00:38:11 -05:00
thinkyhead
8285953c1b [cron] Bump distribution date (2020-10-19) 2020-10-19 00:16:11 +00:00
InsanityAutomation
6375829448
Apply home offsets to probing, Z Safe Homing (#19423)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-18 15:53:12 -05:00
Scott Lahteine
b0f0dc683d ABM Teensy 3.6 build 2020-10-18 00:20:25 -05:00
Jago Strong-Wright
c2802d35bb
Distinct Chopper Timing settings (#19781)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2020-10-17 22:35:19 -05:00
thinkyhead
2693d0eb27 [cron] Bump distribution date (2020-10-18) 2020-10-18 00:16:03 +00:00
Sten Uusvali
6fed11896b
Fix M503 output for M907 motor current (#19777)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2020-10-17 16:11:22 -05:00
Curtis Jenkins
178721a329
Fix Smoothieboard digipots i2c pin (#19784) 2020-10-17 15:05:50 -05:00
Scott Lahteine
263f29a96a MarlinUI followup 2020-10-16 20:48:59 -05:00
Scott Lahteine
e99f967372 Starting fan followup 2020-10-16 20:38:30 -05:00
Victor Oliveira
313efa33ae
Fix starting fan with bad material preset index (#19773) 2020-10-16 20:05:45 -05:00
Scott Lahteine
eaf6777a66 Rename ultralcd => marlinui 2020-10-16 19:55:18 -05:00
Scott Lahteine
0f6fc48f85 touch_ms followup 2020-10-16 19:55:18 -05:00
thinkyhead
1e13a7161a [cron] Bump distribution date (2020-10-17) 2020-10-17 00:15:41 +00:00
arminth
3ed0b24831
Provide FYSETC F6 13 LCD pins for HD44780 (#19769) 2020-10-16 17:07:34 -05:00
Jason Smith
050ba0e0a0
LCD conditionals followup (#19766) 2020-10-16 17:04:10 -05:00
nb-rapidia
418b3e5ee2
Fix IDEX layer shift and DIR states (#19756)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-16 16:59:55 -05:00
Serhiy-K
aa901ac4a2
Fix HAL/STM32 FastIO for analog pins (#19735) 2020-10-16 16:21:21 -05:00
Victor Oliveira
0b80841c38
Fix Color UI external_control, wait_for_release (#19771)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-16 16:19:48 -05:00
Victor Oliveira
e370834c35
Handle M410 in the main task (#19752) 2020-10-16 16:11:00 -05:00
Jason Smith
9b9cd698a5
Fix SAMD Serial name macro (#19765) 2020-10-16 16:04:51 -05:00
mks-viva
a4b89e67c6
Update MKS SGen-L V2 RGB LED pins (#19762) 2020-10-16 02:16:09 -05:00
Andreas Setterlind
814db9d7c9
Add ESP32 160MHz to README (#19748) 2020-10-16 02:06:05 -05:00
Jason Smith
7f83231385
Fix NUCLEO_F767ZI build, add tests (#19746) 2020-10-16 02:04:55 -05:00
Victor Oliveira
5247bb11f7
Sanity check unsupported EP (#19745) 2020-10-16 02:03:45 -05:00
thinkyhead
763544585a [cron] Bump distribution date (2020-10-16) 2020-10-16 00:15:39 +00:00
Victor Oliveira
8a885dc61b
Fix TOUCH_SCREEN + TFT_LVGL_UI compile (#19754) 2020-10-15 18:38:27 -05:00
Victor Oliveira
f74b5a6b9b
Update Probe Offset Wizard for Color UI (#19742) 2020-10-15 14:15:11 -05:00
rlojek
72e3238c3f
Fix ADVANCED_PAUSE && !PREVENT_COLD_EXTRUSION (#19740) 2020-10-15 13:44:57 -05:00
Peter Hall
f86c6851fc
Default LASER_POWER_INLINE to OFF (#19727) 2020-10-15 13:18:43 -05:00
Scott Lahteine
f6ffbe548c
TFT Presets, Generic options, Sanity checks (#19723) 2020-10-15 03:00:27 -05:00
thinkyhead
04c27573d6 [cron] Bump distribution date (2020-10-15) 2020-10-15 00:15:10 +00:00
Jason Smith
9a23fb5863
Fix SET_SOFT_ENDSTOP_LOOSE w/out soft endstops (#19734) 2020-10-14 13:50:03 -05:00
Jason Smith
90d364fc37
Revert at90usb1286 conditional (#19733) 2020-10-14 13:48:46 -05:00
Jason Smith
79d51581ba
Fix digipot compilation (#19731) 2020-10-14 13:44:03 -05:00
Jason Smith
9507c49b18
Fix mega2560ext environment (#19730) 2020-10-14 13:43:36 -05:00
thinkyhead
87b07d6f2f [cron] Bump distribution date (2020-10-14) 2020-10-14 00:15:03 +00:00
Keith Bennett
64711e0d56
If needed, home before G34 (#19713) 2020-10-13 18:13:25 -05:00
Victor Oliveira
bf33b2f862
Watchdog Refresh for LVGL Asset Load (#19724) 2020-10-13 18:12:34 -05:00
Jason Smith
54315252c7
Add NUCLEO-F767ZI dev board (#19373)
Co-authored-by: Lorenzo Delana <lorenzo.delana@gmail.com>
2020-10-13 18:03:09 -05:00
Scott Lahteine
733eb127e9 Simple bool in soft_endstops_t 2020-10-13 14:55:14 -05:00
Victor Oliveira
2132efa981
TFT followup fixes (#19710) 2020-10-13 11:58:50 -05:00
thinkyhead
da79674f84 [cron] Bump distribution date (2020-10-13) 2020-10-13 00:15:19 +00:00
Scott Lahteine
ae36ed3903 Move @section temperature 2020-10-12 18:02:25 -05:00
Victor Oliveira
cc4db8e4a9
Fix UTF8 handling for Color UI (#19708) 2020-10-12 18:01:03 -05:00
Keith Bennett
f9f8fd37de
Sanity-check mutually-exclusive G34 features (#19706) 2020-10-12 16:52:56 -05:00
Earle F. Philhower, III
193c0a52d9
Add loose soft endstop state, apply to UBL fine-tune (#19681)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-12 16:48:04 -05:00
Jason Smith
f5139f8bf4
Add D100 Watchdog Test (#19697) 2020-10-12 16:39:31 -05:00
Victor Oliveira
c0920bbf6a
TFT Refactoring (#19192)
* split tft folder in two: tft for color ui; tft_io for shared tft code

* after the files got moved, now the code was moved to the right place

* classic ui using TFT IO init lcd codes

* feature to compile tft_io when enabled

* compiling fix

* lvgl spi tft working with tft io init codes

* there is no need for separeted fsmc and spi class in lvgl anymore, as tft io handle everything

* remove debug

* base for TFT rotation and mirroring API, and ILI9488 support

* ST7796S rotate and mirror support

* ST7789V rotate and mirror support

* ST7735 rotate and mirror support

* ILI9341 rotate and mirror support

* ILI9328 rotate and mirror support

* R61505 rotate and mirror support

* MKS TFT definitions

* more configs for mks tfts

* update config

* naming typo

* to configure the user interface

* ANYCUBIC_TFT35

* tft configs

* support for SSD1963

* tft display types

* updated conditionals lcd; first board fully working with the new code - all 3 ui!

* compatiblity

* changed name

* move classic ui file name

* rename TURN -> ROTATE

* GRAPHICAL_TFT_ROTATE_180 deprecated

* first fsmc board fully working - chitu v5

* mks robin nano v1.2 + tft 35 ok!

* right pin name

* anycubic tft tested in a TRIGORILLA_PRO

* chitu v6

* nano 32 tft orientation

* mks tft43

* mks tft43 rotation

* fixed LONGER LK tft setup

* GRAPHICAL_TFT_UPSCALE defined by the display type

* better offsets defaults

* Update Configuration.h

* Update tft_fsmc.cpp

* Update Conditionals_LCD.h

* Tweak comments

* update nano tests

* Revert "update nano tests"

This reverts commit a071ebbfad30e28855a4a5695ec8a726542a1a65.

* default tft

* outdated comments

* to not break non-vscode builds

* upscale tft 35

* support tft 180 rotation for color ui

* Each TFT Driver is responsible for its default color mode.

* use auto detect in mks displays, because some of them could be shipped with diferent drivers

* extra s

* unused code

* wrong -1

* missing mirror options

* Smaller regex pattern

* Comment updates

* Clean up old defines

* Apply pins formatting

* GRAPHICAL_TFT_ROTATE_180 => TFT_ROTATE_180

* MKS_ROBIN_TFT_V1_1R

* merge fix

* correct resolution

* auto is default, dont need be there, and it will allow the user to configure it even for named displays

* to not use rotation with MKS_ROBIN_TFT_V1_1R

* i like () in macros

* avoid sleepy commits

* default for st7789 is rgb

* nano follow up

* to allow ili9328 rotation

* default is rgb

* boards merge follow up

* to match bootloader orientation

* HAS_TOUCH_XPT2046 is not hal specific anymore

* lets not forget LPC

* 180 rotation for ili9328 and R61505

* Clean up whitespace

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2020-10-12 16:38:07 -05:00
Scott Lahteine
bcf65aa503
Fix screen click reading too often (#19696)
Co-authored-by: andreibobirica <39415547+andreibobirica@users.noreply.github.com>
2020-10-12 00:59:30 -05:00
Jason Smith
a866a758cc
Allow MAX31865 resistance values configuration (#19695) 2020-10-12 00:40:39 -05:00
InsanityAutomation
e7838c5f79
G34 Mechanical Gantry Calibration (like Prusa M915) (#18972)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-11 21:34:27 -05:00
qwewer0
f21b91f1a7
Add REPORT_TRAMMING_MM option (#19682)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-11 21:30:18 -05:00
Jason Smith
edda32e6b4
Fix motion compile w/out probe-oriented settings (#19684) 2020-10-11 19:42:50 -05:00
Victor Oliveira
639b0b8f50
Option to prevent (extra) Watchdog init on STM32 (#19693) 2020-10-11 19:31:21 -05:00
Victor Oliveira
18dd0d00a6
Implement wait_for_user for Color UI (#19694) 2020-10-11 19:26:16 -05:00
Jason Smith
24fd19259d
Fix I2C_ADDRESS sign warning (#19685) 2020-10-11 19:23:23 -05:00
thinkyhead
bdd555990b [cron] Bump distribution date (2020-10-12) 2020-10-12 00:15:08 +00:00
Jason Smith
c762b7c91b
Fix various errors, warnings in example config builds (#19686)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-11 19:06:57 -05:00
Jason Smith
45731bd022
Fix at90usb1286 build (#19687)
* Skip check for USBCON during dependency detection
* Ignore incompatible Teensy_ADC library, which requires Teensy >= 3
* Add IS_AT90USB

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-11 18:13:01 -05:00
Scott Lahteine
492ba2a111
Digipots refactor / cleanup (#19690) 2020-10-11 14:58:35 -05:00
thinkyhead
349465b168 [cron] Bump distribution date (2020-10-11) 2020-10-11 00:15:24 +00:00
Scott Lahteine
98427ea92a Save PLR on resume from pause (#19676)
Co-Authored-By: shahab <32130261+SHBnik@users.noreply.github.com>
2020-10-10 12:09:44 -05:00
Victor Oliveira
a90edd5eb4
Restore correct STM32 port-bits code (#19678) 2020-10-10 11:47:28 -05:00
Serhiy-K
6fdaaf3d20 Fixes for TFTGLCD Panel, FastIO (#19614) 2020-10-10 05:08:01 -05:00
ellensp
406f8363bc
HAS_CHARACTER_LCD => HAS_MARLINUI_HD44780 (#19673) 2020-10-10 04:39:12 -05:00
Victor Oliveira
8e03a4cb93
Keep HAL tasks running during PID Autotune (#19671) 2020-10-09 23:35:41 -05:00
thinkyhead
1403260487 [cron] Bump distribution date (2020-10-10) 2020-10-10 00:14:40 +00:00
Scott Lahteine
6831341ab4 Batch appercase hex values 2020-10-09 16:55:27 -05:00
Scott Lahteine
0988af453c
Optional M42/M226; Add more features filters (#19664) 2020-10-09 16:42:23 -05:00
Victor Oliveira
631457ffea Support for Debug Codes - Dnnn (#19225)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-09 06:28:53 -05:00
石立枫
bec1844954
Support for FLY MINI (#19185) 2020-10-09 06:09:27 -05:00
Keith Bennett
e6d0a8ef66
Fix touch ifndefs (#19661) 2020-10-09 02:52:06 -05:00
Giuliano Zaro
70ab146cbb
Update Italian language (#19654) 2020-10-09 02:51:25 -05:00
thinkyhead
33b2e12886 [cron] Bump distribution date (2020-10-09) 2020-10-09 00:14:12 +00:00
Samantaz Fox
1de29026d5
Fix and improve Makefile / CMake (#19640) 2020-10-08 18:40:54 -05:00
Scott Lahteine
854af7a4bf Permit touch calibration override 2020-10-08 16:59:54 -05:00
Scott Lahteine
f72c559824 Use 0xFF (not 'ff') for byte transfer 2020-10-08 15:18:43 -05:00
ellensp
321afd5fef
Apply env:mega2560ext to relevant boards (#19624) 2020-10-08 02:30:31 -05:00
qwewer0
91df2bea80
Update PROBE_OFFSET_WIZARD comment (#19652) 2020-10-07 20:43:08 -05:00
thinkyhead
5de2946999 [cron] Bump distribution date (2020-10-08) 2020-10-08 00:12:06 +00:00
qwewer0
c650b752f1
More accessible PROBE_OFFSET_WIZARD (#19647) 2020-10-07 13:01:01 -05:00
ellensp
c12f41ec6f
Restore ° to 6x9 small info font (#19645) 2020-10-07 13:00:08 -05:00
Scott Lahteine
2c6ec0c999 Chamber vent/fan followup 2020-10-06 19:42:11 -05:00
Scott Lahteine
f1e563d8cf Fix small font section directive, mixer warning 2020-10-06 19:18:00 -05:00
thinkyhead
6de179eb7d [cron] Bump distribution date (2020-10-07) 2020-10-07 00:14:42 +00:00
Scott Lahteine
584ffc6f52 Update language fonts 2020-10-06 18:37:32 -05:00
ladismrkolj
2c99c1e06f
Add Chamber servo vent, auto fan (#19519) 2020-10-06 18:36:01 -05:00
signetica
f95a2f6d91
Fix Ender-3 V2 DWIN Stop SD Print (#19642)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-06 16:58:28 -05:00
Scott Lahteine
b31e358270 Improve retract / unretract labels 2020-10-06 03:01:28 -05:00
thinkyhead
673835e5d9 [cron] Bump distribution date (2020-10-06) 2020-10-06 00:14:30 +00:00
Scott Lahteine
f5bae208cc Trailing whitespace 2020-10-05 17:16:42 -05:00
Scott Lahteine
c25c31b1de Sync config to examples 2020-10-05 17:16:42 -05:00
Mathew Winters
343441d746
Z Probe Offset Wizard (#18866) 2020-10-05 00:31:20 -05:00
Cory Ory
78fc4c8947
Allow bypass for cold E movement (#19606) 2020-10-04 19:51:21 -05:00
thinkyhead
86165ceca5 [cron] Bump distribution date (2020-10-05) 2020-10-05 00:14:33 +00:00
Ryan V1
8989353fab
Fix Archim1 stepper timing (with new variant) (#19596) 2020-10-04 17:41:41 -05:00
Scott Lahteine
7e0524109e Add HAS_FAST_MOVES 2020-10-04 17:31:10 -05:00
ellensp
d88e694d06
Fix Z_AFTER_HOMING without probe (#19607) 2020-10-04 16:47:06 -05:00
Scott Lahteine
44d50c2bd3 Move SF_ARC_FIX option 2020-10-04 15:46:00 -05:00
Speaka
58548f5051
Fix German translation purging/unloading (#19615) 2020-10-04 14:50:12 -05:00
Scott Lahteine
782eabc226 Shared singlenozzle item 2020-10-04 14:47:06 -05:00
Scott Lahteine
0ff3ae3cc6 Fix Tune/Fan edit items
- Fixes #19617
- Followup to #18400
2020-10-04 14:29:44 -05:00
thinkyhead
8088c7dcd5 [cron] Bump distribution date (2020-10-04) 2020-10-04 00:14:30 +00:00
thinkyhead
604d10d307 [cron] Bump distribution date (2020-10-03) 2020-10-03 00:14:05 +00:00
Ryan V1
8dcc72ce9c
Fix 'bossac' upload on Windows (#19545) 2020-10-02 17:31:33 -05:00
Marcio T
d06bcd6dd3
Touch UI support for X2, Y2 and Z2 (#19538) 2020-10-02 17:30:32 -05:00
ellensp
b3c2ee56f9
Fix wrappers on HAL/STM32F1 .cpp files (#19581)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-02 17:28:08 -05:00
ellensp
435e98ceed
Fix TEMP_ADC_PROBE support for STM32F1 (#19582)
Co-authored-by: ellensp <ellensp@ellensp-HP-ProBook-6470b.fritz.box>
2020-10-02 17:19:43 -05:00
Andreas Setterlind
7d21dfc938
Add Configurations repo info to config/README.md (#19583)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2020-10-02 17:16:55 -05:00
ellensp
2e1ba73926
Fix compile of MMU2 with S-mode disabled (#19584) 2020-10-02 17:12:17 -05:00
bilsef
e8a62ee3cf
Fix onboard SD card support for Teensy 3.6 & 4.1 (#19593) 2020-10-02 17:08:50 -05:00
Scott Lahteine
4e8eea8e78 Adjust HAL platform defines, comments 2020-10-02 17:05:59 -05:00
Scott Lahteine
d83baf8925 Replace tabs with spaces 2020-10-02 17:05:59 -05:00
Victor Oliveira
348570fd68 Minor SPI fixes, systick_callback for STM32F1 HAL compatibility (#19565) 2020-10-01 20:54:22 -05:00
thinkyhead
cf61562196 [cron] Bump distribution date (2020-10-02) 2020-10-02 00:13:10 +00:00
swissnorp
d02d7a95d1
G35 workaround for Pronterface "feature" (#19577) 2020-10-01 18:17:11 -05:00
Stéphane
ba07c26761
Fix Anycubic i3 Mega target temperature display (#19572)
Also includes a workaround for missing (probably un-fetched) long name in file listing
2020-10-01 18:09:39 -05:00
Ilya
e56295851f
No move on Park = No move on Resume (#19569) 2020-10-01 17:51:11 -05:00
Roman Moravčík
f7d93dadeb
Update Slovak language (#19561) 2020-10-01 17:47:24 -05:00
Victor Oliveira
5c87762f9e
Fix Buzzer (pin) init for uninitialized FastIO (#19559) 2020-09-30 20:14:19 -05:00
Victor Oliveira
ea78514ff3
Fix Move Screen with disabled Touch (#19558) 2020-09-30 20:06:32 -05:00
thinkyhead
2616feb3df [cron] Bump distribution date (2020-10-01) 2020-10-01 00:14:15 +00:00
thinkyhead
f4255b14e8 [cron] Bump distribution date (2020-09-30) 2020-09-30 00:13:59 +00:00
743 changed files with 16595 additions and 16856 deletions

2
.gitattributes vendored
View file

@ -17,3 +17,5 @@
*.png binary
*.jpg binary
*.fon binary
*.bin binary
*.woff binary

View file

@ -1,59 +0,0 @@
---
name: Bug report
about: Report a bug in Marlin
title: "[BUG] (short description)"
labels: ''
assignees: ''
---
<!--
Please follow the instructions below. Failure to do so may result in your issue being closed.
### Before Reporting a Bug
1. Test with the `bugfix-2.0.x` branch to see whether the issue still exists.
2. Get troubleshooting help from the Marlin community to confirm it's a bug and not just a configuration error. Links at https://github.com/MarlinFirmware/Marlin/issues/new/choose
### Instructions
1. Fill out every section of the template below.
2. Always attach configuration files, regardless of whether you think they are involved.
3. Read and understand Marlin's Code of Conduct. By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md
-->
### Bug Description
<!-- Describe the bug in this section. (You can remove this invisible comment.) -->
### Configuration Files
**Required:** Include a ZIP file containing `Configuration.h` and `Configuration_adv.h`.
If you've made any other modifications describe them in detail here.
### Steps to Reproduce
<!-- Describe the steps needed to reproduce the issue. (You can remove this invisible comment.) -->
1. [First Step]
2. [Second Step]
3. [and so on...]
**Expected behavior:**
<!-- Describe what you expected to happen here. (You can remove this invisible comment.) -->
**Actual behavior:**
<!-- Describe what actually happens here. (You can remove this invisible comment.) -->
#### Additional Information
* Provide pictures or links to videos that clearly demonstrate the issue.
* See [Contributing to Marlin](https://github.com/MarlinFirmware/Marlin/blob/2.0.x/.github/contributing.md) for additional guidelines.

View file

@ -1,17 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: Marlin Documentation
url: http://marlinfw.org/
about: Lots of documentation on installing and using Marlin.
- name: MarlinFirmware Facebook group
url: https://www.facebook.com/groups/1049718498464482
about: Please ask and answer questions here.
- name: Marlin on Discord
url: https://discord.gg/n5NJ59y
about: Join the Discord server for support and discussion.
- name: Marlin Discussion Forum
url: http://forums.reprap.org/list.php?415
about: A searchable web forum hosted by RepRap dot org.
- name: Marlin Videos on YouTube
url: https://www.youtube.com/results?search_query=marlin+firmware
about: Tutorials and more from Marlin users all around the world. Great for new users!

View file

@ -1,35 +0,0 @@
---
name: Feature request
about: Request a Feature
title: "[FR] (feature request title)"
labels: 'T: Feature Request'
assignees: ''
---
<!--
Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md
Do you want to ask a question? Are you looking for support? Please don't post here. Instead please use one of the support links at https://github.com/MarlinFirmware/Marlin/issues/new/choose
Before filing an issue be sure to test the "bugfix" branches to see whether the issue has been resolved.
-->
### Description
<!-- Description of the requested feature -->
### Feature Workflow
<!-- Please describe the feature's behavior, user interaction, etc. -->
1. [First Action]
2. [Second Action]
3. [and so on...]
#### Additional Information
* Provide pictures or links that demonstrate a similar feature or concept.
* See [How Can I Contribute](#how-can-i-contribute) for additional guidelines.

View file

@ -1,11 +1,35 @@
# NO SUPPORT REQUESTS PLEASE
<!--
Do you want to ask a question? Are you looking for support? Please don't post here. Support Requests posted here will be automatically closed!
Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/.github/code_of_conduct.md
Instead use one of the following options:
Do you want to ask a question? Are you looking for support? Please don't post here. Instead use one of the following options:
- The Marlin Firmware forum at https://reprap.org/forum/list.php?415
- The MarlinFirmware Facebook Group at https://www.facebook.com/groups/1049718498464482/
- The MarlinFirmware Discord Server at https://discord.gg/n5NJ59y.
Before filing an issue be sure to test the latest "bugfix" branch to see whether the issue is already addressed.
-->
### Description
<!-- Description of the bug or requested feature -->
### Steps to Reproduce
<!-- If this is a Bug Report, please describe the steps needed to reproduce the issue -->
1. [First Step]
2. [Second Step]
3. [and so on...]
**Expected behavior:** [What you expect to happen]
**Actual behavior:** [What actually happens]
#### Additional Information
* Include a ZIP file containing your `Configuration.h` and `Configuration_adv.h` files.
* Provide pictures or links to videos that clearly demonstrate the issue.
* See [How Can I Contribute](#how-can-i-contribute) for additional guidelines.

View file

@ -1,35 +0,0 @@
#
# bump-date.yml
# Bump the distribution date once per day
#
name: Bump Distribution Date
on:
schedule:
- cron: '0 0 * * *'
jobs:
bump_date:
name: Bump Distribution Date
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- name: Check out bugfix-2.0.x
uses: actions/checkout@v2
with:
ref: bugfix-2.0.x
- 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" && \
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

View file

@ -1,33 +0,0 @@
#
# check-pr.yml
# Close PRs directed at release branches
#
name: PR Bad Target
on:
pull_request:
branches:
- 1.0.x
- 1.1.x
- 2.0.x
jobs:
bad_target:
name: PR Bad Target
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- uses: peter-evans/close-pull@v1
with:
delete-branch: false
comment: >
Thanks for your contribution! Unfortunately we can't accept PRs directed at release branches. We make patches to the bugfix branches and only later do we push them out as releases.
Please redo this PR starting with the `bugfix-2.0.x` branch and be careful to target `bugfix-2.0.x` when resubmitting the PR.
It may help to set your fork's default branch to `bugfix-2.0.x`.
See [this page](http://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions.

View file

@ -1,27 +0,0 @@
#
# close-stale.yml
# Close open issues after a period of inactivity
#
name: Close Stale Issues
on:
schedule:
- cron: "22 1 * * *"
jobs:
stale:
name: Close Stale Issues
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has had no activity in the last 30 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed within 7 days.'
days-before-stale: 30
days-before-close: 7
stale-issue-label: 'stale-closing-soon'
exempt-issue-labels: 'T: Feature Request'

View file

@ -1,32 +0,0 @@
#
# lock-closed.yml
# Lock closed issues after a period of inactivity
#
name: Lock Closed Issues
on:
schedule:
- cron: '0 1/13 * * *'
jobs:
lock:
name: Lock Closed Issues
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v2
with:
github-token: ${{ github.token }}
process-only: 'issues'
issue-lock-inactive-days: '60'
issue-exclude-created-before: ''
issue-exclude-labels: 'no-locking'
issue-lock-labels: ''
issue-lock-comment: >
This issue has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.
issue-lock-reason: ''

View file

@ -36,9 +36,11 @@ jobs:
# Base Environments
- DUE
- DUE_archim
- esp32
- linux_native
- mega2560
- at90usb1286_dfu
- teensy31
- teensy35
- teensy41
@ -81,6 +83,8 @@ jobs:
- STM32F103RET6_creality
- LERDGEX
- mks_robin_nano35
- mks_robin_nano35_stm32
- NUCLEO_F767ZI
# Put lengthy tests last
@ -94,7 +98,6 @@ jobs:
# Non-working environment tests
#- at90usb1286_cdc
#- at90usb1286_dfu
#- STM32F103CB_malyan
#- mks_robin_mini

View file

@ -1,22 +0,0 @@
#
# unlock-reopened.yml
# Unlock an issue whenever it is re-opened
#
name: "Unlock reopened issue"
on:
issues:
types: [reopened]
jobs:
unlock:
name: Unlock Reopened
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- uses: OSDKDev/unlock-issues@v1.1
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

4
.gitignore vendored
View file

@ -77,7 +77,6 @@ tags
*.out
*.app
#
# C
#
@ -184,3 +183,6 @@ cmake-build-*
#Python
__pycache__
#IOLogger logs
*_log.csv

View file

@ -35,7 +35,7 @@
*
* Advanced settings can be found in Configuration_adv.h
*/
#define CONFIGURATION_H_VERSION 020007
#define CONFIGURATION_H_VERSION 020008
//===========================================================================
//============================= Getting Started =============================
@ -107,7 +107,8 @@
/**
* Select a secondary serial port on the board to use for communication with the host.
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
* 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
@ -334,15 +335,19 @@
//#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80
//#define PSU_POWERUP_DELAY 250 // (ms) Delay for the PSU to warm up to full power
//#define PSU_POWERUP_GCODE "M355 S1" // G-code to run after power-on (e.g., case light on)
//#define PSU_POWEROFF_GCODE "M355 S0" // G-code to run before power-off (e.g., case light off)
//#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
#if ENABLED(AUTO_POWER_CONTROL)
#define AUTO_POWER_FANS // Turn on PSU if fans need power
#define AUTO_POWER_E_FANS
#define AUTO_POWER_CONTROLLERFAN
#define AUTO_POWER_CHAMBER_FAN
//#define AUTO_POWER_E_TEMP 50 // (°C) Turn on PSU over this temperature
//#define AUTO_POWER_CHAMBER_TEMP 30 // (°C) Turn on PSU over this temperature
#define POWER_TIMEOUT 30
//#define AUTO_POWER_E_TEMP 50 // (°C) Turn on PSU if any extruder is over this temperature
//#define AUTO_POWER_CHAMBER_TEMP 30 // (°C) Turn on PSU if the chamber is over this temperature
#define POWER_TIMEOUT 30 // (s) Turn off power if the machine is idle for this duration
//#define POWER_OFF_DELAY 60 // (s) Delay of poweroff after M81 command. Useful to let fans run for extra time.
#endif
#endif
@ -431,11 +436,11 @@
#define DUMMY_THERMISTOR_998_VALUE 25
#define DUMMY_THERMISTOR_999_VALUE 100
// Resistor values when using a MAX31865 (sensor -5)
// Sensor value is typically 100 (PT100) or 1000 (PT1000)
// Calibration value is typically 430 ohm for AdaFruit PT100 modules and 4300 ohm for AdaFruit PT1000 modules.
//#define MAX31865_SENSOR_OHMS 100
//#define MAX31865_CALIBRATION_OHMS 430
// Resistor values when using MAX31865 sensors (-5) on TEMP_SENSOR_0 / 1
//#define MAX31865_SENSOR_OHMS_0 100 // (Ω) Typically 100 or 1000 (PT100 or PT1000)
//#define MAX31865_CALIBRATION_OHMS_0 430 // (Ω) Typically 430 for AdaFruit PT100; 4300 for AdaFruit PT1000
//#define MAX31865_SENSOR_OHMS_1 100
//#define MAX31865_CALIBRATION_OHMS_1 430
// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings
// from the two sensors differ too much the print will be aborted.
@ -670,6 +675,8 @@
*
* A4988 is assumed for unspecified drivers.
*
* Use TMC2208/TMC2208_STANDALONE for TMC2225 drivers and TMC2209/TMC2209_STANDALONE for TMC2226 drivers.
*
* Options: A4988, A5984, DRV8825, LV8729, L6470, L6474, POWERSTEP01,
* TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE,
@ -678,15 +685,15 @@
* 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 A4988
#define Y_DRIVER_TYPE A4988
#define Z_DRIVER_TYPE A4988
//#define X2_DRIVER_TYPE A4988
//#define Y2_DRIVER_TYPE A4988
//#define Z2_DRIVER_TYPE A4988
//#define Z3_DRIVER_TYPE A4988
//#define Z4_DRIVER_TYPE A4988
//#define E0_DRIVER_TYPE A4988
#define E0_DRIVER_TYPE A4988
//#define E1_DRIVER_TYPE A4988
//#define E2_DRIVER_TYPE A4988
//#define E3_DRIVER_TYPE A4988
@ -741,7 +748,7 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2...]]
*/
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 4000, 500 }
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 500 }
/**
* Default Max Feed Rate (mm/s)
@ -1166,6 +1173,12 @@
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
*
* IMPORTANT: Runout will only trigger if Marlin is aware that a print job is running.
* Marlin knows a print job is running when:
* 1. Running a print job from media started with M24.
* 2. The Print Job Timer has been started with M75.
* 3. The heaters were turned on and PRINTJOB_TIMER_AUTOSTART is enabled.
*
* RAMPS-based boards use SERVO3_PIN for the first runout sensor.
* For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
*/
@ -1173,9 +1186,27 @@
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#define FIL_RUNOUT_ENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500.
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_STATE LOW // Pin state indicating that filament is NOT present.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
#define FIL_RUNOUT_PULL // Use internal pullup / pulldown for filament runout pins.
// Override individually if the runout sensors vary
//#define FIL_RUNOUT1_STATE LOW
//#define FIL_RUNOUT1_PULL
//#define FIL_RUNOUT2_STATE LOW
//#define FIL_RUNOUT2_PULL
//#define FIL_RUNOUT3_STATE LOW
//#define FIL_RUNOUT3_PULL
//#define FIL_RUNOUT4_STATE LOW
//#define FIL_RUNOUT4_PULL
//#define FIL_RUNOUT5_STATE LOW
//#define FIL_RUNOUT5_PULL
//#define FIL_RUNOUT6_STATE LOW
//#define FIL_RUNOUT6_PULL
//#define FIL_RUNOUT7_STATE LOW
//#define FIL_RUNOUT7_PULL
//#define FIL_RUNOUT8_STATE LOW
//#define FIL_RUNOUT8_PULL
// Set one or more commands to execute on filament runout.
// (After 'M412 H' Marlin will ask the host to handle the process.)
@ -2083,9 +2114,10 @@
//
// Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
// A clone of the RepRapDiscount full graphics display but with
// different pins/wiring (see pins_ANET_10.h).
// different pins/wiring (see pins_ANET_10.h). Enable one of these.
//
//#define ANET_FULL_GRAPHICS_LCD
//#define ANET_FULL_GRAPHICS_LCD_ALT_WIRING
//
// AZSMZ 12864 LCD with SD
@ -2192,7 +2224,7 @@
//
// Third-party or vendor-customized controller interfaces.
// Sources should be installed in 'src/lcd/extensible_ui'.
// Sources should be installed in 'src/lcd/extui'.
//
//#define EXTENSIBLE_UI
@ -2205,22 +2237,83 @@
//=============================================================================
/**
* TFT Type - Select your Display type
*
* Available options are:
* MKS_TS35_V2_0,
* MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32, MKS_ROBIN_TFT35,
* MKS_ROBIN_TFT43, MKS_ROBIN_TFT_V1_1R
* TFT_TRONXY_X5SA, ANYCUBIC_TFT35, LONGER_LK_TFT28
* TFT_GENERIC
*
* For TFT_GENERIC, you need to configure these 3 options:
* Driver: TFT_DRIVER
* Current Drivers are: AUTO, ST7735, ST7789, ST7796, R61505, ILI9328, ILI9341, ILI9488
* Resolution: TFT_WIDTH and TFT_HEIGHT
* Interface: TFT_INTERFACE_FSMC or TFT_INTERFACE_SPI
* Specific TFT Model Presets. Enable one of the following options
* or enable TFT_GENERIC and set sub-options.
*/
//
// 480x320, 3.5", SPI Display From MKS
// Normally used in MKS Robin Nano V2
//
//#define MKS_TS35_V2_0
//
// 320x240, 2.4", FSMC Display From MKS
// Normally used in MKS Robin Nano V1.2
//
//#define MKS_ROBIN_TFT24
//
// 320x240, 2.8", FSMC Display From MKS
// Normally used in MKS Robin Nano V1.2
//
//#define MKS_ROBIN_TFT28
//
// 320x240, 3.2", FSMC Display From MKS
// Normally used in MKS Robin Nano V1.2
//
//#define MKS_ROBIN_TFT32
//
// 480x320, 3.5", FSMC Display From MKS
// Normally used in MKS Robin Nano V1.2
//
//#define MKS_ROBIN_TFT35
//
// 480x272, 4.3", FSMC Display From MKS
//
//#define MKS_ROBIN_TFT43
//
// 320x240, 3.2", FSMC Display From MKS
// Normally used in MKS Robin
//
//#define MKS_ROBIN_TFT_V1_1R
//
// 480x320, 3.5", FSMC Stock Display from TronxXY
//
//#define TFT_TRONXY_X5SA
//
// 480x320, 3.5", FSMC Stock Display from AnyCubic
//
//#define ANYCUBIC_TFT35
//
// 320x240, 2.8", FSMC Stock Display from Longer/Alfawise
//
//#define LONGER_LK_TFT28
//
// Generic TFT with detailed options
//
//#define TFT_GENERIC
#if ENABLED(TFT_GENERIC)
// :[ 'AUTO', 'ST7735', 'ST7789', 'ST7796', 'R61505', 'ILI9328', 'ILI9341', 'ILI9488' ]
#define TFT_DRIVER AUTO
// Interface. Enable one of the following options:
//#define TFT_INTERFACE_FSMC
//#define TFT_INTERFACE_SPI
// TFT Resolution. Enable one of the following options:
//#define TFT_RES_320x240
//#define TFT_RES_480x272
//#define TFT_RES_480x320
#endif
/**
* TFT UI - User Interface Selection. Enable one of the following options:
@ -2269,6 +2362,10 @@
//#define XPT2046_Y_CALIBRATION -8981
//#define XPT2046_X_OFFSET -43
//#define XPT2046_Y_OFFSET 257
#if ENABLED(TFT_COLOR_UI)
//#define SINGLE_TOUCH_NAVIGATION
#endif
#endif
//

View file

@ -30,7 +30,7 @@
*
* Basic settings can be found in Configuration.h
*/
#define CONFIGURATION_ADV_H_VERSION 020007
#define CONFIGURATION_ADV_H_VERSION 020008
//===========================================================================
//============================= Thermal Settings ============================
@ -660,6 +660,7 @@
//#define QUICK_HOME // If G28 contains XY do a diagonal move first
//#define HOME_Y_BEFORE_X // If G28 contains XY home Y before X
//#define HOME_Z_FIRST // Home Z first. Requires a Z-MIN endstop (not a probe).
//#define CODEPENDENT_XY_HOMING // If X/Y can't home without homing Y/X first
// @section bltouch
@ -808,7 +809,10 @@
#define RESTORE_LEVELING_AFTER_G35 // Enable to restore leveling setup after operation
//#define REPORT_TRAMMING_MM // Report Z deviation (mm) for each point relative to the first
//#define ASSISTED_TRAMMING_MENU_ITEM // Add a menu item for Assisted Tramming
//#define ASSISTED_TRAMMING_MENU_ITEM // Add a menu item to run G35 Assisted Tramming (MarlinUI)
//#define ASSISTED_TRAMMING_WIZARD // Make the menu item open a Tramming Wizard sub-menu
//#define ASSISTED_TRAMMING_WAIT_POSITION { X_CENTER, Y_CENTER, 30 } // Move the nozzle out of the way for adjustment
/**
* Screw thread:
@ -1048,10 +1052,10 @@
// @section lcd
#if EITHER(ULTIPANEL, EXTENSIBLE_UI)
#if EITHER(IS_ULTIPANEL, EXTENSIBLE_UI)
#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 SHORT_MANUAL_Z_MOVE 0.025 // (mm) Smallest manual Z move (< 0.1mm)
#if ENABLED(ULTIPANEL)
#if IS_ULTIPANEL
#define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position"
#define ULTIPANEL_FEEDMULTIPLY // Encoder sets the feedrate multiplier on the Status Screen
#endif
@ -1090,6 +1094,9 @@
// 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
@ -1166,6 +1173,7 @@
// Enable this option and set to HIGH if your SD cards are incorrectly detected.
//#define SD_DETECT_STATE HIGH
//#define SD_IGNORE_AT_STARTUP // Don't mount the SD card when starting up
//#define SDCARD_READONLY // Read-only SD card (to save over 2K of flash)
#define SD_PROCEDURE_DEPTH 1 // Increase if you need more nested M32 calls
@ -1250,6 +1258,10 @@
// Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
#endif
// Allow international symbols in long filenames. To display correctly, the
// LCD's font must contain the characters. Check your selected LCD language.
#define UTF_FILENAME_SUPPORT
// This allows hosts to request long names for files and folders with M33
//#define LONG_FILENAME_HOST_SUPPORT
@ -2261,14 +2273,20 @@
#if HAS_TRINAMIC_CONFIG
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
/**
* Interpolate microsteps to 256
* Override for each driver with <driver>_INTERPOLATE settings below
*/
#define INTERPOLATE true
#if AXIS_IS_TMC(X)
#define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing
#define X_MICROSTEPS 16 // 0..256
#define X_MICROSTEPS 16 // 0..256
#define X_RSENSE 0.11
#define X_CHAIN_POS -1 // <=0 : Not chained. 1 : MCU MOSI connected. 2 : Next in chain, ...
#define X_CHAIN_POS -1 // -1..0: Not chained. 1: MCU MOSI connected. 2: Next in chain, ...
//#define X_INTERPOLATE true // Enable to override 'INTERPOLATE' for the X axis
#endif
#if AXIS_IS_TMC(X2)
@ -2277,6 +2295,7 @@
#define X2_MICROSTEPS 16
#define X2_RSENSE 0.11
#define X2_CHAIN_POS -1
//#define X2_INTERPOLATE true
#endif
#if AXIS_IS_TMC(Y)
@ -2285,6 +2304,7 @@
#define Y_MICROSTEPS 16
#define Y_RSENSE 0.11
#define Y_CHAIN_POS -1
//#define Y_INTERPOLATE true
#endif
#if AXIS_IS_TMC(Y2)
@ -2293,6 +2313,7 @@
#define Y2_MICROSTEPS 16
#define Y2_RSENSE 0.11
#define Y2_CHAIN_POS -1
//#define Y2_INTERPOLATE true
#endif
#if AXIS_IS_TMC(Z)
@ -2301,6 +2322,7 @@
#define Z_MICROSTEPS 16
#define Z_RSENSE 0.11
#define Z_CHAIN_POS -1
//#define Z_INTERPOLATE true
#endif
#if AXIS_IS_TMC(Z2)
@ -2309,6 +2331,7 @@
#define Z2_MICROSTEPS 16
#define Z2_RSENSE 0.11
#define Z2_CHAIN_POS -1
//#define Z2_INTERPOLATE true
#endif
#if AXIS_IS_TMC(Z3)
@ -2317,6 +2340,7 @@
#define Z3_MICROSTEPS 16
#define Z3_RSENSE 0.11
#define Z3_CHAIN_POS -1
//#define Z3_INTERPOLATE true
#endif
#if AXIS_IS_TMC(Z4)
@ -2325,6 +2349,7 @@
#define Z4_MICROSTEPS 16
#define Z4_RSENSE 0.11
#define Z4_CHAIN_POS -1
//#define Z4_INTERPOLATE true
#endif
#if AXIS_IS_TMC(E0)
@ -2332,6 +2357,7 @@
#define E0_MICROSTEPS 16
#define E0_RSENSE 0.11
#define E0_CHAIN_POS -1
//#define E0_INTERPOLATE true
#endif
#if AXIS_IS_TMC(E1)
@ -2339,6 +2365,7 @@
#define E1_MICROSTEPS 16
#define E1_RSENSE 0.11
#define E1_CHAIN_POS -1
//#define E1_INTERPOLATE true
#endif
#if AXIS_IS_TMC(E2)
@ -2346,6 +2373,7 @@
#define E2_MICROSTEPS 16
#define E2_RSENSE 0.11
#define E2_CHAIN_POS -1
//#define E2_INTERPOLATE true
#endif
#if AXIS_IS_TMC(E3)
@ -2353,6 +2381,7 @@
#define E3_MICROSTEPS 16
#define E3_RSENSE 0.11
#define E3_CHAIN_POS -1
//#define E3_INTERPOLATE true
#endif
#if AXIS_IS_TMC(E4)
@ -2360,6 +2389,7 @@
#define E4_MICROSTEPS 16
#define E4_RSENSE 0.11
#define E4_CHAIN_POS -1
//#define E4_INTERPOLATE true
#endif
#if AXIS_IS_TMC(E5)
@ -2367,6 +2397,7 @@
#define E5_MICROSTEPS 16
#define E5_RSENSE 0.11
#define E5_CHAIN_POS -1
//#define E5_INTERPOLATE true
#endif
#if AXIS_IS_TMC(E6)
@ -2374,6 +2405,7 @@
#define E6_MICROSTEPS 16
#define E6_RSENSE 0.11
#define E6_CHAIN_POS -1
//#define E6_INTERPOLATE true
#endif
#if AXIS_IS_TMC(E7)
@ -2381,6 +2413,7 @@
#define E7_MICROSTEPS 16
#define E7_RSENSE 0.11
#define E7_CHAIN_POS -1
//#define E7_INTERPOLATE true
#endif
/**
@ -2471,10 +2504,26 @@
* CHOPPER_PRUSAMK3_24V // Imported parameters from the official Průša firmware for MK3 (24V)
* CHOPPER_MARLIN_119 // Old defaults from Marlin v1.1.9
*
* Define you own with
* Define your own with:
* { <off_time[1..15]>, <hysteresis_end[-3..12]>, hysteresis_start[1..8] }
*/
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V // All axes (override below)
//#define CHOPPER_TIMING_X CHOPPER_DEFAULT_12V // For X Axes (override below)
//#define CHOPPER_TIMING_X2 CHOPPER_DEFAULT_12V
//#define CHOPPER_TIMING_Y CHOPPER_DEFAULT_12V // For Y Axes (override below)
//#define CHOPPER_TIMING_Y2 CHOPPER_DEFAULT_12V
//#define CHOPPER_TIMING_Z CHOPPER_DEFAULT_12V // For Z Axes (override below)
//#define CHOPPER_TIMING_Z2 CHOPPER_DEFAULT_12V
//#define CHOPPER_TIMING_Z3 CHOPPER_DEFAULT_12V
//#define CHOPPER_TIMING_Z4 CHOPPER_DEFAULT_12V
//#define CHOPPER_TIMING_E CHOPPER_DEFAULT_12V // For Extruders (override below)
//#define CHOPPER_TIMING_E1 CHOPPER_DEFAULT_12V
//#define CHOPPER_TIMING_E2 CHOPPER_DEFAULT_12V
//#define CHOPPER_TIMING_E3 CHOPPER_DEFAULT_12V
//#define CHOPPER_TIMING_E4 CHOPPER_DEFAULT_12V
//#define CHOPPER_TIMING_E5 CHOPPER_DEFAULT_12V
//#define CHOPPER_TIMING_E6 CHOPPER_DEFAULT_12V
//#define CHOPPER_TIMING_E7 CHOPPER_DEFAULT_12V
/**
* Monitor Trinamic drivers
@ -2903,11 +2952,18 @@
#define SPINDLE_LASER_FREQUENCY 2500 // (Hz) Spindle/laser frequency (only on supported HALs: AVR and LPC)
//#define SPINDLE_SERVO // A servo converting an angle to spindle power
#ifdef SPINDLE_SERVO
#define SPINDLE_SERVO_NR 0 // Index of servo used for spindle control
#define SPINDLE_SERVO_MIN 10 // Minimum angle for servo spindle
#endif
/**
* Speed / Power can be set ('M3 S') and displayed in terms of:
* - PWM255 (S0 - S255)
* - PERCENT (S0 - S100)
* - RPM (S0 - S50000) Best for use with a spindle
* - SERVO (S0 - S180)
*/
#define CUTTER_POWER_UNIT PWM255
@ -2958,7 +3014,7 @@
* This allows the laser to keep in perfect sync with the planner and removes
* the powerup/down delay since lasers require negligible time.
*/
#define LASER_POWER_INLINE
//#define LASER_POWER_INLINE
#if ENABLED(LASER_POWER_INLINE)
/**
@ -3440,6 +3496,13 @@
// Default behavior is limited to Z axis only.
#endif
/**
* Ethernet. Use M552 to enable and set the IP address.
*/
#if HAS_ETHERNET
#define MAC_ADDRESS { 0xDE, 0xAD, 0xBE, 0xEF, 0xF0, 0x0D } // A MAC address unique to your network
#endif
/**
* WiFi Support (Espressif ESP32 WiFi)
*/

View file

@ -28,7 +28,7 @@
/**
* Marlin release version identifier
*/
//#define SHORT_BUILD_VERSION "2.0.7.2"
//#define SHORT_BUILD_VERSION "bugfix-2.0.x"
/**
* 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 "2020-07-09"
//#define STRING_DISTRIBUTION_DATE "2019-07-10"
/**
* Defines a generic printer name to be output to the LCD after booting Marlin.

View file

@ -25,7 +25,7 @@
#include "watchdog.h"
#include "math.h"
#ifdef IS_AT90USB
#ifdef USBCON
#include <HardwareSerial.h>
#else
#define HardwareSerial_h // Hack to prevent HardwareSerial.h header inclusion
@ -81,7 +81,7 @@ typedef int8_t pin_t;
//extern uint8_t MCUSR;
// Serial ports
#ifdef IS_AT90USB
#ifdef USBCON
#define MYSERIAL0 TERN(BLUETOOTH, bluetoothSerial, Serial)
#else
#if !WITHIN(SERIAL_PORT, -1, 3)

View file

@ -38,7 +38,7 @@
#include "../../inc/MarlinConfig.h"
#if !IS_AT90USB && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
#if !defined(USBCON) && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
#include "MarlinSerial.h"
#include "../../MarlinCore.h"
@ -792,10 +792,10 @@ MarlinSerial<MarlinSerialCfg<SERIAL_PORT>> customizedSerial1;
#endif
#endif // !IS_AT90USB && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
#endif // !USBCON && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
// For AT90USB targets use the UART for BT interfacing
#if BOTH(IS_AT90USB, BLUETOOTH)
#if defined(USBCON) && ENABLED(BLUETOOTH)
HardwareSerial bluetoothSerial;
#endif

View file

@ -327,6 +327,6 @@
#endif
// Use the UART for Bluetooth in AT90USB configurations
#if BOTH(IS_AT90USB, BLUETOOTH)
#if defined(USBCON) && ENABLED(BLUETOOTH)
extern HardwareSerial bluetoothSerial;
#endif

View file

@ -59,7 +59,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
uint8_t c = eeprom_read_byte((uint8_t*)pos);
if (writing) *value = c;

View file

@ -145,7 +145,7 @@ uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_va
}
#if ENABLED(LIGHTWEIGHT_UI)
#include "../../../lcd/ultralcd.h"
#include "../../../lcd/marlinui.h"
#include "../../shared/HAL_ST7920.h"
#define ST7920_CS_PIN LCD_PINS_RS

View file

@ -996,7 +996,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
uint8_t c = ee_Read(uint32_t(pos));
if (writing) *value = c;

View file

@ -62,7 +62,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
uint8_t c = eeprom_read_byte((uint8_t*)pos);
if (writing) *value = c;

View file

@ -163,6 +163,9 @@
#define SET_INPUT(IO) _SET_INPUT(IO)
// Set pin as input with pullup (wrapper)
#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _PULLUP(IO, HIGH); }while(0)
// Set pin as input with pulldown (substitution)
#define SET_INPUT_PULLDOWN SET_INPUT
// Set pin as output (wrapper) - reads the pin and sets the output to that value
#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
// Set pin as PWM
@ -477,7 +480,7 @@
#define DIO91_PIN 15
#define DIO91_WPORT PIOB
#if ARDUINO_SAM_ARCHIM
#ifdef ARDUINO_SAM_ARCHIM
#define DIO92_PIN 11
#define DIO92_WPORT PIOC

View file

@ -84,7 +84,7 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) {
card.getSd2Card().readData(sector_buf);
// RAM -> USB
if (!udi_msc_trans_block(true, sector_buf, SD_MMC_BLOCK_SIZE, NULL)) {
if (!udi_msc_trans_block(true, sector_buf, SD_MMC_BLOCK_SIZE, nullptr)) {
card.getSd2Card().readStop();
return CTRL_FAIL;
}
@ -120,7 +120,7 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) {
while (nb_sector--) {
// USB -> RAM
if (!udi_msc_trans_block(false, sector_buf, SD_MMC_BLOCK_SIZE, NULL)) {
if (!udi_msc_trans_block(false, sector_buf, SD_MMC_BLOCK_SIZE, nullptr)) {
card.getSd2Card().writeStop();
return CTRL_FAIL;
}

View file

@ -36,7 +36,7 @@ void watchdogSetup() {
#if ENABLED(USE_WATCHDOG)
// 4 seconds timeout
uint32_t timeout = 4000;
uint32_t timeout = TERN(WATCHDOG_DURATION_8S, 8000, 4000);
// Calculate timeout value in WDT counter ticks: This assumes
// the slow clock is running at 32.768 kHz watchdog

View file

@ -86,7 +86,7 @@ volatile int numPWMUsed = 0,
#endif
void HAL_init() { i2s_init(); }
void HAL_init() { TERN_(I2S_STEPPER_STREAM, i2s_init()); }
void HAL_init_board() {

View file

@ -44,7 +44,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
for (size_t i = 0; i < size; i++) {
uint8_t c = EEPROM.read(pos++);
if (writing) value[i] = c;

View file

@ -52,6 +52,9 @@
// Set pin as input with pullup wrapper
#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _PULLUP(IO, HIGH); }while(0)
// Set pin as input with pulldown (substitution)
#define SET_INPUT_PULLDOWN SET_INPUT
// Set pin as output wrapper
#define SET_OUTPUT(IO) do{ _SET_OUTPUT(IO); }while(0)

View file

@ -184,7 +184,7 @@ int i2s_init() {
// Allocate the array of pointers to the buffers
dma.buffers = (uint32_t **)malloc(sizeof(uint32_t*) * DMA_BUF_COUNT);
if (dma.buffers == nullptr) return -1;
if (!dma.buffers) return -1;
// Allocate each buffer that can be used by the DMA controller
for (int buf_idx = 0; buf_idx < DMA_BUF_COUNT; buf_idx++) {
@ -194,7 +194,7 @@ int i2s_init() {
// Allocate the array of DMA descriptors
dma.desc = (lldesc_t**) malloc(sizeof(lldesc_t*) * DMA_BUF_COUNT);
if (dma.desc == nullptr) return -1;
if (!dma.desc) return -1;
// Allocate each DMA descriptor that will be used by the DMA controller
for (int buf_idx = 0; buf_idx < DMA_BUF_COUNT; buf_idx++) {

View file

@ -24,15 +24,9 @@
#include <stdint.h>
#include <driver/timer.h>
// Includes needed to get I2S_STEPPER_STREAM. Note that pins.h
// is included in case this header is being included early.
#include "../../inc/MarlinConfig.h"
#include "../../pins/pins.h"
// ------------------------
// Defines
// ------------------------
//
#define FORCE_INLINE __attribute__((always_inline)) inline
typedef uint64_t hal_timer_t;

View file

@ -25,6 +25,8 @@
#if ENABLED(USE_WATCHDOG)
#define WDT_TIMEOUT_US TERN(WATCHDOG_DURATION_8S, 8000000, 4000000) // 4 or 8 second timeout
#include "watchdog.h"
void watchdogSetup() {

View file

@ -23,7 +23,7 @@
#define CPU_32_BIT
#define F_CPU 100000000
#define F_CPU 100000000UL
#define SystemCoreClock F_CPU
#include <iostream>
#include <stdint.h>

View file

@ -40,7 +40,7 @@ size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
bool PersistentStore::access_start() {
const char eeprom_erase_value = 0xFF;
FILE * eeprom_file = fopen(filename, "rb");
if (eeprom_file == nullptr) return false;
if (!eeprom_file) return false;
fseek(eeprom_file, 0L, SEEK_END);
std::size_t file_size = ftell(eeprom_file);
@ -59,7 +59,7 @@ bool PersistentStore::access_start() {
bool PersistentStore::access_finish() {
FILE * eeprom_file = fopen(filename, "wb");
if (eeprom_file == nullptr) return false;
if (!eeprom_file) return false;
fwrite(buffer, sizeof(uint8_t), sizeof(buffer), eeprom_file);
fclose(eeprom_file);
return true;
@ -78,7 +78,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return (bytes_written != size); // return true for any error
}
bool PersistentStore::read_data(int &pos, uint8_t* value, const size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, const size_t size, uint16_t *crc, const bool writing/*=true*/) {
std::size_t bytes_read = 0;
if (writing) {
for (std::size_t i = 0; i < size; i++) {

View file

@ -86,10 +86,10 @@ public:
GpioEvent::Type evt_type = value > 1 ? GpioEvent::SET_VALUE : value > pin_map[pin].value ? GpioEvent::RISE : value < pin_map[pin].value ? GpioEvent::FALL : GpioEvent::NOP;
pin_map[pin].value = value;
GpioEvent evt(Clock::nanos(), pin, evt_type);
if (pin_map[pin].cb != nullptr) {
if (pin_map[pin].cb) {
pin_map[pin].cb->interrupt(evt);
}
if (Gpio::logger != nullptr) Gpio::logger->log(evt);
if (Gpio::logger) Gpio::logger->log(evt);
}
static uint16_t get(pin_type pin) {
@ -105,8 +105,8 @@ public:
if (!valid_pin(pin)) return;
pin_map[pin].mode = value;
GpioEvent evt(Clock::nanos(), pin, GpioEvent::Type::SETM);
if (pin_map[pin].cb != nullptr) pin_map[pin].cb->interrupt(evt);
if (Gpio::logger != nullptr) Gpio::logger->log(evt);
if (pin_map[pin].cb) pin_map[pin].cb->interrupt(evt);
if (Gpio::logger) Gpio::logger->log(evt);
}
static uint8_t getMode(pin_type pin) {
@ -118,8 +118,8 @@ public:
if (!valid_pin(pin)) return;
pin_map[pin].dir = value;
GpioEvent evt(Clock::nanos(), pin, GpioEvent::Type::SETD);
if (pin_map[pin].cb != nullptr) pin_map[pin].cb->interrupt(evt);
if (Gpio::logger != nullptr) Gpio::logger->log(evt);
if (pin_map[pin].cb) pin_map[pin].cb->interrupt(evt);
if (Gpio::logger) Gpio::logger->log(evt);
}
static uint8_t getDir(pin_type pin) {

View file

@ -19,22 +19,23 @@
*/
#ifdef __PLAT_LINUX__
extern void setup();
extern void loop();
#include <thread>
#include <iostream>
#include <fstream>
//#define GPIO_LOGGING // Full GPIO and Positional Logging
#include "../../inc/MarlinConfig.h"
#include <stdio.h>
#include <stdarg.h>
#include "../shared/Delay.h"
#include "hardware/IOLoggerCSV.h"
#include "hardware/Heater.h"
#include "hardware/LinearAxis.h"
#include <stdio.h>
#include <stdarg.h>
#include <thread>
#include <iostream>
#include <fstream>
extern void setup();
extern void loop();
// simple stdout / stdin implementation for fake serial port
void write_serial_thread() {
for (;;) {
@ -64,8 +65,6 @@ void simulation_loop() {
LinearAxis z_axis(Z_ENABLE_PIN, Z_DIR_PIN, Z_STEP_PIN, Z_MIN_PIN, Z_MAX_PIN);
LinearAxis extruder0(E0_ENABLE_PIN, E0_DIR_PIN, E0_STEP_PIN, P_NC, P_NC);
//#define GPIO_LOGGING // Full GPIO and Positional Logging
#ifdef GPIO_LOGGING
IOLoggerCSV logger("all_gpio_log.csv");
Gpio::attachLogger(&logger);
@ -88,7 +87,7 @@ void simulation_loop() {
#ifdef GPIO_LOGGING
if (x_axis.position != x || y_axis.position != y || z_axis.position != z) {
uint64_t update = MAX3(x_axis.last_update, y_axis.last_update, z_axis.last_update);
uint64_t update = _MAX(x_axis.last_update, y_axis.last_update, z_axis.last_update);
position_log << update << ", " << x_axis.position << ", " << y_axis.position << ", " << z_axis.position << std::endl;
position_log.flush();
x = x_axis.position;

View file

@ -26,15 +26,15 @@
*/
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
#define pwm_details(pin) pin = pin // do nothing // print PWM details
#define pwm_status(pin) false //Print a pin's PWM status. Return true if it's currently a PWM pin.
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0)
#define pwm_details(pin) NOOP // (do nothing)
#define pwm_status(pin) false // Print a pin's PWM status. Return true if it's currently a PWM pin.
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0)
#define digitalRead_mod(p) digitalRead(p)
#define PRINT_PORT(p)
#define GET_ARRAY_PIN(p) pin_array[p].pin
#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 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("%3d "), p); 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
constexpr int8_t ADC_pin_mode(pin_t pin) {

View file

@ -27,6 +27,8 @@
#include "watchdog.h"
#define WDT_TIMEOUT_US TERN(WATCHDOG_DURATION_8S, 8000000, 4000000) // 4 or 8 second timeout
void watchdog_init() {}
void HAL_watchdog_refresh() {}

View file

@ -21,7 +21,5 @@
*/
#pragma once
#define WDT_TIMEOUT 4000000 // 4 second timeout
void watchdog_init();
void HAL_watchdog_refresh();

View file

@ -127,11 +127,9 @@
for (uint16_t i = 0; i < nbyte; i++) doio(buf[i]);
}
void spiSend(uint32_t chan, byte b) {
}
void spiSend(uint32_t chan, byte b) {}
void spiSend(uint32_t chan, const uint8_t* buf, size_t nbyte) {
}
void spiSend(uint32_t chan, const uint8_t* buf, size_t nbyte) {}
// Read single byte from SPI
uint8_t spiRec() { return doio(0xFF); }
@ -143,9 +141,7 @@
for (uint16_t i = 0; i < nbyte; i++) buf[i] = doio(0xFF);
}
uint8_t spiTransfer(uint8_t b) {
return doio(b);
}
uint8_t spiTransfer(uint8_t b) { return doio(b); }
// Write from buffer to SPI
void spiSendBlock(uint8_t token, const uint8_t* buf) {
@ -201,6 +197,15 @@ SPIClass::SPIClass(uint8_t device) {
GPDMA_Init();
}
SPIClass::SPIClass(pin_t mosi, pin_t miso, pin_t sclk, pin_t ssel) {
#if BOARD_NR_SPI >= 1
if (mosi == BOARD_SPI1_MOSI_PIN) SPIClass(1);
#endif
#if BOARD_NR_SPI >= 2
if (mosi == BOARD_SPI2_MOSI_PIN) SPIClass(2);
#endif
}
void SPIClass::begin() {
// Init the SPI pins in the first begin call
if ((_currentSetting->spi_d == LPC_SSP0 && spiInitialised[0] == false) ||
@ -263,8 +268,9 @@ uint16_t SPIClass::transfer16(const uint16_t data) {
}
void SPIClass::end() {
// SSP_Cmd(_currentSetting->spi_d, DISABLE); // stop device or SSP_DeInit?
SSP_DeInit(_currentSetting->spi_d);
// Neither is needed for Marlin
//SSP_Cmd(_currentSetting->spi_d, DISABLE);
//SSP_DeInit(_currentSetting->spi_d);
}
void SPIClass::send(uint8_t data) {
@ -330,25 +336,15 @@ void SPIClass::read(uint8_t *buf, uint32_t len) {
for (uint16_t i = 0; i < len; i++) buf[i] = transfer(0xFF);
}
void SPIClass::setClock(uint32_t clock) {
_currentSetting->clock = clock;
}
void SPIClass::setClock(uint32_t clock) { _currentSetting->clock = clock; }
void SPIClass::setModule(uint8_t device) {
_currentSetting = &_settings[device - 1];// SPI channels are called 1 2 and 3 but the array is zero indexed
}
void SPIClass::setModule(uint8_t device) { _currentSetting = &_settings[device - 1]; } // SPI channels are called 1, 2, and 3 but the array is zero-indexed
void SPIClass::setBitOrder(uint8_t bitOrder) {
_currentSetting->bitOrder = bitOrder;
}
void SPIClass::setBitOrder(uint8_t bitOrder) { _currentSetting->bitOrder = bitOrder; }
void SPIClass::setDataMode(uint8_t dataMode) {
_currentSetting->dataMode = dataMode;
}
void SPIClass::setDataMode(uint8_t dataMode) { _currentSetting->dataMode = dataMode; }
void SPIClass::setDataSize(uint32_t ds) {
_currentSetting->dataSize = ds;
}
void SPIClass::setDataSize(uint32_t dataSize) { _currentSetting->dataSize = dataSize; }
/**
* Set up/tear down
@ -356,8 +352,8 @@ void SPIClass::setDataSize(uint32_t ds) {
void SPIClass::updateSettings() {
//SSP_DeInit(_currentSetting->spi_d); //todo: need force de init?!
// divide PCLK by 2 for SSP0
CLKPWR_SetPCLKDiv(_currentSetting->spi_d == LPC_SSP0 ? CLKPWR_PCLKSEL_SSP0 : CLKPWR_PCLKSEL_SSP1, CLKPWR_PCLKSEL_CCLK_DIV_2);
// Divide PCLK by 2 for SSP0
//CLKPWR_SetPCLKDiv(_currentSetting->spi_d == LPC_SSP0 ? CLKPWR_PCLKSEL_SSP0 : CLKPWR_PCLKSEL_SSP1, CLKPWR_PCLKSEL_CCLK_DIV_2);
SSP_CFG_Type HW_SPI_init; // data structure to hold init values
SSP_ConfigStructInit(&HW_SPI_init); // set values for SPI mode

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,45 +19,27 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(__STM32F1__) && !defined(HAVE_SW_SERIAL)
#pragma once
#include <SPI.h>
/**
* Empty class for Software Serial implementation (Custom RX/TX pins)
* Marlin currently requires 3 SPI classes:
*
* SPIClass:
* This class is normally provided by frameworks and has a semi-default interface.
* This is needed because some libraries reference it globally.
*
* SPISettings:
* Container for SPI configs for SPIClass. As above, libraries may reference it globally.
*
* These two classes are often provided by frameworks so we cannot extend them to add
* useful methods for Marlin.
*
* MarlinSPI:
* Provides the default SPIClass interface plus some Marlin goodies such as a simplified
* interface for SPI DMA transfer.
*
* TODO: Optionally use https://github.com/FYSETC/SoftwareSerialM if TMC UART is wanted
*/
#include "SoftwareSerial.h"
// Constructor
SoftwareSerial::SoftwareSerial(int8_t RX_pin, int8_t TX_pin) {}
// Public
void SoftwareSerial::begin(const uint32_t baudrate) {
}
bool SoftwareSerial::available() {
return false;
}
uint8_t SoftwareSerial::read() {
return 0;
}
uint16_t SoftwareSerial::write(uint8_t byte) {
return 0;
}
void SoftwareSerial::flush() {}
void SoftwareSerial::listen() {
listening = true;
}
void SoftwareSerial::stopListening() {
listening = false;
}
#endif // __STM32F1__
using MarlinSPI = SPIClass;

View file

@ -119,7 +119,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false; // return true for any error
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
const uint8_t * const buff = writing ? &value[0] : &ram_eeprom[pos];
if (writing) for (size_t i = 0; i < size; i++) value[i] = ram_eeprom[pos + i];
crc16(crc, buff, size);

View file

@ -143,7 +143,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return bytes_written != size; // return true for any error
}
bool PersistentStore::read_data(int &pos, uint8_t* value, const size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, const size_t size, uint16_t *crc, const bool writing/*=true*/) {
if (!eeprom_file_open) return true;
UINT bytes_read = 0;
FRESULT s;

View file

@ -64,7 +64,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
// Read from external EEPROM
const uint8_t c = eeprom_read_byte((uint8_t*)pos);

View file

@ -72,7 +72,7 @@ static_assert(!(NUM_SERVOS && ENABLED(FAST_PWM_FAN)), "BLTOUCH and Servos are in
//#endif
#if MB(RAMPS_14_RE_ARM_EFB, RAMPS_14_RE_ARM_EEB, RAMPS_14_RE_ARM_EFF, RAMPS_14_RE_ARM_EEF, RAMPS_14_RE_ARM_SF)
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI)
#if IS_RRD_FG_SC && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI)
#error "Re-ARM with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and TMC2130 requires TMC_USE_SW_SPI."
#endif
#endif

View file

@ -37,13 +37,14 @@
#define DATA_SIZE_8BIT SSP_DATABIT_8
#define DATA_SIZE_16BIT SSP_DATABIT_16
#define SPI_CLOCK_DIV2 8333333 //(SCR: 2) desired: 8,000,000 actual: 8,333,333 +4.2% SPI_FULL_SPEED
#define SPI_CLOCK_DIV4 4166667 //(SCR: 5) desired: 4,000,000 actual: 4,166,667 +4.2% SPI_HALF_SPEED
#define SPI_CLOCK_DIV8 2083333 //(SCR: 11) desired: 2,000,000 actual: 2,083,333 +4.2% SPI_QUARTER_SPEED
#define SPI_CLOCK_DIV16 1000000 //(SCR: 24) desired: 1,000,000 actual: 1,000,000 SPI_EIGHTH_SPEED
#define SPI_CLOCK_DIV32 500000 //(SCR: 49) desired: 500,000 actual: 500,000 SPI_SPEED_5
#define SPI_CLOCK_DIV64 250000 //(SCR: 99) desired: 250,000 actual: 250,000 SPI_SPEED_6
#define SPI_CLOCK_DIV128 125000 //(SCR:199) desired: 125,000 actual: 125,000 Default from HAL.h
#define SPI_CLOCK_MAX_TFT 30000000UL
#define SPI_CLOCK_DIV2 8333333 //(SCR: 2) desired: 8,000,000 actual: 8,333,333 +4.2% SPI_FULL_SPEED
#define SPI_CLOCK_DIV4 4166667 //(SCR: 5) desired: 4,000,000 actual: 4,166,667 +4.2% SPI_HALF_SPEED
#define SPI_CLOCK_DIV8 2083333 //(SCR: 11) desired: 2,000,000 actual: 2,083,333 +4.2% SPI_QUARTER_SPEED
#define SPI_CLOCK_DIV16 1000000 //(SCR: 24) desired: 1,000,000 actual: 1,000,000 SPI_EIGHTH_SPEED
#define SPI_CLOCK_DIV32 500000 //(SCR: 49) desired: 500,000 actual: 500,000 SPI_SPEED_5
#define SPI_CLOCK_DIV64 250000 //(SCR: 99) desired: 250,000 actual: 250,000 SPI_SPEED_6
#define SPI_CLOCK_DIV128 125000 //(SCR:199) desired: 125,000 actual: 125,000 Default from HAL.h
#define SPI_CLOCK_MAX SPI_CLOCK_DIV2
@ -125,6 +126,11 @@ public:
*/
SPIClass(uint8_t spiPortNumber);
/**
* Init using pins
*/
SPIClass(pin_t mosi, pin_t miso, pin_t sclk, pin_t ssel = (pin_t)-1);
/**
* Select and configure the current selected SPI device to use
*/

View file

@ -89,7 +89,7 @@ void TFT_SPI::Init() {
#elif TFT_MISO_PIN == BOARD_SPI2_MISO_PIN
SPIx.setModule(2);
#endif
SPIx.setClock(SPI_CLOCK_MAX);
SPIx.setClock(SPI_CLOCK_MAX_TFT);
SPIx.setBitOrder(MSBFIRST);
SPIx.setDataMode(SPI_MODE0);
}
@ -125,7 +125,7 @@ uint32_t TFT_SPI::ReadID(uint16_t Reg) {
}
DataTransferEnd();
SPIx.setClock(SPI_CLOCK_MAX);
SPIx.setClock(SPI_CLOCK_MAX_TFT);
#endif
return data >> 7;

View file

@ -1,6 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* 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

View file

@ -1,6 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* 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

View file

@ -28,6 +28,8 @@
#include <lpc17xx_wdt.h>
#include "watchdog.h"
#define WDT_TIMEOUT_US TERN(WATCHDOG_DURATION_8S, 8000000, 4000000) // 4 or 8 second timeout
void watchdog_init() {
#if ENABLED(WATCHDOG_RESET_MANUAL)
// We enable the watchdog timer, but only for the interrupt.
@ -52,7 +54,7 @@ void watchdog_init() {
#else
WDT_Init(WDT_CLKSRC_IRC, WDT_MODE_RESET);
#endif
WDT_Start(WDT_TIMEOUT);
WDT_Start(WDT_TIMEOUT_US);
}
void HAL_watchdog_refresh() {

View file

@ -21,8 +21,6 @@
*/
#pragma once
#define WDT_TIMEOUT 4000000 // 4 second timeout
void watchdog_init();
void HAL_watchdog_refresh();

View file

@ -300,7 +300,7 @@ uint16_t HAL_adc_result;
DMA_ADDRESS_INCREMENT_STEP_SIZE_1, // STEPSIZE
DMA_STEPSEL_SRC // STEPSEL
);
if (descriptor != nullptr)
if (descriptor)
descriptor->BTCTRL.bit.EVOSEL = DMA_EVENT_OUTPUT_BEAT;
adc0DMAProgram.startJob();
}
@ -337,7 +337,7 @@ uint16_t HAL_adc_result;
DMA_ADDRESS_INCREMENT_STEP_SIZE_1, // STEPSIZE
DMA_STEPSEL_SRC // STEPSEL
);
if (descriptor != nullptr)
if (descriptor)
descriptor->BTCTRL.bit.EVOSEL = DMA_EVENT_OUTPUT_BEAT;
adc1DMAProgram.startJob();
}

View file

@ -35,10 +35,10 @@ uint8_t QSPIFlash::_buf[SFLASH_SECTOR_SIZE];
uint32_t QSPIFlash::_addr = INVALID_ADDR;
void QSPIFlash::begin() {
if (_flashBase != nullptr) return;
if (_flashBase) return;
_flashBase = new Adafruit_SPIFlashBase(new Adafruit_FlashTransport_QSPI());
_flashBase->begin(NULL);
_flashBase->begin(nullptr);
}
size_t QSPIFlash::size() {

View file

@ -79,7 +79,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
while (size--) {
SYNC(NVMCTRL->SEESTAT.bit.BUSY);
uint8_t c = ((volatile uint8_t *)SEEPROM_ADDR)[pos];

View file

@ -56,7 +56,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
while (size--) {
uint8_t c = qspi.readByte(pos);
if (writing) *value = c;

View file

@ -59,7 +59,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
while (size--) {
uint8_t c = eeprom_read_byte((uint8_t*)pos);
if (writing) *value = c;

View file

@ -24,28 +24,30 @@
#if ENABLED(USE_WATCHDOG)
#include "watchdog.h"
#include "watchdog.h"
void watchdog_init() {
// The low-power oscillator used by the WDT runs at 32,768 Hz with
// a 1:32 prescale, thus 1024 Hz, though probably not super precise.
#define WDT_TIMEOUT_REG TERN(WATCHDOG_DURATION_8S, WDT_CONFIG_PER_CYC8192, WDT_CONFIG_PER_CYC4096) // 4 or 8 second timeout
// Setup WDT clocks
MCLK->APBAMASK.bit.OSC32KCTRL_ = true;
MCLK->APBAMASK.bit.WDT_ = true;
OSC32KCTRL->OSCULP32K.bit.EN1K = true; // Enable out 1K (this is what WDT uses)
void watchdog_init() {
// The low-power oscillator used by the WDT runs at 32,768 Hz with
// a 1:32 prescale, thus 1024 Hz, though probably not super precise.
WDT->CTRLA.bit.ENABLE = false; // Disable watchdog for config
SYNC(WDT->SYNCBUSY.bit.ENABLE);
// Setup WDT clocks
MCLK->APBAMASK.bit.OSC32KCTRL_ = true;
MCLK->APBAMASK.bit.WDT_ = true;
OSC32KCTRL->OSCULP32K.bit.EN1K = true; // Enable out 1K (this is what WDT uses)
WDT->INTENCLR.reg = WDT_INTENCLR_EW; // Disable early warning interrupt
WDT->CONFIG.reg = WDT_CONFIG_PER_CYC4096; // Set at least 4s period for chip reset
WDT->CTRLA.bit.ENABLE = false; // Disable watchdog for config
SYNC(WDT->SYNCBUSY.bit.ENABLE);
HAL_watchdog_refresh();
WDT->INTENCLR.reg = WDT_INTENCLR_EW; // Disable early warning interrupt
WDT->CONFIG.reg = WDT_TIMEOUT_REG; // Set a 4s or 8s period for chip reset
WDT->CTRLA.reg = WDT_CTRLA_ENABLE; // Start watchdog now in normal mode
SYNC(WDT->SYNCBUSY.bit.ENABLE);
}
HAL_watchdog_refresh();
WDT->CTRLA.reg = WDT_CTRLA_ENABLE; // Start watchdog now in normal mode
SYNC(WDT->SYNCBUSY.bit.ENABLE);
}
#endif // USE_WATCHDOG

View file

@ -81,7 +81,9 @@ void HAL_init() {
SetTimerInterruptPriorities();
TERN_(EMERGENCY_PARSER, USB_Hook_init());
#if ENABLED(EMERGENCY_PARSER) && USBD_USE_CDC
USB_Hook_init();
#endif
}
void HAL_clear_reset_source() { __HAL_RCC_CLEAR_RESET_FLAGS(); }
@ -128,8 +130,12 @@ uint16_t HAL_adc_get_result() { return HAL_adc_result; }
void flashFirmware(const int16_t) { NVIC_SystemReset(); }
// Maple Compatibility
volatile uint32_t systick_uptime_millis = 0;
systickCallback_t systick_user_callback;
void systick_attach_callback(systickCallback_t cb) { systick_user_callback = cb; }
void HAL_SYSTICK_Callback() { if (systick_user_callback) systick_user_callback(); }
void HAL_SYSTICK_Callback() {
systick_uptime_millis++;
if (systick_user_callback) systick_user_callback();
}
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC

View file

@ -184,3 +184,21 @@ void flashFirmware(const int16_t);
typedef void (*systickCallback_t)(void);
void systick_attach_callback(systickCallback_t cb);
void HAL_SYSTICK_Callback();
extern volatile uint32_t systick_uptime_millis;
#define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment
/**
* set_pwm_frequency
* Set the frequency of the timer corresponding to the provided pin
* All Timer PWM pins run at the same frequency
*/
void set_pwm_frequency(const pin_t pin, int f_desired);
/**
* set_pwm_duty
* 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]
*/
void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size=255, const bool invert=false);

View file

@ -0,0 +1,165 @@
/**
* 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
* (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/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#include "MarlinSPI.h"
static void spi_init(spi_t *obj, uint32_t speed, spi_mode_e mode, uint8_t msb, uint32_t dataSize) {
spi_init(obj, speed, mode, msb);
// spi_init set 8bit always
// TODO: copy the code from spi_init and handle data size, to avoid double init always!!
if (dataSize != SPI_DATASIZE_8BIT) {
obj->handle.Init.DataSize = dataSize;
HAL_SPI_Init(&obj->handle);
__HAL_SPI_ENABLE(&obj->handle);
}
}
void MarlinSPI::setClockDivider(uint8_t _div) {
_speed = spi_getClkFreq(&_spi);// / _div;
_clockDivider = _div;
}
void MarlinSPI::begin(void) {
//TODO: only call spi_init if any parameter changed!!
spi_init(&_spi, _speed, _dataMode, _bitOrder, _dataSize);
}
void MarlinSPI::setupDma(SPI_HandleTypeDef &_spiHandle, DMA_HandleTypeDef &_dmaHandle, uint32_t direction, bool minc) {
_dmaHandle.Init.Direction = direction;
_dmaHandle.Init.PeriphInc = DMA_PINC_DISABLE;
_dmaHandle.Init.Mode = DMA_NORMAL;
_dmaHandle.Init.Priority = DMA_PRIORITY_LOW;
_dmaHandle.Init.MemInc = minc ? DMA_MINC_ENABLE : DMA_MINC_DISABLE;
if (_dataSize == DATA_SIZE_8BIT) {
_dmaHandle.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
_dmaHandle.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
}
else {
_dmaHandle.Init.PeriphDataAlignment = DMA_PDATAALIGN_HALFWORD;
_dmaHandle.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD;
}
#ifdef STM32F4xx
_dmaHandle.Init.Channel = DMA_CHANNEL_3;
_dmaHandle.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
#endif
// start DMA hardware
// TODO: check if hardware is already enabled
#ifdef SPI1_BASE
if (_spiHandle.Instance == SPI1) {
#ifdef STM32F1xx
__HAL_RCC_DMA1_CLK_ENABLE();
_dmaHandle.Instance = (direction == DMA_MEMORY_TO_PERIPH) ? DMA1_Channel3 : DMA1_Channel2;
#elif defined(STM32F4xx)
__HAL_RCC_DMA2_CLK_ENABLE();
_dmaHandle.Instance = DMA2_Stream3;
#endif
}
#endif
#ifdef SPI2_BASE
if (_spiHandle.Instance == SPI2) {
#ifdef STM32F1xx
__HAL_RCC_DMA1_CLK_ENABLE();
_dmaHandle.Instance = (direction == DMA_MEMORY_TO_PERIPH) ? DMA1_Channel5 : DMA1_Channel4;
#elif defined(STM32F4xx)
//TODO: f4 dma config
#endif
}
#endif
#ifdef SPI3_BASE
if (_spiHandle.Instance == SPI3) {
#ifdef STM32F1xx
__HAL_RCC_DMA2_CLK_ENABLE();
_dmaHandle.Instance = (direction == DMA_MEMORY_TO_PERIPH) ? DMA2_Channel2 : DMA2_Channel1;
#elif defined(STM32F4xx)
//TODO: f4 dma config
#endif
}
#endif
HAL_DMA_Init(&_dmaHandle);
}
byte MarlinSPI::transfer(uint8_t _data) {
uint8_t rxData = 0xFF;
HAL_SPI_TransmitReceive(&_spi.handle, &_data, &rxData, 1, HAL_MAX_DELAY);
return rxData;
}
uint8_t MarlinSPI::dmaTransfer(const void *transmitBuf, void *receiveBuf, uint16_t length) {
const uint8_t ff = 0xFF;
//if ((hspi->Instance->CR1 & SPI_CR1_SPE) != SPI_CR1_SPE) //only enable if disabled
__HAL_SPI_ENABLE(&_spi.handle);
if (receiveBuf) {
setupDma(_spi.handle, _dmaRx, DMA_PERIPH_TO_MEMORY, true);
HAL_DMA_Start(&_dmaRx, (uint32_t)&(_spi.handle.Instance->DR), (uint32_t)receiveBuf, length);
SET_BIT(_spi.handle.Instance->CR2, SPI_CR2_RXDMAEN); /* Enable Rx DMA Request */
}
// check for 2 lines transfer
bool mincTransmit = true;
if (transmitBuf == nullptr && _spi.handle.Init.Direction == SPI_DIRECTION_2LINES && _spi.handle.Init.Mode == SPI_MODE_MASTER) {
transmitBuf = &ff;
mincTransmit = false;
}
if (transmitBuf) {
setupDma(_spi.handle, _dmaTx, DMA_MEMORY_TO_PERIPH, mincTransmit);
HAL_DMA_Start(&_dmaTx, (uint32_t)transmitBuf, (uint32_t)&(_spi.handle.Instance->DR), length);
SET_BIT(_spi.handle.Instance->CR2, SPI_CR2_TXDMAEN); /* Enable Tx DMA Request */
}
if (transmitBuf) {
HAL_DMA_PollForTransfer(&_dmaTx, HAL_DMA_FULL_TRANSFER, HAL_MAX_DELAY);
HAL_DMA_Abort(&_dmaTx);
HAL_DMA_DeInit(&_dmaTx);
}
// while ((_spi.handle.Instance->SR & SPI_FLAG_RXNE) != SPI_FLAG_RXNE) {}
if (receiveBuf) {
HAL_DMA_PollForTransfer(&_dmaRx, HAL_DMA_FULL_TRANSFER, HAL_MAX_DELAY);
HAL_DMA_Abort(&_dmaRx);
HAL_DMA_DeInit(&_dmaRx);
}
return 1;
}
uint8_t MarlinSPI::dmaSend(const void * transmitBuf, uint16_t length, bool minc) {
setupDma(_spi.handle, _dmaTx, DMA_MEMORY_TO_PERIPH, minc);
HAL_DMA_Start(&_dmaTx, (uint32_t)transmitBuf, (uint32_t)&(_spi.handle.Instance->DR), length);
__HAL_SPI_ENABLE(&_spi.handle);
SET_BIT(_spi.handle.Instance->CR2, SPI_CR2_TXDMAEN); /* Enable Tx DMA Request */
HAL_DMA_PollForTransfer(&_dmaTx, HAL_DMA_FULL_TRANSFER, HAL_MAX_DELAY);
HAL_DMA_Abort(&_dmaTx);
// DeInit objects
HAL_DMA_DeInit(&_dmaTx);
return 1;
}
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC

View file

@ -0,0 +1,107 @@
/**
* 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
* (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 "HAL.h"
#include <SPI.h>
extern "C" {
#include <utility/spi_com.h>
}
/**
* Marlin currently requires 3 SPI classes:
*
* SPIClass:
* This class is normally provided by frameworks and has a semi-default interface.
* This is needed because some libraries reference it globally.
*
* SPISettings:
* Container for SPI configs for SPIClass. As above, libraries may reference it globally.
*
* These two classes are often provided by frameworks so we cannot extend them to add
* useful methods for Marlin.
*
* MarlinSPI:
* Provides the default SPIClass interface plus some Marlin goodies such as a simplified
* interface for SPI DMA transfer.
*
*/
#define DATA_SIZE_8BIT SPI_DATASIZE_8BIT
#define DATA_SIZE_16BIT SPI_DATASIZE_16BIT
class MarlinSPI {
public:
MarlinSPI() : MarlinSPI(NC, NC, NC, NC) {}
MarlinSPI(pin_t mosi, pin_t miso, pin_t sclk, pin_t ssel = (pin_t)NC) : _mosiPin(mosi), _misoPin(miso), _sckPin(sclk), _ssPin(ssel) {
_spi.pin_miso = digitalPinToPinName(_misoPin);
_spi.pin_mosi = digitalPinToPinName(_mosiPin);
_spi.pin_sclk = digitalPinToPinName(_sckPin);
_spi.pin_ssel = digitalPinToPinName(_ssPin);
_dataSize = DATA_SIZE_8BIT;
_bitOrder = MSBFIRST;
_dataMode = SPI_MODE_0;
_spi.handle.State = HAL_SPI_STATE_RESET;
setClockDivider(SPI_SPEED_CLOCK_DIV2_MHZ);
}
void begin(void);
void end(void) {}
byte transfer(uint8_t _data);
uint8_t dmaTransfer(const void *transmitBuf, void *receiveBuf, uint16_t length);
uint8_t dmaSend(const void * transmitBuf, uint16_t length, bool minc = true);
/* These methods are deprecated and kept for compatibility.
* Use SPISettings with SPI.beginTransaction() to configure SPI parameters.
*/
void setBitOrder(BitOrder _order) { _bitOrder = _order; }
void setDataMode(uint8_t _mode) {
switch (_mode) {
case SPI_MODE0: _dataMode = SPI_MODE_0; break;
case SPI_MODE1: _dataMode = SPI_MODE_1; break;
case SPI_MODE2: _dataMode = SPI_MODE_2; break;
case SPI_MODE3: _dataMode = SPI_MODE_3; break;
}
}
void setClockDivider(uint8_t _div);
private:
void setupDma(SPI_HandleTypeDef &_spiHandle, DMA_HandleTypeDef &_dmaHandle, uint32_t direction, bool minc = false);
spi_t _spi;
DMA_HandleTypeDef _dmaTx;
DMA_HandleTypeDef _dmaRx;
BitOrder _bitOrder;
spi_mode_e _dataMode;
uint8_t _clockDivider;
uint32_t _speed;
uint32_t _dataSize;
pin_t _mosiPin;
pin_t _misoPin;
pin_t _sckPin;
pin_t _ssPin;
};

View file

@ -113,7 +113,7 @@ bool PersistentStore::access_start() {
// This must be the first time since power on that we have accessed the storage, or someone
// loaded and called write_data and never called access_finish.
// Lets go looking for the slot that holds our configuration.
if (eeprom_data_written) DEBUG_ECHOLN("Dangling EEPROM write_data");
if (eeprom_data_written) DEBUG_ECHOLNPGM("Dangling EEPROM write_data");
uint32_t address = FLASH_ADDRESS_START;
while (address <= FLASH_ADDRESS_END) {
uint32_t address_value = (*(__IO uint32_t*)address);
@ -261,7 +261,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
const uint8_t c = TERN(FLASH_EEPROM_LEVELING, ram_eeprom[pos], eeprom_buffered_read_byte(pos));
if (writing) *value = c;

View file

@ -78,7 +78,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, const size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, const size_t size, uint16_t *crc, const bool writing/*=true*/) {
for (size_t i = 0; i < size; i++) {
uint8_t c = HAL_eeprom_data[pos + i];
if (writing) value[i] = c;

View file

@ -52,7 +52,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
// Read from either external EEPROM, program flash or Backup SRAM
const uint8_t c = ( *(__IO uint8_t *)(BKPSRAM_BASE + ((uint8_t*)pos)) );

View file

@ -65,7 +65,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
// Read from either external EEPROM, program flash or Backup SRAM
const uint8_t c = eeprom_read_byte((uint8_t*)pos);

View file

@ -0,0 +1,57 @@
/**
* 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
* (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/>.
*
*/
#include "../../inc/MarlinConfigPre.h"
#if NEEDS_HARDWARE_PWM
#include "HAL.h"
#include "timers.h"
void set_pwm_frequency(const pin_t pin, int f_desired) {
if (!PWM_PIN(pin)) return; // Don't proceed if no hardware timer
PinName pin_name = digitalPinToPinName(pin);
TIM_TypeDef *Instance = (TIM_TypeDef *)pinmap_peripheral(pin_name, PinMap_PWM); // Get HAL timer instance
LOOP_S_L_N(i, 0, NUM_HARDWARE_TIMERS) // Protect used timers
if (timer_instance[i] && timer_instance[i]->getHandle()->Instance == Instance)
return;
pwm_start(pin_name, f_desired, 0, RESOLUTION_8B_COMPARE_FORMAT);
}
void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
PinName pin_name = digitalPinToPinName(pin);
TIM_TypeDef *Instance = (TIM_TypeDef *)pinmap_peripheral(pin_name, PinMap_PWM);
uint16_t adj_val = Instance->ARR * v / v_size;
if (invert) adj_val = Instance->ARR - adj_val;
switch (get_pwm_channel(pin_name)) {
case TIM_CHANNEL_1: LL_TIM_OC_SetCompareCH1(Instance, adj_val); break;
case TIM_CHANNEL_2: LL_TIM_OC_SetCompareCH2(Instance, adj_val); break;
case TIM_CHANNEL_3: LL_TIM_OC_SetCompareCH3(Instance, adj_val); break;
case TIM_CHANNEL_4: LL_TIM_OC_SetCompareCH4(Instance, adj_val); break;
}
}
#endif // NEEDS_HARDWARE_PWM

View file

@ -28,9 +28,6 @@
// #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
//#endif
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on STM32."
#endif
#if ENABLED(SDCARD_EEPROM_EMULATION) && DISABLED(SDSUPPORT)
#undef SDCARD_EEPROM_EMULATION // Avoid additional error noise

View file

@ -21,30 +21,28 @@
*/
#pragma once
#include "../../../inc/MarlinConfig.h"
#ifdef STM32F1xx
#include "stm32f1xx_hal.h"
#define __IS_DMA_ENABLED(__HANDLE__) ((__HANDLE__)->Instance->CCR & DMA_CCR_EN)
#elif defined(STM32F4xx)
#include "stm32f4xx_hal.h"
#define __IS_DMA_ENABLED(__HANDLE__) ((__HANDLE__)->Instance->CR & DMA_SxCR_EN)
#else
#error FSMC TFT is currently only supported on STM32F1 and STM32F4 hardware.
#error "FSMC TFT is currently only supported on STM32F1 and STM32F4 hardware."
#endif
#ifndef LCD_READ_ID
#define LCD_READ_ID 0x04 // Read display identification information (0xD3 on ILI9341)
#define LCD_READ_ID 0x04 // Read display identification information (0xD3 on ILI9341)
#endif
#ifndef LCD_READ_ID4
#define LCD_READ_ID4 0xD3 // Read display identification information (0xD3 on ILI9341)
#endif
#define DATASIZE_8BIT SPI_DATASIZE_8BIT
#define DATASIZE_16BIT SPI_DATASIZE_16BIT
#define TFT_IO_DRIVER TFT_FSMC
#ifdef STM32F1xx
#define __IS_DMA_ENABLED(__HANDLE__) ((__HANDLE__)->Instance->CCR & DMA_CCR_EN)
#elif defined(STM32F4xx)
#define __IS_DMA_ENABLED(__HANDLE__) ((__HANDLE__)->Instance->CR & DMA_SxCR_EN)
#endif
#define DATASIZE_8BIT SPI_DATASIZE_8BIT
#define DATASIZE_16BIT SPI_DATASIZE_16BIT
#define TFT_IO_DRIVER TFT_FSMC
typedef struct {
__IO uint16_t REG;

View file

@ -1,6 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* 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
@ -99,7 +102,7 @@ void XPT2046::Init() {
#endif
}
else {
SPIx.Instance = NULL;
SPIx.Instance = nullptr;
SET_INPUT(TOUCH_MISO_PIN);
SET_OUTPUT(TOUCH_MOSI_PIN);
SET_OUTPUT(TOUCH_SCK_PIN);

View file

@ -1,6 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* 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

View file

@ -27,7 +27,6 @@
// Local defines
// ------------------------
#define NUM_HARDWARE_TIMERS 2
// Default timer priorities. Override by specifying alternate priorities in the board pins file.
// The TONE timer is not present here, as it currently cannot be set programmatically. It is set
@ -68,26 +67,23 @@
#endif
#ifdef STM32F0xx
#define MCU_TIMER_RATE (F_CPU) // Frequency of timer peripherals
#define MCU_STEP_TIMER 16
#define MCU_TEMP_TIMER 17
#elif defined(STM32F1xx)
#define MCU_TIMER_RATE (F_CPU)
#define MCU_STEP_TIMER 4
#define MCU_TEMP_TIMER 2
#elif defined(STM32F401xC) || defined(STM32F401xE)
#define MCU_TIMER_RATE (F_CPU / 2)
#define MCU_STEP_TIMER 9
#define MCU_TEMP_TIMER 10
#elif defined(STM32F4xx) || defined(STM32F7xx)
#define MCU_TIMER_RATE (F_CPU / 2)
#define MCU_STEP_TIMER 6 // STM32F401 has no TIM6, TIM7, or TIM8
#define MCU_TEMP_TIMER 14 // TIM7 is consumed by Software Serial if used.
#endif
#ifndef HAL_TIMER_RATE
#define HAL_TIMER_RATE MCU_TIMER_RATE
#define HAL_TIMER_RATE GetStepperTimerClkFreq()
#endif
#ifndef STEP_TIMER
#define STEP_TIMER MCU_STEP_TIMER
#endif
@ -109,12 +105,19 @@
// Private Variables
// ------------------------
HardwareTimer *timer_instance[NUM_HARDWARE_TIMERS] = { NULL };
HardwareTimer *timer_instance[NUM_HARDWARE_TIMERS] = { nullptr };
// ------------------------
// Public functions
// ------------------------
uint32_t GetStepperTimerClkFreq() {
// Timer input clocks vary between devices, and in some cases between timers on the same device.
// Retrieve at runtime to ensure device compatibility. Cache result to avoid repeated overhead.
static uint32_t clkfreq = timer_instance[STEP_TIMER_NUM]->getTimerClkFreq();
return clkfreq;
}
// frequency is in Hertz
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
if (!HAL_timer_initialized(timer_num)) {

View file

@ -43,6 +43,8 @@
#define hal_timer_t uint32_t
#define HAL_TIMER_TYPE_MAX UINT16_MAX
#define NUM_HARDWARE_TIMERS 2
#ifndef STEP_TIMER_NUM
#define STEP_TIMER_NUM 0 // Timer Index for Stepper
#endif
@ -57,7 +59,8 @@
// TODO: get rid of manual rate/prescale/ticks/cycles taken for procedures in stepper.cpp
#define STEPPER_TIMER_RATE 2000000 // 2 Mhz
#define STEPPER_TIMER_PRESCALE ((HAL_TIMER_RATE)/(STEPPER_TIMER_RATE))
extern uint32_t GetStepperTimerClkFreq();
#define STEPPER_TIMER_PRESCALE (GetStepperTimerClkFreq() / (STEPPER_TIMER_RATE))
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE
@ -102,7 +105,7 @@ void SetTimerInterruptPriorities();
// FORCE_INLINE because these are used in performance-critical situations
FORCE_INLINE bool HAL_timer_initialized(const uint8_t timer_num) {
return timer_instance[timer_num] != NULL;
return timer_instance[timer_num] != nullptr;
}
FORCE_INLINE static hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
return HAL_timer_initialized(timer_num) ? timer_instance[timer_num]->getCount() : 0;

View file

@ -21,7 +21,7 @@
#include "../../inc/MarlinConfigPre.h"
#if ENABLED(EMERGENCY_PARSER)
#if ENABLED(EMERGENCY_PARSER) && USBD_USE_CDC
#include "usb_serial.h"
#include "../../feature/e_parser.h"

View file

@ -25,23 +25,26 @@
#if ENABLED(USE_WATCHDOG)
#include "../../inc/MarlinConfig.h"
#define WDT_TIMEOUT_US TERN(WATCHDOG_DURATION_8S, 8000000, 4000000) // 4 or 8 second timeout
#include "watchdog.h"
#include <IWatchdog.h>
#include "../../inc/MarlinConfig.h"
void watchdog_init() {
#if DISABLED(DISABLE_WATCHDOG_INIT)
IWatchdog.begin(4000000); // 4 sec timeout
#endif
}
#include "watchdog.h"
#include <IWatchdog.h>
void HAL_watchdog_refresh() {
IWatchdog.reload();
#if DISABLED(PINS_DEBUGGING) && PIN_EXISTS(LED)
TOGGLE(LED_PIN); // heartbeat indicator
#endif
}
void watchdog_init() {
#if DISABLED(DISABLE_WATCHDOG_INIT)
IWatchdog.begin(WDT_TIMEOUT_US);
#endif
}
void HAL_watchdog_refresh() {
IWatchdog.reload();
#if DISABLED(PINS_DEBUGGING) && PIN_EXISTS(LED)
TOGGLE(LED_PIN); // heartbeat indicator
#endif
}
#endif // USE_WATCHDOG
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC

View file

@ -130,7 +130,7 @@ const uint8_t adc_pins[] = {
#if ENABLED(FILAMENT_WIDTH_SENSOR)
FILWIDTH_PIN,
#endif
#if ENABLED(ADC_KEYPAD)
#if HAS_ADC_BUTTONS
ADC_KEYPAD_PIN,
#endif
#if HAS_JOY_ADC_X
@ -187,7 +187,7 @@ enum TempPinIndex : char {
#if ENABLED(FILAMENT_WIDTH_SENSOR)
FILWIDTH,
#endif
#if ENABLED(ADC_KEYPAD)
#if HAS_ADC_BUTTONS
ADC_KEY,
#endif
#if HAS_JOY_ADC_X
@ -389,7 +389,7 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) {
#if ENABLED(FILAMENT_WIDTH_SENSOR)
case FILWIDTH_PIN: pin_index = FILWIDTH; break;
#endif
#if ENABLED(ADC_KEYPAD)
#if HAS_ADC_BUTTONS
case ADC_KEYPAD_PIN: pin_index = ADC_KEY; break;
#endif
#if ENABLED(POWER_MONITOR_CURRENT)

View file

@ -124,7 +124,7 @@ void HAL_idletask();
#endif
#ifndef digitalPinHasPWM
#define digitalPinHasPWM(P) (PIN_MAP[P].timer_device != nullptr)
#define digitalPinHasPWM(P) !!PIN_MAP[P].timer_device
#define NO_COMPILE_TIME_PWM
#endif
@ -244,3 +244,20 @@ void analogWrite(pin_t pin, int pwm_val8); // PWM only! mul by 257 in maple!?
#define PLATFORM_M997_SUPPORT
void flashFirmware(const int16_t);
#define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment
/**
* set_pwm_frequency
* Set the frequency of the timer corresponding to the provided pin
* All Timer PWM pins run at the same frequency
*/
void set_pwm_frequency(const pin_t pin, int f_desired);
/**
* set_pwm_duty
* 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]
*/
void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size=255, const bool invert=false);

View file

@ -0,0 +1,45 @@
/**
* 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
* (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>
/**
* Marlin currently requires 3 SPI classes:
*
* SPIClass:
* This class is normally provided by frameworks and has a semi-default interface.
* This is needed because some libraries reference it globally.
*
* SPISettings:
* Container for SPI configs for SPIClass. As above, libraries may reference it globally.
*
* These two classes are often provided by frameworks so we cannot extend them to add
* useful methods for Marlin.
*
* MarlinSPI:
* Provides the default SPIClass interface plus some Marlin goodies such as a simplified
* interface for SPI DMA transfer.
*
*/
using MarlinSPI = SPIClass;

View file

@ -147,6 +147,18 @@ SPIClass::SPIClass(uint32_t spi_num) {
_currentSetting->state = SPI_STATE_IDLE;
}
SPIClass::SPIClass(int8_t mosi, int8_t miso, int8_t sclk, int8_t ssel) {
#if BOARD_NR_SPI >= 1
if (mosi == BOARD_SPI1_MOSI_PIN) SPIClass(1);
#endif
#if BOARD_NR_SPI >= 2
if (mosi == BOARD_SPI2_MOSI_PIN) SPIClass(2);
#endif
#if BOARD_NR_SPI >= 3
if (mosi == BOARD_SPI3_MOSI_PIN) SPIClass(3);
#endif
}
/**
* Set up/tear down
*/
@ -656,7 +668,7 @@ static const spi_pins* dev_to_spi_pins(spi_dev *dev) {
#if BOARD_NR_SPI >= 3
case RCC_SPI3: return board_spi_pins + 2;
#endif
default: return NULL;
default: return nullptr;
}
}

View file

@ -163,6 +163,11 @@ public:
*/
SPIClass(uint32_t spiPortNumber);
/**
* Init using pins
*/
SPIClass(int8_t mosi, int8_t miso, int8_t sclk, int8_t ssel=-1);
/**
* @brief Equivalent to begin(SPI_1_125MHZ, MSBFIRST, 0).
*/

View file

@ -3,7 +3,7 @@ import sys
#dynamic build flags for generic compile options
if __name__ == "__main__":
args = " ".join([ "-std=gnu11",
args = " ".join([ "-std=gnu++14",
"-Os",
"-mcpu=cortex-m3",
"-mthumb",

View file

@ -68,7 +68,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
uint8_t * const p = (uint8_t * const)pos;
uint8_t c = eeprom_read_byte(p);

View file

@ -101,7 +101,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false; // return true for any error
}
bool PersistentStore::read_data(int &pos, uint8_t* value, const size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, const size_t size, uint16_t *crc, const bool writing/*=true*/) {
const uint8_t * const buff = writing ? &value[0] : &ram_eeprom[pos];
if (writing) for (size_t i = 0; i < size; i++) value[i] = ram_eeprom[pos + i];
crc16(crc, buff, size);

View file

@ -79,7 +79,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, const size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, const size_t size, uint16_t *crc, const bool writing/*=true*/) {
for (size_t i = 0; i < size; i++) {
uint8_t c = HAL_eeprom_data[pos + i];
if (writing) value[i] = c;

View file

@ -72,7 +72,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
uint8_t c = eeprom_read_byte((uint8_t*)pos);
if (writing && value) *value = c;

View file

@ -0,0 +1,68 @@
/**
* 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
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifdef __STM32F1__
#include "../../inc/MarlinConfigPre.h"
#if NEEDS_HARDWARE_PWM
#include <pwm.h>
#include "HAL.h"
#include "timers.h"
void set_pwm_frequency(const pin_t pin, int f_desired) {
if (!PWM_PIN(pin)) return; // Don't proceed if no hardware timer
timer_dev *timer = PIN_MAP[pin].timer_device;
uint8_t channel = PIN_MAP[pin].timer_channel;
// Protect used timers
if (timer == get_timer_dev(TEMP_TIMER_NUM)) return;
if (timer == get_timer_dev(STEP_TIMER_NUM)) return;
#if PULSE_TIMER_NUM != STEP_TIMER_NUM
if (timer == get_timer_dev(PULSE_TIMER_NUM)) return;
#endif
if (!(timer->regs.bas->SR & TIMER_CR1_CEN)) // Ensure the timer is enabled
timer_init(timer);
timer_set_mode(timer, channel, TIMER_PWM);
uint16_t preload = 255; // Lock 255 PWM resolution for high frequencies
int32_t prescaler = (HAL_TIMER_RATE) / (preload + 1) / f_desired - 1;
if (prescaler > 65535) { // For low frequencies increase prescaler
prescaler = 65535;
preload = (HAL_TIMER_RATE) / (prescaler + 1) / f_desired - 1;
}
if (prescaler < 0) return; // Too high frequency
timer_set_reload(timer, preload);
timer_set_prescaler(timer, prescaler);
}
void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
timer_dev *timer = PIN_MAP[pin].timer_device;
uint16_t max_val = timer->regs.bas->ARR * v / v_size;
if (invert) max_val = v_size - max_val;
pwmWrite(pin, max_val);
}
#endif // NEEDS_HARDWARE_PWM
#endif // __STM32F1__

View file

@ -51,7 +51,7 @@
#define IS_INPUT(IO) (_GET_MODE(IO) == GPIO_INPUT_FLOATING || _GET_MODE(IO) == GPIO_INPUT_ANALOG || _GET_MODE(IO) == GPIO_INPUT_PU || _GET_MODE(IO) == GPIO_INPUT_PD)
#define IS_OUTPUT(IO) (_GET_MODE(IO) == GPIO_OUTPUT_PP || _GET_MODE(IO) == GPIO_OUTPUT_OD)
#define PWM_PIN(IO) (PIN_MAP[IO].timer_device != nullptr)
#define PWM_PIN(IO) !!PIN_MAP[IO].timer_device
// digitalRead/Write wrappers
#define extDigitalRead(IO) digitalRead(IO)

View file

@ -25,15 +25,6 @@
* Test STM32F1-specific configuration values for errors at compile-time.
*/
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on STM32F1."
#endif
#if !defined(HAVE_SW_SERIAL) && HAS_TMC_SW_SERIAL
#warning "With TMC2208/9 consider using SoftwareSerialM with HAVE_SW_SERIAL and appropriate SS_TIMER."
#error "Missing SoftwareSerial implementation."
#endif
#if ENABLED(SDCARD_EEPROM_EMULATION) && DISABLED(SDSUPPORT)
#undef SDCARD_EEPROM_EMULATION // Avoid additional error noise
#if USE_FALLBACK_EEPROM
@ -51,3 +42,10 @@
#if ENABLED(NEOPIXEL_LED)
#error "NEOPIXEL_LED (Adafruit NeoPixel) is not supported for HAL/STM32F1. Comment out this line to proceed at your own risk!"
#endif
// Emergency Parser needs at least one serial with HardwareSerial or USBComposite.
// The USBSerial maple don't allow any hook to implement EMERGENCY_PARSER.
// And copy all USBSerial code to marlin space to support EMERGENCY_PARSER, when we have another options, don't worth it.
#if ENABLED(EMERGENCY_PARSER) && !defined(USE_USB_COMPOSITE) && ((SERIAL_PORT == -1 && !defined(SERIAL_PORT_2)) || (SERIAL_PORT_2 == -1 && !defined(SERIAL_PORT)))
#error "EMERGENCY_PARSER is only supported by HardwareSerial or USBComposite in HAL/STM32F1."
#endif

View file

@ -49,10 +49,6 @@
#undef SDSS
#define SDSS SS_PIN
#if ENABLED(ENABLE_SPI3)
#define SPI_DEVICE 3
#elif ENABLED(ENABLE_SPI2)
#define SPI_DEVICE 2
#else
#ifndef SPI_DEVICE
#define SPI_DEVICE 1
#endif

View file

@ -22,7 +22,7 @@
#pragma once
#ifndef LCD_READ_ID
#define LCD_READ_ID 0x04 // Read display identification information (0xD3 on ILI9341)
#define LCD_READ_ID 0x04 // Read display identification information (0xD3 on ILI9341)
#endif
#ifndef LCD_READ_ID4
#define LCD_READ_ID4 0xD3 // Read display identification information (0xD3 on ILI9341)
@ -30,9 +30,9 @@
#include <libmaple/dma.h>
#define DATASIZE_8BIT DMA_SIZE_8BITS
#define DATASIZE_16BIT DMA_SIZE_16BITS
#define TFT_IO_DRIVER TFT_FSMC
#define DATASIZE_8BIT DMA_SIZE_8BITS
#define DATASIZE_16BIT DMA_SIZE_16BITS
#define TFT_IO_DRIVER TFT_FSMC
typedef struct {
__IO uint16_t REG;

View file

@ -1,6 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* 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

View file

@ -1,6 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* 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

View file

@ -33,6 +33,11 @@
#include <libmaple/iwdg.h>
#include "watchdog.h"
/**
* The watchdog clock is 40Khz. So for a 4s or 8s interval use a /256 preescaler and 625 or 1250 reload value (counts down to 0).
*/
#define STM32F1_WD_RELOAD TERN(WATCHDOG_DURATION_8S, 1250, 625) // 4 or 8 second timeout
void HAL_watchdog_refresh() {
#if DISABLED(PINS_DEBUGGING) && PIN_EXISTS(LED)
TOGGLE(LED_PIN); // heartbeat indicator
@ -49,7 +54,7 @@ void watchdogSetup() {
*
* @return No return
*
* @details The watchdog clock is 40Khz. We need a 4 seconds interval, so use a /256 preescaler and 625 reload value (counts down to 0)
* @details The watchdog clock is 40Khz. So for a 4s or 8s interval use a /256 preescaler and 625 or 1250 reload value (counts down to 0).
*/
void watchdog_init() {
#if DISABLED(DISABLE_WATCHDOG_INIT)

View file

@ -27,18 +27,9 @@
#include <libmaple/iwdg.h>
/**
* The watchdog clock is 40Khz. We need a 4 seconds interval, so use a /256 preescaler and
* 625 reload value (counts down to 0)
* use 1250 for 8 seconds
*/
#define STM32F1_WD_RELOAD 625
// Arduino STM32F1 core now has watchdog support
// Initialize watchdog with a 4 second countdown time
// Initialize watchdog with a 4 or 8 second countdown time
void watchdog_init();
// Reset watchdog. MUST be called at least every 4 seconds after the
// first watchdog_init or STM32F1 will reset.
// Reset watchdog. MUST be called every 4 or 8 seconds after the
// first watchdog_init or the STM32F1 will reset.
void HAL_watchdog_refresh();

View file

@ -96,7 +96,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
uint8_t c = ee_read_byte((uint8_t*)pos);
if (writing) *value = c;

View file

@ -62,7 +62,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
uint8_t c = eeprom_read_byte((uint8_t*)pos);
if (writing) *value = c;

View file

@ -25,31 +25,33 @@
#if ENABLED(USE_WATCHDOG)
#include "watchdog.h"
#include "watchdog.h"
IWDG_HandleTypeDef hiwdg;
#define WDT_TIMEOUT_COUNT TERN(WATCHDOG_DURATION_8S, 8192, 4096) // 4 or 8 second timeout
void watchdog_init() {
hiwdg.Instance = IWDG;
hiwdg.Init.Prescaler = IWDG_PRESCALER_32; //32kHz LSI clock and 32x prescalar = 1024Hz IWDG clock
hiwdg.Init.Reload = 4095; //4095 counts = 4 seconds at 1024Hz
if (HAL_IWDG_Init(&hiwdg) != HAL_OK) {
//Error_Handler();
}
else {
#if PIN_EXISTS(LED) && DISABLED(PINS_DEBUGGING)
TOGGLE(LED_PIN); // heartbeat indicator
#endif
}
IWDG_HandleTypeDef hiwdg;
void watchdog_init() {
hiwdg.Instance = IWDG;
hiwdg.Init.Prescaler = IWDG_PRESCALER_32; // 32kHz LSI clock and 32x prescalar = 1024Hz IWDG clock
hiwdg.Init.Reload = WDT_TIMEOUT_COUNT - 1;
if (HAL_IWDG_Init(&hiwdg) != HAL_OK) {
//Error_Handler();
}
void HAL_watchdog_refresh() {
/* Refresh IWDG: reload counter */
if (HAL_IWDG_Refresh(&hiwdg) != HAL_OK) {
/* Refresh Error */
//Error_Handler();
}
else {
#if PIN_EXISTS(LED) && DISABLED(PINS_DEBUGGING)
TOGGLE(LED_PIN); // heartbeat indicator
#endif
}
}
void HAL_watchdog_refresh() {
/* Refresh IWDG: reload counter */
if (HAL_IWDG_Refresh(&hiwdg) != HAL_OK) {
/* Refresh Error */
//Error_Handler();
}
}
#endif // USE_WATCHDOG
#endif // STM32GENERIC && (STM32F4 || STM32F7)

View file

@ -57,7 +57,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
uint8_t c = eeprom_read_byte((uint8_t*)pos);
if (writing) *value = c;

View file

@ -27,9 +27,11 @@
#include "watchdog.h"
#define WDT_TIMEOUT_MS TERN(WATCHDOG_DURATION_8S, 8000, 4000) // 4 or 8 second timeout
void watchdog_init() {
WDOG_TOVALH = 0;
WDOG_TOVALL = 4000;
WDOG_TOVALL = WDT_TIMEOUT_MS;
WDOG_STCTRLH = WDOG_STCTRLH_WDOGEN;
}

View file

@ -61,7 +61,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
uint8_t c = eeprom_read_byte((uint8_t*)pos);
if (writing) *value = c;

View file

@ -27,9 +27,11 @@
#include "watchdog.h"
#define WDT_TIMEOUT_MS TERN(WATCHDOG_DURATION_8S, 8000, 4000) // 4 or 8 second timeout
void watchdog_init() {
WDOG_TOVALH = 0;
WDOG_TOVALL = 4000;
WDOG_TOVALL = WDT_TIMEOUT_MS;
WDOG_STCTRLH = WDOG_STCTRLH_WDOGEN;
}

View file

@ -66,10 +66,12 @@
#ifdef SERIAL_PORT_2
#if SERIAL_PORT_2 == -1
#define MYSERIAL1 usbSerial
#elif SERIAL_PORT_2 == -2
#define MYSERIAL1 ethernet.telnetClient
#elif WITHIN(SERIAL_PORT_2, 0, 8)
#define MYSERIAL1 MSERIAL(SERIAL_PORT_2)
#else
#error "SERIAL_PORT_2 must be from -1 to 8. Please update your configuration."
#error "SERIAL_PORT_2 must be from -2 to 8. Please update your configuration."
#endif
#endif

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