Compare commits

..

624 Commits

Author SHA1 Message Date
InsanityAutomation d46cf60548 btt stm32 CR6 Fixes 2024-06-26 10:26:47 -04:00
InsanityAutomation e94a1b16c4 Upstream fixes 2024-06-18 15:46:57 -04:00
InsanityAutomation b44c03c203 SKR2/3 2024-06-03 14:40:38 -04:00
InsanityAutomation 67cdaa89cf Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2024-04-16 10:05:38 -04:00
InsanityAutomation db9763c65f Merge branch 'Tenlog_DWIN' into CrealityDwin2.0_Bleeding 2024-04-16 10:05:17 -04:00
InsanityAutomation 0055b6b423 Sanity Check IDEX X1_MAX_POS 2024-04-10 16:24:02 -04:00
InsanityAutomation ab38abb237 Fix IDEX X2 Direction 2024-04-10 16:09:39 -04:00
InsanityAutomation 907761e2bb Merge commit followup 2024-04-10 15:08:15 -04:00
InsanityAutomation eba4b1f556 Merge branch 'bugfix-2.1.x' into Tenlog_DWIN 2024-04-08 15:30:09 -04:00
InsanityAutomation 30ba2241e3 Fix icons 2024-01-29 14:56:35 -05:00
InsanityAutomation 6bb17e68c1 Update vars 2024-01-28 16:12:30 -05:00
InsanityAutomation 7a7f723eb6 Update Version.h 2024-01-28 16:12:16 -05:00
InsanityAutomation 1daa885dbc More g30 2023-09-28 09:16:58 -04:00
InsanityAutomation c995ecb933 Update Creality_DWIN.cpp 2023-09-24 22:17:48 -04:00
InsanityAutomation 901628c53e tweaks to probe tramming 2023-09-24 22:17:48 -04:00
InsanityAutomation b8229c14d4 Enable tramming with probe 2023-09-24 22:17:36 -04:00
InsanityAutomation 8bd0501bdf Allow bed tramming with probe to automatically calculate points by probe limits 2023-09-24 22:14:31 -04:00
InsanityAutomation b436a19f23 Update Creality_DWIN.cpp 2023-09-24 22:14:08 -04:00
InsanityAutomation 97179ddad3 tweaks to probe tramming 2023-09-24 21:51:22 -04:00
InsanityAutomation 57815d2d65 Enable tramming with probe 2023-09-17 17:12:09 -04:00
InsanityAutomation 67aa28f0c1 Allow bed tramming with probe to automatically calculate points by probe limits 2023-09-17 17:11:39 -04:00
InsanityAutomation 8d4eadefef New binaries 2023-09-10 16:48:56 -04:00
InsanityAutomation 56a41810d2 Runout sensor fixes 2023-08-27 13:17:25 -04:00
InsanityAutomation b5d7f3ef12 Runout sensor fixes 2023-08-27 13:17:01 -04:00
InsanityAutomation e0ff391eba Build fixes for stm32 2023-08-26 14:31:18 -04:00
InsanityAutomation 8d44b6c427 Merge branch 'Tenlog_DWIN' into CrealityDwin2.0_Bleeding 2023-08-24 11:11:07 -04:00
InsanityAutomation 953ea9f16e Revert runout changes 2023-08-22 20:55:40 -04:00
InsanityAutomation 59dffb5f1c Pin fix, rx stuck state flush 2023-08-05 18:03:21 -04:00
InsanityAutomation d3704f834a Revert limiting change 2023-08-04 11:14:17 -04:00
InsanityAutomation 13395db032 First round merge fixes 2023-08-04 11:13:28 -04:00
InsanityAutomation ebde4ceb35 Merge branch 'bugfix-2.1.x' into Tenlog_DWIN 2023-08-04 10:38:20 -04:00
InsanityAutomation 6128d61186 Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.1.x 2023-08-04 09:47:12 -04:00
InsanityAutomation 55cd1f51a4 additional RX reset, new binaries 2023-07-31 17:31:42 -04:00
InsanityAutomation 900464dc72 Update binaries 2023-07-30 15:10:35 -04:00
InsanityAutomation b87f2a86c9 Clean up unused variables, add debug output on serial rx 2023-07-29 17:42:52 -04:00
InsanityAutomation 6657c44cc7 Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.1.x 2023-07-26 11:52:43 -04:00
InsanityAutomation 52c37ee699 Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.1.x 2023-06-23 09:26:59 -04:00
InsanityAutomation 97e0ed7393 fix touch ui for stm32 2023-05-31 23:32:39 -04:00
InsanityAutomation 7862493991 Build tweaks 2023-05-31 19:14:39 -04:00
InsanityAutomation 63e91dc0af Purge old / tenlog imported 2023-05-30 11:16:24 -04:00
InsanityAutomation e713d5ee2b Version bump and notes 2023-05-29 15:17:44 -04:00
InsanityAutomation 52f1474281 More dwin serial throttling 2023-05-29 13:28:31 -04:00
InsanityAutomation a512f6b40a More dwin serial throttling 2023-05-29 13:24:54 -04:00
InsanityAutomation 911093a28c Restore Ver file, remove broken sanity check 2023-05-19 18:17:57 -04:00
InsanityAutomation b05b35ece9 Restore files killed by branch merge 2023-05-14 13:17:03 -04:00
InsanityAutomation 0fa6605b49 Merge branch 'Tenlog_DWIN' into CrealityDwin2.0_Bleeding 2023-05-13 14:21:47 -04:00
InsanityAutomation b007343710 purge stale binaries 2023-05-13 14:19:41 -04:00
InsanityAutomation 7e02ffb9e9 New binaries 2023-05-10 11:05:47 -04:00
InsanityAutomation 73c2954ecb New binaries 2023-05-10 11:05:28 -04:00
InsanityAutomation 1e8f6ba749 Update Creality_DWIN.cpp 2023-05-08 13:27:58 -04:00
InsanityAutomation 134958a535 Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.1.x 2023-04-24 13:25:58 -04:00
InsanityAutomation 99378bfad4 Update Creality_DWIN.cpp 2023-04-24 13:25:36 -04:00
InsanityAutomation 3eb7bc37b8 force M422R after adjusting probe offsets 2023-04-13 19:59:05 -04:00
InsanityAutomation d347e6ab22 Updated Binaries 2023-04-13 16:53:51 -04:00
InsanityAutomation 793e1c0b1d further compress 32_screens.icl below 512k 2023-04-12 20:10:03 -04:00
InsanityAutomation 69c6b0f812 Serial comms tweaks to improve responsiveness on screens that wont honor disabling x82 ack 2023-04-12 20:09:46 -04:00
InsanityAutomation fa25cab5ce New Binaries 2023-04-06 13:31:39 -04:00
InsanityAutomation 33afb53201 Endstop interupts and missed variants 2023-04-06 10:26:39 -04:00
InsanityAutomation 6dc15e953f Update low res screen 2023-04-01 16:35:22 -04:00
InsanityAutomation 19a449cdaa adjustable babystep increments 2023-04-01 16:33:46 -04:00
InsanityAutomation 9ebc74c1e7 fix 4988 dir 2023-04-01 16:33:35 -04:00
InsanityAutomation d69b857d8b totally kill pages 58 and 60 2023-03-27 11:09:16 -04:00
InsanityAutomation 0a9ea5968a Update high res screen files 2023-03-26 19:56:08 -04:00
InsanityAutomation 4c90eb0173 Bump version 2023-03-26 19:23:28 -04:00
InsanityAutomation 7bcfede5b7 Trim unnecessary Envs as we can easily select at runtime 2023-03-26 19:23:19 -04:00
InsanityAutomation 7385ce389a Runout, IS, and LA Screens 2023-03-26 19:22:50 -04:00
InsanityAutomation a1b0bfc23a Config tweaks to limit ram usage 2023-03-26 19:22:19 -04:00
InsanityAutomation 773a894209 Add IS and Runout Mode ExtUI Hooks 2023-03-26 19:21:35 -04:00
InsanityAutomation d873148f2f Fix erroneous power off message when function is called with no action 2023-03-26 19:20:39 -04:00
InsanityAutomation 0f7ef6b586 Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.1.x 2023-03-10 09:10:03 -05:00
InsanityAutomation 0766fcd082 Update CombinedLandscapeDwin_TM3D_V8.7z 2023-03-08 17:44:55 -05:00
InsanityAutomation f2060b5c34 Add V8 screen files 2023-03-08 17:38:15 -05:00
InsanityAutomation 01479cab84 Final binaries 2023-03-02 20:48:41 -05:00
InsanityAutomation 056db1c3ae update binaries, couple small fixes 2023-03-02 20:43:57 -05:00
InsanityAutomation 57e4fe6381 Add debug message, reduce ram usage to avoid comm corruption from stack 2023-03-01 22:25:01 -05:00
InsanityAutomation 6531db383c Update Configuration.h 2023-02-28 18:31:31 -05:00
InsanityAutomation 401f5cf1ca Tenlog Shipped Envs 2023-02-28 18:18:00 -05:00
InsanityAutomation ab427804ac Add debug message, reduce ram usage to avoid comm corruption from stack 2023-02-26 15:22:37 -05:00
InsanityAutomation 3a4d705308 Update Configuration.h 2023-02-25 13:31:13 -05:00
InsanityAutomation 56ee00f354 Minor tweak, fix fan speed input 2023-02-24 15:34:06 -05:00
InsanityAutomation f434f368ac Merge branch 'CrealityDwin2.0_Bleeding' of https://github.com/InsanityAutomation/Marlin into CrealityDwin2.0_Bleeding 2023-02-22 19:13:58 -05:00
InsanityAutomation 1d9cf20d4b Merge pull request #295 from bob-anthony/DGUS_DISPLAY_FIXES
Fix compiling errors for DGUS displays
2023-02-22 19:13:58 -05:00
Tom Brazier 313014515c MIN_ISR_LOOP_CYCLES already includes ISR_[XY]_STEPPER_CYCLES and more, it should not be counted 2023-02-22 19:13:58 -05:00
Tom Brazier 11d9bb4a66 Don't include MIN_ISR_LOOP_CYCLES in calculation for ISR_SHAPING_LOOP_CYCLES if input shaping is disabled 2023-02-22 19:13:58 -05:00
Tom Brazier 7591c8661f Also implement 2 cycle saving in MultiU24X32toH16() 2023-02-22 19:13:58 -05:00
Tom Brazier 456b0a4011 Fixed rounding of fractional part of multiplication results (a bug inherited from Sprinter). Cleaned up comments and function naming. Minor optimisation of MultiU8X16toH16(). 2023-02-22 19:13:58 -05:00
InsanityAutomation 278c49e9de Merge branch 'CrealityDwin2.0_Bleeding' of https://github.com/InsanityAutomation/Marlin into CrealityDwin2.0_Bleeding 2023-02-19 19:17:49 -05:00
InsanityAutomation 0ed4727767 Merge pull request #295 from bob-anthony/DGUS_DISPLAY_FIXES
Fix compiling errors for DGUS displays
2023-02-19 18:30:31 -05:00
Tom Brazier fcbc6a929c MIN_ISR_LOOP_CYCLES already includes ISR_[XY]_STEPPER_CYCLES and more, it should not be counted 2023-02-19 18:01:46 -05:00
Tom Brazier 3c9b927291 Don't include MIN_ISR_LOOP_CYCLES in calculation for ISR_SHAPING_LOOP_CYCLES if input shaping is disabled 2023-02-19 18:01:44 -05:00
Tom Brazier aa3cd470da Also implement 2 cycle saving in MultiU24X32toH16() 2023-02-19 17:58:41 -05:00
Tom Brazier 004fd179d1 Fixed rounding of fractional part of multiplication results (a bug inherited from Sprinter). Cleaned up comments and function naming. Minor optimisation of MultiU8X16toH16(). 2023-02-19 17:58:39 -05:00
InsanityAutomation eab01ba183 circle around as upstream never merged 2023-02-19 17:54:52 -05:00
InsanityAutomation 42bd6e74a7 Slightly more robust pause resume and faster serial event handling 2023-02-19 17:54:51 -05:00
InsanityAutomation 67d6f2f877 circle around as upstream never merged 2023-02-19 17:53:32 -05:00
InsanityAutomation 5e10f6d8d1 Slightly more robust pause resume and faster serial event handling 2023-02-19 15:23:27 -05:00
Bob Anthony 3a1f3a4ba3 Remove junk files 2023-02-18 04:01:15 -06:00
Bob Anthony 9697434981 Fix compiling errors for the dgus display
Handler code section needed for any leveling not just probe.

Fix for renamed variables upstream.

Added default to switch statement to resolve compile warning.
2023-02-18 03:45:50 -06:00
Bob Anthony 6dec98e54c Merge pull request #4 from InsanityAutomation/CrealityDwin2.0_Bleeding
Merge bleeding branch changes
2023-02-18 03:12:38 -06:00
Bob Anthony 39201418ce Merge remote-tracking branch 'origin/CR-X-Config-with-Purge-Bucket' into CrealityDwin_2.0 2023-02-18 02:37:36 -06:00
InsanityAutomation 8a30019a18 Update README.md 2023-02-17 17:25:17 -05:00
InsanityAutomation a1c5735d6f Update README.md 2023-02-17 17:24:44 -05:00
InsanityAutomation b02badf25e Remove obsolete bins from devel repo 2023-02-17 17:06:25 -05:00
InsanityAutomation 686fe6fe74 Patch version string 2023-02-15 19:17:03 -05:00
InsanityAutomation 8ece5bcbee Update Version.h 2023-02-14 23:29:30 -05:00
InsanityAutomation ae9fe880f8 Recompress ScreenICL 2023-02-14 23:21:29 -05:00
InsanityAutomation 9c48d93a36 Binaries now identify machine and options in version info 2023-02-13 10:29:11 -05:00
InsanityAutomation fad005fdc2 Readme and Version info 2023-02-12 12:56:09 -05:00
InsanityAutomation 0cf916ce13 Updated binaries 2023-02-11 13:35:20 -05:00
InsanityAutomation 0a54b35981 Updated screen configs, added low res/high res envs 2023-02-11 12:45:28 -05:00
InsanityAutomation 3b7871005a Update Creality_DWIN.cpp 2023-02-10 16:26:46 -05:00
InsanityAutomation 9cbb6b1512 Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.1.x 2023-02-06 15:59:13 -05:00
InsanityAutomation 0bd0b3df80 tweak readme, remove conflicting sanity check 2023-02-05 14:17:38 -05:00
InsanityAutomation 549619995f Update stm32f1-maple.ini 2023-02-05 13:55:27 -05:00
InsanityAutomation 47c0dc631c Make high res screen default, add high res dwin fileset 2023-02-05 13:39:17 -05:00
InsanityAutomation 5c39469b94 Config tweaks and updated TFT files for low res screens 2023-02-04 11:57:05 -05:00
InsanityAutomation 8ea02e3ede add casting for handler 2023-02-03 17:40:47 -05:00
InsanityAutomation a33f7ddc8c Merge branch 'CrealityDwin2.0_Bleeding' into Tenlog_DWIN 2023-02-03 15:35:23 -05:00
InsanityAutomation 462b586c76 Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2023-02-03 15:31:34 -05:00
InsanityAutomation af85a271a5 Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.1.x 2023-02-03 15:20:56 -05:00
InsanityAutomation 1bab76a98a Revert "Fix for Nema23 CNC driver on D6"
This reverts commit c43d064122.
2023-02-03 15:20:11 -05:00
InsanityAutomation 25de1facb5 more work on dint type for offsets 2023-02-03 15:20:03 -05:00
InsanityAutomation c43d064122 Fix for Nema23 CNC driver on D6 2023-02-03 15:19:40 -05:00
InsanityAutomation 5a9736bfa3 add endian swap 2023-02-03 15:19:40 -05:00
InsanityAutomation 359258701f Move writevariables to class with other serial sends 2023-02-03 15:19:40 -05:00
InsanityAutomation 04f5a42c60 Idex offsets to uint32 4 byte 2023-02-03 15:19:40 -05:00
InsanityAutomation 6dc27f6fc0 more work on dint type for offsets 2023-02-03 15:19:08 -05:00
InsanityAutomation b010d0782f Fix for Nema23 CNC driver on D6 2023-02-03 15:18:42 -05:00
InsanityAutomation 6fd0c3f6a8 add endian swap 2023-01-24 20:38:53 -05:00
InsanityAutomation 8f7735655e Move writevariables to class with other serial sends 2023-01-24 20:28:35 -05:00
InsanityAutomation 5f431c140f Idex offsets to uint32 4 byte 2023-01-24 20:21:08 -05:00
InsanityAutomation 23f580bd03 Idex offsets to uint32 4 byte 2023-01-24 20:20:31 -05:00
MarkMan0 a7eacbcc49 🐛 Fix, Refactor PID scaling (#25096) 2022-12-17 23:48:33 -06:00
Scott Lahteine 05e2e059e3 🐛 Fix M593 F 2022-12-17 23:04:49 -06:00
InsanityAutomation 2752234e14 large rom enable IS 2022-12-04 14:21:12 -05:00
ellensp c87943cff1 better 2022-12-04 12:24:05 -05:00
ellensp 661abff6e6 use uint32_t not int
fixes issue https://github.com/MarlinFirmware/Marlin/issues/25018
2022-12-04 12:24:05 -05:00
kisslorand 7e0478c97d Fix commit 3ba9387 2022-12-04 12:23:04 -05:00
Tom Brazier a0ed4d51bc Input shaping buffer size metaprogramming for disctict E axes 2022-12-04 12:22:35 -05:00
Tom Brazier 005019b82d Better error message 2022-12-04 12:22:35 -05:00
Tom Brazier 55d943e9d2 Make it possible to override the shaping buffer size calculations in confg.
Also potential SRAM reduction when not using ADAPTIVE_STEP_SMOOTHING on 32 bit MCUs.
2022-12-04 12:22:35 -05:00
InsanityAutomation f3e8919552 Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-12-04 11:46:46 -05:00
InsanityAutomation 2bd9bcf61b Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-11-28 15:01:14 -05:00
InsanityAutomation 3ec124f417 Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-10-29 19:42:55 -04:00
InsanityAutomation c5263830d8 Update planner.cpp 2022-10-18 16:51:02 -04:00
InsanityAutomation 050e0db3a3 Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-10-18 16:42:19 -04:00
InsanityAutomation f8f918590c Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-10-16 15:05:28 -04:00
InsanityAutomation 5d56a71423 Update Creality_DWIN.cpp 2022-10-10 14:38:29 -04:00
InsanityAutomation 93b664182e Final tweaks and add binaries 2022-09-17 16:10:08 -04:00
InsanityAutomation e0990f1b65 Merge branch 'CrealityDwin2.0_Bleeding' into Tenlog_DWIN 2022-09-17 12:12:13 -04:00
InsanityAutomation 0a55425552 Revert "️ Minor planner optimization (#24737)"
This reverts commit d5cf0b3348.
2022-09-17 12:03:16 -04:00
InsanityAutomation 47c0c7072a Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-09-15 11:21:48 -04:00
InsanityAutomation beb163a183 Update stm32f1-maple.ini 2022-09-15 10:40:31 -04:00
InsanityAutomation cd67b87f22 Update Configuration_adv.h 2022-09-01 14:35:45 -04:00
InsanityAutomation e5f087bd98 adjust envs 2022-08-23 19:29:00 -04:00
InsanityAutomation 1fcad0b87c platform tweaking 2022-08-23 19:28:48 -04:00
InsanityAutomation bf698efc93 Remove no longer needed silent builds 2022-08-20 15:18:03 -04:00
InsanityAutomation f0e950db72 Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-08-20 15:17:46 -04:00
InsanityAutomation 200a3957d9 idex updates 2022-07-29 09:33:17 -04:00
InsanityAutomation b243c67de2 Update Configuration.h 2022-07-23 17:19:51 -04:00
InsanityAutomation 20d107adf2 Update Creality_DWIN.cpp 2022-07-23 17:19:48 -04:00
InsanityAutomation 5e3c15bd39 Update Creality_DWIN.h 2022-07-19 22:32:04 -04:00
InsanityAutomation 05cbeef2c6 Update pins_TENLOG_D3_HERO.h 2022-07-19 13:49:17 -04:00
InsanityAutomation 2ab4b9bd13 Update Creality_DWIN.cpp 2022-07-19 13:49:10 -04:00
InsanityAutomation 1cc33f318c Delete binaries 2022-07-19 13:48:59 -04:00
InsanityAutomation 78e3a829ba Merge branch 'CrealityDwin2.0_Bleeding' into Tenlog_DWIN 2022-07-18 18:55:53 -04:00
InsanityAutomation 60dc55c3bf Use raw positions for G34 probing to honor M206 offsets 2022-07-17 21:02:39 -04:00
thisiskeithb ef12aa5a6c Fix ProUI with Leveling 2022-07-17 21:01:31 -04:00
Tom Brazier b8f90b2d71 Give correct hints to the planner when drawing arcs 2022-07-17 21:01:01 -04:00
Tom Brazier ee91c915ee Return FLOOR() on the offchance that a float rounding error results in a slightly negative decelerate_steps_float 2022-07-17 21:01:01 -04:00
InsanityAutomation e7fac26f2b Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-07-17 20:58:41 -04:00
InsanityAutomation e66a2fdbf4 Update Configuration.h 2022-07-17 20:43:31 -04:00
InsanityAutomation f96a4a53ef IDEX Support initial commit 2022-07-17 20:43:12 -04:00
InsanityAutomation 096c146f16 Start adding more SKR boards, starting with SKRMiniV3 2022-07-17 20:42:52 -04:00
InsanityAutomation 5111e8d3a3 Update rev number and upstream merge revisions 2022-07-17 20:40:27 -04:00
InsanityAutomation 775850a245 Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-07-15 10:37:36 -04:00
InsanityAutomation 8401c6d267 Allow Portrait display with no leveling 2022-06-02 09:17:06 -04:00
InsanityAutomation bdeceae5b4 Update temp calls to honor active tool 2022-05-21 13:37:51 -04:00
InsanityAutomation c6ace0d4a5 tweaks 2022-05-21 13:19:16 -04:00
InsanityAutomation e9c9f07b8b Initial config import from luxuri and first pass sweep for issues 2022-05-21 12:55:02 -04:00
InsanityAutomation 8386ae0f4d generalize, and prep 2022-05-17 21:13:04 -04:00
InsanityAutomation 237ad14388 Merge branch 'CrealityDwin2.0_Bleeding' into CrealityDwin_2.0 2022-05-16 17:45:12 -04:00
InsanityAutomation 1c194d4e16 Update CR6E3 Touchscreen 2022-05-16 17:41:37 -04:00
InsanityAutomation fb5ee94263 New bins 2022-05-15 19:35:20 -04:00
InsanityAutomation 7bfcba1cf7 Update Configuration.h 2022-05-15 11:00:11 -04:00
InsanityAutomation 147cda7c1d Add E3S1_F4 2022-05-14 20:10:09 -04:00
InsanityAutomation 6016ef7ba1 Update Configuration_adv.h 2022-05-13 20:52:28 -04:00
InsanityAutomation a82e3147fd Adjust startup delay for fast machines with higher res displays 2022-05-13 19:54:23 -04:00
Scott Lahteine fa73edd76a Add BOARD_CREALITY_V24S1_301F4
Co-Authored-By: Miguel Risco-Castillo <mriscoc@users.noreply.github.com>
2022-05-13 11:11:41 -04:00
InsanityAutomation 591a42cdd0 Update G29.cpp 2022-05-08 18:01:38 -04:00
InsanityAutomation 6b74e0f142 Update pins_CREALITY_V25S1.h 2022-05-08 18:01:34 -04:00
InsanityAutomation 4cdec14648 Update Configuration_adv.h 2022-05-08 18:01:23 -04:00
InsanityAutomation e4e9f01bf0 More smart pro tweaks 2022-05-08 17:33:13 -04:00
InsanityAutomation 01ef9afdd0 CR10Smart Pro Configs 2022-05-08 14:41:54 -04:00
InsanityAutomation 21f8741982 Add Creality CR10SmartPro Support 2022-05-08 14:41:27 -04:00
InsanityAutomation fa80adf92c Update cr10 max builds to 470mm 2022-05-07 11:45:43 -04:00
InsanityAutomation 9e4cce23d4 Update Configuration.h 2022-05-04 15:07:04 -04:00
InsanityAutomation 868967d08c Updated bins compressed 2022-05-01 14:53:00 -04:00
InsanityAutomation 48dc25407e Update Creality_DWIN.cpp 2022-05-01 12:35:05 -04:00
InsanityAutomation b88833a1cd More pause tweaks 2022-04-30 21:29:39 -04:00
InsanityAutomation 391a07b2bf Pause improvements 2022-04-30 16:33:19 -04:00
InsanityAutomation c8faaca998 Update Creality_DWIN.cpp 2022-04-30 12:02:26 -04:00
InsanityAutomation 01ab324a12 advanced pause improvements 2022-04-30 10:22:52 -04:00
InsanityAutomation 00152be921 bin revision 2022-04-28 08:14:04 -04:00
InsanityAutomation be5078f8ab Update Configuration.h 2022-04-26 23:49:21 -04:00
InsanityAutomation cacdb2d818 update startup logo 2022-04-26 23:26:51 -04:00
InsanityAutomation 3553ef4c00 Set default runout mode to lerge and sprite to dd retraction 2022-04-26 23:24:16 -04:00
InsanityAutomation 64cf8316e1 Update dgus_creality_lcd.cpp 2022-04-26 22:58:30 -04:00
InsanityAutomation b6ad2db3a9 Add binary relocate function to avoid random pio purging 2022-04-26 14:18:13 -04:00
InsanityAutomation 47222bcdde Update platformio.ini 2022-04-25 11:10:49 -04:00
InsanityAutomation 22f2a8baa7 Add updated binaries 2022-04-25 11:07:52 -04:00
InsanityAutomation 08b92c3d1c Bump version, tweak accels 2022-04-23 10:48:43 -04:00
InsanityAutomation 474111f1c9 Minor touchups from last rebase 2022-04-22 09:11:22 -04:00
InsanityAutomation b35125e1a2 Update Configuration_adv.h 2022-04-20 17:33:48 -04:00
InsanityAutomation 3a1646b2e8 Update Configuration_adv.h 2022-04-18 14:50:05 -04:00
InsanityAutomation b99b6250ee Update Configuration.h 2022-04-18 14:48:31 -04:00
InsanityAutomation 947ee4560e E2Pro no runout stock 2022-04-15 16:09:23 -04:00
InsanityAutomation 11a0186b35 Update for extui recent changes 2022-04-15 16:08:29 -04:00
InsanityAutomation db74ac3ce1 Disable 100x multiplier for dwin marlinui 2022-04-15 13:13:46 -04:00
InsanityAutomation 2b46761060 minor tweaks 2022-04-15 13:03:32 -04:00
InsanityAutomation 97e1768ffe Remove extra screen refreshes and obsolete box 2022-04-09 17:16:56 -04:00
InsanityAutomation 8e83784656 Update dwin.cpp 2022-04-08 20:05:10 -04:00
InsanityAutomation 73b0c506e4 Update Configuration.h 2022-04-06 12:48:03 -04:00
InsanityAutomation 4678bb49b9 Update Creality_DWIN.cpp 2022-04-03 14:54:03 -04:00
InsanityAutomation f581502cc4 M591Fixes 2022-04-03 14:53:59 -04:00
InsanityAutomation dfc3007326 Merge branch 'Implement-M591-Configurable-Runout-Sensors' into CrealityDwin2.0_Bleeding 2022-04-03 13:24:30 -04:00
InsanityAutomation 7f691fc5c1 Bump version 2022-04-03 11:33:31 -04:00
InsanityAutomation 01e7a5cb76 Add Ender 2 Pro 2022-04-03 11:28:20 -04:00
InsanityAutomation fa72415812 Add CR10SmartPro First draft
Guess on BLTouch pins as HW not available atm
2022-04-03 10:57:55 -04:00
InsanityAutomation 0b6ecbd553 Merge branch 'bugfix-2.0.x' into Implement-M591-Configurable-Runout-Sensors 2022-04-03 10:33:18 -04:00
InsanityAutomation de6246f826 Merge branch 'Implement-M591-Configurable-Runout-Sensors' of https://github.com/InsanityAutomation/Marlin into Implement-M591-Configurable-Runout-Sensors 2022-04-03 10:32:57 -04:00
Scott Lahteine e813742ae0 Merge branch 'bugfix-2.0.x' into pr/23899 2022-03-29 03:25:51 -05:00
Scott Lahteine 46c8204990 Extend enum 2022-03-27 19:46:47 -05:00
Scott Lahteine bdfe4ca4d1 Simplify menu items, use enum, adjust settings 2022-03-26 21:10:16 -05:00
InsanityAutomation adabc63617 V2 tweaks 2022-03-26 20:08:37 -04:00
Scott Lahteine 6741f5182d Simplify menu items, use enum 2022-03-26 18:54:02 -05:00
InsanityAutomation d8508c5110 Update Configuration.h 2022-03-26 19:46:50 -04:00
InsanityAutomation dae60f4b29 V2 S1 UI Change 2022-03-26 19:46:26 -04:00
InsanityAutomation e16655a011 Fix char overlap V2S1 2022-03-26 19:46:14 -04:00
InsanityAutomation 0d576bb529 Fix marlinui status scroll 2022-03-25 21:53:36 -04:00
InsanityAutomation 61c3d122c9 Fix marlinUI V2 display bootscreen reloading cached BG 2022-03-25 16:39:46 -04:00
InsanityAutomation 123086d14c Fix non probe z offset adjustment 2022-03-25 14:05:55 -04:00
InsanityAutomation 10fd6df83d Update Configuration.h 2022-03-23 09:48:01 -04:00
InsanityAutomation d40750cde8 Non-BLT CR5 2022-03-19 11:49:40 -04:00
InsanityAutomation 489b75ae3c Update menu_advanced.cpp 2022-03-15 12:47:14 -04:00
InsanityAutomation 378fc12628 Add runout menu, small fixes 2022-03-15 12:28:19 -04:00
InsanityAutomation 0cedad36d1 Reorganize config options, remove obsolete option. 2022-03-14 09:29:53 -04:00
Scott Lahteine 07b2480d30 glue for CI test 2022-03-14 00:37:41 -05:00
Scott Lahteine dd88eb56ee Allow user to change 2022-03-14 00:37:41 -05:00
Scott Lahteine fc77afd93e misc. cleanup 2022-03-14 00:37:41 -05:00
InsanityAutomation 26af3e70bc Remove obsolete state from tests 2022-03-13 19:51:12 -04:00
InsanityAutomation 0c15e8e751 Fix up pause trigger, adjust config options minor changes 2022-03-13 18:57:24 -04:00
InsanityAutomation 639a2dc0b3 M591 Cleanup and tweaks 2022-03-13 13:48:33 -04:00
InsanityAutomation 91a094d8cb Update Configuration.h 2022-03-12 15:55:57 -05:00
InsanityAutomation 66efa0b09b Initial commit - Flexible Runout Configuration M591 2022-03-12 15:54:07 -05:00
InsanityAutomation e1c5f8418d Update Configuration.h 2022-03-06 18:12:11 -05:00
InsanityAutomation 4a0769ec1b allows z offset to work for babystep total on machines without probe 2022-03-06 18:11:43 -05:00
InsanityAutomation 991f21c74c Faster lcd buffer processing 2022-03-04 21:40:55 -05:00
InsanityAutomation 9ebf358b8a Default livemove to true 2022-03-04 21:40:38 -05:00
InsanityAutomation 70c26fd4ca S1 and E3 Touch Updates 2022-03-02 12:37:18 -05:00
InsanityAutomation 9e66a87122 Update .gitignore 2022-02-28 08:49:44 -05:00
InsanityAutomation f177bd32eb Variant and Version Info 2022-02-27 21:07:56 -05:00
InsanityAutomation 8df38008ef Add S1 screen support 2022-02-27 21:02:21 -05:00
InsanityAutomation ec5d623c93 Update README.md 2022-02-27 21:00:27 -05:00
InsanityAutomation aca3184ce4 Add S1 Support 2022-02-27 21:00:23 -05:00
InsanityAutomation 7cda9dbf84 Add Blank BG screen to E3V2 for S1 screen compat 2022-02-27 21:00:04 -05:00
InsanityAutomation 71d530e594 Create firmware_Ender7_BLT_DW7.4.5.bin.zip 2022-02-26 18:43:58 -05:00
InsanityAutomation 24e8499ef6 Create firmware_Ender7_BLT_DW7.4.5.bin.zip 2022-02-26 18:43:32 -05:00
InsanityAutomation 0821c72d39 Add CR5Pro 2022-02-26 16:00:44 -05:00
InsanityAutomation 2abf5f0ad8 Add CR5Pro 2022-02-26 16:00:13 -05:00
BDScripting 5c59a3d7c7 CR-X Configuration for purge bucket 2022-02-26 09:51:19 -06:00
InsanityAutomation a9e7df859c Merge branch 'CrealityDwin2.0_Bleeding' into CrealityDwin_2.0 2022-02-25 10:31:00 -05:00
InsanityAutomation f6a48f82aa Update README.md 2022-02-25 10:30:31 -05:00
InsanityAutomation c0f0964329 Update README.md 2022-02-25 10:17:42 -05:00
InsanityAutomation 0322dfd76e Update README.md 2022-02-25 10:08:34 -05:00
InsanityAutomation 2d651fc785 Merge branch 'CrealityDwin2.0_Bleeding' into CrealityDwin_2.0 2022-02-23 11:23:12 -05:00
InsanityAutomation bd967ba7a2 Add smart binary 2022-02-23 11:21:57 -05:00
InsanityAutomation cc1a4f5f70 Update binaries 2022-02-19 19:15:25 -05:00
InsanityAutomation d43c557404 Readme and DWIN updates 2022-02-19 12:23:30 -05:00
InsanityAutomation c4ba4600dc Update Configuration_adv.h 2022-02-18 15:13:37 -05:00
InsanityAutomation 0bbc122475 Trim out processing page to save space 2022-02-15 09:51:13 -05:00
InsanityAutomation 1868db82aa Cleanup 2022-02-13 14:57:45 -05:00
InsanityAutomation 23091e566b fix overlapping platforms 2022-02-12 13:37:07 -05:00
InsanityAutomation 0ac94f6a2f Platform tweaks 2022-02-11 22:11:56 -05:00
InsanityAutomation 3d804bd314 Block LCD Reinit for ExtUI 2022-02-11 22:11:31 -05:00
InsanityAutomation e0de16f3a8 UpdateVersion 2022-02-06 12:01:38 -05:00
InsanityAutomation 7421731eed ReviseENVsToRC 2022-02-06 12:01:28 -05:00
InsanityAutomation 43bc8c3865 AddToggles 2022-02-06 12:01:08 -05:00
InsanityAutomation c13d290934 FixMapleHalCompileErrors 2022-02-06 12:00:42 -05:00
InsanityAutomation 49eb72816e AddGenericMapleRC_ENV 2022-02-06 12:00:17 -05:00
InsanityAutomation ec0c72e2f0 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2022-02-05 11:04:35 -05:00
InsanityAutomation ff221cdacd Update Creality_DWIN.h 2022-02-05 10:25:04 -05:00
InsanityAutomation af177e719e Add PLR to ext_ui 2022-01-13 17:53:02 -05:00
InsanityAutomation c713b14143 CR30 and Smart improvements 2022-01-13 08:34:53 -05:00
InsanityAutomation 44c21f477e Update Creality_DWIN.cpp 2022-01-08 16:32:53 -05:00
InsanityAutomation 9f2e0238df Add ENV 2022-01-08 16:32:53 -05:00
InsanityAutomation fd72d771e6 Update Configuration.h 2022-01-08 16:32:53 -05:00
InsanityAutomation dc1a4080db Update Creality_DWIN.cpp 2022-01-03 11:40:33 -05:00
InsanityAutomation 1e3cd5ca8b Add ENV 2022-01-03 11:05:57 -05:00
InsanityAutomation 09f1c97c6e move to maple again 2022-01-03 10:50:14 -05:00
InsanityAutomation 13b16b4062 Add CR10Smart, CR6 fix 2022-01-03 10:47:11 -05:00
InsanityAutomation 7f5f9724de Merge branch 'CrealityDwin2.0_Bleeding' into CrealityDwin_2.0 2021-11-26 13:31:02 -05:00
InsanityAutomation 92a7943d4e Update README.md 2021-11-26 13:27:30 -05:00
InsanityAutomation 448abd5de2 Fix stale screen build 2021-11-22 11:22:43 -05:00
InsanityAutomation 37f4924ac1 Fixed binaries 2021-11-21 15:31:30 -05:00
InsanityAutomation 1c269eda1e Merge branch 'CrealityDwin2.0_Bleeding' of https://github.com/InsanityAutomation/Marlin into CrealityDwin2.0_Bleeding 2021-11-21 15:28:50 -05:00
InsanityAutomation d8573b97eb Update Creality_DWIN.cpp 2021-11-21 15:27:08 -05:00
InsanityAutomation 5a94a8e1c0 Update Configuration.h 2021-11-20 12:55:37 -05:00
InsanityAutomation e067dc4713 Updated binaries 2021-11-17 16:41:08 -05:00
InsanityAutomation 1f6da0c1b4 Add ender 5 32b envs 2021-11-17 09:04:14 -05:00
InsanityAutomation 8bb4484af5 clear old binaries, add 32 bit filament runout envs 2021-11-17 08:59:33 -05:00
InsanityAutomation 6cc524dd50 Update Ender3V2_Dwin_TM3DV2.7z 2021-11-14 14:20:50 -05:00
InsanityAutomation 728539bb23 Revert "Revert "v2 jyers update""
This reverts commit a67b346523.
2021-11-14 14:11:29 -05:00
InsanityAutomation a67b346523 Revert "v2 jyers update"
This reverts commit a3e960c251.
2021-11-14 12:15:11 -05:00
InsanityAutomation 4b767d7623 bump version 2021-11-14 12:15:02 -05:00
InsanityAutomation 7e149b2532 Build script indentation fixes 2021-11-13 09:45:02 -05:00
InsanityAutomation 3b7b4b48d8 tm3d progress bar location 2021-11-13 09:44:49 -05:00
InsanityAutomation 49fd9bdb77 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-11-11 21:23:58 -05:00
InsanityAutomation 5bcf64f17c Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-11-11 21:17:23 -05:00
InsanityAutomation a3e960c251 v2 jyers update 2021-11-11 21:17:16 -05:00
InsanityAutomation a7696f32fd Tweak accel multipliers, move to stm32 common lib 2021-11-07 10:29:11 -05:00
tome9111991 b4d3f03a26 🐛 Fix SHOW_REMAINING_TIME option for JyersUI (#22999) 2021-11-04 17:28:53 -04:00
ellensp 42c6324f68 🐛 Fix E3V2 width/height defines (#22994) 2021-11-04 17:28:04 -04:00
Dennis 4d15eb94e4 🐛 Fix JyersUI current positions (scaling) (#23005) 2021-11-04 17:27:16 -04:00
InsanityAutomation 3d688fc324 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-11-04 17:25:43 -04:00
InsanityAutomation 58e54f6746 Ender 7 tuning, sermoon fixes, jyersui fixes, finish jerk/accel dwin 2021-11-04 17:25:36 -04:00
InsanityAutomation bf7a48ed31 Update Creality_DWIN.cpp 2021-10-30 10:40:52 -04:00
InsanityAutomation dc52c64424 Update Configuration.h 2021-10-30 10:40:49 -04:00
InsanityAutomation 0e29cd8cc5 Update Configuration.h 2021-10-26 18:38:35 -04:00
InsanityAutomation 844fe9b24d Start jerk/accel/travel support 2021-10-25 19:21:18 -04:00
Keith Bennett 2b19dc3232 Octopus Pro V1.0 with STM32F429ZGT6 (#23008) 2021-10-25 01:14:02 -05:00
ellensp f41c78d178 🐛 Fix børken E_DUAL_STEPPER_DRIVERS (#23017) 2021-10-25 01:12:07 -05:00
Miguel Risco-Castillo 6270df927e 🐛 Fix Emder-3 V2 Enhanced SetFlow (#23016) 2021-10-25 01:08:15 -05:00
InsanityAutomation cbcc1bc084 DWINos4 changes 2021-10-23 17:43:40 -04:00
InsanityAutomation ab1d124bf9 Ender 7 preliminary support 2021-10-23 17:43:12 -04:00
InsanityAutomation 5b7215df43 Ender 7 Mainboard Support 2021-10-23 17:42:12 -04:00
InsanityAutomation b589cac5ff Merge branch 'CrealityDwin2.0_Bleeding' into CrealityDwin_2.0 2021-10-23 08:58:41 -04:00
InsanityAutomation 44aaa4f042 Update README.md 2021-10-23 08:53:36 -04:00
InsanityAutomation afef0b9dec Update Configuration.h 2021-10-20 10:04:58 -04:00
InsanityAutomation f7767be8a5 Updated binaries 2021-10-18 18:11:03 -04:00
InsanityAutomation 2f5e28dd66 Update Configuration.h 2021-10-18 09:14:29 -04:00
InsanityAutomation 0397d384d2 Fix JyersUI ZOffset Multiplication 2021-10-17 20:02:13 -04:00
InsanityAutomation 212dfb4050 Update platformio.ini 2021-10-17 18:38:11 -04:00
InsanityAutomation 59ff070dba V2 Display Standalone 2021-10-16 19:44:55 -04:00
InsanityAutomation c7af93b39f Update Configuration.h 2021-10-16 18:30:28 -04:00
InsanityAutomation 794ea13ae8 Update Configuration_adv.h 2021-10-16 18:29:14 -04:00
InsanityAutomation 227f014fb5 Update PageHandlers.cpp 2021-10-16 18:29:11 -04:00
InsanityAutomation e22408f3f9 Update DGUSScreenHandler.cpp 2021-10-16 18:29:09 -04:00
InsanityAutomation 9e8e1c1113 CR30 Tweaks 2021-10-16 15:38:32 -04:00
InsanityAutomation 1427290e84 Message fixes, V2 UI Positioning 2021-10-16 12:00:30 -04:00
InsanityAutomation 1c7b232d05 Fix Tool Change Park 2021-10-16 10:44:59 -04:00
InsanityAutomation 005dad193a Updated screen archives 2021-10-15 11:24:18 -04:00
InsanityAutomation 88f502cac5 Bump revision, Add CR30 2021-10-15 10:53:09 -04:00
InsanityAutomation 0cc286757b Update Configuration.h 2021-10-15 09:48:58 -04:00
InsanityAutomation d843e2be2b Merge branch 'BLTouch-HS-Mode-EEPROM' into CrealityDwin2.0_Bleeding 2021-10-15 08:58:45 -04:00
Scott Lahteine cede5b22c9 Use BLTOUCH_HS_MODE for default + editable 2021-10-14 20:35:36 -05:00
Scott Lahteine 43f996d68a Rename bltouch_last_written_mode 2021-10-14 20:04:42 -05:00
Scott Lahteine bd426d40cd Tweak M401 2021-10-14 19:28:39 -05:00
Scott Lahteine 099c329238 Fix LEVEL_CORNERS_USE_PROBE 2021-10-14 19:28:39 -05:00
Scott Lahteine 3db4452d28 settings tweak 2021-10-14 19:28:00 -05:00
InsanityAutomation 385bab2f36 Update settings.cpp 2021-10-14 18:49:12 -04:00
InsanityAutomation 1fab2ef94f Update menu_tramming.cpp 2021-10-14 14:01:42 -04:00
InsanityAutomation 102c43dcd5 Update G35.cpp 2021-10-14 13:50:56 -04:00
InsanityAutomation 5284f45c62 Update menu_tramming.cpp 2021-10-14 13:41:31 -04:00
InsanityAutomation 9aaa7b1100 Add missing include 2021-10-14 13:34:31 -04:00
InsanityAutomation ef661cd295 Update Creality_DWIN.cpp 2021-10-14 13:24:08 -04:00
InsanityAutomation d068769f2c Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-10-13 17:47:30 -04:00
Scott Lahteine a6c4c5a3f7 Update motion.cpp 2021-10-12 22:22:15 -05:00
Scott Lahteine 78c57f2847 Update menu_tramming.cpp 2021-10-12 22:21:43 -05:00
Scott Lahteine 90b0be5e12 Merge 'upstream/bugfix-2.0.x' into pr/22916 2021-10-12 21:45:54 -05:00
Scott Lahteine c24456353f Merge 'upstream/bugfix-2.0.x' into pr/22916 2021-10-12 20:20:28 -05:00
Scott Lahteine ec7a4eb69e clean up and fix 2021-10-09 18:57:38 -05:00
InsanityAutomation 4f62ae9764 Return on mode change without deploying 2021-10-09 14:07:11 -04:00
InsanityAutomation 0cc6955ab7 BLTouch High Speed EEPROM Control 2021-10-09 13:58:25 -04:00
InsanityAutomation 86d2d5d0a8 Update dwin.cpp 2021-10-09 13:09:28 -04:00
InsanityAutomation 5a994f0c9a Update dwin.cpp 2021-10-09 12:15:10 -04:00
InsanityAutomation 39ee694856 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-10-09 12:13:17 -04:00
InsanityAutomation 10a16c8c75 Sermoon updates 2021-10-08 14:06:57 -04:00
InsanityAutomation aa2763442e Fix E3V2 M600 resume 2021-09-28 09:25:29 -04:00
InsanityAutomation f44a11f5ff Add SermoonD1 preliminary 2021-09-22 17:02:47 -04:00
InsanityAutomation 7748fa84dd Catchup debug messages 2021-09-15 22:44:33 -04:00
InsanityAutomation cb506ec639 Update Configuration.h 2021-09-15 08:08:15 -04:00
InsanityAutomation 5e4f7516c1 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-09-14 10:25:27 -04:00
InsanityAutomation 6443790c6f Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-09-10 10:41:08 -04:00
InsanityAutomation 9a238fa7f9 Add e3 options for CR6 touch 2021-08-22 19:37:55 -04:00
InsanityAutomation 723fc88e78 Updates to support ExtUI advanced pause messaging 2021-08-21 14:17:34 -04:00
InsanityAutomation 4b4a4ba163 AdvancedPauseExtUIMessaging 2021-08-21 14:17:19 -04:00
InsanityAutomation 57250c8340 Updates for CR6 Screen resume function 2021-08-13 13:32:46 -04:00
InsanityAutomation 6bf069d1ab Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-07-21 18:39:25 -04:00
InsanityAutomation 1921015d1f Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-07-21 18:30:14 -04:00
InsanityAutomation 24f3400c46 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-07-19 15:35:57 -04:00
InsanityAutomation b8c9e823ca Update Configuration.h 2021-07-19 12:18:10 -04:00
InsanityAutomation 3801d831d4 Minor tweaks 2021-07-16 12:23:55 -04:00
InsanityAutomation 6f4b2ce4a2 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-07-13 17:01:45 -04:00
InsanityAutomation ef85eeed2a Minor tweaks 2021-07-13 16:50:08 -04:00
Katelyn Schiesser cd98d0cf5c 🐛 Followup to TEMP_SENSOR_BOARD (#22344)
Followup to #22279
2021-07-12 22:57:01 -05:00
InsanityAutomation 6f57a7311c Update marlinui.cpp 2021-07-08 09:57:59 -04:00
InsanityAutomation dc19c60a0e Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-07-07 17:50:24 -04:00
InsanityAutomation 38c79a4585 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-07-07 10:15:40 -04:00
InsanityAutomation 541e074f97 Merge branch 'CrealityDwin_2.0' into CrealityDwin2.0_Bleeding 2021-07-07 10:12:11 -04:00
InsanityAutomation 2a01b8ea62 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-07-05 13:06:44 -04:00
InsanityAutomation 38fd3782f9 Ender6 BLT Fix 2021-07-03 14:43:04 -04:00
InsanityAutomation f5cfc65c1d Ender6 BLTouch Fix 2021-07-03 12:51:14 -04:00
InsanityAutomation 00f3397cad Create Creality_CR6DWIN_DW74.7z 2021-07-01 11:15:20 -04:00
InsanityAutomation 8e6f5f90c5 Update TM3D_DWINCombinedScreens_V4.7z 2021-06-30 09:54:46 -04:00
InsanityAutomation db0b14d97e fix 2021-06-28 18:45:23 -04:00
Katelyn Schiesser 84158b912b 🐛 Use setTargetHotend in menus (#22247) 2021-06-28 00:30:11 -05:00
InsanityAutomation 21f8c8d7f8 Fix precompiled bins 2021-06-27 22:56:19 -04:00
InsanityAutomation e2363dc64c Update hex files for screen rotate 2021-06-25 19:06:23 -04:00
InsanityAutomation 1f439cd89a Update Configuration.h 2021-06-25 12:04:47 -04:00
InsanityAutomation f3ddc1f8b6 Add screen rotate PB 2021-06-25 12:03:59 -04:00
InsanityAutomation 223971c47f Update Configuration.h 2021-06-25 12:03:40 -04:00
InsanityAutomation c2eeda01de Add screen rotate PB 2021-06-25 11:49:28 -04:00
InsanityAutomation 5ea4241ea3 Simplify conditions and reorder 2021-06-23 20:22:25 -04:00
InsanityAutomation 04845c80e9 Simplify conditions and reorder 2021-06-23 20:22:17 -04:00
InsanityAutomation 8194b7f5fc Merge branch 'CrealityDwin2.0_Bleeding' into CrealityDwin_2.0 2021-06-23 19:20:14 -04:00
InsanityAutomation e735948969 Update TM3D_DWINCombinedScreens_V4.7z 2021-06-23 19:09:59 -04:00
InsanityAutomation 634ddeef7e Update 32 bit bins 2021-06-21 17:08:49 -04:00
Scott Lahteine ea78c6bf61 🐛 Fix compact sensitive pins array (#22184) 2021-06-21 16:11:51 -04:00
InsanityAutomation b52168e37c Binaries, Readme 2021-06-21 16:10:42 -04:00
InsanityAutomation ba7368ce3a Repack screen files, update readme 2021-06-20 22:20:28 -04:00
InsanityAutomation 69d06dd872 Update README.md 2021-06-20 20:12:22 -04:00
InsanityAutomation a92b627d00 remove stale files 2021-06-20 18:17:36 -04:00
InsanityAutomation b9aa338c19 Update platformio.ini 2021-06-20 17:43:09 -04:00
InsanityAutomation 27e105b890 Add toggle option for probe pin on 422/427 2021-06-20 17:27:15 -04:00
InsanityAutomation 494a9a90bb Cleanup and limit adjustment 2021-06-20 17:15:33 -04:00
InsanityAutomation d876e6b80a Add combined screen files 2021-06-20 10:46:59 -04:00
InsanityAutomation 97da6e97b9 add zig to mesh update 2021-06-19 15:02:20 -04:00
InsanityAutomation 671ab75bce Updates for mesh edit 2021-06-19 14:04:42 -04:00
InsanityAutomation 6a98f4e1be Add CR10V3 description, eliminate crx display, minor additions 2021-06-19 10:32:54 -04:00
InsanityAutomation dd86d60a32 Catchup to head 2021-06-18 19:15:34 -04:00
InsanityAutomation 706260d39f Update pause.cpp 2021-06-18 00:12:37 -04:00
InsanityAutomation bae9d18ee9 Update Creality_DWIN.cpp 2021-06-18 00:10:59 -04:00
InsanityAutomation df31aa486e Add Pause State to ExtUI 2021-06-18 00:10:55 -04:00
InsanityAutomation 9a4d0fec6c Fixes from last rebase 2021-06-17 22:13:41 -04:00
InsanityAutomation b1f96cf4f7 Rebase fixes 2021-06-17 00:19:22 -04:00
InsanityAutomation 916aaa4881 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-06-16 17:04:50 -04:00
InsanityAutomation 4a4820d84f Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-06-16 17:00:36 -04:00
InsanityAutomation 8eeea354cd Update Configuration.h 2021-06-16 17:00:23 -04:00
InsanityAutomation b26e53156f Update Configuration.h 2021-06-16 16:17:40 -04:00
InsanityAutomation ce46fafd92 Update serial.h 2021-06-15 22:14:10 -04:00
InsanityAutomation 7d9ee39285 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-06-15 01:21:18 -04:00
InsanityAutomation bf8074c108 definerename 2021-06-14 23:46:40 -04:00
Marcio T dd82d2d217 🐛 Fix FTDI Eve Touch UI, add screens (#22132) 2021-06-14 02:46:50 -05:00
Scott Lahteine 1ee599a2ba 🚨 Suppress pin sign-change warning 2021-06-14 02:43:24 -05:00
InsanityAutomation 8adb58c266 Finish screen config controls 2021-06-14 01:21:19 -04:00
InsanityAutomation 173b0f8bd1 EEPROM settings for volume and brightness 2021-06-13 16:46:37 -04:00
InsanityAutomation e77f6d855b Update EXTUI on MBL 2021-06-12 15:41:43 -04:00
InsanityAutomation 23ce68436a Last bit of Ender 6 manual mesh debug 2021-06-12 15:41:33 -04:00
InsanityAutomation 6e15859ce2 Misc fixes 2021-06-12 14:56:43 -04:00
InsanityAutomation e76f769690 Minor debugging and platform changes 2021-06-12 10:21:41 -04:00
InsanityAutomation 0a2ba2fadf Add EXTUi Click function 2021-06-12 08:54:39 -04:00
InsanityAutomation 37d5f55396 Add cr6 screen files 2021-06-12 08:54:23 -04:00
InsanityAutomation eca2080a3f Add manual mesh to leveling screens 2021-06-12 08:21:17 -04:00
InsanityAutomation d2fc1daf50 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-06-11 15:42:13 -04:00
InsanityAutomation 782fe78ea0 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-06-11 15:40:38 -04:00
InsanityAutomation 084c45a6ee Update Configuration.h 2021-06-11 11:04:07 -04:00
InsanityAutomation 94d8fc8e8a CR6Max 2021-06-11 11:02:13 -04:00
InsanityAutomation 491d82f93e Add CR6 definitions 2021-06-11 10:55:43 -04:00
InsanityAutomation 49fd0950ee Update Configuration_adv.h 2021-06-11 09:14:32 -04:00
InsanityAutomation 06425bf4b7 Ender6 First Pass 2021-06-07 09:54:54 -04:00
InsanityAutomation e9660aeed7 Rebase fixes 2021-06-06 13:20:25 -04:00
InsanityAutomation 6480f0939d Add Ender3 Max 2021-06-06 12:27:14 -04:00
InsanityAutomation d0e9c21aff Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-06-06 12:03:26 -04:00
InsanityAutomation 63d1ae1021 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-06-06 11:53:30 -04:00
InsanityAutomation 5a4b2ba5c5 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-06-05 16:51:34 -04:00
InsanityAutomation a80c371340 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-05-25 09:22:13 -04:00
InsanityAutomation 6d39a6fc55 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-05-23 15:06:33 -04:00
InsanityAutomation 02fe3a6818 Update Ender3V2_Dwin_TM3D.7z 2021-05-16 15:58:17 -04:00
InsanityAutomation be44105ae9 Update Ender3V2_Dwin_TM3D.7z 2021-05-16 15:57:41 -04:00
InsanityAutomation 10e5d92dec Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-05-16 14:18:43 -04:00
InsanityAutomation 2e11485da4 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-05-06 11:55:25 -04:00
InsanityAutomation d305f0a14b Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-05-05 09:46:59 -04:00
Scott Lahteine 5f30e9fe1c Add MKS_LCD12864B 2021-05-05 08:04:04 -05:00
Scott Lahteine 80c8218d94 Add MKS_LCD12864B 2021-05-05 07:23:52 -05:00
Scott Lahteine bed2bfdc24 Misc comments 2021-05-05 07:18:05 -05:00
Scott Lahteine 6f2967a8dc Cleanup, hex formatting 2021-05-05 06:34:02 -05:00
InsanityAutomation 6496cedc17 Update README.md 2021-05-04 14:42:49 -04:00
InsanityAutomation 7b01993bbc Fix link 2021-05-04 14:42:33 -04:00
InsanityAutomation 07a1b00a25 Version bump for rebase to head 2021-05-04 11:56:18 -04:00
InsanityAutomation 7325d66de5 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-05-04 11:08:03 -04:00
InsanityAutomation 865737345f Update Configuration.h 2021-05-04 10:58:53 -04:00
InsanityAutomation dfa6c2f4f1 Update Configuration.h 2021-04-30 21:20:51 -04:00
InsanityAutomation 0a2f0cca93 Thermistor priority issue 2021-04-30 21:20:07 -04:00
InsanityAutomation dbbdf11d75 Merge branch 'CrealityDwin2.0_Bleeding' into CrealityDwin_2.0 2021-04-30 14:06:57 -04:00
InsanityAutomation 6430489e21 zip er up 2021-04-30 12:25:48 -04:00
InsanityAutomation 04d4fca75d Next batch 2021-04-30 09:02:05 -04:00
InsanityAutomation 486cf92c5c Set3 2021-04-30 00:39:59 -04:00
InsanityAutomation 820aff4e7c Merge branch 'CrealityDwin2.0_Bleeding' of https://github.com/InsanityAutomation/Marlin into CrealityDwin2.0_Bleeding 2021-04-29 23:16:15 -04:00
InsanityAutomation 120da68133 Batch 2 hex files 2021-04-29 23:11:16 -04:00
InsanityAutomation 747e21ee3e First batch 731 hex files 2021-04-29 23:10:41 -04:00
InsanityAutomation 53e8c005b7 Update Configuration_adv.h 2021-04-29 10:02:01 -04:00
InsanityAutomation ef01aecd47 Update screen file 2021-04-28 19:40:11 -04:00
InsanityAutomation 6ff92f3215 dw7.3.1 changes 2021-04-28 19:25:30 -04:00
InsanityAutomation ba5bab1a3a Update README.md 2021-04-28 10:53:41 -04:00
InsanityAutomation af0b39982b resolve bad merge 2021-04-28 10:39:32 -04:00
InsanityAutomation 680135583a Update ui_api.cpp 2021-04-28 10:36:40 -04:00
InsanityAutomation bdc256c048 Merge pull request #180 from oliof/patch-1
Update README.md
2021-04-26 23:32:24 -04:00
InsanityAutomation 0948c589d6 Merge branch 'CrealityDwin_2.0' into patch-1 2021-04-26 23:32:07 -04:00
InsanityAutomation fbf069ebe0 Remove leftover stale files 2021-04-26 10:34:33 -04:00
InsanityAutomation 160f8ef0bc Update platformio.ini 2021-04-26 08:25:12 -04:00
InsanityAutomation 93ecbfa88c Merge branch 'CrealityDwin2.0_Bleeding' into CrealityDwin_2.0 2021-04-26 08:24:22 -04:00
InsanityAutomation 19d004b342 Update README.md 2021-04-25 12:44:58 -04:00
InsanityAutomation 8b67e72afc Update README.md 2021-04-25 12:20:41 -04:00
InsanityAutomation 9c863b1c67 Update README.md 2021-04-25 12:12:24 -04:00
InsanityAutomation e4c4acbcc5 Add hex Remainder 2021-04-25 00:23:56 -04:00
InsanityAutomation 7dd2fe3f6c Add first bundle HEX 2021-04-24 19:29:09 -04:00
InsanityAutomation a399028c77 Update platformio.ini 2021-04-24 17:36:29 -04:00
InsanityAutomation 840beb78be Update README.md 2021-04-24 12:37:43 -04:00
InsanityAutomation 1181724b2b Update screen archives and remove stale hexs 2021-04-24 12:27:09 -04:00
InsanityAutomation 227aac34a2 Update Creality_DWIN.cpp 2021-04-22 16:49:31 -04:00
InsanityAutomation ecb6e215c5 Update Creality_DWIN.cpp 2021-04-22 16:07:32 -04:00
InsanityAutomation 8f09db27bd file browse page display 2021-04-22 14:49:26 -04:00
InsanityAutomation 39e4ae2d7a Working 2021-04-21 19:08:16 -04:00
InsanityAutomation 8c181685d2 First sweep 2021-04-20 11:23:25 -04:00
InsanityAutomation 4f2730b6f8 Update Creality_DWIN.h 2021-04-19 22:52:18 -04:00
InsanityAutomation bc12ada74d 422 and 427 adjustments 2021-04-19 17:50:31 -04:00
InsanityAutomation 7e97639e38 Update Version.h 2021-04-18 17:00:19 -04:00
InsanityAutomation c217fd3e66 Update Creality_DWIN.cpp 2021-04-18 16:16:30 -04:00
InsanityAutomation 6f69a30435 Reduce ram usage, convert to PSTRs, move serial to LCDSERIAL base 2021-04-18 13:15:00 -04:00
InsanityAutomation 96d880e745 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-04-18 12:06:36 -04:00
InsanityAutomation d768f875ac Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-04-18 12:06:26 -04:00
InsanityAutomation 02d54b9ce7 Update Configuration.h 2021-04-18 12:05:26 -04:00
Scott Lahteine 7070628ef9 Misc. formatting, serial out 2021-04-13 21:34:21 -05:00
InsanityAutomation 1a89a43532 Update platformio.ini 2021-04-12 21:04:46 -04:00
InsanityAutomation 25faa304ee fix ret6 builds 2021-04-11 19:36:37 -04:00
InsanityAutomation 18a0f68ac0 Add hex files 2021-04-09 12:13:42 -04:00
InsanityAutomation 7262ad3fc4 Add CRXPro autobuilds 2021-04-09 12:06:38 -04:00
InsanityAutomation b456959b97 Add CRXPro autobuilds 2021-04-09 10:47:54 -04:00
InsanityAutomation d20182aa91 Some catch up and a look at SKRe3T E3V2 support 2021-04-08 10:50:06 -04:00
InsanityAutomation dc86dd9fae Update platformio.ini 2021-04-07 11:56:28 -04:00
InsanityAutomation e887033c0d Per AJ/Chris add home and Z0 post G29 measuring button 2021-04-07 11:26:38 -04:00
Scott Lahteine d786ba1773 Reimplement reverted PR from testing 2021-04-07 11:18:37 -04:00
InsanityAutomation 3f0a4cfe25 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-04-07 11:12:35 -04:00
InsanityAutomation 442327d92e Leftovers 2021-04-03 15:01:38 -04:00
InsanityAutomation 345ac6e8fe Revert "Optimized string-to-number functions (#21484)"
This reverts commit 20d2061f22.
2021-04-03 13:53:44 -04:00
InsanityAutomation 1b47fe8c64 Fix extui build issues, block hotend idle while paused for user, revert type change 2021-04-03 13:35:43 -04:00
InsanityAutomation 67e9ee7bf2 Fix extui build issues, block hotend idle while paused for user, revert type change 2021-04-03 13:35:07 -04:00
InsanityAutomation 7aecff2ba6 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-04-03 12:43:14 -04:00
InsanityAutomation 2e6d7308f6 Add SKRE3Turbo 2021-04-03 12:33:42 -04:00
InsanityAutomation 9c5ee355e8 Merge branch 'CrealityDwin2.0_Bleeding' into CrealityDwin_2.0 2021-04-03 11:11:01 -04:00
InsanityAutomation 656946a0ff Merge branch 'CrealityDwin2.0_Bleeding' of https://github.com/InsanityAutomation/Marlin into CrealityDwin2.0_Bleeding 2021-02-24 09:09:47 -05:00
InsanityAutomation 48e02a3210 Update Creality_DWIN.h 2021-02-24 09:09:13 -05:00
InsanityAutomation 6891ef5d00 Update Configuration.h 2021-02-23 18:41:46 -05:00
InsanityAutomation c392e6bf07 Minor tweaks 2021-02-23 14:28:20 -05:00
InsanityAutomation de564f9b0a add 7.2 hex files 2021-02-19 23:11:46 -05:00
InsanityAutomation c9aab13192 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-02-19 10:17:09 -05:00
Harald Wagener 9ba9f654c4 Update README.md
Add explanation for LR configuration.
2021-02-17 11:29:44 +01:00
InsanityAutomation a13ebba41a Merge pull request #168 from DrDMoney/patch-1
Update Configuration.h
2021-02-11 15:51:21 -05:00
InsanityAutomation b1153cff1e Merge pull request #176 from x13-me/CrealityDwin_2.0
Added Ender 3 to Readme.md
2021-02-11 15:48:59 -05:00
InsanityAutomation 9aa0004de6 Disable broken feature until I can trace it down 2021-02-10 07:39:53 -05:00
InsanityAutomation 3a9f043c58 Update temperature.cpp 2021-02-10 07:26:20 -05:00
InsanityAutomation 80123bfdf2 fix platform 2021-02-10 07:24:51 -05:00
InsanityAutomation 923ce8e1d8 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-02-10 07:09:49 -05:00
InsanityAutomation c72fc3eaec Update platformio.ini 2021-02-06 11:04:09 -05:00
InsanityAutomation 3aa0763f26 Update Creality_DWIN.cpp 2021-02-02 11:17:12 -05:00
InsanityAutomation 96bee60be9 Update dwin.cpp 2021-02-02 09:33:22 -05:00
InsanityAutomation b5df47bdf7 Add missing extui functions 2021-01-31 17:18:06 -05:00
InsanityAutomation c27474f396 Update Version.h 2021-01-31 15:37:45 -05:00
InsanityAutomation 6af2c36c50 Add E3V2 427 Env 2021-01-31 15:31:38 -05:00
InsanityAutomation 577ebc6ba4 Reimplement live move 2021-01-31 15:27:46 -05:00
InsanityAutomation 4b0135c022 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-01-31 13:27:55 -05:00
x13.me 27e95f2aab Added Ender 3 to Readme.md 2021-01-25 02:18:13 +00:00
InsanityAutomation 247385e94e Update platformio.ini 2021-01-06 19:05:44 -05:00
Daniel Mooney aafa3af088 Update Configuration.h
PSU_ACTIVE_HIGH should be PSU_ACTIVE_STATE

PSU_ACTIVE_STATE set from false to low.
2020-12-12 14:23:00 -06:00
InsanityAutomation 12e230ca30 Update Configuration.h 2020-12-08 21:29:09 -05:00
InsanityAutomation 225a89004b Poweroff kit 2020-12-05 19:36:09 -05:00
InsanityAutomation 0b6aa3cb2d Update Creality_DWIN.cpp 2020-11-10 09:04:21 -05:00
InsanityAutomation e7d3e67dc4 Merge branch 'CrealityDwin2.0_Bleeding' of https://github.com/InsanityAutomation/Marlin into CrealityDwin2.0_Bleeding 2020-11-08 14:14:53 -05:00
InsanityAutomation 8fd37402a3 Bump rev, invert flag 2020-11-08 14:14:07 -05:00
InsanityAutomation 7cf72d5867 Rebase and catchup
add 2130 option for SKR

Update platformio.ini

Add SKRMini and DDX

Rebase and catchup

add 2130 option for SKR

Update platformio.ini

Minor adjustments following github issues

Update Creality_DWIN.cpp

Update Configuration_adv.h

Update platformio.ini

Rebase and catchup

add 2130 option for SKR

Update platformio.ini

Add SKRMini and DDX

Rebase and catchup

add 2130 option for SKR

Update platformio.ini

Minor adjustments following github issues

Update Creality_DWIN.cpp

Update Configuration_adv.h

Clean up rebase

Update platformio.ini

Update platformio.ini

Add Ender3V2

Update Configuration.h

tweaks for e3v2

Fixes

Add 32 bit Ender3's

eparser and display fixes

MachineEnder3Pro420 -> MachineEnder3Pro422

force silent board for all v4 pcb's

Update Configuration.h

Implement fix from https://github.com/cosmoderp/Marlin/commit/5c8e1e7d4af37e25fb9040dcbf690bbb089948e6

Live axis move and z offset

Update dwin.cpp

Fix info menu screens

borders etc e3v2

Ender 5 SKRMini Tweaks

Update Version.h

Add layer shift rapid correction logic and creality stm32f01 environments for E3V2

changes for melzi to fit

Update Configuration.h

Add DW7 Hex Files

Support 10SPro display on Ender3 422 and 427 boards

Update dwin.cpp

Update Configuration_adv.h

Update Configuration.h
2020-11-08 13:47:02 -05:00
InsanityAutomation a348c3caa9 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2020-11-06 09:30:48 -05:00
InsanityAutomation 6f5430f00a Update Configuration.h 2020-10-26 10:44:44 -04:00
InsanityAutomation 63821d87f9 Update Configuration_adv.h 2020-10-23 14:57:19 -04:00
InsanityAutomation b5f447f144 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2020-10-23 14:32:10 -04:00
InsanityAutomation 4a56689801 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2020-10-22 09:13:59 -04:00
Scott Lahteine 0216e032be Host prompt followup 2020-10-19 04:34:14 -05:00
Scott Lahteine 2d8aa0cea1 Tweak a host prompt call 2020-10-19 04:25:48 -05:00
InsanityAutomation 50f10fc57f Update dwin.cpp 2020-10-08 15:56:54 -04:00
InsanityAutomation 12180f20e5 Support 10SPro display on Ender3 422 and 427 boards 2020-10-01 21:20:50 -04:00
InsanityAutomation f5dc8d73ee Add DW7 Hex Files 2020-09-26 10:51:50 -04:00
InsanityAutomation 00e3806613 Update Configuration.h 2020-09-24 12:54:05 -04:00
InsanityAutomation 7296538849 changes for melzi to fit 2020-09-24 09:53:13 -04:00
InsanityAutomation 6c4e3e9215 Add layer shift rapid correction logic and creality stm32f01 environments for E3V2 2020-09-21 10:13:07 -04:00
InsanityAutomation 4f050e8dc9 Update Version.h 2020-09-15 16:53:04 -04:00
InsanityAutomation e50e446676 Ender 5 SKRMini Tweaks 2020-09-14 21:38:07 -04:00
InsanityAutomation b795860c5a borders etc e3v2 2020-09-13 22:35:56 -04:00
InsanityAutomation b97b2b9df8 Fix info menu screens 2020-09-13 11:20:52 -04:00
InsanityAutomation c6bdb2cd95 Update dwin.cpp 2020-09-08 07:48:53 -04:00
InsanityAutomation f409cf8c87 Live axis move and z offset 2020-09-07 19:20:22 -04:00
InsanityAutomation fbb75f41c2 Implement fix from https://github.com/cosmoderp/Marlin/commit/5c8e1e7d4af37e25fb9040dcbf690bbb089948e6 2020-09-05 15:13:10 -04:00
InsanityAutomation d560a493b2 Update Configuration.h 2020-09-03 13:31:32 -04:00
InsanityAutomation 0395b7563e force silent board for all v4 pcb's 2020-09-03 13:19:53 -04:00
InsanityAutomation ebd414b3d5 MachineEnder3Pro420 -> MachineEnder3Pro422 2020-09-03 12:37:58 -04:00
InsanityAutomation 0c8bafba38 eparser and display fixes 2020-09-03 12:33:39 -04:00
InsanityAutomation 65d5c57957 Add 32 bit Ender3's 2020-09-03 12:30:06 -04:00
InsanityAutomation b1d667c04a Fixes 2020-09-03 12:03:20 -04:00
InsanityAutomation ee8ea7a0b5 tweaks for e3v2 2020-09-03 12:03:20 -04:00
InsanityAutomation 89ac692bcc Update Configuration.h 2020-09-03 12:03:20 -04:00
InsanityAutomation 88410b3cfe Add Ender3V2 2020-09-03 12:03:20 -04:00
InsanityAutomation 60eb467bfe Update platformio.ini 2020-09-03 12:03:03 -04:00
InsanityAutomation 1c3407ed62 Update platformio.ini 2020-09-03 12:03:03 -04:00
InsanityAutomation 82064d2341 Clean up rebase 2020-09-03 12:03:03 -04:00
InsanityAutomation 16b7cffe0f Update Configuration_adv.h 2020-09-03 12:03:03 -04:00
InsanityAutomation 638bac84cf Update Creality_DWIN.cpp 2020-09-03 12:03:03 -04:00
InsanityAutomation 9d3ad76d50 Minor adjustments following github issues 2020-09-03 12:03:03 -04:00
InsanityAutomation 6edb31f58c Update platformio.ini 2020-09-03 12:02:49 -04:00
InsanityAutomation 01297cab24 add 2130 option for SKR 2020-09-03 12:02:49 -04:00
InsanityAutomation 80fa195db3 Rebase and catchup 2020-09-03 12:02:49 -04:00
InsanityAutomation 052b4387d3 Add SKRMini and DDX 2020-09-03 12:02:34 -04:00
InsanityAutomation dd5481b001 Update platformio.ini 2020-09-03 12:02:14 -04:00
InsanityAutomation 59e1371f89 add 2130 option for SKR 2020-09-03 12:02:13 -04:00
InsanityAutomation 4fdcae6677 Rebase and catchup 2020-09-03 12:02:13 -04:00
InsanityAutomation 1c3dcae659 Update platformio.ini 2020-09-03 12:01:58 -04:00
InsanityAutomation ec425de694 Update Configuration_adv.h 2020-09-03 12:01:58 -04:00
InsanityAutomation 29899e6fe8 Update Creality_DWIN.cpp 2020-09-03 12:01:58 -04:00
InsanityAutomation f7eaa32bc9 Minor adjustments following github issues 2020-09-03 12:01:58 -04:00
InsanityAutomation 508dc26394 Update platformio.ini 2020-09-03 12:01:33 -04:00
InsanityAutomation 600d5922da add 2130 option for SKR 2020-09-03 12:01:33 -04:00
InsanityAutomation a2efee8b7b Rebase and catchup 2020-09-03 12:01:32 -04:00
InsanityAutomation 239e4737a8 Add SKRMini and DDX 2020-09-03 12:01:00 -04:00
InsanityAutomation c8577bc673 Update platformio.ini 2020-09-03 12:00:22 -04:00
InsanityAutomation 3bd2ed7310 add 2130 option for SKR 2020-09-03 12:00:22 -04:00
InsanityAutomation 79414a1398 Rebase and catchup 2020-09-03 12:00:22 -04:00
1483 changed files with 87990 additions and 58191 deletions
-21
View File
@@ -1,21 +0,0 @@
# Build artifacts
buildroot/
*.o
*.a
*.so
*.dylib
*.dll
*.exe
# Web assets
*.min.js
*.min.css
# Generated files
__pycache__/
*.pyc
.DS_Store
# IDE files
.vscode/
.idea/
+1 -1
View File
@@ -7,7 +7,7 @@ contact_links:
url: https://www.facebook.com/groups/1049718498464482
about: Please ask and answer questions here.
- name: 🕹 Marlin on Discord
url: https://discord.com/servers/marlin-firmware-461605380783472640
url: https://discord.gg/n5NJ59y
about: Join the Discord server for support and discussion.
- name: 🔗 Marlin Discussion Forum
url: https://reprap.org/forum/list.php?415
+1 -1
View File
@@ -43,7 +43,7 @@ We have a Message Board and a Facebook group where our knowledgable user communi
If chat is more your speed, you can join the MarlinFirmware Discord server:
* Use the link https://discord.com/servers/marlin-firmware-461605380783472640 to join up as a General User.
* Use the link https://discord.gg/n5NJ59y to join up as a General User.
* Even though our Discord is pretty active, it may take a while for community members to respond &mdash; please be patient!
* Use the `#general` channel for general questions or discussion about Marlin.
* Other channels exist for certain topics or are limited to Patrons. Check the channel list.
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
autolabel:
name: Auto Label
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Auto Label for [BUG]
uses: actions/github-script@v7
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
name: Bump Distribution Date
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
name: PR Bad Target
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
+5 -22
View File
@@ -14,8 +14,6 @@ on:
- config/**
- data/**
- docs/**
- test/**
- Marlin/tests/**
- '**/*.md'
push:
branches:
@@ -25,8 +23,6 @@ on:
- config/**
- data/**
- docs/**
- test/**
- Marlin/tests/**
- '**/*.md'
jobs:
@@ -34,19 +30,14 @@ jobs:
name: Build Test
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
test-platform:
# RP2040
- SKR_Pico
# Native
- linux_native
- simulator_linux_release
# AVR
- mega2560
@@ -109,11 +100,11 @@ jobs:
# STM32F4
- ARMED
- BTT_BTT002
- BTT_GTR_V1_0
- BTT_SKR_PRO
- BIGTREE_BTT002
- BIGTREE_GTR_V1_0
- BIGTREE_SKR_PRO
- FLYF407ZG
- STM32F446VE_fysetc
- FYSETC_S6
- LERDGEK
- LERDGEX
- mks_robin_pro2
@@ -186,14 +177,6 @@ jobs:
pio upgrade --dev
pio pkg update --global
- name: Install Simulator dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install libsdl2-dev
sudo apt-get install libsdl2-net-dev
sudo apt-get install libglm-dev
- name: Run ${{ matrix.test-platform }} Tests
run: |
make tests-single-ci TEST_TARGET=${{ matrix.test-platform }}
+1 -1
View File
@@ -36,7 +36,7 @@ jobs:
# pulls them into additional branches.
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Check out the PR
-48
View File
@@ -1,48 +0,0 @@
#
# ci-validate-boards.yml
# Validate boards.h to make sure it's all set up correctly
#
name: CI - Validate boards.h
# We can do the on: section as two items, one for pull requests and one for pushes...
on:
pull_request:
branches:
- bugfix-2.1.x
paths:
- 'Marlin/src/core/boards.h'
push:
branches:
- bugfix-2.1.x
paths:
- 'Marlin/src/core/boards.h'
jobs:
validate_pins_files:
name: Validate boards.h
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-22.04
steps:
- name: Check out the PR
uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Select Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: 'x64'
- name: Validate core/boards.h
run: |
make validate-boards -j
-51
View File
@@ -1,51 +0,0 @@
#
# ci-validate-pins.yml
# Validate that all of the pins files are unchanged by pinsformat.py
#
name: CI - Validate Pins Files
on:
pull_request:
branches:
- bugfix-2.1.x
# Cannot be enabled on 2.1.x until it contains the unit test framework
#- 2.1.x
paths:
- 'Marlin/src/pins/*/**'
push:
branches:
- bugfix-2.1.x
# Cannot be enabled on 2.1.x until it contains the unit test framework
#- 2.1.x
paths:
- 'Marlin/src/pins/*/**'
jobs:
validate_pins_files:
name: Validate Pins Files
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-22.04
steps:
- name: Check out the PR
uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Select Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: 'x64'
- name: Validate all pins files
run: |
make validate-pins -j
+1 -1
View File
@@ -13,7 +13,7 @@ on:
jobs:
remove_label:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
name: Close Stale Issues
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
name: Lock Closed Issues
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
name: Unlock Reopened
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: OSDKDev/unlock-issues@v1.1
-4
View File
@@ -125,7 +125,6 @@ vc-fileutils.settings
# Visual Studio Code
.vscode/*
!.vscode/extensions.json
*.code-workspace
# Simulation files
imgui.ini
@@ -169,6 +168,3 @@ __pycache__
tags
*.logs
*.bak
.aider*
!.aiderignore
.env
-16
View File
@@ -1,16 +0,0 @@
/**
* Marlin-specific settings for Zed
*
* For a full list of overridable settings, and general information on folder-specific settings,
* see the documentation: https://zed.dev/docs/configuring-zed#settings-files
*/
{
"languages": {
"C": {
"enable_language_server": false
},
"C++": {
"enable_language_server": false
}
}
}
+21 -43
View File
@@ -2,24 +2,22 @@ SCRIPTS_DIR := buildroot/share/scripts
CONTAINER_RT_BIN := docker
CONTAINER_RT_OPTS := --rm -v $(PWD):/code -v platformio-cache:/root/.platformio
CONTAINER_IMAGE := marlin-dev
UNIT_TEST_CONFIG ?= default
help:
@echo "Tasks for local development:"
@echo "make marlin : Build Marlin for the configured board"
@echo "make format-pins -j : Reformat all pins files (-j for parallel execution)"
@echo "make validate-pins -j : Validate all pins files, fails if any require reformatting"
@echo "make validate-boards -j : Validate boards.h and pins.h for standards compliance"
@echo "make marlin : Build marlin for the configured board"
@echo "make format-pins : Reformat all pins files"
@echo "make tests-single-ci : Run a single test from inside the CI"
@echo "make tests-single-local : Run a single test locally"
@echo "make tests-single-local-docker : Run a single test locally, using docker"
@echo "make tests-all-local : Run all tests locally"
@echo "make tests-all-local-docker : Run all tests locally, using docker"
@echo "make unit-test-single-local : Run unit tests for a single config locally"
@echo "make unit-test-single-local-docker : Run unit tests for a single config locally, using docker"
# @echo "make unit-test-single-ci : Run a single code test from inside the CI"
# @echo "make unit-test-single-local : Run a single code test locally"
# @echo "make unit-test-single-local-docker : Run a single code test locally, using docker-compose"
@echo "make unit-test-all-local : Run all code tests locally"
@echo "make unit-test-all-local-docker : Run all code tests locally, using docker"
@echo "make setup-local-docker : Setup local docker using buildx"
@echo "make unit-test-all-local-docker : Run all code tests locally, using docker-compose"
@echo "make setup-local-docker : Setup local docker-compose"
@echo ""
@echo "Options for testing:"
@echo " TEST_TARGET Set when running tests-single-*, to select the"
@@ -29,9 +27,6 @@ help:
@echo " run on GitHub CI"
@echo " ONLY_TEST Limit tests to only those that contain this, or"
@echo " the index of the test (1-based)"
@echo " UNIT_TEST_CONFIG Set the name of the config from the test folder, without"
@echo " the leading number. Default is 'default'". Used with the
@echo " unit-test-single-* tasks"
@echo " VERBOSE_PLATFORMIO If you want the full PIO output, set any value"
@echo " GIT_RESET_HARD Used by CI: reset all local changes. WARNING:"
@echo " THIS WILL UNDO ANY CHANGES YOU'VE MADE!"
@@ -56,29 +51,27 @@ tests-single-local-docker:
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)"
tests-all-local:
@python -c "import yaml" 2>/dev/null || (echo 'pyyaml module is not installed. Install it with "python -m pip install pyyaml"' && exit 1)
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
&& for TEST_TARGET in $$(python $(SCRIPTS_DIR)/get_test_targets.py) ; do \
if [ "$$TEST_TARGET" = "linux_native" ] && [ "$$(uname)" = "Darwin" ]; then \
echo "Skipping tests for $$TEST_TARGET on macOS" ; \
continue ; \
fi ; \
echo "Running tests for $$TEST_TARGET" ; \
run_tests . $$TEST_TARGET || exit 1 ; \
sleep 5; \
done
&& for TEST_TARGET in $$($(SCRIPTS_DIR)/get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done
tests-all-local-docker:
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD)
unit-test-single-local:
platformio run -t marlin_$(UNIT_TEST_CONFIG) -e linux_native_test
#unit-test-single-ci:
# export GIT_RESET_HARD=true
# $(MAKE) unit-test-single-local TEST_TARGET=$(TEST_TARGET)
unit-test-single-local-docker:
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make unit-test-single-local UNIT_TEST_CONFIG=$(UNIT_TEST_CONFIG)
# TODO: How can we limit tests with ONLY_TEST with platformio?
#unit-test-single-local:
# @if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make unit-test-all-local" ; return 1; fi
# platformio run -t marlin_$(TEST_TARGET)
#unit-test-single-local-docker:
# @if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make unit-test-all-local-docker" ; return 1; fi
# @if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
# $(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make unit-test-single-local TEST_TARGET=$(TEST_TARGET) ONLY_TEST="$(ONLY_TEST)"
unit-test-all-local:
platformio run -t test-marlin -e linux_native_test
@@ -92,22 +85,7 @@ setup-local-docker:
PINS := $(shell find Marlin/src/pins -mindepth 2 -name '*.h')
.PHONY: $(PINS) format-pins validate-pins
$(PINS): %:
@echo "Formatting $@"
@python $(SCRIPTS_DIR)/pinsformat.py $< $@
@echo "Formatting $@" && node $(SCRIPTS_DIR)/pinsformat.js $@
format-pins: $(PINS)
validate-pins: format-pins
@echo "Validating pins files"
@git diff --exit-code || (git status && echo "\nError: Pins files are not formatted correctly. Run \"make format-pins\" to fix.\n" && exit 1)
BOARDS_FILE := Marlin/src/core/boards.h
.PHONY: validate-boards
validate-boards:
@echo "Validating boards.h file"
@python $(SCRIPTS_DIR)/validate_boards.py $(BOARDS_FILE) || (echo "\nError: boards.h file is not valid. Please check and correct it.\n" && exit 1)
+1945 -513
View File
File diff suppressed because it is too large Load Diff
+568 -506
View File
File diff suppressed because it is too large Load Diff
+74 -105
View File
@@ -187,17 +187,6 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1033)
# RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
else ifeq ($(HARDWARE_MOTHERBOARD),1034)
# RAMPS 1.6+ (Power outputs: Hotend, Fan, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),1035)
# RAMPS 1.6+ (Power outputs: Hotend0, Hotend1, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),1036)
# RAMPS 1.6+ (Power outputs: Hotend, Fan0, Fan1)
else ifeq ($(HARDWARE_MOTHERBOARD),1037)
# RAMPS 1.6+ (Power outputs: Hotend0, Hotend1, Fan)
else ifeq ($(HARDWARE_MOTHERBOARD),1038)
# RAMPS 1.6+ (Power outputs: Spindle, Controller Fan)
else ifeq ($(HARDWARE_MOTHERBOARD),1039)
#
# RAMPS Derivatives - ATmega1280, ATmega2560
#
@@ -232,113 +221,108 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1112)
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
# BigTreeTech or BIQU KFB2.0
else ifeq ($(HARDWARE_MOTHERBOARD),1114)
# Zonestar zrib V2.0 (Chinese RAMPS replica)
# zrib V2.0 (Chinese RAMPS replica)
else ifeq ($(HARDWARE_MOTHERBOARD),1115)
# Zonestar zrib V5.2 (Chinese RAMPS replica)
# zrib V5.2 (Chinese RAMPS replica)
else ifeq ($(HARDWARE_MOTHERBOARD),1116)
# Zonestar zrib V5.3 (Chinese RAMPS replica)
else ifeq ($(HARDWARE_MOTHERBOARD),1117)
# Felix 2.0+ Electronics Board (RAMPS like)
else ifeq ($(HARDWARE_MOTHERBOARD),1118)
else ifeq ($(HARDWARE_MOTHERBOARD),1117)
# Invent-A-Part RigidBoard
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
else ifeq ($(HARDWARE_MOTHERBOARD),1118)
# Invent-A-Part RigidBoard V2
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
# Sainsmart 2-in-1 board
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
# Ultimaker
else ifeq ($(HARDWARE_MOTHERBOARD),1122)
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
else ifeq ($(HARDWARE_MOTHERBOARD),1122)
MCU ?= atmega1280
PROG_MCU ?= m1280
# Azteeg X3
else ifeq ($(HARDWARE_MOTHERBOARD),1124)
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
# Azteeg X3 Pro
else ifeq ($(HARDWARE_MOTHERBOARD),1125)
else ifeq ($(HARDWARE_MOTHERBOARD),1124)
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
else ifeq ($(HARDWARE_MOTHERBOARD),1126)
else ifeq ($(HARDWARE_MOTHERBOARD),1125)
# Rumba
else ifeq ($(HARDWARE_MOTHERBOARD),1127)
else ifeq ($(HARDWARE_MOTHERBOARD),1126)
# Raise3D N series Rumba derivative
else ifeq ($(HARDWARE_MOTHERBOARD),1128)
else ifeq ($(HARDWARE_MOTHERBOARD),1127)
# Rapide Lite 200 (v1, low-cost RUMBA clone with drv)
else ifeq ($(HARDWARE_MOTHERBOARD),1129)
else ifeq ($(HARDWARE_MOTHERBOARD),1128)
# Formbot T-Rex 2 Plus
else ifeq ($(HARDWARE_MOTHERBOARD),1130)
else ifeq ($(HARDWARE_MOTHERBOARD),1129)
# Formbot T-Rex 3
else ifeq ($(HARDWARE_MOTHERBOARD),1131)
else ifeq ($(HARDWARE_MOTHERBOARD),1130)
# Formbot Raptor
else ifeq ($(HARDWARE_MOTHERBOARD),1132)
else ifeq ($(HARDWARE_MOTHERBOARD),1131)
# Formbot Raptor 2
else ifeq ($(HARDWARE_MOTHERBOARD),1133)
else ifeq ($(HARDWARE_MOTHERBOARD),1132)
# bq ZUM Mega 3D
else ifeq ($(HARDWARE_MOTHERBOARD),1134)
else ifeq ($(HARDWARE_MOTHERBOARD),1133)
# MakeBoard Mini v2.1.2 by MicroMake
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
else ifeq ($(HARDWARE_MOTHERBOARD),1134)
# TriGorilla Anycubic version 1.3-based on RAMPS EFB
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
# ... Ver 1.4
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
# ... Rev 1.1 (new servo pin order)
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
# Creality: Ender-4, CR-8
else ifeq ($(HARDWARE_MOTHERBOARD),1139)
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
# Creality: CR10S, CR20, CR-X
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
else ifeq ($(HARDWARE_MOTHERBOARD),1139)
# Dagoma F5
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
# Dagoma D6 (as found in the Dagoma DiscoUltimate V2 TMC)
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
# FYSETC F6 1.3
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
# FYSETC F6 1.4
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
# Wanhao Duplicator i3 Plus
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
# VORON Design
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
# Tronxy TRONXY-V3-1.0
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
# Z-Bolt X Series
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
# TT OSCAR
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
# Overlord/Overlord Pro
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
# ADIMLab Gantry v1
else ifeq ($(HARDWARE_MOTHERBOARD),1149)
# BIQU Tango V1
# ADIMLab Gantry v2
else ifeq ($(HARDWARE_MOTHERBOARD),1150)
# MKS GEN L V2
# BIQU Tango V1
else ifeq ($(HARDWARE_MOTHERBOARD),1151)
# MKS GEN L V2.1
# MKS GEN L V2
else ifeq ($(HARDWARE_MOTHERBOARD),1152)
# Copymaster 3D
# MKS GEN L V2.1
else ifeq ($(HARDWARE_MOTHERBOARD),1153)
# Ortur 4
# Copymaster 3D
else ifeq ($(HARDWARE_MOTHERBOARD),1154)
# Tenlog D3 Hero IDEX printer
# Ortur 4
else ifeq ($(HARDWARE_MOTHERBOARD),1155)
# Tenlog D3, D5, D6 IDEX Printer
# Tenlog D3 Hero IDEX printer
else ifeq ($(HARDWARE_MOTHERBOARD),1156)
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed)
# Tenlog D3,5,6 Pro IDEX printers
else ifeq ($(HARDWARE_MOTHERBOARD),1157)
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed)
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),1158)
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed)
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),1159)
# Longer LK1 PRO / Alfawise U20 Pro (PRO version)
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),1160)
# Longer LKx PRO / Alfawise Uxx Pro (PRO version)
# Longer LK1 PRO / Alfawise U20 Pro (PRO version)
else ifeq ($(HARDWARE_MOTHERBOARD),1161)
# Pxmalion Core I3
# Longer LKx PRO / Alfawise Uxx Pro (PRO version)
else ifeq ($(HARDWARE_MOTHERBOARD),1162)
# Panowin Cutlass (as found in the Panowin F1)
# Zonestar zrib V5.3 (Chinese RAMPS replica)
else ifeq ($(HARDWARE_MOTHERBOARD),1163)
# Kodama Bardo V1.x (as found in the Kodama Trinus)
# Pxmalion Core I3
else ifeq ($(HARDWARE_MOTHERBOARD),1164)
# XTLW MFF V1.0
else ifeq ($(HARDWARE_MOTHERBOARD),1165)
# XTLW MFF V2.0
else ifeq ($(HARDWARE_MOTHERBOARD),1166)
#
# RAMBo and derivatives
@@ -356,7 +340,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1203)
else ifeq ($(HARDWARE_MOTHERBOARD),1204)
# abee Scoovo X9H
else ifeq ($(HARDWARE_MOTHERBOARD),1205)
# ThinkerV2
# Rambo ThinkerV2
else ifeq ($(HARDWARE_MOTHERBOARD),1206)
#
@@ -399,40 +383,30 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1315)
else ifeq ($(HARDWARE_MOTHERBOARD),1316)
# Geeetech GT2560 Rev B for A10(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1317)
# Geeetech GT2560 Rev B for Mecreator2
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
# Geeetech GT2560 Rev B for A20(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1319)
# Geeetech GT2560 Rev B for A10(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1320)
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
# Geeetech GT2560 Rev B for Mecreator2
else ifeq ($(HARDWARE_MOTHERBOARD),1319)
# Geeetech GT2560 Rev B for A20(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1321)
else ifeq ($(HARDWARE_MOTHERBOARD),1320)
# Einstart retrofit
else ifeq ($(HARDWARE_MOTHERBOARD),1322)
else ifeq ($(HARDWARE_MOTHERBOARD),1321)
# Wanhao 0ne+ i3 Mini
else ifeq ($(HARDWARE_MOTHERBOARD),1323)
# Overlord/Overlord Pro
else ifeq ($(HARDWARE_MOTHERBOARD),1324)
# ADIMLab Gantry v1
else ifeq ($(HARDWARE_MOTHERBOARD),1325)
# ADIMLab Gantry v2
else ifeq ($(HARDWARE_MOTHERBOARD),1326)
else ifeq ($(HARDWARE_MOTHERBOARD),1322)
# Leapfrog Xeed 2015
else ifeq ($(HARDWARE_MOTHERBOARD),1327)
else ifeq ($(HARDWARE_MOTHERBOARD),1323)
# PICA Shield (original version)
else ifeq ($(HARDWARE_MOTHERBOARD),1328)
else ifeq ($(HARDWARE_MOTHERBOARD),1324)
# PICA Shield (rev C or later)
else ifeq ($(HARDWARE_MOTHERBOARD),1329)
else ifeq ($(HARDWARE_MOTHERBOARD),1325)
# Intamsys 4.0 (Funmat HT)
else ifeq ($(HARDWARE_MOTHERBOARD),1330)
else ifeq ($(HARDWARE_MOTHERBOARD),1326)
# Malyan M180 Mainboard Version 2 (no display function, direct G-code only)
else ifeq ($(HARDWARE_MOTHERBOARD),1331)
else ifeq ($(HARDWARE_MOTHERBOARD),1327)
# Geeetech GT2560 Rev B for A20(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1328)
# Mega controller & Protoneer CNC Shield V3.00
else ifeq ($(HARDWARE_MOTHERBOARD),1332)
# WEEDO 62A board (TINA2, Monoprice Cadet, etc.)
else ifeq ($(HARDWARE_MOTHERBOARD),1333)
# Geeetech GT2560 V4.1B for A10(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1334)
else ifeq ($(HARDWARE_MOTHERBOARD),1329)
#
# ATmega1281, ATmega2561
@@ -466,7 +440,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1502)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p
PROG_MCU ?= m644p
# Melzi V2
# Melzi V2.0
else ifeq ($(HARDWARE_MOTHERBOARD),1503)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
@@ -476,38 +450,33 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1504)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
PROG_MCU ?= m1284p
# Melzi Creality3D (for CR-10 etc)
# Melzi Creality3D board (for CR-10 etc)
else ifeq ($(HARDWARE_MOTHERBOARD),1505)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
PROG_MCU ?= m1284p
# Melzi Creality3D (for Ender-2)
# Melzi Malyan M150 board
else ifeq ($(HARDWARE_MOTHERBOARD),1506)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
PROG_MCU ?= m1284p
# Melzi Malyan M150
# Tronxy X5S
else ifeq ($(HARDWARE_MOTHERBOARD),1507)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
PROG_MCU ?= m1284p
# Tronxy X5S
# STB V1.1
else ifeq ($(HARDWARE_MOTHERBOARD),1508)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
PROG_MCU ?= m1284p
# STB V1.1
# Azteeg X1
else ifeq ($(HARDWARE_MOTHERBOARD),1509)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
PROG_MCU ?= m1284p
# Azteeg X1
else ifeq ($(HARDWARE_MOTHERBOARD),1510)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
PROG_MCU ?= m1284p
# Anet 1.0 (Melzi clone)
else ifeq ($(HARDWARE_MOTHERBOARD),1511)
else ifeq ($(HARDWARE_MOTHERBOARD),1510)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
PROG_MCU ?= m1284p
@@ -1026,7 +995,7 @@ extcoff: $(TARGET).elf
$(NM) -n $< > $@
# Link: create ELF output file from library.
LDFLAGS+= -Wl,-V
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
$(Pecho) " CXX $@"
$P $(CXX) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
+164 -19
View File
@@ -16,7 +16,7 @@
* 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/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
@@ -28,32 +28,177 @@
/**
* Marlin release version identifier
*/
//#define SHORT_BUILD_VERSION "bugfix-2.1.x"
#define SHORT_BUILD_VERSION "DW7.4.9"
/**
* Verbose version identifier which should contain a reference to the location
* from where the binary was downloaded or the source code was compiled.
*/
//#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION
#if(ENABLED(MachineMini))
#define VerChar1 "M"
#elif(ENABLED(MachineEnder2))
#define VerChar1 "E2"
#elif(ENABLED(MachineEnder2Pro))
#define VerChar1 "E2P"
#elif(ENABLED(MachineEnder3))
#define VerChar1 "E3"
#elif ENABLED(MachineEnder3V2)
#define VerChar1 "E3V2"
#elif ENABLED(MachineEnder3S1)
#define VerChar1 "E3S1"
#elif ENABLED(MachineEnder3Max)
#define VerChar1 "E3M"
#elif(ENABLED(MachineEnder4))
#define VerChar1 "E4"
#elif(ENABLED(MachineEnder5))
#define VerChar1 "E5"
#elif(ENABLED(MachineEnder6))
#define VerChar1 "E6"
#elif(ENABLED(MachineEnder7))
#define VerChar1 "E7"
#elif(ENABLED(MachineSermoonD1))
#define VerChar1 "D1"
#elif(ENABLED(MachineEnder5Plus))
#define VerChar1 "E5P"
#elif(ENABLED(MachineCR20))
#define VerChar1 "2"
#elif(ENABLED(MachineCR10Orig))
#define VerChar1 "O"
#elif(ENABLED(MachineCR10Std))
#define VerChar1 "S"
#elif(ENABLED(MachineCRX))
#define VerChar1 "X"
#elif(ENABLED(MachineCR6))
#define VerChar1 "CR6"
#elif(ENABLED(MachineCR5))
#define VerChar1 "CR5"
#elif(ENABLED(MachineCR6Max))
#define VerChar1 "CR6M"
#elif(ENABLED(MachineS4))
#define VerChar1 "4"
#elif(ENABLED(MachineS5) || ENABLED(MachineCR10Max))
#define VerChar1 "5"
#elif ENABLED(MachineCR2020)
#define VerChar1 "20"
#elif(ENABLED(MachineCR30))
#define VerChar1 "CR30"
#endif
#if(ENABLED(HotendStock))
#define VerChar2 "S"
#elif(ENABLED(HotendE3D))
#define VerChar2 "E"
#elif ENABLED(HotendMosquito)
#define VerChar2 "M"
#endif
#if(ENABLED(HotendAllMetal))
#define VerChar3 "M"
#else
#define VerChar3 "S"
#endif
#if(ENABLED(BedAC))
#define VerChar4 "A"
#elif(ENABLED(BedDC))
#define VerChar4 "D"
#else
#define VerChar4 "N"
#endif
#if(ENABLED(ABL_EZABL))
#define VerChar5 "A"
#elif(ENABLED(ABL_BLTOUCH))
#define VerChar5 "B"
#else
#define VerChar5 "N"
#endif
#if(ENABLED(ABL_UBL))
#define VerChar6 "U"
#elif(ENABLED(ABL_BI))
#define VerChar6 "B"
#else
#define VerChar6 "N"
#endif
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " TM3D " VerChar1 VerChar2 VerChar3 VerChar4 VerChar5 VerChar6
/**
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2025-03-18"
/**
* The protocol for communication to the host. Protocol indicates communication
* standards such as the use of ASCII, "echo:" and "error:" line prefixes, etc.
* (Other behaviors are given by the firmware version and capabilities report.)
*/
//#define PROTOCOL_VERSION "1.0"
#define STRING_DISTRIBUTION_DATE "2024-04-08"
/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
*/
//#define MACHINE_NAME "3D Printer"
#if(ENABLED(MachineMini))
#define CUSTOM_MACHINE_NAME "Mini SuPeR"
#elif(ENABLED(MachineCR10Smart))
#define CUSTOM_MACHINE_NAME "TM3D CR10Smart"
#elif(ENABLED(MachineCR10SmartPro))
#define CUSTOM_MACHINE_NAME "TM3D CR10SmartPro"
#elif(ENABLED(MachineEnder2))
#define CUSTOM_MACHINE_NAME "TM3D Ender2"
#elif(ENABLED(MachineEnder2Pro))
#define CUSTOM_MACHINE_NAME "TM3D Ender2 Pro"
#elif(ENABLED(MachineEnder3))
#define CUSTOM_MACHINE_NAME "TM3D Ender3"
#elif(ENABLED(MachineEnder3Max))
#define CUSTOM_MACHINE_NAME "TM3D E3Max"
#elif(ENABLED(MachineEnder6))
#define CUSTOM_MACHINE_NAME "TM3D Ender6"
#elif(ENABLED(MachineEnder7))
#define CUSTOM_MACHINE_NAME "TM3D Ender7"
#elif(ENABLED(MachineEnder3V2))
#define CUSTOM_MACHINE_NAME "TM3D Ender3V2"
#elif(ENABLED(MachineEnder3S1))
#define CUSTOM_MACHINE_NAME "TM3D Ender3S1"
#elif(ENABLED(MachineEnder4))
#define CUSTOM_MACHINE_NAME "TM3D Ender4"
#elif(ENABLED(MachineEnder5))
#define CUSTOM_MACHINE_NAME "TM3D Ender5"
#elif(ENABLED(MachineEnder5Plus))
#define CUSTOM_MACHINE_NAME "TM3D E5 Plus"
#elif(ENABLED(MachineCR20))
#define CUSTOM_MACHINE_NAME "SuPeR CR-20"
#elif(ENABLED(MachineCR10Orig))
#define CUSTOM_MACHINE_NAME "SuPeR CR-10"
#elif(ENABLED(MachineCRX))
#define CUSTOM_MACHINE_NAME "TM3D CR-X"
#elif ENABLED(MachineCR10SProV2)
#define CUSTOM_MACHINE_NAME "TM3D 10SProV2"
#elif(ENABLED(MachineCR10SPro))
#define CUSTOM_MACHINE_NAME "TM3D 10S Pro"
#elif(ENABLED(MachineCR10Max))
#define CUSTOM_MACHINE_NAME "TM3D Max"
#elif(ENABLED(MachineCR10SV3))
#define CUSTOM_MACHINE_NAME "TM3D CR10V3"
#elif(ENABLED(MachineCR10SV2))
#define CUSTOM_MACHINE_NAME "TM3D CR10V2"
#elif(ENABLED(MachineCR10Std))
#define CUSTOM_MACHINE_NAME "300 SuPeR"
#elif(ENABLED(MachineS4))
#define CUSTOM_MACHINE_NAME "400 SuPeR"
#elif(ENABLED(MachineS5))
#define CUSTOM_MACHINE_NAME "500 SuPeR"
#elif ENABLED(MachineCR2020)
#define CUSTOM_MACHINE_NAME "TM3D 2020"
#elif ENABLED(MachineSermoonD1)
#define CUSTOM_MACHINE_NAME "SermoonD1"
#elif ENABLED(MachineCR5)
#define CUSTOM_MACHINE_NAME "CR5 Pro"
#elif ENABLED(MachineCR6)
#define CUSTOM_MACHINE_NAME "CR6"
#elif ENABLED(MachineCR6Max)
#define CUSTOM_MACHINE_NAME "CR6 Max"
#elif ENABLED(MachineCR30)
#define CUSTOM_MACHINE_NAME "CR30 Printmill"
#endif
/**
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
@@ -61,7 +206,7 @@
* has a distinct Github fork— the Source Code URL should just be the main
* Marlin repository.
*/
//#define SOURCE_CODE_URL "github.com/MarlinFirmware/Marlin"
#define SOURCE_CODE_URL "https://github.com/InsanityAutomation/Marlin/tree/CrealityDwin_2.0"
/**
* Default generic printer UUID.
@@ -72,12 +217,12 @@
* The WEBSITE_URL is the location where users can get more information such as
* documentation about a specific Marlin release.
*/
//#define WEBSITE_URL "marlinfw.org"
#define WEBSITE_URL "tinymachines3d.com"
/**
* Set the vendor info the serial USB interface, if changeable.
* Currently only supported by DUE platform.
* Set the vendor info the serial USB interface, if changable
* Currently only supported by DUE platform
*/
//#define USB_DEVICE_VENDOR_ID 0x0000
//#define USB_DEVICE_PRODUCT_ID 0x0000
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL
//#define USB_DEVICE_VENDOR_ID 0x0000
//#define USB_DEVICE_PRODUCT_ID 0x0000
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL
+93
View File
@@ -0,0 +1,93 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
*
*/
/**
* Custom Bitmap for splashscreen
*
* You may use one of the following tools to generate the C++ bitmap array from
* a black and white image:
*
* - http://www.marlinfw.org/tools/u8glib/converter.html
* - http://www.digole.com/tools/PicturetoC_Hex_converter.php
*/
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
#define CUSTOM_BOOTSCREEN_BMPWIDTH 128
#define CUSTOM_BOOTSCREEN_INVERTED
const unsigned char custom_start_bmp[] PROGMEM = {
B11111101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111101,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111110,B00000111,B11000000,B00000101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111100,B00001010,B00100000,B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111110,B00010100,B00010000,B00000101,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111100,B00101000,B00001000,B00000110,B00000111,B11000000,B00000101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,B11111111,B11111111,B11111111,
B11111110,B01010100,B00000100,B00000100,B00001010,B00100000,B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,
B11111100,B01100000,B00000100,B00000110,B00010100,B00010000,B00000101,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111110,B01010000,B00000100,B00000100,B00101000,B00001000,B00000110,B00000111,B11000000,B00000101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,
B11111100,B01100000,B00000100,B00000110,B01010100,B00000100,B00000100,B00001010,B00100000,B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
B11111110,B01010100,B00000100,B00011100,B01100000,B00000100,B00000110,B00010100,B00010000,B00000101,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,
B11111100,B00101000,B00001000,B00101110,B01010000,B00000100,B00000100,B00101000,B00001000,B00000110,B00000111,B11000000,B00000000,B00000001,B11110000,B00111111,
B11111110,B00010100,B00010000,B01010100,B01100000,B00000100,B00000110,B01010100,B00000100,B00000100,B00001010,B00100000,B00000000,B00000010,B00001000,B00011111,
B11111100,B00001010,B00100000,B01100110,B01010100,B00000100,B00011100,B01100000,B00000100,B00000110,B00010100,B00010000,B00000000,B00000101,B00000100,B00111111,
B11111110,B00000111,B11000000,B01010100,B00101000,B00001000,B00101110,B01010000,B00000100,B00000100,B00101000,B00001000,B00000000,B00001010,B00000010,B00011111,
B11111100,B00000000,B00000000,B00101110,B00010100,B00010000,B01010100,B01100000,B00000100,B00000110,B01010100,B00000100,B00000000,B00010101,B00000001,B00111111,
B11111110,B00000000,B00000000,B00011100,B00001010,B00100000,B01100110,B01010100,B00000100,B00011100,B01100000,B00000100,B00000000,B00011000,B00000001,B00011111,
B11111100,B00000000,B00000000,B00000110,B00000111,B11000000,B01010100,B00101000,B00001000,B00101110,B01010000,B00000100,B00000000,B00010100,B00000001,B00111111,
B11111110,B00000000,B00000000,B00000100,B00000000,B00000000,B00101110,B00010100,B00010000,B01010100,B01100000,B00000100,B00000000,B00011000,B00000001,B00011111,
B11111100,B11111111,B11111111,B11111110,B00000000,B00000000,B00011100,B00001010,B00100000,B01100110,B01010100,B00000100,B00011100,B00010101,B00000001,B00111111,
B11111110,B11010101,B01010101,B01010100,B00000000,B00000000,B00000110,B00000111,B11000000,B01010100,B00101000,B00001000,B00101010,B00001010,B00000010,B00011111,
B11111100,B10000100,B00010000,B01000110,B00000000,B00000000,B00000100,B00000000,B00000000,B00101110,B00010100,B00010000,B01010001,B00000101,B00000100,B00111111,
B11111110,B11000100,B00010000,B01000100,B11111111,B11111111,B11111110,B00000000,B00000000,B00011100,B00001010,B00100000,B01100001,B00000010,B10001000,B00011111,
B11111100,B10000100,B00010000,B01000110,B11010101,B01010101,B01010100,B00000000,B00000000,B00000110,B00000111,B11000000,B01010001,B00000001,B11110000,B00111111,
B11111110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B00000000,B00000000,B00000100,B00000000,B00000000,B00101010,B00000000,B00000000,B00011111,
B11111100,B11000100,B00010000,B01000110,B11000100,B00010000,B01000100,B11111111,B11111111,B11111110,B00000000,B00000000,B00011100,B00000000,B00000000,B00111111,
B11111110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B11010101,B01010101,B01010100,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,
B11111100,B11010101,B01010101,B01010110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
B11111100,B11111111,B11111111,B11111100,B11000100,B00010000,B01000110,B11000100,B00010000,B01000100,B11111111,B11111111,B11111111,B11111111,B11111111,B10011111,
B11111110,B00000000,B00000000,B00000110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B11010101,B01010101,B01010101,B01010101,B01010101,B10111111,
B11111101,B01010101,B01010101,B01010100,B11010101,B01010101,B01010110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
B11111111,B11111111,B11111111,B11111100,B11111111,B11111111,B11111100,B11000100,B00010000,B01000110,B11000100,B00010000,B01000001,B00000100,B00010001,B10111111,
B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
B11111111,B11111111,B11111111,B11111101,B01010101,B01010101,B01010100,B11010101,B01010101,B01010110,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B11111111,B11111111,B11111100,B11000100,B00010000,B01000001,B00000100,B00010001,B10111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000110,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111101,B01010101,B01010101,B01010100,B11010101,B01010101,B01010101,B01010101,B01010101,B10111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B11111111,B11111111,B11111111,B11111111,B11111111,B10011111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11100000,B00101110,B11111011,B01111101,B11111011,B11111011,B11001111,B11000001,B11011111,B10111011,B00111110,B11000000,B11100001,B11111110,B00111100,B00011111,
B11111101,B11101110,B01111011,B00111001,B11111001,B11110011,B11001111,B10011110,B11011111,B10111011,B00111110,B11011111,B11011110,B11111100,B11011101,B11100111,
B11111101,B11101110,B00111011,B10111011,B11111001,B11101011,B11010111,B10111111,B01011111,B10111011,B01011110,B11011111,B11011110,B11111101,B11101101,B11110111,
B11111101,B11101110,B10111011,B11010011,B11111010,B11101011,B10110111,B00111111,B11011111,B10111011,B01001110,B11011111,B11011111,B11111111,B11001101,B11110011,
B11111101,B11101110,B11011011,B11000111,B11111010,B11101011,B10111011,B01111111,B11000000,B00111011,B01101110,B11000000,B11100011,B11111111,B00011101,B11110011,
B11111101,B11101110,B11001011,B11101111,B11111010,B11011011,B10111011,B01111111,B11011111,B10111011,B01100110,B11011111,B11111000,B11111111,B11001101,B11110011,
B11111101,B11101110,B11101011,B11101111,B11111011,B01011011,B00000011,B00111111,B01011111,B10111011,B01110110,B11011111,B11111110,B01111111,B11101101,B11110011,
B11111101,B11101110,B11110011,B11101111,B11111011,B01011011,B01111001,B10111110,B11011111,B10111011,B01111010,B11011111,B11011110,B01111101,B11101101,B11110111,
B11111101,B11101110,B11110011,B11101111,B11111011,B10111010,B11111101,B10011110,B11011111,B10111011,B01111100,B11011111,B11011110,B11111101,B11001101,B11100111,
B11111101,B11101110,B11111011,B11101111,B11111011,B10111010,B11111101,B11000001,B11011111,B10111011,B01111110,B11000000,B11100000,B11111110,B00011100,B00011111
};
+74
View File
@@ -0,0 +1,74 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
*
*/
/**
* Custom Status Screen bitmap
*
* Place this file in the root with your configuration files
* and enable CUSTOM_STATUS_SCREEN_IMAGE in Configuration.h.
*
* Use the Marlin Bitmap Converter to make your own:
* http://marlinfw.org/tools/u8glib/converter.html
*/
//
// Status Screen Logo bitmap
//
#define STATUS_LOGO_Y 3
#define STATUS_LOGO_WIDTH 24
const unsigned char status_logo_bmp[] PROGMEM = {
B11111111,B11111111,B11111111,
B10000000,B00000000,B00000001,
B10001110,B00000000,B11100001,
B10011111,B00000001,B11110001,
B10010011,B10000001,B00111001,
B10011111,B10000001,B11111001,
B10011111,B10000001,B11111001,
B10011111,B10111001,B11111001,
B10001111,B00101000,B11110001,
B10000000,B00111000,B00000001,
B10000000,B00000000,B00000001,
B10011111,B11111111,B11111001,
B10010001,B01110100,B10011001,
B10011011,B00000110,B10101001,
B10011011,B01010100,B10101001,
B10011011,B01010110,B10101001,
B10011011,B01010100,B10011001,
B10011111,B11111111,B11111001,
B11111111,B11111111,B11111111
};
//
// Use default bitmaps
//
#define STATUS_HOTEND_ANIM
#define STATUS_BED_ANIM
#if HOTENDS < 2
#define STATUS_LOGO_X 8
#define STATUS_HEATERS_X 40
#define STATUS_BED_X 72
#else
#define STATUS_LOGO_X 0
#define STATUS_HEATERS_X 32
#define STATUS_BED_X 80
#endif
+44 -41
View File
@@ -62,11 +62,6 @@ motherboard = BOARD_RAMPS_14_EFB
serial_port = 0
baudrate = 250000
string_config_h_author = "(default from config.ini)"
capabilities_report = on
extended_capabilities_report = on
use_watchdog = on
thermal_protection_hotends = on
thermal_protection_hysteresis = 4
@@ -82,7 +77,9 @@ temp_sensor_0 = 1
temp_hysteresis = 3
heater_0_mintemp = 5
heater_0_maxtemp = 275
preheat_1_temp_hotend = 180
bang_max = 255
pidtemp = on
pid_k1 = 0.95
pid_max = 255
@@ -92,14 +89,6 @@ default_kp = 22.20
default_ki = 1.08
default_kd = 114.00
temp_sensor_bed = 1
bed_mintemp = 5
bed_maxtemp = 150
thermal_protection_bed = on
thermal_protection_bed_hysteresis = 2
thermal_protection_bed_period = 20
x_driver_type = A4988
y_driver_type = A4988
z_driver_type = A4988
@@ -132,10 +121,10 @@ default_max_acceleration = { 3000, 3000, 100, 10000 }
homing_feedrate_mm_m = { (50*60), (50*60), (4*60) }
homing_bump_divisor = { 2, 2, 4 }
x_enable_on = LOW
y_enable_on = LOW
z_enable_on = LOW
e_enable_on = LOW
x_enable_on = 0
y_enable_on = 0
z_enable_on = 0
e_enable_on = 0
invert_x_dir = false
invert_y_dir = true
@@ -147,6 +136,11 @@ step_state_x = HIGH
step_state_y = HIGH
step_state_z = HIGH
disable_x = off
disable_y = off
disable_z = off
disable_e = off
proportional_font_ratio = 1.0
default_nominal_filament_dia = 1.75
@@ -159,13 +153,18 @@ default_retract_acceleration = 3000
default_minimumfeedrate = 0.0
default_mintravelfeedrate = 0.0
minimum_planner_speed = 0.05
min_steps_per_segment = 6
default_minsegmenttime = 20000
[config:basic]
bed_overshoot = 10
busy_while_heating = on
default_ejerk = 5.0
default_keepalive_interval = 2
default_leveling_fade_height = 0.0
disable_other_extruders = on
display_charset_hd44780 = JAPANESE
eeprom_boot_silent = on
eeprom_chitchat = on
endstoppullups = on
@@ -174,8 +173,10 @@ extrude_mintemp = 170
host_keepalive_feature = on
hotend_overshoot = 15
jd_handle_small_segments = on
lcd_info_screen_style = 0
lcd_language = en
max_bed_power = 255
mesh_inset = 0
min_software_endstops = on
max_software_endstops = on
min_software_endstop_x = on
@@ -184,48 +185,50 @@ min_software_endstop_z = on
max_software_endstop_x = on
max_software_endstop_y = on
max_software_endstop_z = on
preheat_1_label = "PLA"
preheat_1_temp_hotend = 180
preheat_1_temp_bed = 70
preheat_1_fan_speed = 0
preheat_2_label = "ABS"
preheat_2_temp_hotend = 240
preheat_2_temp_bed = 110
preheat_2_fan_speed = 0
preheat_1_label = "PLA"
preheat_1_temp_bed = 70
prevent_cold_extrusion = on
prevent_lengthy_extrude = on
printjob_timer_autostart = on
probing_margin = 10
show_bootscreen = on
soft_pwm_scale = 0
string_config_h_author = "(none, default config)"
temp_bed_hysteresis = 3
temp_bed_residency_time = 10
temp_bed_window = 1
temp_residency_time = 10
temp_window = 1
validate_homing_endstops = on
editable_steps_per_unit = on
xy_probe_feedrate = (133*60)
z_clearance_between_probes = 5
z_clearance_deploy_probe = 10
z_clearance_multi_probe = 5
[config:advanced]
arc_support = on
auto_report_temperatures = on
autotemp = on
autotemp_min = 210
autotemp_max = 250
autotemp_factor = 0.1f
autotemp_oldweight = 0.98
bed_check_interval = 5000
default_stepper_timeout_sec = 120
default_volumetric_extruder_limit = 0.00
disable_idle_x = on
disable_idle_y = on
disable_idle_z = on
disable_idle_e = on
e0_auto_fan_pin = -1
encoder_100x_steps_per_sec = 80
encoder_10x_steps_per_sec = 30
encoder_rate_multiplier = on
extended_capabilities_report = on
extruder_auto_fan_speed = 255
extruder_auto_fan_temperature = 50
fanmux0_pin = -1
fanmux1_pin = -1
fanmux2_pin = -1
faster_gcode_parser = on
debug_flags_gcode = on
homing_bump_mm = { 5, 5, 2 }
max_arc_segment_mm = 1.0
min_arc_segment_mm = 0.1
@@ -234,11 +237,11 @@ n_arc_correction = 25
serial_overrun_protection = on
slowdown = on
slowdown_divisor = 2
temp_sensor_bed = 0
thermal_protection_bed_hysteresis = 2
thermocouple_max_errors = 15
tx_buffer_size = 0
bed_check_interval = 5000
watch_bed_temp_increase = 2
watch_bed_temp_period = 60
watch_temp_increase = 2
watch_temp_period = 40
watch_temp_period = 20
+7 -7
View File
@@ -129,11 +129,11 @@ typedef Servo hal_servo_t;
#endif
#endif
#ifdef MMU_SERIAL_PORT
#if !WITHIN(MMU_SERIAL_PORT, 0, 3)
#error "MMU_SERIAL_PORT must be from 0 to 3"
#ifdef MMU2_SERIAL_PORT
#if !WITHIN(MMU2_SERIAL_PORT, 0, 3)
#error "MMU2_SERIAL_PORT must be from 0 to 3"
#endif
#define MMU_SERIAL mmuSerial
#define MMU2_SERIAL mmuSerial
#endif
#ifdef LCD_SERIAL_PORT
@@ -141,8 +141,8 @@ typedef Servo hal_servo_t;
#error "LCD_SERIAL_PORT must be from 0 to 3."
#endif
#define LCD_SERIAL lcdSerial
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH) || ENABLED(EXTENSIBLE_UI)
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
#endif
#endif
@@ -159,7 +159,7 @@ typedef Servo hal_servo_t;
#define GET_PIN_MAP_INDEX(pin) pin
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
#define HAL_SENSITIVE_PINS 0, 1
#define HAL_SENSITIVE_PINS 0, 1,
#ifdef __AVR_AT90USB1286__
#define JTAG_DISABLE() do{ MCUCR = 0x80; MCUCR = 0x80; }while(0)
+8 -8
View File
@@ -601,20 +601,20 @@ MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser);
#endif // SERIAL_PORT_3
#ifdef MMU_SERIAL_PORT
#ifdef MMU2_SERIAL_PORT
ISR(SERIAL_REGNAME(USART, MMU_SERIAL_PORT, _RX_vect)) {
MarlinSerial<MMU2SerialCfg<MMU_SERIAL_PORT>>::store_rxd_char();
ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _RX_vect)) {
MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>::store_rxd_char();
}
ISR(SERIAL_REGNAME(USART, MMU_SERIAL_PORT, _UDRE_vect)) {
MarlinSerial<MMU2SerialCfg<MMU_SERIAL_PORT>>::_tx_udr_empty_irq();
ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _UDRE_vect)) {
MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>::_tx_udr_empty_irq();
}
template class MarlinSerial< MMU2SerialCfg<MMU_SERIAL_PORT> >;
template class MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> >;
MSerialMMU2 mmuSerial(MSerialMMU2::HasEmergencyParser);
#endif // MMU_SERIAL_PORT
#endif // MMU2_SERIAL_PORT
#ifdef LCD_SERIAL_PORT
@@ -629,7 +629,7 @@ MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser);
template class MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> >;
MSerialLCD lcdSerial(MSerialLCD::HasEmergencyParser);
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH) || ENABLED(EXTENSIBLE_UI)
template<typename Cfg>
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::get_tx_buffer_free() {
const ring_buffer_pos_t t = tx_buffer.tail, // next byte to send.
+4 -4
View File
@@ -205,7 +205,7 @@
static ring_buffer_pos_t available();
static void write(const uint8_t c);
static void flushTX();
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH) || ENABLED(EXTENSIBLE_UI)
static ring_buffer_pos_t get_tx_buffer_free();
#endif
@@ -246,7 +246,7 @@
#endif // !USBCON
#ifdef MMU_SERIAL_PORT
#ifdef MMU2_SERIAL_PORT
template <uint8_t serial>
struct MMU2SerialCfg {
static constexpr int PORT = serial;
@@ -260,7 +260,7 @@
static constexpr bool RX_OVERRUNS = false;
};
typedef Serial1Class< MarlinSerial< MMU2SerialCfg<MMU_SERIAL_PORT> > > MSerialMMU2;
typedef Serial1Class< MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> > > MSerialMMU2;
extern MSerialMMU2 mmuSerial;
#endif
@@ -276,7 +276,7 @@
static constexpr bool DROPPED_RX = false;
static constexpr bool RX_FRAMING_ERRORS = false;
static constexpr bool MAX_RX_QUEUED = false;
static constexpr bool RX_OVERRUNS = ALL(HAS_DGUS_LCD, SERIAL_STATS_RX_BUFFER_OVERRUNS);
static constexpr bool RX_OVERRUNS = (ANY(HAS_DGUS_LCD, SERIAL_STATS_RX_BUFFER_OVERRUNS) || ENABLED(DWINOS_4));
};
typedef Serial1Class< MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> > > MSerialLCD;
-8
View File
@@ -345,14 +345,6 @@ void setup_endstop_interrupts() {
pciSetup(Z_MIN_PROBE_PIN);
#endif
#endif
#if USE_CALIBRATION
#if (digitalPinToInterrupt(CALIBRATION_PIN) != NOT_AN_INTERRUPT)
_ATTACH(CALIBRATION_PIN);
#else
static_assert(digitalPinHasPCICR(CALIBRATION_PIN), "CALIBRATION_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
pciSetup(CALIBRATION_PIN);
#endif
#endif
// If we arrive here without raising an assertion, each pin has either an EXT-interrupt or a PCI.
}
+1 -1
View File
@@ -150,7 +150,7 @@ void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
else {
if (p == 32 || p == 128) continue; // Skip TIMER2 specific prescalers when not TIMER2
const uint16_t rft = (F_CPU) / (p * f_desired);
DEBUG_ECHOLNPGM("(Not Timer 2) F_CPU=", STRINGIFY(F_CPU), " prescaler=", p, " f_desired=", f_desired);
DEBUG_ECHOLNPGM("(Not Timer 2) F_CPU=" STRINGIFY(F_CPU), " prescaler=", p, " f_desired=", f_desired);
res_fast_temp = rft - 1;
res_pc_temp = rft / 2;
}
+3
View File
@@ -28,6 +28,9 @@
* Port : E0 E1 E4 E5 G5 E3 H3 H4 H5 H6 B4 B5 B6 B7 J1 J0 H1 H0 D3 D2 D1 D0 A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 C1 C0 D7 G2 G1 G0 L7 L6 L5 L4 L3 L2 L1 L0 B3 B2 B1 B0 F0 F1 F2 F3 F4 F5 F6 F7 K0 K1 K2 K3 K4 K5 K6 K7 | E2 E6 E7 xx xx H2 H7 G3 G4 xx xx xx xx xx D4 D5 D6 xx xx J2 J3 J4 J5 J6 J7 xx xx xx xx xx
* Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 78 79 80 xx xx 84 85 71 70 xx xx xx xx xx 81 82 83 xx xx 72 73 75 76 77 74 xx xx xx xx xx
* Analog Input : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
*
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/
#include "../fastio.h"
+3
View File
@@ -26,6 +26,9 @@
*
* Logical Pin: 38 39 40 41 42 43 44 45 16 10 11 12 06 07 08 09 30 31 32 33 34 35 36 37 17 18 19 20 21 22 23 24 00 01 13 05 02 03 14 15 46 47 48 49 50 51 52 53 25 26 27 28 29 04
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5
*
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/
#include "../fastio.h"
+3
View File
@@ -26,6 +26,9 @@
*
* Logical Pin: 08 09 10 11 12 13 14 15 16 17 18 19 20 21 00 01 02 03 04 05 06 07
* Port: B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7
*
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/
#include "../fastio.h"
+3
View File
@@ -26,6 +26,9 @@
*
* Logical Pin: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
* Port: B0 B1 B2 B3 B4 B5 B6 B7 D0 D1 D2 D3 D4 D5 D6 D7 C0 C1 C2 C3 C4 C5 C6 C7 A7 A6 A5 A4 A3 A2 A1 A0
*
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/
/** ATMega644
+4 -1
View File
@@ -26,7 +26,10 @@
*
* Logical Pin: 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
* Logical pins 46-47 aren't supported by Teensyduino, but are supported below as E2 and E3
* The logical pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3
*
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/
#include "../fastio.h"
+29 -45
View File
@@ -22,23 +22,7 @@
#pragma once
/**
* Pins Debugging for Atmel 8 bit AVR CPUs
*
* - NUMBER_PINS_TOTAL
* - MULTI_NAME_PAD
* - getPinByIndex(index)
* - printPinNameByIndex(index)
* - getPinIsDigitalByIndex(index)
* - digitalPinToAnalogIndex(pin)
* - getValidPinMode(pin)
* - isValidPin(pin)
* - isAnalogPin(pin)
* - digitalRead_mod(pin)
* - pwm_status(pin)
* - printPinPWM(pin)
* - printPinPort(pin)
* - printPinNumber(pin)
* - printPinAnalog(pin)
* PWM print routines for Atmel 8 bit AVR CPUs
*/
#include "../../inc/MarlinConfig.h"
@@ -55,44 +39,44 @@
#include "pinsDebug_Teensyduino.h"
// Can't use the "digitalPinToPort" function from the Teensyduino type IDEs
// portModeRegister takes a different argument
#define digitalPinToTimer_DEBUG(P) digitalPinToTimer(P)
#define digitalPinToBitMask_DEBUG(P) digitalPinToBitMask(P)
#define digitalPinToPort_DEBUG(P) digitalPinToPort(P)
#define getValidPinMode(P) (*portModeRegister(P) & digitalPinToBitMask_DEBUG(P))
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
#define GET_PINMODE(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin))
#elif AVR_ATmega2560_FAMILY_PLUS_70 // So we can access/display all the pins on boards using more than 70
#include "pinsDebug_plus_70.h"
#define digitalPinToTimer_DEBUG(P) digitalPinToTimer_plus_70(P)
#define digitalPinToBitMask_DEBUG(P) digitalPinToBitMask_plus_70(P)
#define digitalPinToPort_DEBUG(P) digitalPinToPort_plus_70(P)
bool getValidPinMode(pin_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer_plus_70(p)
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask_plus_70(p)
#define digitalPinToPort_DEBUG(p) digitalPinToPort_plus_70(p)
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
#else
#define digitalPinToTimer_DEBUG(P) digitalPinToTimer(P)
#define digitalPinToBitMask_DEBUG(P) digitalPinToBitMask(P)
#define digitalPinToPort_DEBUG(P) digitalPinToPort(P)
bool getValidPinMode(pin_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
#define getPinByIndex(x) pgm_read_byte(&pin_array[x].pin)
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin)
#endif
#define isValidPin(P) (P >= 0 && P < NUMBER_PINS_TOTAL)
#define VALID_PIN(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0)
#if AVR_ATmega1284_FAMILY
#define isAnalogPin(P) WITHIN(P, analogInputToDigitalPin(7), analogInputToDigitalPin(0))
#define digitalPinToAnalogIndex(P) int(isAnalogPin(P) ? (P) - analogInputToDigitalPin(7) : -1)
#define IS_ANALOG(P) WITHIN(P, analogInputToDigitalPin(7), analogInputToDigitalPin(0))
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int(IS_ANALOG(P) ? (P) - analogInputToDigitalPin(7) : -1)
#else
#define _ANALOG1(P) WITHIN(P, analogInputToDigitalPin(0), analogInputToDigitalPin(7))
#define _ANALOG2(P) WITHIN(P, analogInputToDigitalPin(8), analogInputToDigitalPin(15))
#define isAnalogPin(P) (_ANALOG1(P) || _ANALOG2(P))
#define digitalPinToAnalogIndex(P) int(_ANALOG1(P) ? (P) - analogInputToDigitalPin(0) : _ANALOG2(P) ? (P) - analogInputToDigitalPin(8) + 8 : -1)
#define IS_ANALOG(P) (_ANALOG1(P) || _ANALOG2(P))
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int(_ANALOG1(P) ? (P) - analogInputToDigitalPin(0) : _ANALOG2(P) ? (P) - analogInputToDigitalPin(8) + 8 : -1)
#endif
#define getPinByIndex(x) pgm_read_byte(&pin_array[x].pin)
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin)
#define MULTI_NAME_PAD 26 // space needed to be pretty if not first name assigned to a pin
void printPinNameByIndex(const uint8_t index) {
PGM_P const name_mem_pointer = (PGM_P)pgm_read_ptr(&pin_array[index].name);
void PRINT_ARRAY_NAME(uint8_t x) {
PGM_P const name_mem_pointer = (PGM_P)pgm_read_ptr(&pin_array[x].name);
for (uint8_t y = 0; y < MAX_NAME_LENGTH; ++y) {
char temp_char = pgm_read_byte(name_mem_pointer + y);
if (temp_char != 0)
@@ -104,7 +88,7 @@ void printPinNameByIndex(const uint8_t index) {
}
}
#define getPinIsDigitalByIndex(x) pgm_read_byte(&pin_array[x].is_digital)
#define GET_ARRAY_IS_DIGITAL(x) pgm_read_byte(&pin_array[x].is_digital)
#if defined(__AVR_ATmega1284P__) // 1284 IDE extensions set this to the number of
#undef NUM_DIGITAL_PINS // digital only pins while all other CPUs have it
@@ -125,7 +109,7 @@ void printPinNameByIndex(const uint8_t index) {
* Print a pin's PWM status.
* Return true if it's currently a PWM pin.
*/
bool pwm_status(const uint8_t pin) {
bool pwm_status(uint8_t pin) {
char buffer[20]; // for the sprintf statements
switch (digitalPinToTimer_DEBUG(pin)) {
@@ -292,7 +276,7 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N -
if (TEST(*TMSK, TOIE)) err_prob_interrupt();
}
void printPinPWM(const uint8_t pin) {
void pwm_details(uint8_t pin) {
switch (digitalPinToTimer_DEBUG(pin)) {
#if ABTEST(0)
@@ -363,7 +347,7 @@ void printPinPWM(const uint8_t pin) {
#else
UNUSED(print_is_also_tied);
#endif
} // printPinPWM
} // pwm_details
#ifndef digitalRead_mod // Use Teensyduino's version of digitalRead - it doesn't disable the PWMs
int digitalRead_mod(const pin_t pin) { // same as digitalRead except the PWM stop section has been removed
@@ -372,7 +356,7 @@ void printPinPWM(const uint8_t pin) {
}
#endif
void printPinPort(const pin_t pin) { // print port number
void print_port(const pin_t pin) { // print port number
#ifdef digitalPinToPort_DEBUG
uint8_t x;
SERIAL_ECHOPGM(" Port: ");
@@ -402,7 +386,7 @@ void printPinPort(const pin_t pin) { // print port number
#endif
}
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3d "), P); SERIAL_ECHO(buffer); }while(0)
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
#undef ABTEST
+1 -1
View File
@@ -102,7 +102,7 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
// digitalPinToBitMask(pin) is OK
#define digitalRead_mod(P) extDigitalRead(P) // Teensyduino's version of digitalRead doesn't
#define digitalRead_mod(p) extDigitalRead(p) // Teensyduino's version of digitalRead doesn't
// disable the PWMs so we can use it as is
// portModeRegister(pin) is OK
+26 -24
View File
@@ -23,41 +23,43 @@
/**
* Define SPI Pins: SCK, MISO, MOSI, SS
* Platform pins have parentheses, e.g., "(53)", so we cannot use them.
*/
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
#define _PIN_SPI_SCK 13
#define _PIN_SPI_MISO 12
#define _PIN_SPI_MOSI 11
#define _PIN_SPI_SS 10
#define AVR_SCK_PIN 13
#define AVR_MISO_PIN 12
#define AVR_MOSI_PIN 11
#define AVR_SS_PIN 10
#elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
#define _PIN_SPI_SCK 7
#define _PIN_SPI_MISO 6
#define _PIN_SPI_MOSI 5
#define _PIN_SPI_SS 4
#define AVR_SCK_PIN 7
#define AVR_MISO_PIN 6
#define AVR_MOSI_PIN 5
#define AVR_SS_PIN 4
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#define _PIN_SPI_SCK 52
#define _PIN_SPI_MISO 50
#define _PIN_SPI_MOSI 51
#define _PIN_SPI_SS 53
#define AVR_SCK_PIN 52
#define AVR_MISO_PIN 50
#define AVR_MOSI_PIN 51
#define AVR_SS_PIN 53
#elif defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
#define _PIN_SPI_SCK 21
#define _PIN_SPI_MISO 23
#define _PIN_SPI_MOSI 22
#define _PIN_SPI_SS 20
#define AVR_SCK_PIN 21
#define AVR_MISO_PIN 23
#define AVR_MOSI_PIN 22
#define AVR_SS_PIN 20
#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
#define _PIN_SPI_SCK 10
#define _PIN_SPI_MISO 12
#define _PIN_SPI_MOSI 11
#define _PIN_SPI_SS 16
#define AVR_SCK_PIN 10
#define AVR_MISO_PIN 12
#define AVR_MOSI_PIN 11
#define AVR_SS_PIN 16
#endif
#ifndef SD_SCK_PIN
#define SD_SCK_PIN _PIN_SPI_SCK
#define SD_SCK_PIN AVR_SCK_PIN
#endif
#ifndef SD_MISO_PIN
#define SD_MISO_PIN _PIN_SPI_MISO
#define SD_MISO_PIN AVR_MISO_PIN
#endif
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN _PIN_SPI_MOSI
#define SD_MOSI_PIN AVR_MOSI_PIN
#endif
#ifndef SD_SS_PIN
#define SD_SS_PIN AVR_SS_PIN
#endif
@@ -120,7 +120,7 @@ void u8g_spiSend_sw_AVR_mode_3(uint8_t val) {
U8G_ATOMIC_END();
}
#if U8G_SPI_USE_MODE_3
#if ENABLED(FYSETC_MINI_12864)
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_3
#else
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_0
@@ -143,9 +143,9 @@ uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
break;
case U8G_COM_MSG_CHIP_SELECT:
#if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
#if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
u8g_com_arduino_digital_write(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
u8g_com_arduino_digital_write(u8g, U8G_PI_CS, LOW);
}
+1 -1
View File
@@ -48,7 +48,7 @@ uint16_t MarlinHAL::adc_result;
void MarlinHAL::init() {
#if HAS_MEDIA
OUT_WRITE(SD_SS_PIN, HIGH); // Try to set SDSS inactive before any other SPI users start up
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
#endif
usb_task_init(); // Initialize the USB stack
TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the min serial handler
+62 -4
View File
@@ -35,9 +35,67 @@
#include <stdint.h>
//
// Serial Ports
//
#include "../../core/serial_hook.h"
// ------------------------
// Serial ports
// ------------------------
typedef ForwardSerial1Class< decltype(Serial) > DefaultSerial1;
typedef ForwardSerial1Class< decltype(Serial1) > DefaultSerial2;
typedef ForwardSerial1Class< decltype(Serial2) > DefaultSerial3;
typedef ForwardSerial1Class< decltype(Serial3) > DefaultSerial4;
extern DefaultSerial1 MSerial0;
extern DefaultSerial2 MSerial1;
extern DefaultSerial3 MSerial2;
extern DefaultSerial4 MSerial3;
#define _MSERIAL(X) MSerial##X
#define MSERIAL(X) _MSERIAL(X)
#if SERIAL_PORT == -1 || ENABLED(EMERGENCY_PARSER)
#define MYSERIAL1 customizedSerial1
#elif WITHIN(SERIAL_PORT, 0, 3)
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
#else
#error "The required SERIAL_PORT must be from 0 to 3, or -1 for USB Serial."
#endif
#ifdef SERIAL_PORT_2
#if SERIAL_PORT_2 == -1 || ENABLED(EMERGENCY_PARSER)
#define MYSERIAL2 customizedSerial2
#elif WITHIN(SERIAL_PORT_2, 0, 3)
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
#else
#error "SERIAL_PORT_2 must be from 0 to 3, or -1 for USB Serial."
#endif
#endif
#ifdef SERIAL_PORT_3
#if SERIAL_PORT_3 == -1 || ENABLED(EMERGENCY_PARSER)
#define MYSERIAL3 customizedSerial3
#elif WITHIN(SERIAL_PORT_3, 0, 3)
#define MYSERIAL3 MSERIAL(SERIAL_PORT_3)
#else
#error "SERIAL_PORT_3 must be from 0 to 3, or -1 for USB Serial."
#endif
#endif
#ifdef MMU2_SERIAL_PORT
#if WITHIN(MMU2_SERIAL_PORT, 0, 3)
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
#else
#error "MMU2_SERIAL_PORT must be from 0 to 3."
#endif
#endif
#ifdef LCD_SERIAL_PORT
#if WITHIN(LCD_SERIAL_PORT, 0, 3)
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
#else
#error "LCD_SERIAL_PORT must be from 0 to 3."
#endif
#endif
#include "MarlinSerial.h"
#include "MarlinSerialUSB.h"
@@ -69,7 +127,7 @@ typedef Servo hal_servo_t;
#define HAL_ADC_RESOLUTION 10
#ifndef analogInputToDigitalPin
#define analogInputToDigitalPin(p) pin_t((p < 12U) ? (p) + 54U : -1)
#define analogInputToDigitalPin(p) ((p < 12U) ? (p) + 54U : -1)
#endif
//
+4 -3
View File
@@ -600,8 +600,9 @@
OUT_WRITE(SPI_EEPROM1_CS_PIN, HIGH);
OUT_WRITE(SPI_EEPROM2_CS_PIN, HIGH);
OUT_WRITE(SPI_FLASH_CS_PIN, HIGH);
OUT_WRITE(SD_SS_PIN, HIGH);
WRITE(SD_SS_PIN, LOW);
WRITE(SD_SS_PIN, HIGH);
OUT_WRITE(SDSS, LOW);
PIO_Configure(
g_APinDescription[SPI_PIN].pPort,
@@ -766,7 +767,7 @@
// Disable PIO on A26 and A27
REG_PIOA_PDR = 0x0C000000;
OUT_WRITE(SD_SS_PIN, HIGH);
OUT_WRITE(SDSS, HIGH);
// Reset SPI0 (from sam lib)
SPI0->SPI_CR = SPI_CR_SPIDIS;
-15
View File
@@ -33,21 +33,6 @@
#include "../../core/types.h"
#include "../../core/serial_hook.h"
typedef ForwardSerial1Class< decltype(Serial) > DefaultSerial1;
typedef ForwardSerial1Class< decltype(Serial1) > DefaultSerial2;
typedef ForwardSerial1Class< decltype(Serial2) > DefaultSerial3;
typedef ForwardSerial1Class< decltype(Serial3) > DefaultSerial4;
extern DefaultSerial1 MSerial0;
extern DefaultSerial2 MSerial1;
extern DefaultSerial3 MSerial2;
extern DefaultSerial4 MSerial3;
#define SERIAL_INDEX_MIN 0
#define SERIAL_INDEX_MAX 3
#define EP_SERIAL_PORT(N) customizedSerial##N
#define USB_SERIAL_PORT(N) customizedSerial##N
#include "../shared/serial_ports.h"
// Define constants and variables for buffering incoming serial data. We're
// using a ring buffer (I think), in which rx_buffer_head is the index of the
// location to which to write the next incoming character and rx_buffer_tail
+1 -1
View File
@@ -50,7 +50,7 @@
static Flags<_Nbr_16timers> DisablePending; // ISR should disable the timer at the next timer reset
// ------------------------
// Interrupt handler for the TC0 channel 1.
/// Interrupt handler for the TC0 channel 1.
// ------------------------
void Servo_Handler(const timer16_Sequence_t, Tc*, const uint8_t);
+1 -1
View File
@@ -291,7 +291,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
uint32_t *p1 = (uint32_t*)addrflash;
uint32_t *p2 = (uint32_t*)data;
int count = 0;
for (i = 0; i < PageSize >> 2; i++) {
for (i =0; i<PageSize >> 2; i++) {
if (p1[i] != p2[i]) {
uint32_t delta = p1[i] ^ p2[i];
while (delta) {
-1
View File
@@ -64,7 +64,6 @@ void setup_endstop_interrupts() {
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
+1 -1
View File
@@ -61,7 +61,7 @@
#else
#define G2_PWM_Z 0
#endif
#if HAS_MOTOR_CURRENT_PWM_E
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
#define G2_PWM_E 1
#else
#define G2_PWM_E 0
+7 -6
View File
@@ -68,15 +68,16 @@
* Usually the hardware SPI pins are only available to the LCD. This makes the DUE hard SPI used at the same time
* as the TMC2130 soft SPI the most common setup.
*/
#define _IS_HW_SPI(P) (defined(TMC_SPI_##P) && (TMC_SPI_##P == SD_MOSI_PIN || TMC_SPI_##P == SD_MISO_PIN || TMC_SPI_##P == SD_SCK_PIN))
#if HAS_MEDIA && HAS_DRIVER(TMC2130)
#define _IS_HW_SPI(P) (defined(TMC_SPI_##P) && (TMC_SPI_##P == SD_MOSI_PIN || TMC_SPI_##P == SD_MISO_PIN || TMC_SPI_##P == SD_SCK_PIN))
#if DISABLED(SOFTWARE_SPI) && ENABLED(TMC_USE_SW_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
#error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."
#endif
#if ENABLED(SOFTWARE_SPI) && DISABLED(TMC_USE_SW_SPI)
#if ENABLED(TMC_USE_SW_SPI)
#if DISABLED(SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
#error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."
#endif
#elif ENABLED(SOFTWARE_SPI)
#error "DUE software SPI is required but is incompatible with TMC2130 hardware SPI. Enable TMC_USE_SW_SPI to fix."
#endif
#undef _IS_HW_SPI
#endif
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
+19 -32
View File
@@ -19,26 +19,13 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Pins Debugging for DUE
*
* - NUMBER_PINS_TOTAL
* - MULTI_NAME_PAD
* - getPinByIndex(index)
* - printPinNameByIndex(index)
* - getPinIsDigitalByIndex(index)
* - digitalPinToAnalogIndex(pin)
* - getValidPinMode(pin)
* - isValidPin(pin)
* - isAnalogPin(pin)
* - digitalRead_mod(pin)
* - pwm_status(pin)
* - printPinPWM(pin)
* - printPinPort(pin)
* - printPinNumber(pin)
* - printPinAnalog(pin)
* Support routines for Due
*/
/**
* Translation of routines & variables used by pinsDebug.h
*/
#include "../shared/Marduino.h"
@@ -76,20 +63,20 @@
#define NUMBER_PINS_TOTAL PINS_COUNT
#define digitalRead_mod(P) extDigitalRead(P) // AVR digitalRead disabled PWM before it read the pin
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%02d"), P); SERIAL_ECHO(buffer); }while(0)
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0)
#define getPinByIndex(x) pin_array[x].pin
#define getPinIsDigitalByIndex(x) pin_array[x].is_digital
#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL))
#define digitalPinToAnalogIndex(P) int(P - analogInputToDigitalPin(0))
#define isAnalogPin(P) WITHIN(P, pin_t(analogInputToDigitalPin(0)), pin_t(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1)))
#define pwm_status(P) (((g_pinStatus[P] & 0xF) == PIN_STATUS_PWM) && \
((g_APinDescription[P].ulPinAttribute & PIN_ATTR_PWM) == PIN_ATTR_PWM))
#define digitalRead_mod(p) extDigitalRead(p) // AVR digitalRead disabled PWM before it read the pin
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
#define GET_ARRAY_PIN(p) pin_array[p].pin
#define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital
#define VALID_PIN(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL))
#define DIGITAL_PIN_TO_ANALOG_PIN(p) int(p - analogInputToDigitalPin(0))
#define IS_ANALOG(P) WITHIN(P, char(analogInputToDigitalPin(0)), char(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1)))
#define pwm_status(pin) (((g_pinStatus[pin] & 0xF) == PIN_STATUS_PWM) && \
((g_APinDescription[pin].ulPinAttribute & PIN_ATTR_PWM) == PIN_ATTR_PWM))
#define MULTI_NAME_PAD 14 // space needed to be pretty if not first name assigned to a pin
bool getValidPinMode(const pin_t pin) { // 1: output, 0: input
bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
volatile Pio* port = g_APinDescription[pin].pPort;
uint32_t mask = g_APinDescription[pin].ulPin;
uint8_t pin_status = g_pinStatus[pin] & 0xF;
@@ -98,14 +85,14 @@ bool getValidPinMode(const pin_t pin) { // 1: output, 0: input
|| pwm_status(pin));
}
void printPinPWM(const int32_t pin) {
void pwm_details(int32_t pin) {
if (pwm_status(pin)) {
uint32_t chan = g_APinDescription[pin].ulPWMChannel;
SERIAL_ECHOPGM("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY);
}
}
void printPinPort(const pin_t) {}
void print_port(const pin_t) {}
/**
* DUE Board pin | PORT | Label
+28 -25
View File
@@ -24,38 +24,41 @@
/**
* Define SPI Pins: SCK, MISO, MOSI, SS
*
* Available chip select pins for HW SPI are 4 10 52 77 87
* Available chip select pins for HW SPI are 4 10 52 77
*/
#if SD_SS_PIN == 4 || SD_SS_PIN == 10 || SD_SS_PIN == 52 || SD_SS_PIN == 77 || SD_SS_PIN == 87
#define SD_SCK_PIN 76
#define SD_MISO_PIN 74
#define SD_MOSI_PIN 75
#endif
#if SD_SS_PIN == 4
#define SPI_PIN 87
#define SPI_CHAN 1
#elif SD_SS_PIN == 10
#define SPI_PIN 77
#define SPI_CHAN 0
#elif SD_SS_PIN == 52
#define SPI_PIN 86
#define SPI_CHAN 2
#elif SD_SS_PIN == 77
#define SPI_PIN 77
#define SPI_CHAN 0
#elif SD_SS_PIN == 87
#define SPI_PIN 87
#define SPI_CHAN 1
#if SDSS == 4 || SDSS == 10 || SDSS == 52 || SDSS == 77 || SDSS == 87
#if SDSS == 4
#define SPI_PIN 87
#define SPI_CHAN 1
#elif SDSS == 10
#define SPI_PIN 77
#define SPI_CHAN 0
#elif SDSS == 52
#define SPI_PIN 86
#define SPI_CHAN 2
#elif SDSS == 77
#define SPI_PIN 77
#define SPI_CHAN 0
#else
#define SPI_PIN 87
#define SPI_CHAN 1
#endif
#define SD_SCK_PIN 76
#define SD_MISO_PIN 74
#define SD_MOSI_PIN 75
#else
// defaults
#define SOFTWARE_SPI
#ifndef SD_SCK_PIN
#define SD_SCK_PIN 52
#define SD_SCK_PIN 52
#endif
#ifndef SD_MISO_PIN
#define SD_MISO_PIN 50
#define SD_MISO_PIN 50
#endif
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN 51
#define SD_MOSI_PIN 51
#endif
#endif
/* A.28, A.29, B.21, C.26, C.29 */
#define SD_SS_PIN SDSS
@@ -66,7 +66,7 @@
#include <U8glib-HAL.h>
#if U8G_SPI_USE_MODE_3
#if ENABLED(FYSETC_MINI_12864)
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_3
#else
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_0
@@ -96,15 +96,15 @@ uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
break;
case U8G_COM_MSG_CHIP_SELECT:
#if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
#if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 1); //set SCK to mode 3 idle state before CS goes active
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, LOW);
}
else {
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, HIGH);
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0); //set SCK to mode 0 idle state after CS goes inactive
}
#else
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, !arg_val);
+1 -1
View File
@@ -11,7 +11,7 @@ if pioutil.is_pio_build():
if current_OS == 'Windows':
env = pioutil.env
Import("env")
# Use bossac.exe on Windows
env.Replace(
+16 -14
View File
@@ -18,32 +18,32 @@ extern "C" {
void sd_mmc_spi_mem_init() {
}
inline bool media_ready() {
return IS_SD_MOUNTED() && IS_SD_INSERTED() && !IS_SD_FILE_OPEN() && !IS_SD_PRINTING();
}
bool sd_mmc_spi_unload(bool) { return true; }
bool sd_mmc_spi_wr_protect() { return false; }
bool sd_mmc_spi_removal() { return !media_ready(); }
Ctrl_status sd_mmc_spi_test_unit_ready() {
#ifdef DISABLE_DUE_SD_MMC
return CTRL_NO_PRESENT;
#endif
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
return CTRL_NO_PRESENT;
return CTRL_GOOD;
}
// NOTE: This function is defined as returning the address of the last block
// in the card, which is cardSize() - 1
Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector) {
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
return CTRL_NO_PRESENT;
*nb_sector = card.diskIODriver()->cardSize() - 1;
return CTRL_GOOD;
}
bool sd_mmc_spi_unload(bool) { return true; }
bool sd_mmc_spi_wr_protect() { return false; }
bool sd_mmc_spi_removal() {
return (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted());
}
#if ACCESS_USB == true
/**
* \name MEM <-> USB Interface
@@ -61,7 +61,8 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) {
#ifdef DISABLE_DUE_SD_MMC
return CTRL_NO_PRESENT;
#endif
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
return CTRL_NO_PRESENT;
#ifdef DEBUG_MMC
{
@@ -100,7 +101,8 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) {
#ifdef DISABLE_DUE_SD_MMC
return CTRL_NO_PRESENT;
#endif
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
return CTRL_NO_PRESENT;
#ifdef DEBUG_MMC
{
+8 -8
View File
@@ -74,7 +74,7 @@
//!
//! @brief This function initializes the hw/sw resources required to drive the SD_MMC_SPI.
//!/
void sd_mmc_spi_mem_init();
extern void sd_mmc_spi_mem_init(void);
//!
//! @brief This function tests the state of the SD_MMC memory and sends it to the Host.
@@ -87,7 +87,7 @@ void sd_mmc_spi_mem_init();
//! Media not present -> CTRL_NO_PRESENT
//! Media has changed -> CTRL_BUSY
//!/
Ctrl_status sd_mmc_spi_test_unit_ready();
extern Ctrl_status sd_mmc_spi_test_unit_ready(void);
//!
//! @brief This function gives the address of the last valid sector.
@@ -98,7 +98,7 @@ Ctrl_status sd_mmc_spi_test_unit_ready();
//! Media ready -> CTRL_GOOD
//! Media not present -> CTRL_NO_PRESENT
//!/
Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
extern Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
/*! \brief Unload/Load the SD/MMC card selected
*
@@ -109,7 +109,7 @@ Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
*
* \return \c true if unload/load done success.
*/
bool sd_mmc_spi_unload(bool unload);
extern bool sd_mmc_spi_unload(bool unload);
//!
//! @brief This function returns the write protected status of the memory.
@@ -120,14 +120,14 @@ bool sd_mmc_spi_unload(bool unload);
//!
//! @return false -> the memory is not write-protected (always)
//!/
bool sd_mmc_spi_wr_protect();
extern bool sd_mmc_spi_wr_protect(void);
//!
//! @brief This function tells if the memory has been removed or not.
//!
//! @return false -> The memory isn't removed
//!
bool sd_mmc_spi_removal();
extern bool sd_mmc_spi_removal(void);
//---- ACCESS DATA FUNCTIONS ----
@@ -147,7 +147,7 @@ bool sd_mmc_spi_removal();
//! It is ready -> CTRL_GOOD
//! A error occur -> CTRL_FAIL
//!
Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
extern Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
//! This function initializes the SD/MMC memory for a write operation
//!
@@ -161,7 +161,7 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
//! It is ready -> CTRL_GOOD
//! An error occurs -> CTRL_FAIL
//!
Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector);
extern Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector);
#endif // #if ACCESS_USB == true
+8 -9
View File
@@ -209,17 +209,16 @@ int MarlinHAL::freeMemory() { return ESP.getFreeHeap(); }
// ADC
// ------------------------
// https://docs.espressif.com/projects/esp-idf/en/release-v4.4/esp32/api-reference/peripherals/adc.html
#define ADC1_CHANNEL(pin) ADC1_GPIO ## pin ## _CHANNEL
adc1_channel_t get_channel(int pin) {
switch (pin) {
case 39: return ADC1_CHANNEL_3;
case 36: return ADC1_CHANNEL_0;
case 35: return ADC1_CHANNEL_7;
case 34: return ADC1_CHANNEL_6;
case 33: return ADC1_CHANNEL_5;
case 32: return ADC1_CHANNEL_4;
case 37: return ADC1_CHANNEL_1;
case 38: return ADC1_CHANNEL_2;
case 39: return ADC1_CHANNEL(39);
case 36: return ADC1_CHANNEL(36);
case 35: return ADC1_CHANNEL(35);
case 34: return ADC1_CHANNEL(34);
case 33: return ADC1_CHANNEL(33);
case 32: return ADC1_CHANNEL(32);
}
return ADC1_CHANNEL_MAX;
}
@@ -59,7 +59,6 @@ void setup_endstop_interrupts() {
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
-7
View File
@@ -37,10 +37,6 @@
// Set pin as output
#define _SET_OUTPUT(IO) pinMode(IO, OUTPUT)
// TODO: Store set modes in an array and use those to get the mode
#define _IS_OUTPUT(IO) true
#define _IS_INPUT(IO) true
// Set pin as input with pullup mode
#define _PULLUP(IO, v) pinMode(IO, v ? INPUT_PULLUP : INPUT)
@@ -74,9 +70,6 @@
// Set pin as output and init
#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
#define IS_OUTPUT(IO) _IS_OUTPUT(IO)
#define IS_INPUT(IO) _IS_INPUT(IO)
// digitalRead/Write wrappers
#define extDigitalRead(IO) digitalRead(IO)
#define extDigitalWrite(IO,V) digitalWrite(IO,V)
+1 -1
View File
@@ -152,7 +152,7 @@ void stepperTask(void *parameter) {
xQueueReceive(dma.queue, &dma.current, portMAX_DELAY);
dma.rw_pos = 0;
const bool using_ftMotion = TERN0(FT_MOTION, ftMotion.cfg.active);
const bool using_ftMotion = TERN0(FT_MOTION, ftMotion.cfg.mode);
while (dma.rw_pos < DMA_SAMPLE_COUNT) {
+1 -5
View File
@@ -22,15 +22,11 @@
#ifdef ARDUINO_ARCH_ESP32
#include <WiFi.h>
#undef ENABLED
#undef DISABLED
#include "../../inc/MarlinConfigPre.h"
#if ALL(WIFISUPPORT, OTASUPPORT)
#include <WiFi.h>
#include <ESPmDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
-71
View File
@@ -1,71 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#error "PINS_DEBUGGING is not yet supported for ESP32!"
/**
* Pins Debugging for ESP32
*
* - NUMBER_PINS_TOTAL
* - MULTI_NAME_PAD
* - getPinByIndex(index)
* - printPinNameByIndex(index)
* - getPinIsDigitalByIndex(index)
* - digitalPinToAnalogIndex(pin)
* - getValidPinMode(pin)
* - isValidPin(pin)
* - isAnalogPin(pin)
* - digitalRead_mod(pin)
* - pwm_status(pin)
* - printPinPWM(pin)
* - printPinPort(pin)
* - printPinNumber(pin)
* - printPinAnalog(pin)
*/
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
#define digitalRead_mod(P) extDigitalRead(P)
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%02d"), P); SERIAL_ECHO(buffer); }while(0)
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0)
#define getPinByIndex(x) pin_array[x].pin
#define getPinIsDigitalByIndex(x) pin_array[x].is_digital
#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL))
#define digitalPinToAnalogIndex(P) int(P - analogInputToDigitalPin(0))
#define isAnalogPin(P) WITHIN(P, pin_t(analogInputToDigitalPin(0)), pin_t(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1)))
bool pwm_status(const pin_t) { return false; }
void printPinPort(const pin_t) {}
static bool getValidPinMode(const pin_t pin) {
return isValidPin(pin) && !IS_INPUT(pin);
}
void printPinPWM(const int32_t pin) {
if (pwm_status(pin)) {
//uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative;
//SERIAL_ECHOPGM("PWM = ", duty);
}
}
+4 -13
View File
@@ -21,16 +21,7 @@
*/
#pragma once
#define PIN_SPI_SCK 18
#define PIN_SPI_MISO 19
#define PIN_SPI_MOSI 23
#ifndef SD_SCK_PIN
#define SD_SCK_PIN PIN_SPI_SCK
#endif
#ifndef SD_MISO_PIN
#define SD_MISO_PIN PIN_SPI_MISO
#endif
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN PIN_SPI_MOSI
#endif
#define SD_SS_PIN SDSS
#define SD_SCK_PIN 18
#define SD_MISO_PIN 19
#define SD_MOSI_PIN 23
+1 -1
View File
@@ -90,7 +90,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
config.counter_en = TIMER_PAUSE;
config.alarm_en = TIMER_ALARM_EN;
config.intr_type = TIMER_INTR_LEVEL;
config.auto_reload = TIMER_AUTORELOAD_EN;
config.auto_reload = true;
// Select and initialize the timer
timer_init(timer.group, timer.idx, &config);
+2 -1
View File
@@ -53,11 +53,12 @@ typedef uint64_t hal_timer_t;
#if ENABLED(I2S_STEPPER_STREAM)
#define STEPPER_TIMER_PRESCALE 1
#define STEPPER_TIMER_RATE 250000 // 250khz, 4µs pulses of i2s word clock
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs // wrong would be 0.25
#else
#define STEPPER_TIMER_PRESCALE 40
#define STEPPER_TIMER_RATE ((HAL_TIMER_RATE) / (STEPPER_TIMER_PRESCALE)) // frequency of stepper timer, 2MHz
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
#endif
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
+1 -2
View File
@@ -21,12 +21,11 @@
*/
#ifdef ARDUINO_ARCH_ESP32
#include "../../core/serial.h"
#include "../../inc/MarlinConfigPre.h"
#if ENABLED(WIFISUPPORT)
#include "../../core/serial.h"
#include <WiFi.h>
#include <ESPmDNS.h>
#include <ESPAsyncWebServer.h>
+66 -31
View File
@@ -30,18 +30,69 @@
#include "../../inc/MarlinConfig.h"
#include "../../core/macros.h"
#include "../shared/Marduino.h"
#include "../shared/math_32bit.h"
#include "../shared/HAL_SPI.h"
#include "fastio.h"
#include "timers.h"
#include "MarlinSerial.h"
#include <stdint.h>
//
// Serial Ports
//
#define _MSERIAL(X) MSerial##X
#define MSERIAL(X) _MSERIAL(X)
#define NUM_UARTS 4
#include "MarlinSerial.h"
#if SERIAL_PORT == -1
#error "USB Serial is not supported on HC32F460"
#elif WITHIN(SERIAL_PORT, 1, NUM_UARTS)
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
#else
#define MYSERIAL1 MSERIAL(1) // Dummy port
static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ".")
#endif
#ifdef SERIAL_PORT_2
#if SERIAL_PORT_2 == -1
#error "USB Serial is not supported on HC32F460"
#elif WITHIN(SERIAL_PORT_2, 1, NUM_UARTS)
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
#else
#define MYSERIAL2 MSERIAL(1) // Dummy port
static_assert(false, "SERIAL_PORT_2 must be from 1 to " STRINGIFY(NUM_UARTS) ".")
#endif
#endif
#ifdef SERIAL_PORT_3
#if SERIAL_PORT_3 == -1
#error "USB Serial is not supported on HC32F460"
#elif WITHIN(SERIAL_PORT_3, 1, NUM_UARTS)
#define MYSERIAL3 MSERIAL(SERIAL_PORT_3)
#else
#define MYSERIAL3 MSERIAL(1) // Dummy port
static_assert(false, "SERIAL_PORT_3 must be from 1 to " STRINGIFY(NUM_UARTS) ".")
#endif
#endif
#ifdef LCD_SERIAL_PORT
#if LCD_SERIAL_PORT == -1
#error "USB Serial is not supported on HC32F460"
#elif WITHIN(LCD_SERIAL_PORT, 1, NUM_UARTS)
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
#else
#define LCD_SERIAL MSERIAL(1) // Dummy port
static_assert(false, "LCD_SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ".")
#endif
#if HAS_DGUS_LCD
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
#endif
#endif
//
// Emergency Parser
@@ -63,19 +114,22 @@
// Misc. Functions
//
#ifndef analogInputToDigitalPin
#define analogInputToDigitalPin(p) pin_t(p)
#define analogInputToDigitalPin(p) (p)
#endif
#define CRITICAL_SECTION_START() \
const bool irqon = !__get_PRIMASK(); \
__disable_irq(); \
__DSB();
#define CRITICAL_SECTION_END() \
__DSB(); \
if (irqon) __enable_irq();
#define CRITICAL_SECTION_START \
uint32_t primask = __get_PRIMASK(); \
(void)__iCliRetVal()
#define cli() __disable_irq()
#define sei() __enable_irq()
#define CRITICAL_SECTION_END \
if (!primask) \
(void)__iSeiRetVal()
// Disable interrupts
#define cli() noInterrupts()
// Enable interrupts
#define sei() interrupts()
// bss_end alias
#define __bss_end __bss_end__
@@ -88,31 +142,12 @@
// ADC
//
#define HAL_ADC_VREF_MV 3300
#define HAL_ADC_RESOLUTION 12
#define HAL_ADC_RESOLUTION 10
#define GET_PIN_MAP_PIN(index) index
#define GET_PIN_MAP_INDEX(pin) pin
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
//
// Debug port disable
// JTMS / SWDIO = PA13
// JTCK / SWCLK = PA14
// JTDI = PA15
// JTDO = PB3
// NJTRST = PB4
//
#define DBG_SWCLK _BV(0)
#define DBG_SWDIO _BV(1)
#define DBG_TDO _BV(2)
#define DBG_TDI _BV(3)
#define DBG_TRST _BV(4)
#define DBG_ALL (DBG_SWCLK | DBG_SWDIO | DBG_TDO | DBG_TDI | DBG_TRST)
#define JTAGSWD_RESET() PORT_DebugPortSetting(DBG_ALL, Enable);
#define JTAG_DISABLE() PORT_DebugPortSetting(DBG_TDO | DBG_TDI | DBG_TRST, Disable);
#define JTAGSWD_DISABLE() PORT_DebugPortSetting(DBG_ALL, Disable);
//
// MarlinHAL implementation
//
+1 -3
View File
@@ -232,9 +232,7 @@ int MarlinHAL::freeMemory() {
return &top - _sbrk(0);
}
void MarlinHAL::adc_init() {
analogReadResolution(HAL_ADC_RESOLUTION);
}
void MarlinHAL::adc_init() {}
void MarlinHAL::adc_enable(const pin_t pin) {
#if TEMP_SENSOR_SOC
+2 -10
View File
@@ -24,14 +24,6 @@
#include "../../core/serial_hook.h"
#include <drivers/usart/Usart.h>
#define SERIAL_INDEX_MIN 1
#define SERIAL_INDEX_MAX 4
#include "../shared/serial_ports.h"
#if defined(LCD_SERIAL_PORT) && ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
#endif
// Optionally set uart IRQ priority to reduce overflow errors
//#define UART_RX_IRQ_PRIO 1
//#define UART_TX_IRQ_PRIO 1
@@ -39,8 +31,8 @@
struct MarlinSerial : public Usart {
MarlinSerial(
struct usart_config_t *usart_device,
gpio_pin_t tx_pin,
struct usart_config_t *usart_device,
gpio_pin_t tx_pin,
gpio_pin_t rx_pin
#if ENABLED(SERIAL_DMA)
, M4_DMA_TypeDef *dma_unit = nullptr,
+1 -1
View File
@@ -11,7 +11,7 @@ The HC32F460 HAL is designed to be generic enough for any HC32F460-based board.
- Examine the board's main processor. (Refer the naming key in `hc32.ini`.)
- Extend the `HC32F460C_common` base env for 256K, or `HC32F460E_common` for 512K.
3. Determine your board's application start address (see [below](#finding-the-application-start-address))
4. Set `board_upload.offset_address` to the app start address once you've found it. If your board doesn't use a bootloader, you may be able to use the "ICSP" header or DFU. This document will be updated once we have more information about flashing without a bootloader.
4. Set `board_build.ld_args.flash_start` to the app start address once you've found it. If your board doesn't use a bootloader, you may be able to use the "ICSP" header or DFU. This document will be updated once we have more information about flashing without a bootloader.
### Finding the application start address
+4 -6
View File
@@ -1,6 +1,6 @@
/**
* app_config.h is included by the hc32f460 arduino build script for every source file.
* it is used to configure the arduino core (and ddl) automatically according
* it is used to configure the arduino core (and ddl) automatically according
* to the settings in Configuration.h and Configuration_adv.h.
*/
#pragma once
@@ -8,7 +8,6 @@
#define _HC32_APP_CONFIG_H_
#include "../../inc/MarlinConfigPre.h"
#include "sysclock.h"
//
// dev mode
@@ -45,7 +44,7 @@
#define DISABLE_SERIAL_GLOBALS 1
// increase the size of the Usart buffers (both RX and TX)
// NOTE:
// NOTE:
// the heap usage will increase by (SERIAL_BUFFER_SIZE - 64) * "number of serial ports used"
// if running out of heap, the system may become unstable
//#define SERIAL_BUFFER_SIZE 256
@@ -65,8 +64,7 @@
// redirect printf to host serial
#define REDIRECT_PRINTF_TO_SERIAL 1
// F_CPU is F_HCLK, as that's the main CPU core's clock.
// see 'sysclock.h' for more information.
#define F_CPU F_HCLK
// FIXME override F_CPU to PCLK1, as marlin freaks out otherwise
#define F_CPU (SYSTEM_CLOCK_FREQUENCIES.pclk1)
#endif // _HC32_APP_CONFIG_H_
+1 -3
View File
@@ -101,14 +101,12 @@ void setup_endstop_interrupts() {
SETUP(Z_MIN_PROBE);
SETUP(CALIBRATION);
#undef SETUP
}
// Ensure 1 - 10 IRQs are registered
// Disable some endstops if you encounter this error
#define ENDSTOPS_INTERRUPTS_COUNT COUNT_ENABLED(USE_X_MAX, USE_X_MIN, USE_X2_MAX, USE_X2_MIN, USE_Y_MAX, USE_Y_MIN, USE_Y2_MAX, USE_Y2_MIN, USE_Z_MAX, USE_Z_MIN, USE_Z2_MAX, USE_Z2_MIN, USE_Z3_MAX, USE_Z3_MIN, USE_Z4_MAX, USE_Z4_MIN, USE_Z_MIN_PROBE, USE_CALIBRATION)
#define ENDSTOPS_INTERRUPTS_COUNT COUNT_ENABLED(USE_X_MAX, USE_X_MIN, USE_X2_MAX, USE_X2_MIN, USE_Y_MAX, USE_Y_MIN, USE_Y2_MAX, USE_Y2_MIN, USE_Z_MAX, USE_Z_MIN, USE_Z2_MAX, USE_Z2_MIN, USE_Z3_MAX, USE_Z3_MIN, USE_Z4_MAX, USE_Z4_MIN, USE_Z_MIN_PROBE)
#if ENDSTOPS_INTERRUPTS_COUNT > 10
#error "Too many endstop interrupts! HC32F460 only supports 10 endstop interrupts."
#elif ENDSTOPS_INTERRUPTS_COUNT == 0
+3 -5
View File
@@ -30,7 +30,7 @@
#endif
#if ARDUINO_CORE_VERSION_INT < GET_VERSION_INT(1, 1, 0)
// because we use app_config.h introduced in arduino core version 1.1.0, the
// because we use app_config.h introduced in arduino core version 1.1.0, the
// HAL is not compatible with older versions
#error "The HC32 HAL is not compatible with Arduino Core versions < 1.1.0. Consider updating the Arduino Core."
#endif
@@ -94,10 +94,8 @@
#error "SERIAL_DMA requires USART_RX_DMA_SUPPORT to be enabled in the arduino core."
#endif
// Before arduino core version 1.2.0, USART_RX_DMA_SUPPORT did not implement
// core_hook_usart_rx_irq, which is required for the emergency parser.
// With 1.2.0, this was fixed (see https://github.com/shadow578/framework-arduino-hc32f46x/pull/25).
#if ENABLED(EMERGENCY_PARSER) && ARDUINO_CORE_VERSION_INT < GET_VERSION_INT(1, 2, 0)
// USART_RX_DMA_SUPPORT does not implement core_hook_usart_rx_irq, which is required for the emergency parser
#if ENABLED(EMERGENCY_PARSER)
#error "EMERGENCY_PARSER is not supported with SERIAL_DMA. Please disable either SERIAL_DMA or EMERGENCY_PARSER."
#endif
+33 -39
View File
@@ -18,47 +18,41 @@
*/
#pragma once
/**
* Pins Debugging for HC32
*
* - NUMBER_PINS_TOTAL
* - MULTI_NAME_PAD
* - getPinByIndex(index)
* - printPinNameByIndex(index)
* - getPinIsDigitalByIndex(index)
* - digitalPinToAnalogIndex(pin)
* - getValidPinMode(pin)
* - isValidPin(pin)
* - isAnalogPin(pin)
* - digitalRead_mod(pin)
* - pwm_status(pin)
* - printPinPWM(pin)
* - printPinPort(pin)
* - printPinNumber(pin)
* - printPinAnalog(pin)
*/
#include "../../inc/MarlinConfig.h"
#include "fastio.h"
#include <drivers/timera/timera_pwm.h>
//
// Translation of routines & variables used by pinsDebug.h
//
#ifndef BOARD_NR_GPIO_PINS
#error "Expected BOARD_NR_GPIO_PINS not found."
#endif
#define NUM_DIGITAL_PINS BOARD_NR_GPIO_PINS
#define NUMBER_PINS_TOTAL BOARD_NR_GPIO_PINS
#define isValidPin(P) IS_GPIO_PIN(P)
#define VALID_PIN(pin) IS_GPIO_PIN(pin)
// Note: pin_array is defined in `Marlin/src/pins/pinsDebug.h`, and since this file is included
// after it, it is available in this file as well.
#define getPinByIndex(x) pin_t(pin_array[x].pin)
#define digitalRead_mod(P) extDigitalRead(P)
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3hd "), int16_t(P)); SERIAL_ECHO(buffer); }while(0)
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0)
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define GET_ARRAY_PIN(p) pin_t(pin_array[p].pin)
#define digitalRead_mod(p) extDigitalRead(p)
#define PRINT_PIN(p) \
do { \
sprintf_P(buffer, PSTR("%3hd "), int16_t(p)); \
SERIAL_ECHO(buffer); \
} while (0)
#define PRINT_PIN_ANALOG(p) \
do { \
sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); \
SERIAL_ECHO(buffer); \
} while (0)
#define PRINT_PORT(p) print_port(p)
#define PRINT_ARRAY_NAME(x) \
do { \
sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); \
SERIAL_ECHO(buffer); \
} while (0)
#define MULTI_NAME_PAD 21 // Space needed to be pretty if not first name assigned to a pin
@@ -77,14 +71,14 @@
#define M43_NEVER_TOUCH(Q) (IS_HOST_USART_PIN(Q) || IS_OSC_PIN(Q))
#endif
int8_t digitalPinToAnalogIndex(const pin_t pin) {
if (!isValidPin(pin)) return -1;
static pin_t DIGITAL_PIN_TO_ANALOG_PIN(pin_t pin) {
if (!VALID_PIN(pin)) return -1;
const int8_t adc_channel = int8_t(PIN_MAP[pin].adc_info.channel);
return pin_t(adc_channel);
}
bool isAnalogPin(pin_t pin) {
if (!isValidPin(pin)) return false;
static bool IS_ANALOG(pin_t pin) {
if (!VALID_PIN(pin)) return false;
if (PIN_MAP[pin].adc_info.channel != ADC_PIN_INVALID)
return _GET_MODE(pin) == INPUT_ANALOG && !M43_NEVER_TOUCH(pin);
@@ -92,13 +86,13 @@ bool isAnalogPin(pin_t pin) {
return false;
}
bool getValidPinMode(const pin_t pin) {
return isValidPin(pin) && !IS_INPUT(pin);
static bool GET_PINMODE(const pin_t pin) {
return VALID_PIN(pin) && !IS_INPUT(pin);
}
bool getPinIsDigitalByIndex(const int16_t index) {
const pin_t pin = getPinByIndex(index);
return (!isAnalogPin(pin));
static bool GET_ARRAY_IS_DIGITAL(const int16_t array_pin) {
const pin_t pin = GET_ARRAY_PIN(array_pin);
return (!IS_ANALOG(pin));
}
/**
@@ -123,7 +117,7 @@ bool pwm_status(const pin_t pin) {
return timera_is_unit_initialized(unit) && timera_is_channel_active(unit, channel) && getPinMode(pin) == OUTPUT_PWM;
}
void printPinPWM(const pin_t pin) {
void pwm_details(const pin_t pin) {
// Get timer assignment for pin
timera_config_t *unit;
en_timera_channel_t channel;
@@ -167,7 +161,7 @@ void printPinPWM(const pin_t pin) {
}
}
void printPinPort(pin_t pin) {
void print_port(pin_t pin) {
const char port = 'A' + char(pin >> 4); // Pin div 16
const int16_t gbit = PIN_MAP[pin].bit_pos;
char buffer[8];
+61 -179
View File
@@ -26,144 +26,64 @@
#ifdef ARDUINO_ARCH_HC32
// Get BOARD_XTAL_FREQUENCY from configuration / pins
#include "../../inc/MarlinConfig.h"
#include "sysclock.h"
#include <core_hooks.h>
#include <drivers/sysclock/sysclock_util.h>
/***
* @brief Automatically calculate M, N, P values for the MPLL to reach a target frequency.
* @param input_frequency The input frequency.
* @param target_frequency The target frequency.
* @return The MPLL configuration structure. Q and R are not set.
*
* @note
* Simplified MPLL block diagram, with intermediary clocks (1) = VCO_in, (2) = VCO_out:
*
* INPUT -> [/ M] -(1)-> [* N] -(2)-|-> [/ P] -> MPLL-P
*/
constexpr stc_clk_mpll_cfg_t get_mpll_config(double input_frequency, double target_frequency) {
// PLL input clock divider: M in [1, 24]
for (uint32_t M = 1; M <= 24; M++) {
double f_vco_in = input_frequency / M;
// 1 <= VCO_in <= 25 MHz
if (f_vco_in < 1e6 || f_vco_in > 25e6) continue;
// VCO multiplier: N in [20, 480]
for (uint32_t N = 20; N <= 480; N++) {
double f_vco_out = f_vco_in * N;
// 240 <= VCO_out <= 480 MHz
if (f_vco_out < 240e6 || f_vco_out > 480e6) continue;
// Output "P" divider: P in [2, 16]
for (uint32_t P = 2; P <= 16; P++) {
double f_calculated_out = f_vco_out / P;
if (f_calculated_out == target_frequency) {
// Found a match, return it
return {
.PllpDiv = P,
.PllqDiv = P, // Don't care for Q and R
.PllrDiv = P, // "
.plln = N,
.pllmDiv = M
};
}
}
}
}
// If no valid M, N, P found, return invalid config
return { 0, 0, 0, 0, 0 };
}
/**
* @brief Get the division factor required to get the target frequency from the input frequency.
* @tparam input_freq The input frequency.
* @tparam target_freq The target frequency.
* @return The division factor.
*/
template <uint32_t input_freq, uint32_t target_freq>
constexpr en_clk_sysclk_div_factor_t get_division_factor() {
// Calculate the divider to get the target frequency
constexpr float fdivider = static_cast<float>(input_freq) / static_cast<float>(target_freq);
constexpr int divider = static_cast<int>(fdivider);
// divider must be an integer
static_assert(fdivider == divider, "Target frequency not achievable, divider must be an integer");
// divider must be between 1 and 64 (enum range), and must be a power of 2
static_assert(divider >= 1 && divider <= 64, "Invalid divider, out of range");
static_assert((divider & (divider - 1)) == 0, "Invalid divider, not a power of 2");
// return the divider
switch (divider) {
case 1: return ClkSysclkDiv1;
case 2: return ClkSysclkDiv2;
case 4: return ClkSysclkDiv4;
case 8: return ClkSysclkDiv8;
case 16: return ClkSysclkDiv16;
case 32: return ClkSysclkDiv32;
case 64: return ClkSysclkDiv64;
}
}
/**
* @brief Validate the runtime clocks match the expected values.
*/
void validate_system_clocks() {
#define CLOCK_ASSERT(expected, actual) \
if (expected != actual) { \
SERIAL_ECHOPGM( \
"Clock Mismatch for " #expected ": " \
"expected ", expected, \
", got ", actual \
); \
CORE_ASSERT_FAIL("Clock Mismatch: " #expected); \
}
update_system_clock_frequencies();
CLOCK_ASSERT(F_SYSTEM_CLOCK, SYSTEM_CLOCK_FREQUENCIES.system);
CLOCK_ASSERT(F_HCLK, SYSTEM_CLOCK_FREQUENCIES.hclk);
CLOCK_ASSERT(F_EXCLK, SYSTEM_CLOCK_FREQUENCIES.exclk);
CLOCK_ASSERT(F_PCLK0, SYSTEM_CLOCK_FREQUENCIES.pclk0);
CLOCK_ASSERT(F_PCLK1, SYSTEM_CLOCK_FREQUENCIES.pclk1);
CLOCK_ASSERT(F_PCLK2, SYSTEM_CLOCK_FREQUENCIES.pclk2);
CLOCK_ASSERT(F_PCLK3, SYSTEM_CLOCK_FREQUENCIES.pclk3);
CLOCK_ASSERT(F_PCLK4, SYSTEM_CLOCK_FREQUENCIES.pclk4);
}
/**
* @brief Configure HC32 system clocks.
*
* This function is called by the Arduino core early in the startup process, before setup() is called.
* It is used to configure the system clocks to the desired state.
*
* See https://github.com/MarlinFirmware/Marlin/pull/27099 for more information.
*/
void core_hook_sysclock_init() {
// Set wait cycles, as we are about to switch to 200 MHz HCLK
sysclock_configure_flash_wait_cycles();
sysclock_configure_sram_wait_cycles();
// Select MPLL input frequency based on clock availability
#if BOARD_XTAL_FREQUENCY == 8000000 || BOARD_XTAL_FREQUENCY == 16000000 // 8 MHz or 16 MHz XTAL
constexpr uint32_t mpll_input_clock = BOARD_XTAL_FREQUENCY;
// Configure MPLLp to 200 MHz output, with different settings depending on XTAL availability
#if BOARD_XTAL_FREQUENCY == 8000000 // 8 MHz XTAL
// - M = 1 => 8 MHz / 1 = 8 MHz
// - N = 50 => 8 MHz * 50 = 400 MHz
// - P = 2 => 400 MHz / 2 = 200 MHz (sysclk)
// - Q,R = 4 => 400 MHz / 4 = 100 MHz (dont care)
stc_clk_mpll_cfg_t pllConf = {
.PllpDiv = 2u, // P
.PllqDiv = 4u, // Q
.PllrDiv = 4u, // R
.plln = 50u, // N
.pllmDiv = 1u, // M
};
sysclock_configure_xtal();
sysclock_configure_mpll(ClkPllSrcXTAL, &pllConf);
#if BOARD_XTAL_FREQUENCY == 16000000
#warning "HC32F460 with 16 MHz XTAL has not been tested."
#endif
#elif BOARD_XTAL_FREQUENCY == 16000000 // 16 MHz XTAL
// - M = 1 => 16 MHz / 1 = 16 MHz
// - N = 50 => 16 MHz * 25 = 400 MHz
// - P = 2 => 400 MHz / 2 = 200 MHz (sysclk)
// - Q,R = 4 => 400 MHz / 4 = 100 MHz (dont care)
stc_clk_mpll_cfg_t pllConf = {
.PllpDiv = 2u, // P
.PllqDiv = 4u, // Q
.PllrDiv = 4u, // R
.plln = 50u, // N
.pllmDiv = 1u, // M
};
sysclock_configure_xtal();
sysclock_configure_mpll(ClkPllSrcXTAL, &pllConf);
#warning "HC32F460 with 16 MHz XTAL has not been tested."
#else // HRC (16 MHz)
constexpr uint32_t mpll_input_clock = 16000000;
// - M = 1 => 16 MHz / 1 = 16 MHz
// - N = 25 => 16 MHz * 25 = 400 MHz
// - P = 2 => 400 MHz / 2 = 200 MHz (sysclk)
// - Q,R = 4 => 400 MHz / 4 = 100 MHz (dont care)
stc_clk_mpll_cfg_t pllConf = {
.PllpDiv = 2u, // P
.PllqDiv = 4u, // Q
.PllrDiv = 4u, // R
.plln = 25u, // N
.pllmDiv = 1u, // M
};
sysclock_configure_hrc();
sysclock_configure_mpll(ClkPllSrcHRC, &pllConf);
// HRC could have been configured by ICG to 20 MHz
// TODO: handle gracefully if HRC is not 16 MHz
@@ -171,72 +91,34 @@ void core_hook_sysclock_init() {
panic("HRC is not 16 MHz");
}
#if defined(BOARD_XTAL_FREQUENCY)
#ifdef BOARD_XTAL_FREQUENCY
#warning "No valid XTAL frequency defined, falling back to HRC."
#endif
#endif
// Automagically calculate MPLL configuration
constexpr stc_clk_mpll_cfg_t pllConf = get_mpll_config(mpll_input_clock, F_SYSTEM_CLOCK);
static_assert(pllConf.pllmDiv != 0 && pllConf.plln != 0 && pllConf.PllpDiv != 0, "MPLL auto-configuration failed");
sysclock_configure_mpll(ClkPllSrcXTAL, &pllConf);
// Setup clock divisors
constexpr stc_clk_sysclk_cfg_t sysClkConf = {
.enHclkDiv = get_division_factor<F_SYSTEM_CLOCK, F_HCLK>(),
.enExclkDiv = get_division_factor<F_SYSTEM_CLOCK, F_EXCLK>(),
.enPclk0Div = get_division_factor<F_SYSTEM_CLOCK, F_PCLK0>(),
.enPclk1Div = get_division_factor<F_SYSTEM_CLOCK, F_PCLK1>(),
.enPclk2Div = get_division_factor<F_SYSTEM_CLOCK, F_PCLK2>(),
.enPclk3Div = get_division_factor<F_SYSTEM_CLOCK, F_PCLK3>(),
.enPclk4Div = get_division_factor<F_SYSTEM_CLOCK, F_PCLK4>(),
// Setup clock divisors for sysclk = 200 MHz:
// Note: PCLK1 is used for step+temp timers, and need to be kept at 50 MHz (until there is a better solution)
stc_clk_sysclk_cfg_t sysClkConf = {
.enHclkDiv = ClkSysclkDiv1, // HCLK = 200 MHz (CPU)
.enExclkDiv = ClkSysclkDiv2, // EXCLK = 100 MHz (SDIO)
.enPclk0Div = ClkSysclkDiv1, // PCLK0 = 200 MHz (Timer6 (not used))
.enPclk1Div = ClkSysclkDiv4, // PCLK1 = 50 MHz (USART, SPI, I2S, Timer0 (step+temp), TimerA (Servo))
.enPclk2Div = ClkSysclkDiv4, // PCLK2 = 50 MHz (ADC)
.enPclk3Div = ClkSysclkDiv4, // PCLK3 = 50 MHz (I2C, WDT)
.enPclk4Div = ClkSysclkDiv2, // PCLK4 = 100 MHz (ADC ctl)
};
sysclock_set_clock_dividers(&sysClkConf);
// Set power mode, before switch
power_mode_update_pre(F_SYSTEM_CLOCK);
// Set power mode
#define POWER_MODE_SYSTEM_CLOCK 200000000 // 200 MHz
power_mode_update_pre(POWER_MODE_SYSTEM_CLOCK);
// Switch to MPLL-P as system clock source
// Switch to MPLL as sysclk source
CLK_SetSysClkSource(CLKSysSrcMPLL);
// Set power mode, after switch
power_mode_update_post(F_SYSTEM_CLOCK);
// Verify clocks match expected values (at runtime)
#if ENABLED(MARLIN_DEV_MODE) || ENABLED(ALWAYS_VALIDATE_CLOCKS)
validate_system_clocks();
#endif
// Verify clock configuration (at compile time)
#if ARDUINO_CORE_VERSION_INT >= GET_VERSION_INT(1, 2, 0)
assert_mpll_config_valid<
mpll_input_clock,
pllConf.pllmDiv,
pllConf.plln,
pllConf.PllpDiv,
pllConf.PllqDiv,
pllConf.PllrDiv
>();
assert_system_clocks_valid<
F_SYSTEM_CLOCK,
sysClkConf.enHclkDiv,
sysClkConf.enPclk0Div,
sysClkConf.enPclk1Div,
sysClkConf.enPclk2Div,
sysClkConf.enPclk3Div,
sysClkConf.enPclk4Div,
sysClkConf.enExclkDiv
>();
static_assert(get_mpll_output_clock(
mpll_input_clock,
pllConf.pllmDiv,
pllConf.plln,
pllConf.PllpDiv
) == F_SYSTEM_CLOCK, "actual MPLL output clock does not match F_SYSTEM_CLOCK");
#endif
// Set power mode
power_mode_update_post(POWER_MODE_SYSTEM_CLOCK);
#undef POWER_MODE_SYSTEM_CLOCK
}
#endif // ARDUINO_ARCH_HC32
-65
View File
@@ -1,65 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* HC32F460 system clock configuration.
*
* With the HC32 HAL, the various peripheral clocks (including the CPU clock) are derived
* from the main PLL (MPLL-P) output (referred to at F_SYSTEM_CLOCK).
*
* F_SYSTEM_CLOCK is the target frequency of the main PLL, and the PLL is automatically configured
* to achieve this frequency.
*
* The peripheral clocks are the result of integer division of F_SYSTEM_CLOCK.
* Their target frequencies are defined here, and the required division factors are calculated automatically.
* Note that the division factor must be a power of 2 between 1 and 64.
* If the target frequency is not achievable, a compile-time error will be generated.
*
* Additionally, there are interdependencies between the peripheral clocks, which are described in
* Section 4.4 "Working Clock Specifications" of the HC32F460 Reference Manual.
* With Arduino core >= 1.2.0, these interdependencies are checked at compile time.
* On earlier versions, you are on your own.
*
* For all clock frequencies, they can be checked at runtime by enabling the 'ALWAYS_VALIDATE_CLOCKS' define.
* In MARLIN_DEV_MODE, they will also be printed to the serial console by 'MarlinHAL::HAL_clock_frequencies_dump'.
*
* See https://github.com/MarlinFirmware/Marlin/pull/27099 for more information.
*/
// Target peripheral clock frequencies, must be integer divisors of F_SYSTEM_CLOCK.
// Changing the frequency here will automagically update everything else.
#define F_HCLK 200000000UL // 200 MHz; CPU
#define F_EXCLK (F_HCLK / 2) // 100 MHz; SDIO
#define F_PCLK0 (F_HCLK / 2) // 100 MHz; Timer6 (unused)
#define F_PCLK1 (F_HCLK / 4) // 50 MHz; USART, SPI, Timer0 (step + temp), TimerA (Servo)
#define F_PCLK2 (F_HCLK / 8) // 25 MHz; ADC Sampling
#define F_PCLK3 (F_HCLK / 8) // 25 MHz; I2C, WDT
#define F_PCLK4 (F_HCLK / 2) // 100 MHz; ADC Control
// MPLL-P clock target frequency. This must be >= the highest peripheral clock frequency.
// PLL config is automatically calculated based on this value.
#define F_SYSTEM_CLOCK F_HCLK
// The Peripheral clocks are only checked at runtime if this is enabled OR MARLIN_DEV_MODE is enabled.
// Compile time checks are always performed with Arduino core version >= 1.2.0.
#define ALWAYS_VALIDATE_CLOCKS 1
+27 -30
View File
@@ -20,7 +20,6 @@
#pragma once
#include <stdint.h>
#include <Timer0.h>
#include "sysclock.h"
//
// Timer Types
@@ -39,46 +38,44 @@ extern Timer0 step_timer;
// Timer Configurations
//
/**
* HAL_TIMER_RATE must be known at compile time since it's used to calculate
* STEPPER_TIMER_RATE, which is used in 'constexpr' calculations.
* On the HC32F460 the timer rate depends on PCLK1, which is derived from the
* system clock configured at runtime.
* Thus we use the 'F_PCLK1' constant defined in 'sysclock.h'.
*
* See https://github.com/MarlinFirmware/Marlin/pull/27099 for more information.
*
* NOTE: If the 'constexpr' requirement is ever lifted, TIMER0_BASE_FREQUENCY could
* be used instead. Tho this would probably not make any noticable difference.
*/
#define HAL_TIMER_RATE F_PCLK1
// TODO: some calculations (step irq min_step_rate) require the timer rate to be known at compile time
// this is not possible with the HC32F460, as the timer rate depends on PCLK1
// as a workaround, PCLK1 = 50MHz is assumed (check with clock dump in MarlinHAL::init())
#define HAL_TIMER_RATE 50000000 // 50MHz
// #define HAL_TIMER_RATE TIMER0_BASE_FREQUENCY
// TODO: CYCLES_PER_MICROSECOND seems to be used by Marlin to calculate the number of cycles per microsecond in the timer ISRs
// by default, it uses F_CPU, but since that is not known at compile time for HC32, we overwrite it here
#undef CYCLES_PER_MICROSECOND
#define CYCLES_PER_MICROSECOND (HAL_TIMER_RATE / 1000000UL)
// Temperature timer
#define TEMP_TIMER_NUM (&temp_timer)
#define TEMP_TIMER_PRIORITY DDL_IRQ_PRIORITY_02
#define TEMP_TIMER_PRESCALE 16UL // 12.5MHz
#define TEMP_TIMER_RATE 1000 // 1kHz
#define TEMP_TIMER_FREQUENCY TEMP_TIMER_RATE // 1kHz also
#define TEMP_TIMER_NUM (&temp_timer)
#define TEMP_TIMER_PRIORITY DDL_IRQ_PRIORITY_02
#define TEMP_TIMER_PRESCALE 16ul
#define TEMP_TIMER_RATE 1000 // 1kHz
#define TEMP_TIMER_FREQUENCY TEMP_TIMER_RATE // Alias for Marlin
// Stepper timer
#define STEP_TIMER_NUM (&step_timer)
#define STEP_TIMER_PRIORITY DDL_IRQ_PRIORITY_00 // Top priority, nothing else uses it
#define STEPPER_TIMER_PRESCALE 16UL // 12.5MHz
#define STEP_TIMER_NUM (&step_timer)
#define STEP_TIMER_PRIORITY DDL_IRQ_PRIORITY_01
#define STEPPER_TIMER_PRESCALE 16ul
#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // 50MHz / 16 = 3.125MHz
#define STEPPER_TIMER_TICKS_PER_US (STEPPER_TIMER_RATE / 1000000UL) // Integer 3
// TODO: STEPPER_TIMER_RATE seems to work fine like this, but requires further testing...
#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // 50MHz / 16 = 3.125MHz
#define STEPPER_TIMER_TICKS_PER_US (STEPPER_TIMER_RATE / 1000000)
// Pulse timer (== stepper timer)
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
//
// Channel aliases
//
#define MF_TIMER_TEMP TEMP_TIMER_NUM
#define MF_TIMER_STEP STEP_TIMER_NUM
#define MF_TIMER_PULSE PULSE_TIMER_NUM
#define MF_TIMER_TEMP TEMP_TIMER_NUM
#define MF_TIMER_STEP STEP_TIMER_NUM
#define MF_TIMER_PULSE PULSE_TIMER_NUM
//
// HAL functions
@@ -82,7 +82,7 @@ static inline uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, c
}
static void u8g_sw_spi_shift_out(uint8_t val) {
#if U8G_SPI_USE_MODE_3
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864)
swSpiTransfer_mode_3(val, SPI_speed);
#else
swSpiTransfer_mode_0(val, SPI_speed);
@@ -116,15 +116,15 @@ uint8_t u8g_com_HAL_HC32_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, voi
break;
case U8G_COM_MSG_CHIP_SELECT:
#if U8G_SPI_USE_MODE_3 // This LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
WRITE(DOGLCD_SCK, HIGH); // Set SCK to mode 3 idle state before CS goes active
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // This LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
WRITE(DOGLCD_SCK, HIGH); // Set SCK to mode 3 idle state before CS goes active
WRITE(DOGLCD_CS, LOW);
}
else {
WRITE(DOGLCD_CS, HIGH);
WRITE(DOGLCD_SCK, LOW); // Set SCK to mode 0 idle state after CS goes inactive
WRITE(DOGLCD_SCK, LOW); // Set SCK to mode 0 idle state after CS goes inactive
}
#else
WRITE(DOGLCD_CS, !arg_val);
+1 -1
View File
@@ -52,7 +52,7 @@ uint8_t MarlinHAL::active_ch = 0;
uint16_t MarlinHAL::adc_value() {
const pin_t pin = analogInputToDigitalPin(active_ch);
if (!isValidPin(pin)) return 0;
if (!VALID_PIN(pin)) return 0;
return uint16_t((Gpio::get(pin) >> 2) & 0x3FF); // return 10bit value as Marlin expects
}
+6 -6
View File
@@ -49,28 +49,28 @@ extern "C" void delay(const int msec) {
// IO functions
// As defined by Arduino INPUT(0x0), OUTPUT(0x1), INPUT_PULLUP(0x2)
void pinMode(const pin_t pin, const uint8_t mode) {
if (!isValidPin(pin)) return;
if (!VALID_PIN(pin)) return;
Gpio::setMode(pin, mode);
}
void digitalWrite(pin_t pin, uint8_t pin_status) {
if (!isValidPin(pin)) return;
if (!VALID_PIN(pin)) return;
Gpio::set(pin, pin_status);
}
bool digitalRead(pin_t pin) {
if (!isValidPin(pin)) return false;
if (!VALID_PIN(pin)) return false;
return Gpio::get(pin);
}
void analogWrite(pin_t pin, int pwm_value) { // 1 - 254: pwm_value, 0: LOW, 255: HIGH
if (!isValidPin(pin)) return;
if (!VALID_PIN(pin)) return;
Gpio::set(pin, pwm_value);
}
uint16_t analogRead(pin_t adc_pin) {
if (!isValidPin(digitalPinToAnalogIndex(adc_pin))) return 0;
return Gpio::get(digitalPinToAnalogIndex(adc_pin));
if (!VALID_PIN(DIGITAL_PIN_TO_ANALOG_PIN(adc_pin))) return 0;
return Gpio::get(DIGITAL_PIN_TO_ANALOG_PIN(adc_pin));
}
char *dtostrf(double __val, signed char __width, unsigned char __prec, char *__s) {
+8 -8
View File
@@ -37,29 +37,29 @@ constexpr uint8_t NUM_ANALOG_INPUTS = 16;
constexpr uint8_t analog_offset = NUM_DIGITAL_PINS - NUM_ANALOG_INPUTS;
// Get the digital pin for an analog index
constexpr pin_t analogInputToDigitalPin(const int8_t a) {
return (WITHIN(a, 0, NUM_ANALOG_INPUTS - 1) ? analog_offset + a : P_NC);
constexpr pin_t analogInputToDigitalPin(const int8_t p) {
return (WITHIN(p, 0, NUM_ANALOG_INPUTS) ? analog_offset + p : P_NC);
}
// Get the analog index for a digital pin
constexpr int8_t digitalPinToAnalogIndex(const pin_t pin) {
return (WITHIN(pin, analog_offset, NUM_DIGITAL_PINS - 1) ? pin - analog_offset : P_NC);
constexpr int8_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t p) {
return (WITHIN(p, analog_offset, NUM_DIGITAL_PINS) ? p - analog_offset : P_NC);
}
// Return the index of a pin number
constexpr int16_t GET_PIN_MAP_INDEX(const pin_t pin) { return pin; }
// Test whether the pin is valid
constexpr bool isValidPin(const pin_t pin) { return WITHIN(pin, 0, NUM_DIGITAL_PINS - 1); }
constexpr bool VALID_PIN(const pin_t p) { return WITHIN(p, 0, NUM_DIGITAL_PINS); }
// Test whether the pin is PWM
constexpr bool PWM_PIN(const pin_t) { return false; }
constexpr bool PWM_PIN(const pin_t p) { return false; }
// Test whether the pin is interruptible
constexpr bool INTERRUPT_PIN(const pin_t) { return false; }
constexpr bool INTERRUPT_PIN(const pin_t p) { return false; }
// Get the pin number at the given index
constexpr pin_t GET_PIN_MAP_PIN(const int16_t index) { return pin_t(index); }
constexpr pin_t GET_PIN_MAP_PIN(const int16_t ind) { return ind; }
// Parse a G-code word into a pin index
int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
+20 -40
View File
@@ -19,50 +19,30 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Pins Debugging for Linux Native
*
* - NUMBER_PINS_TOTAL
* - MULTI_NAME_PAD
* - getPinByIndex(index)
* - printPinNameByIndex(index)
* - getPinIsDigitalByIndex(index)
* - digitalPinToAnalogIndex(pin)
* - getValidPinMode(pin)
* - isValidPin(pin)
* - isAnalogPin(pin)
* - digitalRead_mod(pin)
* - pwm_status(pin)
* - printPinPWM(pin)
* - printPinPort(pin)
* - printPinNumber(pin)
* - printPinAnalog(pin)
* Support routines for X86_64
*/
/**
* Translation of routines & variables used by pinsDebug.h
*/
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0)
#define digitalRead_mod(p) digitalRead(p)
#define GET_ARRAY_PIN(p) pin_array[p].pin
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
#define getPinByIndex(x) pin_array[x].pin
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
// active ADC function/mode/code values for PINSEL registers
constexpr int8_t ADC_pin_mode(const pin_t) { return -1; }
constexpr int8_t ADC_pin_mode(pin_t pin) { return -1; }
// The pin and index are the same on this platform
bool getPinIsDigitalByIndex(const pin_t pin) {
return (!isAnalogPin(pin) || get_pin_mode(pin) != ADC_pin_mode(pin));
}
int8_t get_pin_mode(const pin_t pin) { return VALID_PIN(pin) ? 0 : -1; }
#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0)
#define digitalRead_mod(P) digitalRead(P)
int8_t get_pin_mode(const pin_t pin) { return isValidPin(pin) ? 0 : -1; }
bool getValidPinMode(const pin_t pin) {
bool GET_PINMODE(const pin_t pin) {
const int8_t pin_mode = get_pin_mode(pin);
if (pin_mode == -1 || pin_mode == ADC_pin_mode(pin)) // Invalid pin or active analog pin
return false;
@@ -70,11 +50,11 @@ bool getValidPinMode(const pin_t pin) {
return (Gpio::getMode(pin) != 0); // Input/output state
}
void printPinPWM(const pin_t) {}
bool GET_ARRAY_IS_DIGITAL(const pin_t pin) {
return (!IS_ANALOG(pin) || get_pin_mode(pin) != ADC_pin_mode(pin));
}
void pwm_details(const pin_t pin) {}
bool pwm_status(const pin_t) { return false; }
void printPinPort(const pin_t) {}
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3d "), P); SERIAL_ECHO(buffer); }while(0)
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0)
void print_port(const pin_t) {}
+12
View File
@@ -28,6 +28,12 @@
// spiBeginTransaction.
#endif
// Onboard SD
//#define SD_SCK_PIN P0_07
//#define SD_MISO_PIN P0_08
//#define SD_MOSI_PIN P0_09
//#define SD_SS_PIN P0_06
// External SD
#ifndef SD_SCK_PIN
#define SD_SCK_PIN 50
@@ -38,3 +44,9 @@
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN 52
#endif
#ifndef SD_SS_PIN
#define SD_SS_PIN 53
#endif
#ifndef SDSS
#define SDSS SD_SS_PIN
#endif
+2
View File
@@ -35,6 +35,8 @@
#include <CDCSerial.h>
#include <usb/mscuser.h>
DefaultSerial1 USBSerial(false, UsbSerial);
uint32_t MarlinHAL::adc_result = 0;
pin_t MarlinHAL::adc_pin = 0;
+64 -7
View File
@@ -38,15 +38,72 @@ extern "C" volatile uint32_t _millis;
#include "../shared/math_32bit.h"
#include "../shared/HAL_SPI.h"
#include "fastio.h"
#include "MarlinSerial.h"
#include <adc.h>
#include <pinmapping.h>
#include <CDCSerial.h>
//
// Serial Ports
//
// ------------------------
// Serial ports
// ------------------------
#include "MarlinSerial.h"
typedef ForwardSerial1Class< decltype(UsbSerial) > DefaultSerial1;
extern DefaultSerial1 USBSerial;
#define _MSERIAL(X) MSerial##X
#define MSERIAL(X) _MSERIAL(X)
#if SERIAL_PORT == -1
#define MYSERIAL1 USBSerial
#elif WITHIN(SERIAL_PORT, 0, 3)
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
#else
#error "SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
#endif
#ifdef SERIAL_PORT_2
#if SERIAL_PORT_2 == -1
#define MYSERIAL2 USBSerial
#elif WITHIN(SERIAL_PORT_2, 0, 3)
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
#else
#error "SERIAL_PORT_2 must be from 0 to 3. You can also use -1 if the board supports Native USB."
#endif
#endif
#ifdef SERIAL_PORT_3
#if SERIAL_PORT_3 == -1
#define MYSERIAL3 USBSerial
#elif WITHIN(SERIAL_PORT_3, 0, 3)
#define MYSERIAL3 MSERIAL(SERIAL_PORT_3)
#else
#error "SERIAL_PORT_3 must be from 0 to 3. You can also use -1 if the board supports Native USB."
#endif
#endif
#ifdef MMU2_SERIAL_PORT
#if MMU2_SERIAL_PORT == -1
#define MMU2_SERIAL USBSerial
#elif WITHIN(MMU2_SERIAL_PORT, 0, 3)
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
#else
#error "MMU2_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
#endif
#endif
#ifdef LCD_SERIAL_PORT
#if LCD_SERIAL_PORT == -1
#define LCD_SERIAL USBSerial
#elif WITHIN(LCD_SERIAL_PORT, 0, 3)
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
#else
#error "LCD_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
#endif
#if HAS_DGUS_LCD || ENABLED(DWINOS_4)
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.available()
#endif
#endif
//
// Interrupts
@@ -80,12 +137,12 @@ extern "C" volatile uint32_t _millis;
//
// Test whether the pin is valid
constexpr bool isValidPin(const pin_t pin) {
constexpr bool VALID_PIN(const pin_t pin) {
return LPC176x::pin_is_valid(pin);
}
// Get the analog index for a digital pin
constexpr int8_t digitalPinToAnalogIndex(const pin_t pin) {
constexpr int8_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t pin) {
return (LPC176x::pin_is_valid(pin) && LPC176x::pin_has_adc(pin)) ? pin : -1;
}
@@ -102,7 +159,7 @@ constexpr pin_t GET_PIN_MAP_PIN(const int16_t index) {
// Parse a G-code word into a pin index
int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
// P0.6 thru P0.9 are for the onboard SD card
#define HAL_SENSITIVE_PINS P0_06, P0_07, P0_08, P0_09
#define HAL_SENSITIVE_PINS P0_06, P0_07, P0_08, P0_09,
// ------------------------
// Defines
-2
View File
@@ -25,8 +25,6 @@
#include "../../inc/MarlinConfig.h"
DefaultSerial1 USBSerial(false, UsbSerial);
#if USING_HW_SERIAL0
MarlinSerial _MSerial0(LPC_UART0);
MSerialT MSerial0(true, _MSerial0);
-13
View File
@@ -21,7 +21,6 @@
*/
#pragma once
#include <CDCSerial.h>
#include <HardwareSerial.h>
#include <WString.h>
@@ -31,18 +30,6 @@
#endif
#include "../../core/serial_hook.h"
typedef ForwardSerial1Class< decltype(UsbSerial) > DefaultSerial1;
extern DefaultSerial1 USBSerial;
#define SERIAL_INDEX_MIN 0
#define SERIAL_INDEX_MAX 3
#define USB_SERIAL_PORT(...) USBSerial
#include "../shared/serial_ports.h"
#if defined(LCD_SERIAL_PORT) && ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.available()
#endif
class MarlinSerial : public HardwareSerial<RX_BUFFER_SIZE, TX_BUFFER_SIZE> {
public:
MarlinSerial(LPC_UART_TypeDef *UARTx) : HardwareSerial<RX_BUFFER_SIZE, TX_BUFFER_SIZE>(UARTx) { }
@@ -146,12 +146,6 @@ void setup_endstop_interrupts() {
#endif
_ATTACH(Z_MIN_PROBE_PIN);
#endif
#if USE_CALIBRATION
#if !LPC1768_PIN_INTERRUPT_M(CALIBRATION_PIN)
#error "CALIBRATION_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
#endif
_ATTACH(CALIBRATION_PIN);
#endif
#if USE_I_MAX
#if !LPC1768_PIN_INTERRUPT_M(I_MAX_PIN)
#error "I_MAX_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
+2 -4
View File
@@ -26,10 +26,8 @@
void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
if (!LPC176x::pin_is_valid(pin)) return;
if (LPC176x::pwm_attach_pin(pin)) {
const uint32_t duty = map(invert ? v_size - v : v, 0, v_size, 0, LPC176x::pwm_get_period(pin));
LPC176x::pwm_write(pin, duty);
}
if (LPC176x::pwm_attach_pin(pin))
LPC176x::pwm_write_ratio(pin, invert ? 1.0f - (float)v / v_size : (float)v / v_size); // map 1-254 onto PWM range
}
void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
+1 -1
View File
@@ -66,7 +66,7 @@
#define _WRITE(IO,V) WRITE_PIN(IO,V)
/// toggle a pin
#define _TOGGLE(IO) LPC176x::gpio_toggle(IO)
#define _TOGGLE(IO) _WRITE(IO, !READ(IO))
/// set pin as input
#define _SET_INPUT(IO) SET_DIR_INPUT(IO)
+3 -3
View File
@@ -121,7 +121,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o
#if IS_TX1(BTN_EN2) || IS_RX1(BTN_EN1)
#error "Serial port pins (1) conflict with Encoder Buttons!"
#elif ANY_TX(1, SD_SCK_PIN, LCD_PINS_D4, DOGLCD_SCK, LCD_RESET_PIN, LCD_PINS_RS, SHIFT_CLK_PIN) \
|| ANY_RX(1, LCD_SDSS_PIN, LCD_PINS_RS, SD_MISO_PIN, DOGLCD_A0, SD_SS_PIN, DOGLCD_CS, LCD_RESET_PIN, LCD_BACKLIGHT_PIN)
|| ANY_RX(1, LCD_SDSS, LCD_PINS_RS, SD_MISO_PIN, DOGLCD_A0, SD_SS_PIN, LCD_SDSS, DOGLCD_CS, LCD_RESET_PIN, LCD_BACKLIGHT_PIN)
#error "Serial port pins (1) conflict with LCD pins!"
#endif
#endif
@@ -211,8 +211,8 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o
#error "SCL0 overlaps with Encoder Button!"
#elif IS_SCL0(SD_SS_PIN)
#error "SCL0 overlaps with SD_SS_PIN!"
#elif IS_SCL0(LCD_SDSS_PIN)
#error "SCL0 overlaps with LCD_SDSS_PIN!"
#elif IS_SCL0(LCD_SDSS)
#error "SCL0 overlaps with LCD_SDSS!"
#endif
#undef PIN_IS_SDA0
#undef IS_SCL0
+15 -28
View File
@@ -19,35 +19,22 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Pins Debugging for LPC1768/9
*
* - NUMBER_PINS_TOTAL
* - MULTI_NAME_PAD
* - getPinByIndex(index)
* - printPinNameByIndex(index)
* - getPinIsDigitalByIndex(index)
* - digitalPinToAnalogIndex(pin)
* - getValidPinMode(pin)
* - isValidPin(pin)
* - isAnalogPin(pin)
* - digitalRead_mod(pin)
* - pwm_status(pin)
* - printPinPWM(pin)
* - printPinPort(pin)
* - printPinNumber(pin)
* - printPinAnalog(pin)
* Support routines for LPC1768
*/
/**
* Translation of routines & variables used by pinsDebug.h
*/
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0)
#define digitalRead_mod(P) extDigitalRead(P)
#define getPinByIndex(x) pin_array[x].pin
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("P%d_%02d"), LPC176x::pin_port(P), LPC176x::pin_bit(P)); SERIAL_ECHO(buffer); }while(0)
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR("_A%d "), LPC176x::pin_get_adc_channel(P)); SERIAL_ECHO(buffer); }while(0)
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0)
#define digitalRead_mod(p) extDigitalRead(p)
#define GET_ARRAY_PIN(p) pin_array[p].pin
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("P%d_%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR("_A%d "), LPC176x::pin_get_adc_channel(pin)); SERIAL_ECHO(buffer); }while(0)
#define MULTI_NAME_PAD 17 // space needed to be pretty if not first name assigned to a pin
// pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities
@@ -55,15 +42,15 @@
#define M43_NEVER_TOUCH(Q) ((Q) == P0_29 || (Q) == P0_30 || (Q) == P2_09) // USB pins
#endif
bool getValidPinMode(const pin_t pin) {
bool GET_PINMODE(const pin_t pin) {
if (!LPC176x::pin_is_valid(pin) || LPC176x::pin_adc_enabled(pin)) // Invalid pin or active analog pin
return false;
return LPC176x::gpio_direction(pin);
}
#define getPinIsDigitalByIndex(x) ((bool) pin_array[x].is_digital)
#define GET_ARRAY_IS_DIGITAL(x) ((bool) pin_array[x].is_digital)
void printPinPort(const pin_t) {}
void printPinPWM(const pin_t) {}
void print_port(const pin_t) {}
void pwm_details(const pin_t) {}
bool pwm_status(const pin_t) { return false; }
+13 -6
View File
@@ -28,12 +28,12 @@
// spiBeginTransaction.
#endif
// Onboard SD
//#define SD_SCK_PIN P0_07
//#define SD_MISO_PIN P0_08
//#define SD_MOSI_PIN P0_09
// External SD
/** onboard SD card */
//#define SD_SCK_PIN P0_07
//#define SD_MISO_PIN P0_08
//#define SD_MOSI_PIN P0_09
//#define SD_SS_PIN P0_06
/** external */
#ifndef SD_SCK_PIN
#define SD_SCK_PIN P0_15
#endif
@@ -43,3 +43,10 @@
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN P0_18
#endif
#ifndef SD_SS_PIN
#define SD_SS_PIN P1_23
#endif
#if !defined(SDSS) || SDSS == P_NC // gets defaulted in pins.h
#undef SDSS
#define SDSS SD_SS_PIN
#endif
@@ -132,7 +132,7 @@ uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, const pin_t sck
static uint8_t SPI_speed = 0;
static void u8g_sw_spi_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) {
#if U8G_SPI_USE_MODE_3
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864)
swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin);
#else
swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin);
@@ -160,15 +160,15 @@ uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val,
break;
case U8G_COM_MSG_CHIP_SELECT:
#if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
u8g_SetPILevel(u8g, U8G_PI_CS, LOW);
}
else {
u8g_SetPILevel(u8g, U8G_PI_CS, HIGH);
u8g_SetPILevel(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
u8g_SetPILevel(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
}
#else
u8g_SetPILevel(u8g, U8G_PI_CS, !arg_val);
@@ -13,9 +13,9 @@ if pioutil.is_pio_build():
target_drive = "REARM"
import platform
current_OS = platform.system()
env = pioutil.env
current_OS = platform.system()
Import("env")
def print_error(e):
print('\nUnable to find destination disk (%s)\n' \
@@ -37,7 +37,7 @@ if pioutil.is_pio_build():
#
# platformio.ini will accept this for a Windows upload port designation: 'upload_port = L:'
# Windows - doesn't care about the disk's name, only cares about the drive letter
import subprocess, string
import subprocess,string
from ctypes import windll
from pathlib import PureWindowsPath
+30 -3
View File
@@ -71,10 +71,37 @@ extern MSerialT serial_stream_2;
extern MSerialT serial_stream_3;
#define _MSERIAL(X) serial_stream_##X
#define MSERIAL(X) _MSERIAL(X)
#define SERIAL_INDEX_MIN 0
#define SERIAL_INDEX_MAX 3
#include "../shared/serial_ports.h"
#if WITHIN(SERIAL_PORT, 0, 3)
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
#else
#error "SERIAL_PORT must be from 0 to 3. Please update your configuration."
#endif
#ifdef SERIAL_PORT_2
#if WITHIN(SERIAL_PORT_2, 0, 3)
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
#else
#error "SERIAL_PORT_2 must be from 0 to 3. Please update your configuration."
#endif
#endif
#ifdef MMU2_SERIAL_PORT
#if WITHIN(MMU2_SERIAL_PORT, 0, 3)
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
#else
#error "MMU2_SERIAL_PORT must be from 0 to 3. Please update your configuration."
#endif
#endif
#ifdef LCD_SERIAL_PORT
#if WITHIN(LCD_SERIAL_PORT, 0, 3)
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
#else
#error "LCD_SERIAL_PORT must be from 0 to 3. Please update your configuration."
#endif
#endif
// ------------------------
// Interrupts
+7 -8
View File
@@ -25,11 +25,11 @@
#include "../../inc/MarlinConfig.h"
#include "pinsDebug.h"
int8_t ADC_pin_mode(const pin_t) { return -1; }
int8_t ADC_pin_mode(pin_t pin) { return -1; }
int8_t get_pin_mode(const pin_t pin) { return isValidPin(pin) ? 0 : -1; }
int8_t get_pin_mode(const pin_t pin) { return VALID_PIN(pin) ? 0 : -1; }
bool getValidPinMode(const pin_t pin) {
bool GET_PINMODE(const pin_t pin) {
const int8_t pin_mode = get_pin_mode(pin);
if (pin_mode == -1 || pin_mode == ADC_pin_mode(pin)) // Invalid pin or active analog pin
return false;
@@ -37,13 +37,12 @@ bool getValidPinMode(const pin_t pin) {
return (Gpio::getMode(pin) != 0); // Input/output state
}
// The pin and index are the same on this platform
bool getPinIsDigitalByIndex(const pin_t pin) {
return !isAnalogPin(pin) || get_pin_mode(pin) != ADC_pin_mode(pin);
bool GET_ARRAY_IS_DIGITAL(const pin_t pin) {
return !IS_ANALOG(pin) || get_pin_mode(pin) != ADC_pin_mode(pin);
}
void printPinPort(const pin_t) {}
void printPinPWM(const pin_t) {}
void print_port(const pin_t) {}
void pwm_details(const pin_t) {}
bool pwm_status(const pin_t) { return false; }
#endif
+17 -30
View File
@@ -19,43 +19,30 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* Support routines for X86_64
*/
#pragma once
/**
* Pins Debugging for x86_64
*
* - NUMBER_PINS_TOTAL
* - MULTI_NAME_PAD
* - getPinByIndex(index)
* - printPinNameByIndex(index)
* - getPinIsDigitalByIndex(index)
* - digitalPinToAnalogIndex(pin)
* - getValidPinMode(pin)
* - isValidPin(pin)
* - isAnalogPin(pin)
* - digitalRead_mod(pin)
* - pwm_status(pin)
* - printPinPWM(pin)
* - printPinPort(pin)
* - printPinNumber(pin)
* - printPinAnalog(pin)
* Translation of routines & variables used by pinsDebug.h
*/
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL))
#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0)
#define digitalRead_mod(P) digitalRead(P)
#define getPinByIndex(x) pin_array[x].pin
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3d "), P); SERIAL_ECHO(buffer); }while(0)
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0)
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0)
#define digitalRead_mod(p) digitalRead(p)
#define GET_ARRAY_PIN(p) pin_array[p].pin
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
// Active ADC function/mode/code values for PINSEL registers
int8_t ADC_pin_mode(const pin_t);
int8_t get_pin_mode(const pin_t);
bool getValidPinMode(const pin_t);
bool getPinIsDigitalByIndex(const pin_t);
void printPinPort(const pin_t);
void printPinPWM(const pin_t);
int8_t ADC_pin_mode(pin_t pin);
int8_t get_pin_mode(const pin_t pin);
bool GET_PINMODE(const pin_t pin);
bool GET_ARRAY_IS_DIGITAL(const pin_t pin);
void print_port(const pin_t);
void pwm_details(const pin_t);
bool pwm_status(const pin_t);
+7
View File
@@ -32,6 +32,7 @@
//#define SD_SCK_PIN P0_07
//#define SD_MISO_PIN P0_08
//#define SD_MOSI_PIN P0_09
//#define SD_SS_PIN P0_06
// External SD
#ifndef SD_SCK_PIN
@@ -43,3 +44,9 @@
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN 52
#endif
#ifndef SD_SS_PIN
#define SD_SS_PIN 53
#endif
#ifndef SDSS
#define SDSS SD_SS_PIN
#endif
@@ -131,7 +131,7 @@ static uint8_t swSpiInit(const uint8_t spi_speed, const uint8_t clk_pin, const u
}
static void u8g_sw_spi_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) {
#if U8G_SPI_USE_MODE_3
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864)
swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin);
#else
swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin);
@@ -159,15 +159,15 @@ uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_pt
break;
case U8G_COM_MSG_CHIP_SELECT:
#if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
u8g_SetPILevel(u8g, U8G_PI_CS, LOW);
}
else {
u8g_SetPILevel(u8g, U8G_PI_CS, HIGH);
u8g_SetPILevel(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
u8g_SetPILevel(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
}
#else
u8g_SetPILevel(u8g, U8G_PI_CS, !arg_val);
-185
View File
@@ -1,185 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include "../platforms.h"
#ifdef __PLAT_RP2040__
#include "HAL.h"
//#include "usb_serial.h"
#include "../../inc/MarlinConfig.h"
#include "../shared/Delay.h"
extern "C" {
#include "pico/bootrom.h"
#include "hardware/watchdog.h"
}
#if HAS_SD_HOST_DRIVE
#include "msc_sd.h"
#include "usbd_cdc_if.h"
#endif
// ------------------------
// Public Variables
// ------------------------
volatile uint16_t adc_result;
// ------------------------
// Public functions
// ------------------------
TERN_(POSTMORTEM_DEBUGGING, extern void install_min_serial());
// HAL initialization task
void MarlinHAL::init() {
// Ensure F_CPU is a constant expression.
// If the compiler breaks here, it means that delay code that should compute at compile time will not work.
// So better safe than sorry here.
constexpr int cpuFreq = F_CPU;
UNUSED(cpuFreq);
#if HAS_MEDIA && DISABLED(SDIO_SUPPORT) && PIN_EXISTS(SD_SS)
OUT_WRITE(SD_SS_PIN, HIGH); // Try to set SD_SS_PIN inactive before any other SPI users start up
#endif
#if PIN_EXISTS(LED)
OUT_WRITE(LED_PIN, LOW);
#endif
#if ENABLED(SRAM_EEPROM_EMULATION)
// __HAL_RCC_PWR_CLK_ENABLE();
// HAL_PWR_EnableBkUpAccess(); // Enable access to backup SRAM
// __HAL_RCC_BKPSRAM_CLK_ENABLE();
// LL_PWR_EnableBkUpRegulator(); // Enable backup regulator
// while (!LL_PWR_IsActiveFlag_BRR()); // Wait until backup regulator is initialized
#endif
HAL_timer_init();
#if ENABLED(EMERGENCY_PARSER) && USBD_USE_CDC
USB_Hook_init();
#endif
TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the min serial handler
TERN_(HAS_SD_HOST_DRIVE, MSC_SD_init()); // Enable USB SD card access
#if PIN_EXISTS(USB_CONNECT)
OUT_WRITE(USB_CONNECT_PIN, !USB_CONNECT_INVERTING); // USB clear connection
delay_ms(1000); // Give OS time to notice
WRITE(USB_CONNECT_PIN, USB_CONNECT_INVERTING);
#endif
}
uint8_t MarlinHAL::get_reset_source() {
return watchdog_enable_caused_reboot() ? RST_WATCHDOG : 0;
}
void MarlinHAL::reboot() { watchdog_reboot(0, 0, 1); }
// ------------------------
// Watchdog Timer
// ------------------------
#if ENABLED(USE_WATCHDOG)
#define WDT_TIMEOUT_US TERN(WATCHDOG_DURATION_8S, 8000000, 4000000) // 4 or 8 second timeout
extern "C" {
#include "hardware/watchdog.h"
}
void MarlinHAL::watchdog_init() {
#if DISABLED(DISABLE_WATCHDOG_INIT)
static_assert(WDT_TIMEOUT_US > 1000, "WDT Timout is too small, aborting");
watchdog_enable(WDT_TIMEOUT_US/1000, true);
#endif
}
void MarlinHAL::watchdog_refresh() {
watchdog_update();
#if DISABLED(PINS_DEBUGGING) && PIN_EXISTS(LED)
TOGGLE(LED_PIN); // heartbeat indicator
#endif
}
#endif
// ------------------------
// ADC
// ------------------------
volatile bool MarlinHAL::adc_has_result = false;
void MarlinHAL::adc_init() {
analogReadResolution(HAL_ADC_RESOLUTION);
::adc_init();
adc_fifo_setup(true, false, 1, false, false);
irq_set_exclusive_handler(ADC_IRQ_FIFO, adc_exclusive_handler);
irq_set_enabled(ADC_IRQ_FIFO, true);
adc_irq_set_enabled(true);
}
void MarlinHAL::adc_enable(const pin_t pin) {
if (pin >= A0 && pin <= A3)
adc_gpio_init(pin);
else if (pin == HAL_ADC_MCU_TEMP_DUMMY_PIN)
adc_set_temp_sensor_enabled(true);
}
void MarlinHAL::adc_start(const pin_t pin) {
adc_has_result = false;
// Select an ADC input. 0...3 are GPIOs 26...29 respectively.
adc_select_input(pin == HAL_ADC_MCU_TEMP_DUMMY_PIN ? 4 : pin - A0);
adc_run(true);
}
void MarlinHAL::adc_exclusive_handler() {
adc_run(false); // Disable since we only want one result
irq_clear(ADC_IRQ_FIFO); // Clear the IRQ
if (adc_fifo_get_level() >= 1) {
adc_result = adc_fifo_get(); // Pop the result
adc_fifo_drain();
adc_has_result = true; // Signal the end of the conversion
}
}
uint16_t MarlinHAL::adc_value() { return adc_result; }
// Reset the system to initiate a firmware flash
void flashFirmware(const int16_t) { hal.reboot(); }
extern "C" {
void * _sbrk(int incr);
extern unsigned int __bss_end__; // end of bss section
}
// Return free memory between end of heap (or end bss) and whatever is current
int freeMemory() {
int free_memory, heap_end = (int)_sbrk(0);
return (int)&free_memory - (heap_end ?: (int)&__bss_end__);
}
#endif // __PLAT_RP2040__
-193
View File
@@ -1,193 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#define CPU_32_BIT
#ifndef F_CPU
#define F_CPU (XOSC_MHZ * 1000000UL)
#endif
#include "arduino_extras.h"
#include "../../core/macros.h"
#include "../shared/Marduino.h"
#include "../shared/math_32bit.h"
#include "../shared/HAL_SPI.h"
#include "fastio.h"
//#include "Servo.h"
#include "watchdog.h"
#include "../../inc/MarlinConfigPre.h"
#include <stdint.h>
//
// Serial Ports
//
#include "MarlinSerial.h"
// ------------------------
// Defines
// ------------------------
/**
* TODO: review this to return 1 for pins that are not analog input
*/
#ifndef analogInputToDigitalPin
#define analogInputToDigitalPin(p) (p)
#endif
#define CRITICAL_SECTION_START() uint32_t primask = __get_PRIMASK(); __disable_irq()
#define CRITICAL_SECTION_END() if (!primask) __enable_irq()
#define cli() __disable_irq()
#define sei() __enable_irq()
// ------------------------
// Types
// ------------------------
template <bool, class L, class R> struct IFPIN { typedef R type; };
template <class L, class R> struct IFPIN<true, L, R> { typedef L type; };
typedef IFPIN<sizeof(pin_size_t) == 1, int8_t, int16_t>::type pin_t;
class libServo;
typedef libServo hal_servo_t;
#define PAUSE_SERVO_OUTPUT() libServo::pause_all_servos()
#define RESUME_SERVO_OUTPUT() libServo::resume_all_servos()
// ------------------------
// ADC
// ------------------------
#define HAL_ADC_VREF 3.3
#ifdef ADC_RESOLUTION
#define HAL_ADC_RESOLUTION ADC_RESOLUTION
#else
#define HAL_ADC_RESOLUTION 12
#endif
// ADC index 4 is the MCU temperature
#define HAL_ADC_MCU_TEMP_DUMMY_PIN 127
//
// Pin Mapping for M42, M43, M226
//
#define GET_PIN_MAP_PIN(index) index
#define GET_PIN_MAP_INDEX(pin) pin
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
#ifndef PLATFORM_M997_SUPPORT
#define PLATFORM_M997_SUPPORT
#endif
void flashFirmware(const int16_t);
// Maple Compatibility
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
#define PWM_FREQUENCY 1000 // Default PWM frequency when set_pwm_duty() is called without set_pwm_frequency()
// ------------------------
// Class Utilities
// ------------------------
int freeMemory();
// ------------------------
// MarlinHAL Class
// ------------------------
class MarlinHAL {
public:
// Earliest possible init, before setup()
MarlinHAL() {}
// Watchdog
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {});
static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {});
static void init(); // Called early in setup()
static void init_board() {} // Called less early in setup()
static void reboot(); // Restart the firmware from 0x0
// Interrupts
static bool isr_state() { return !__get_PRIMASK(); }
static void isr_on() { __enable_irq(); }
static void isr_off() { __disable_irq(); }
static void delay_ms(const int ms) { ::delay(ms); }
// Tasks, called from idle()
static void idletask() {}
// Reset
static uint8_t get_reset_source();
static void clear_reset_source() {}
// Free SRAM
static int freeMemory() { return ::freeMemory(); }
//
// ADC Methods
//
// Called by Temperature::init once at startup
static void adc_init();
// Called by Temperature::init for each sensor at startup
static void adc_enable(const pin_t pin);
// Begin ADC sampling on the given pin. Called from Temperature::isr!
static void adc_start(const pin_t pin);
// This ADC runs a periodic task
static void adc_exclusive_handler();
// Is the ADC ready for reading?
static volatile bool adc_has_result;
static bool adc_ready() { return adc_has_result; }
// The current value of the ADC register
static uint16_t adc_value();
/**
* Set the PWM duty cycle for the pin to the given value.
* Optionally invert the duty cycle [default = false]
* Optionally change the scale of the provided value to enable finer PWM duty control [default = 255]
*/
static void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size=255, const bool invert=false);
/**
* Set the frequency of the timer for the given pin as close as
* possible to the provided desired frequency. Internally calculate
* the required waveform generation mode, prescaler, and resolution
* values and set timer registers accordingly.
* NOTE that the frequency is applied to all pins on the timer (Ex OC3A, OC3B and OC3B)
* NOTE that there are limitations, particularly if using TIMER2. (see Configuration_adv.h -> FAST_PWM_FAN Settings)
*/
static void set_pwm_frequency(const pin_t pin, const uint16_t f_desired);
};

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