Compare commits
380 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5f27f7de47 | ||
|
282f4678cd | ||
|
2471a8bb91 | ||
|
7bf3581b02 | ||
|
b9b29bf4c0 | ||
|
20df64814e | ||
|
34c92bbc17 | ||
|
c41f3f8582 | ||
|
8670df08a2 | ||
|
eeec4c27e7 | ||
|
730690ea03 | ||
|
3543873da7 | ||
|
c505626c42 | ||
|
484e1a624c | ||
|
ac3e27c026 | ||
|
1ab6f910b6 | ||
|
cfd49740eb | ||
|
7e8505fc11 | ||
|
f9aec2685c | ||
|
5d16497bed | ||
|
9f53bbd791 | ||
|
e1d367e05a | ||
|
f30897500d | ||
|
68de12acbf | ||
|
6320f9795c | ||
|
22b974691e | ||
|
4ef627d79f | ||
|
19991e269b | ||
|
b8b225c8b5 | ||
|
a1f026f57a | ||
|
2b788e9aa6 | ||
|
140e4ac507 | ||
|
1c52d76668 | ||
|
178735b958 | ||
|
4c179ba3f7 | ||
|
05f51e9355 | ||
|
75e3aa12c5 | ||
|
99a5074372 | ||
|
4c6f695bea | ||
|
8bc3e63871 | ||
|
4d400910b4 | ||
|
42208bc031 | ||
|
199a1ba0e5 | ||
|
4360142bd1 | ||
|
ddce1c6ef2 | ||
|
72fae2faa5 | ||
|
64a81f887a | ||
|
64b96f3908 | ||
|
52a1268089 | ||
|
5584da388c | ||
|
efdaf940a5 | ||
|
71ec89a112 | ||
|
1087e318e5 | ||
|
150237f712 | ||
|
63dd0f249d | ||
|
0b984519c3 | ||
|
073e4443e8 | ||
|
00ba053c90 | ||
|
ff0c931e47 | ||
|
a16f3baecc | ||
|
49a66bc4cc | ||
|
f3f692adf7 | ||
|
af84e362cc | ||
|
082117c4bb | ||
|
0e17d10bf3 | ||
|
68077149e2 | ||
|
62d7d49719 | ||
|
1d8d91afc6 | ||
|
a83ad2d9d4 | ||
|
0306c1bb0c | ||
|
4a733796bd | ||
|
0fd0554b5f | ||
|
fa6e7cb733 | ||
|
7b02a62da8 | ||
|
189c101793 | ||
|
1c556cd90d | ||
|
e442663e2a | ||
|
71539bcbeb | ||
|
d5790e09a5 | ||
|
b26f7fca3f | ||
|
2836834d7e | ||
|
d8b2726fd3 | ||
|
3f87f912c5 | ||
|
dd6a7ca197 | ||
|
fa4a6cdb5c | ||
|
3bef7a4450 | ||
|
e561f744fa | ||
|
0b45493557 | ||
|
18a7276909 | ||
|
28b48fc9bb | ||
|
10b4fa91eb | ||
|
a33d08928a | ||
|
15e6ee6c7c | ||
|
a9549f7a08 | ||
|
cc1ff27256 | ||
|
0ce83dee95 | ||
|
38873596ec | ||
|
ffcbba4447 | ||
|
b9b07387d7 | ||
|
90e2c42031 | ||
|
84b6e11bd5 | ||
|
894762259b | ||
|
f0cbc85a07 | ||
|
130e36d766 | ||
|
5d3cfbdc9b | ||
|
f55abfeb95 | ||
|
38bf5523e1 | ||
|
12b3807a7f | ||
|
3a3429b1ef | ||
|
86812432f3 | ||
|
54aff83179 | ||
|
78fea4a9ca | ||
|
bb68eaa69e | ||
|
62b9d7dc73 | ||
|
00d71ff0eb | ||
|
9b4192cdd0 | ||
|
0ebd2f44d4 | ||
|
f312ddfa4f | ||
|
d83382eb55 | ||
|
793939a365 | ||
|
7bf2190f03 | ||
|
081ef46e76 | ||
|
15b6ad41bc | ||
|
0268c1d02c | ||
|
38a9706e16 | ||
|
62d9e3f50e | ||
|
3ded99b894 | ||
|
4c76314c26 | ||
|
f1dbfaf706 | ||
|
7d4fa9d504 | ||
|
64ab254f26 | ||
|
ff78f79762 | ||
|
202840e750 | ||
|
bfad23d3e2 | ||
|
7f9c62437e | ||
|
72b4d91d2e | ||
|
ee6003be87 | ||
|
4716dac874 | ||
|
0e72c315a0 | ||
|
4937519d51 | ||
|
63469ed8f7 | ||
|
22556a7bbf | ||
|
c4cbc54484 | ||
|
7a4758a6a2 | ||
|
995a9238b3 | ||
|
5296af94d2 | ||
|
0d342bac51 | ||
|
832d33ce9d | ||
|
c3cab37d7e | ||
|
e58d1bf974 | ||
|
90b6324563 | ||
|
43d3463d5d | ||
|
e64b7a3ab2 | ||
|
1af05797d7 | ||
|
9a8de23858 | ||
|
5b3d968634 | ||
|
300b81bfcb | ||
|
0a6ae664bd | ||
|
c4df5cf9a6 | ||
|
e6a7be922b | ||
|
1525c2530e | ||
|
016e4c0193 | ||
|
be642610ae | ||
|
02f61832c0 | ||
|
dabf393920 | ||
|
e4679c1b78 | ||
|
62f52ebb3a | ||
|
e8e25b80d1 | ||
|
2822c0890a | ||
|
c45d6b2017 | ||
|
8d4dd88bf9 | ||
|
3c9464eea4 | ||
|
5b12627e14 | ||
|
9caf5c05e7 | ||
|
50889c0f94 | ||
|
99b6a132bc | ||
|
e6a675e6ec | ||
|
1bc6509d02 | ||
|
1db9d9f76f | ||
|
8737c35ded | ||
|
e8ed4329ea | ||
|
a5f72330fb | ||
|
9bb8176d34 | ||
|
9b45f342ee | ||
|
e4eaf32b4d | ||
|
0c3cae59d9 | ||
|
131acf304b | ||
|
8bd6b60a01 | ||
|
e2eef1256a | ||
|
a0a93e35ae | ||
|
2325bede8a | ||
|
56cd747c8b | ||
|
48098b1675 | ||
|
f6a6704b66 | ||
|
5e3e8fcdb9 | ||
|
0949c0f326 | ||
|
81f31efaee | ||
|
c49e987b1e | ||
|
3572fa22a0 | ||
|
1d1dc8e339 | ||
|
bbfbcb8a5d | ||
|
44d400db83 | ||
|
4a71285c34 | ||
|
6357619ab2 | ||
|
e3611ad209 | ||
|
95d5a0c480 | ||
|
838a420e27 | ||
|
248b7dfa59 | ||
|
0d166f9c7d | ||
|
86c18ea6e0 | ||
|
b7a67f6f74 | ||
|
1c042bbaea | ||
|
899db41a5c | ||
|
2ef6b86ccd | ||
|
342f65eb8e | ||
|
0eae26a7be | ||
|
fd346c6cd1 | ||
|
d3a8a81756 | ||
|
b7f86bffd5 | ||
|
79810b7fcb | ||
|
84c874c53b | ||
|
04d64351a2 | ||
|
c8ac908db2 | ||
|
b57ef4b261 | ||
|
1a5cbc9052 | ||
|
f36225c3e0 | ||
|
97b5a5f469 | ||
|
a1f5245e27 | ||
|
ef8f829513 | ||
|
d9cdb4ae19 | ||
|
451062553e | ||
|
0fcf2b1110 | ||
|
f36f084465 | ||
|
f6468f0af3 | ||
|
439e73d79c | ||
|
0547d9d651 | ||
|
3b34fbd4c4 | ||
|
a05a65e7d2 | ||
|
aec211fc80 | ||
|
1084068a3e | ||
|
e9ae585647 | ||
|
dda76e50a9 | ||
|
37849969ad | ||
|
707349d492 | ||
|
f6a6839a82 | ||
|
79c2f05e7d | ||
|
4dca6d50c0 | ||
|
23fc81f1af | ||
|
d035bfb1a9 | ||
|
80400ab3f8 | ||
|
a338dce83f | ||
|
4108c5d01f | ||
|
9520e5121c | ||
|
e94f782f51 | ||
|
6d1f6a9516 | ||
|
a578749622 | ||
|
0d0dfba203 | ||
|
91a399ae7f | ||
|
2b9eb4437b | ||
|
5bd66241df | ||
|
1bb1ce7475 | ||
|
c305c2cc6b | ||
|
b310047ded | ||
|
bda4957f9b | ||
|
f10d3564e1 | ||
|
bc483b2354 | ||
|
2d7f94cae1 | ||
|
7481563bd9 | ||
|
bd550bb45a | ||
|
b419ca254b | ||
|
7eed008e8e | ||
|
53dfeed6c0 | ||
|
ef513ef7fb | ||
|
7b304cee16 | ||
|
ea7363a8f4 | ||
|
8e1a21cf53 | ||
|
fc773c2784 | ||
|
bfe4ceedd1 | ||
|
ffd8b595d1 | ||
|
1457e40208 | ||
|
1ad53cee1f | ||
|
53f1e5ff5b | ||
|
0e6ef65aec | ||
|
c4ffe74d71 | ||
|
55b2af9464 | ||
|
b4ee420a37 | ||
|
f926351fa8 | ||
|
51f2733b7f | ||
|
fc4a42bbdc | ||
|
89ccd463d7 | ||
|
473d640e88 | ||
|
57499291d3 | ||
|
56e51efeea | ||
|
d22eb261cf | ||
|
fbf2f36cae | ||
|
536778812f | ||
|
e8941d2bd8 | ||
|
d854c8fa5f | ||
|
e9a97127f7 | ||
|
0391e5bcc7 | ||
|
d02a867424 | ||
|
2d820e6204 | ||
|
f9f7697b96 | ||
|
409d7378d9 | ||
|
669fe74096 | ||
|
36d08f8ad3 | ||
|
8a7661df89 | ||
|
6e658a7c04 | ||
|
95046c9047 | ||
|
5beca89412 | ||
|
5ac9d9754e | ||
|
5e7943f19f | ||
|
5a5e1d0401 | ||
|
a88b91b3ed | ||
|
5c4c052fd7 | ||
|
d26c32375e | ||
|
994c695862 | ||
|
f154e94981 | ||
|
b7f8163291 | ||
|
675295692b | ||
|
d1e55a2d1d | ||
|
5e1f0e5e90 | ||
|
bdcccee203 | ||
|
d70dad6807 | ||
|
93e35880ce | ||
|
9b970cf12f | ||
|
022b6b9067 | ||
|
fc07b0ea30 | ||
|
a484adcb30 | ||
|
31679640c0 | ||
|
3469a0a1a0 | ||
|
38c0f800d6 | ||
|
57e37b6c24 | ||
|
07509febcd | ||
|
e593da1c23 | ||
|
7f87a044cd | ||
|
b841b9bd01 | ||
|
ceeba58dc9 | ||
|
a49c6608c9 | ||
|
9903bc8d36 | ||
|
aa4db785f2 | ||
|
00e27503ce | ||
|
f7e3a5ad85 | ||
|
3cade6245e | ||
|
d7aee3b7b6 | ||
|
64fdc4f24b | ||
|
295aa3d60d | ||
|
1d0452c41e | ||
|
96a5e64bb8 | ||
|
595e684658 | ||
|
21dc07c40a | ||
|
cda363a15e | ||
|
9f44452834 | ||
|
7a50dbc00d | ||
|
3162d378ff | ||
|
d129ac1b37 | ||
|
1ea529b9c1 | ||
|
5ffabd56eb | ||
|
d0e1166cce | ||
|
5b75a018b7 | ||
|
c75b560604 | ||
|
a2cda631d9 | ||
|
a7b0b390cd | ||
|
9ff2d34bf8 | ||
|
92ad973729 | ||
|
0be8b22d3c | ||
|
4e1f2f89f6 | ||
|
ac32ed74b4 | ||
|
89f9902053 | ||
|
c6f7ea9f22 | ||
|
747b2b9bf4 | ||
|
23bdc1556d | ||
|
ec03e46ffa | ||
|
47edbd9220 | ||
|
00c83e9ca6 | ||
|
832321f55d | ||
|
941a09b6ac | ||
|
16787c94af | ||
|
28d83b42e1 | ||
|
23c5266076 |
19
.editorconfig
Normal file
19
.editorconfig
Normal file
@@ -0,0 +1,19 @@
|
||||
# editorconfig.org
|
||||
root = true
|
||||
|
||||
[{*.patch,syntax_test_*}]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[{*.c,*.cpp,*.h}]
|
||||
charset = utf-8
|
||||
|
||||
[{*.c,*.cpp,*.h,Makefile}]
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[{*.py,*.conf,*.sublime-project}]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
4
.github/FUNDING.yml
vendored
4
.github/FUNDING.yml
vendored
@@ -1 +1,3 @@
|
||||
custom: http://www.thinkyhead.com/donate-to-marlin
|
||||
github: [thinkyhead]
|
||||
patreon: thinkyhead
|
||||
custom: ["http://www.thinkyhead.com/donate-to-marlin"]
|
||||
|
7
.github/workflows/bad-target.md
vendored
Normal file
7
.github/workflows/bad-target.md
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
Thanks for your contribution! Unfortunately we can't accept PRs directed at release branches. We make patches to the bugfix branches and only later do we push them out as releases.
|
||||
|
||||
Please redo this PR starting with the `bugfix-2.0.x` branch and be careful to target `bugfix-2.0.x` when resubmitting the PR.
|
||||
|
||||
It may help to set your fork's default branch to `bugfix-2.0.x`.
|
||||
|
||||
See [this page](http://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions.
|
34
.github/workflows/bump-date.yml
vendored
Normal file
34
.github/workflows/bump-date.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
#
|
||||
# bump-date.yml
|
||||
# Bump the distribution date once per day
|
||||
#
|
||||
|
||||
name: Bump Distribution Date
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
bump_date:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out bugfix-2.0.x
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: bugfix-2.0.x
|
||||
|
||||
- name: Bump Distribution Date
|
||||
run: |
|
||||
# Inline Bump Script
|
||||
[[ "$GITHUB_REPOSITORY" == "MarlinFirmware/Marlin" ]] || exit 0
|
||||
DIST=$( date +"%Y-%m-%d" )
|
||||
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
|
||||
git config user.name "${GITHUB_ACTOR}" && \
|
||||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
|
||||
git add . && \
|
||||
git commit -m "[cron] Bump distribution date ($DIST)" && \
|
||||
git push
|
27
.github/workflows/check-pr.yml
vendored
Normal file
27
.github/workflows/check-pr.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
#
|
||||
# comment-pr.yml
|
||||
# Add a comment to any PR directed to a release branch
|
||||
#
|
||||
|
||||
name: PR Bad Target
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- 1.0.x
|
||||
- 1.1.x
|
||||
- 2.0.x
|
||||
|
||||
jobs:
|
||||
bad_target:
|
||||
|
||||
name: PR Bad Target
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: harupy/comment-on-pr@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
filename: bad-target.md
|
103
.github/workflows/test-builds.yml
vendored
Normal file
103
.github/workflows/test-builds.yml
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
#
|
||||
# test-builds.yml
|
||||
# Do test builds to catch compile errors
|
||||
#
|
||||
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- bugfix-2.0.x
|
||||
- dev-2.1.x
|
||||
paths-ignore:
|
||||
- config/**
|
||||
- data/**
|
||||
- docs/**
|
||||
- '**/*.md'
|
||||
|
||||
jobs:
|
||||
test_builds:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
test-platform:
|
||||
# Base Environments
|
||||
|
||||
- DUE
|
||||
- esp32
|
||||
- linux_native
|
||||
- megaatmega2560
|
||||
- teensy31
|
||||
- teensy35
|
||||
- SAMD51_grandcentral_m4
|
||||
|
||||
# Extended AVR Environments
|
||||
|
||||
- FYSETC_F6_13
|
||||
- megaatmega1280
|
||||
- rambo
|
||||
- sanguino_atmega1284p
|
||||
- sanguino_atmega644p
|
||||
|
||||
# Extended STM32 Environments
|
||||
|
||||
- STM32F103RC_bigtree
|
||||
- STM32F103RC_bigtree_USB
|
||||
- STM32F103RE_bigtree
|
||||
- STM32F103RE_bigtree_USB
|
||||
- STM32F103RC_fysetc
|
||||
- jgaurora_a5s_a1
|
||||
- STM32F103VE_longer
|
||||
- STM32F407VE_black
|
||||
- BIGTREE_SKR_PRO
|
||||
- mks_robin
|
||||
- ARMED
|
||||
- FYSETC_S6
|
||||
|
||||
# Put lengthy tests last
|
||||
|
||||
- LPC1768
|
||||
- LPC1769
|
||||
|
||||
# STM32 with non-STM framework. both broken for now. they should use HAL_STM32 which is working.
|
||||
|
||||
#- STM32F4
|
||||
#- STM32F7
|
||||
|
||||
# Non-working environment tests
|
||||
|
||||
#- BIGTREE_BTT002
|
||||
#- at90usb1286_cdc
|
||||
#- at90usb1286_dfu
|
||||
#- STM32F103CB_malyan
|
||||
#- mks_robin_lite
|
||||
#- mks_robin_mini
|
||||
#- mks_robin_nano
|
||||
|
||||
steps:
|
||||
|
||||
- name: Select Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax.
|
||||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
||||
|
||||
- name: Install PlatformIO
|
||||
run: |
|
||||
pip install -U https://github.com/platformio/platformio-core/archive/master.zip
|
||||
platformio update
|
||||
|
||||
- name: Check out the PR
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Run ${{ matrix.test-platform }} Tests
|
||||
run: |
|
||||
# Inline tests script
|
||||
[[ "$GITHUB_REPOSITORY" == "MarlinFirmware/Marlin" ]] || exit 0
|
||||
chmod +x buildroot/bin/*
|
||||
chmod +x buildroot/share/tests/*
|
||||
export PATH=./buildroot/bin/:./buildroot/share/tests/:${PATH}
|
||||
run_tests . ${{ matrix.test-platform }}
|
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Marlin 3D Printer Firmware
|
||||
# Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
# Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
#
|
||||
# Based on Sprinter and grbl.
|
||||
# Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -146,6 +146,9 @@ Marlin/*/*/readme.txt
|
||||
Marlin/*/*/*/readme.txt
|
||||
Marlin/*/*/*/*/readme.txt
|
||||
|
||||
# Secure Credentials
|
||||
Configuration_Secure.h
|
||||
|
||||
#Visual Studio
|
||||
*.sln
|
||||
*.vcxproj
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -36,7 +36,7 @@
|
||||
* Advanced settings can be found in Configuration_adv.h
|
||||
*
|
||||
*/
|
||||
#define CONFIGURATION_H_VERSION 020000
|
||||
#define CONFIGURATION_H_VERSION 020004
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
@@ -143,7 +143,7 @@
|
||||
// @section extruder
|
||||
|
||||
// This defines the number of extruders
|
||||
// :[1, 2, 3, 4, 5, 6]
|
||||
// :[1, 2, 3, 4, 5, 6, 7, 8]
|
||||
#define EXTRUDERS 1
|
||||
|
||||
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
|
||||
@@ -360,7 +360,8 @@
|
||||
* -1 : thermocouple with AD595
|
||||
* 0 : not used
|
||||
* 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
|
||||
* 331 : (3.3V scaled thermistor 1 table)
|
||||
* 331 : (3.3V scaled thermistor 1 table for MEGA)
|
||||
* 332 : (3.3V scaled thermistor 1 table for DUE)
|
||||
* 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
|
||||
* 3 : Mendel-parts thermistor (4.7k pullup)
|
||||
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
|
||||
@@ -378,7 +379,8 @@
|
||||
* 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
|
||||
* 15 : 100k thermistor calibration for JGAurora A5 hotend
|
||||
* 18 : ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327
|
||||
* 20 : Pt100 with circuit in the Ultimainboard V2.x
|
||||
* 20 : Pt100 with circuit in the Ultimainboard V2.x with 5v excitation (AVR)
|
||||
* 21 : Pt100 with circuit in the Ultimainboard V2.x with 3.3v excitation (STM32 \ LPC176x....)
|
||||
* 201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x
|
||||
* 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
|
||||
* 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup
|
||||
@@ -411,7 +413,10 @@
|
||||
#define TEMP_SENSOR_3 0
|
||||
#define TEMP_SENSOR_4 0
|
||||
#define TEMP_SENSOR_5 0
|
||||
#define TEMP_SENSOR_6 0
|
||||
#define TEMP_SENSOR_7 0
|
||||
#define TEMP_SENSOR_BED 0
|
||||
#define TEMP_SENSOR_PROBE 0
|
||||
#define TEMP_SENSOR_CHAMBER 0
|
||||
|
||||
// Dummy thermistor constant temperature readings, for use with 998 and 999
|
||||
@@ -439,6 +444,8 @@
|
||||
#define HEATER_3_MINTEMP 5
|
||||
#define HEATER_4_MINTEMP 5
|
||||
#define HEATER_5_MINTEMP 5
|
||||
#define HEATER_6_MINTEMP 5
|
||||
#define HEATER_7_MINTEMP 5
|
||||
#define BED_MINTEMP 5
|
||||
|
||||
// Above this temperature the heater will be switched off.
|
||||
@@ -450,6 +457,8 @@
|
||||
#define HEATER_3_MAXTEMP 275
|
||||
#define HEATER_4_MAXTEMP 275
|
||||
#define HEATER_5_MAXTEMP 275
|
||||
#define HEATER_6_MAXTEMP 275
|
||||
#define HEATER_7_MAXTEMP 275
|
||||
#define BED_MAXTEMP 150
|
||||
|
||||
//===========================================================================
|
||||
@@ -654,12 +663,13 @@
|
||||
*
|
||||
* A4988 is assumed for unspecified drivers.
|
||||
*
|
||||
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
|
||||
* Options: A4988, A5984, DRV8825, LV8729, L6470, L6474, POWERSTEP01,
|
||||
* TB6560, TB6600, TMC2100,
|
||||
* TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE,
|
||||
* TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE,
|
||||
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
|
||||
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
|
||||
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
|
||||
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'L6474', 'POWERSTEP01', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
|
||||
*/
|
||||
//#define X_DRIVER_TYPE A4988
|
||||
//#define Y_DRIVER_TYPE A4988
|
||||
@@ -668,12 +678,15 @@
|
||||
//#define Y2_DRIVER_TYPE A4988
|
||||
//#define Z2_DRIVER_TYPE A4988
|
||||
//#define Z3_DRIVER_TYPE A4988
|
||||
//#define Z4_DRIVER_TYPE A4988
|
||||
//#define E0_DRIVER_TYPE A4988
|
||||
//#define E1_DRIVER_TYPE A4988
|
||||
//#define E2_DRIVER_TYPE A4988
|
||||
//#define E3_DRIVER_TYPE A4988
|
||||
//#define E4_DRIVER_TYPE A4988
|
||||
//#define E5_DRIVER_TYPE A4988
|
||||
//#define E6_DRIVER_TYPE A4988
|
||||
//#define E7_DRIVER_TYPE A4988
|
||||
|
||||
// Enable this feature if all enabled endstop pins are interrupt-capable.
|
||||
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
|
||||
@@ -903,6 +916,13 @@
|
||||
#define Z_PROBE_RETRACT_X X_MAX_POS
|
||||
#endif
|
||||
|
||||
// Duet Smart Effector (for delta printers) - https://bit.ly/2ul5U7J
|
||||
// When the pin is defined you can use M672 to set/reset the probe sensivity.
|
||||
//#define DUET_SMART_EFFECTOR
|
||||
#if ENABLED(DUET_SMART_EFFECTOR)
|
||||
#define SMART_EFFECTOR_MOD_PIN -1 // Connect a GPIO pin to the Smart Effector MOD pin
|
||||
#endif
|
||||
|
||||
//
|
||||
// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
|
||||
//
|
||||
@@ -929,7 +949,8 @@
|
||||
*/
|
||||
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
|
||||
|
||||
// Certain types of probes need to stay away from edges
|
||||
// Most probes should stay away from the edges of the bed, but
|
||||
// with NOZZLE_AS_PROBE this can be negative for a wider probing area.
|
||||
#define MIN_PROBE_EDGE 10
|
||||
|
||||
// X and Y axis travel speed (mm/m) between probes
|
||||
@@ -1039,15 +1060,19 @@
|
||||
#define INVERT_E3_DIR false
|
||||
#define INVERT_E4_DIR false
|
||||
#define INVERT_E5_DIR false
|
||||
#define INVERT_E6_DIR false
|
||||
#define INVERT_E7_DIR false
|
||||
|
||||
// @section homing
|
||||
|
||||
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
|
||||
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
|
||||
|
||||
//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
|
||||
//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
|
||||
|
||||
//#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
|
||||
// Be sure you have this distance over your Z_MAX_POS in case.
|
||||
//#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
|
||||
// Be sure to have this much clearance over your Z_MAX_POS to prevent grinding.
|
||||
|
||||
//#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing Z
|
||||
|
||||
// Direction of endstops when homing; 1=MAX, -1=MIN
|
||||
// :[-1,1]
|
||||
@@ -1209,6 +1234,7 @@
|
||||
#define MESH_TEST_HOTEND_TEMP 205 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_BED_TEMP 60 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
|
||||
#define G26_XY_FEEDRATE 20 // (mm/s) Feedrate for XY Moves for the G26 Mesh Validation Tool.
|
||||
#define G26_RETRACT_MULTIPLIER 1.0 // G26 Q (retraction) used by default between mesh test elements.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1288,10 +1314,10 @@
|
||||
//#define LEVEL_BED_CORNERS
|
||||
|
||||
#if ENABLED(LEVEL_BED_CORNERS)
|
||||
#define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
|
||||
#define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners
|
||||
#define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points
|
||||
//#define LEVEL_CENTER_TOO // Move to the center after the last corner
|
||||
#define LEVEL_CORNERS_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets
|
||||
#define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points
|
||||
#define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Z height of nozzle between leveling points
|
||||
//#define LEVEL_CENTER_TOO // Move to the center after the last corner
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1424,11 +1450,6 @@
|
||||
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
|
||||
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
|
||||
|
||||
//
|
||||
// M100 Free Memory Watcher
|
||||
//
|
||||
//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
|
||||
|
||||
//
|
||||
// G20/G21 Inch mode support
|
||||
//
|
||||
@@ -1519,9 +1540,10 @@
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1) }
|
||||
#define NOZZLE_CLEAN_END_POINT { 100, 60, (Z_MIN_POS + 1) }
|
||||
// Specify positions for each tool as { { X, Y, Z }, { X, Y, Z } }
|
||||
// Dual hotend system may use { { -20, (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }, { 420, (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }}
|
||||
#define NOZZLE_CLEAN_START_POINT { { 30, 30, (Z_MIN_POS + 1) } }
|
||||
#define NOZZLE_CLEAN_END_POINT { { 100, 60, (Z_MIN_POS + 1) } }
|
||||
|
||||
// Circular pattern radius
|
||||
#define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
|
||||
@@ -1942,10 +1964,11 @@
|
||||
// FYSETC variant of the MINI12864 graphic controller with SD support
|
||||
// https://wiki.fysetc.com/Mini12864_Panel/
|
||||
//
|
||||
//#define FYSETC_MINI_12864_X_X // Type C/D/E/F. No tunable RGB Backlight by default
|
||||
//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on)
|
||||
//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight
|
||||
//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight
|
||||
//#define FYSETC_MINI_12864_X_X // Type C/D/E/F. No tunable RGB Backlight by default
|
||||
//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on)
|
||||
//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight
|
||||
//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight
|
||||
//#define FYSETC_GENERIC_12864_1_1 // Larger display with basic ON/OFF backlight.
|
||||
|
||||
//
|
||||
// Factory display for Creality CR-10
|
||||
@@ -1956,6 +1979,11 @@
|
||||
//
|
||||
//#define CR10_STOCKDISPLAY
|
||||
|
||||
//
|
||||
// Ender-2 OEM display, a variant of the MKS_MINI_12864
|
||||
//
|
||||
//#define ENDER2_STOCKDISPLAY
|
||||
|
||||
//
|
||||
// ANET and Tronxy Graphical Controller
|
||||
//
|
||||
@@ -2024,9 +2052,11 @@
|
||||
//=============================================================================
|
||||
|
||||
//
|
||||
// DGUS Touch Display with DWIN OS
|
||||
// DGUS Touch Display with DWIN OS. (Choose one.)
|
||||
//
|
||||
//#define DGUS_LCD
|
||||
//#define DGUS_LCD_UI_ORIGIN
|
||||
//#define DGUS_LCD_UI_FYSETC
|
||||
//#define DGUS_LCD_UI_HIPRECY
|
||||
|
||||
//
|
||||
// Touch-screen LCD for Malyan M200 printers
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -31,7 +31,7 @@
|
||||
* Basic settings can be found in Configuration.h
|
||||
*
|
||||
*/
|
||||
#define CONFIGURATION_ADV_H_VERSION 020000
|
||||
#define CONFIGURATION_ADV_H_VERSION 020004
|
||||
|
||||
// @section temperature
|
||||
|
||||
@@ -78,6 +78,18 @@
|
||||
#define HOTEND5_BETA 3950 // Beta value
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_6 == 1000
|
||||
#define HOTEND6_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
|
||||
#define HOTEND6_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
|
||||
#define HOTEND6_BETA 3950 // Beta value
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_7 == 1000
|
||||
#define HOTEND7_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
|
||||
#define HOTEND7_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
|
||||
#define HOTEND7_BETA 3950 // Beta value
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_BED == 1000
|
||||
#define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
|
||||
#define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
|
||||
@@ -165,28 +177,28 @@
|
||||
* Thermal Protection parameters for the bed are just as above for hotends.
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_BED)
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* As described above, except for the bed (M140/M190/M303).
|
||||
*/
|
||||
#define WATCH_BED_TEMP_PERIOD 60 // Seconds
|
||||
#define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
|
||||
#define WATCH_BED_TEMP_PERIOD 60 // Seconds
|
||||
#define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Thermal Protection parameters for the heated chamber.
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_CHAMBER)
|
||||
#define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* Heated chamber watch settings (M141/M191).
|
||||
*/
|
||||
#define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds
|
||||
#define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius
|
||||
#define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds
|
||||
#define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
#if ENABLED(PIDTEMP)
|
||||
@@ -368,7 +380,7 @@
|
||||
* FAST_PWM_FAN_FREQUENCY [undefined by default]
|
||||
* Set this to your desired frequency.
|
||||
* If left undefined this defaults to F = F_CPU/(2*255*1)
|
||||
* ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
|
||||
* i.e., F = 31.4kHz on 16MHz microcontrollers or F = 39.2kHz on 20MHz microcontrollers.
|
||||
* These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
|
||||
* NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior.
|
||||
*
|
||||
@@ -479,7 +491,7 @@
|
||||
//#define X_DUAL_ENDSTOPS
|
||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||
#define X2_USE_ENDSTOP _XMAX_
|
||||
#define X_DUAL_ENDSTOPS_ADJUSTMENT 0
|
||||
#define X2_ENDSTOP_ADJUSTMENT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -489,27 +501,28 @@
|
||||
//#define Y_DUAL_ENDSTOPS
|
||||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||
#define Y2_USE_ENDSTOP _YMAX_
|
||||
#define Y_DUAL_ENDSTOPS_ADJUSTMENT 0
|
||||
#define Y2_ENDSTOP_ADJUSTMENT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//#define Z_DUAL_STEPPER_DRIVERS
|
||||
#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
|
||||
//#define Z_DUAL_ENDSTOPS
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#define Z_DUAL_ENDSTOPS_ADJUSTMENT 0
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
// For Z set the number of stepper drivers
|
||||
//
|
||||
#define NUM_Z_STEPPER_DRIVERS 1 // (1-4) Z options change based on how many
|
||||
|
||||
//#define Z_TRIPLE_STEPPER_DRIVERS
|
||||
#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
|
||||
//#define Z_TRIPLE_ENDSTOPS
|
||||
#if ENABLED(Z_TRIPLE_ENDSTOPS)
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#define Z3_USE_ENDSTOP _YMAX_
|
||||
#define Z_TRIPLE_ENDSTOPS_ADJUSTMENT2 0
|
||||
#define Z_TRIPLE_ENDSTOPS_ADJUSTMENT3 0
|
||||
#if NUM_Z_STEPPER_DRIVERS > 1
|
||||
//#define Z_MULTI_ENDSTOPS
|
||||
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#define Z2_ENDSTOP_ADJUSTMENT 0
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
||||
#define Z3_USE_ENDSTOP _YMAX_
|
||||
#define Z3_ENDSTOP_ADJUSTMENT 0
|
||||
#endif
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
||||
#define Z4_USE_ENDSTOP _ZMAX_
|
||||
#define Z4_ENDSTOP_ADJUSTMENT 0
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -655,11 +668,37 @@
|
||||
*/
|
||||
//#define Z_STEPPER_AUTO_ALIGN
|
||||
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
|
||||
// Define probe X and Y positions for Z1, Z2 [, Z3]
|
||||
#define Z_STEPPER_ALIGN_XY { { 10, 190 }, { 100, 10 }, { 190, 190 } }
|
||||
// Define probe X and Y positions for Z1, Z2 [, Z3 [, Z4]]
|
||||
// If not defined, probe limits will be used.
|
||||
// Override with 'M422 S<index> X<pos> Y<pos>'
|
||||
//#define Z_STEPPER_ALIGN_XY { { 10, 190 }, { 100, 10 }, { 190, 190 } }
|
||||
|
||||
/**
|
||||
* Orientation for the automatically-calculated probe positions.
|
||||
* Override Z stepper align points with 'M422 S<index> X<pos> Y<pos>'
|
||||
*
|
||||
* 2 Steppers: (0) (1)
|
||||
* | | 2 |
|
||||
* | 1 2 | |
|
||||
* | | 1 |
|
||||
*
|
||||
* 3 Steppers: (0) (1) (2) (3)
|
||||
* | 3 | 1 | 2 1 | 2 |
|
||||
* | | 3 | | 3 |
|
||||
* | 1 2 | 2 | 3 | 1 |
|
||||
*
|
||||
* 4 Steppers: (0) (1) (2) (3)
|
||||
* | 4 3 | 1 4 | 2 1 | 3 2 |
|
||||
* | | | | |
|
||||
* | 1 2 | 2 3 | 3 4 | 4 1 |
|
||||
*
|
||||
*/
|
||||
#ifndef Z_STEPPER_ALIGN_XY
|
||||
//#define Z_STEPPERS_ORIENTATION 0
|
||||
#endif
|
||||
|
||||
// Provide Z stepper positions for more rapid convergence in bed alignment.
|
||||
// Currently requires triple stepper drivers.
|
||||
// Requires triple stepper drivers (i.e., set NUM_Z_STEPPER_DRIVERS to 3)
|
||||
//#define Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS
|
||||
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
// Define Stepper XY positions for Z1, Z2, Z3 corresponding to
|
||||
@@ -667,23 +706,16 @@
|
||||
// Define one position per Z stepper in stepper driver order.
|
||||
#define Z_STEPPER_ALIGN_STEPPER_XY { { 210.7, 102.5 }, { 152.6, 220.0 }, { 94.5, 102.5 } }
|
||||
#else
|
||||
// Amplification factor. Used to scale the correction step up or down.
|
||||
// In case the stepper (spindle) position is further out than the test point.
|
||||
// Use a value > 1. NOTE: This may cause instability
|
||||
#define Z_STEPPER_ALIGN_AMP 1.0
|
||||
// Amplification factor. Used to scale the correction step up or down in case
|
||||
// the stepper (spindle) position is farther out than the test point.
|
||||
#define Z_STEPPER_ALIGN_AMP 1.0 // Use a value > 1.0 NOTE: This may cause instability!
|
||||
#endif
|
||||
|
||||
// Set number of iterations to align
|
||||
#define Z_STEPPER_ALIGN_ITERATIONS 3
|
||||
|
||||
// Enable to restore leveling setup after operation
|
||||
#define RESTORE_LEVELING_AFTER_G34
|
||||
|
||||
// On a 300mm bed a 5% grade would give a misalignment of ~1.5cm
|
||||
#define G34_MAX_GRADE 5 // (%) Maximum incline G34 will handle
|
||||
|
||||
// Stop criterion. If the accuracy is better than this stop iterating early
|
||||
#define Z_STEPPER_ALIGN_ACC 0.02
|
||||
#define G34_MAX_GRADE 5 // (%) Maximum incline that G34 will handle
|
||||
#define Z_STEPPER_ALIGN_ITERATIONS 5 // Number of iterations to apply during alignment
|
||||
#define Z_STEPPER_ALIGN_ACC 0.02 // Stop iterating early if the accuracy is better than this
|
||||
#define RESTORE_LEVELING_AFTER_G34 // Restore leveling after G34 is done?
|
||||
#endif
|
||||
|
||||
// @section motion
|
||||
@@ -806,10 +838,10 @@
|
||||
// probing on a screwhead or hollow washer, probe near the edges.
|
||||
//#define CALIBRATION_MEASURE_AT_TOP_EDGES
|
||||
|
||||
// Define pin which is read during calibration
|
||||
// Define the pin to read during calibration
|
||||
#ifndef CALIBRATION_PIN
|
||||
#define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
|
||||
#define CALIBRATION_PIN_INVERTING false // Set to true to invert the pin
|
||||
//#define CALIBRATION_PIN -1 // Define here to override the default pin
|
||||
#define CALIBRATION_PIN_INVERTING false // Set to true to invert the custom pin
|
||||
//#define CALIBRATION_PIN_PULLDOWN
|
||||
#define CALIBRATION_PIN_PULLUP
|
||||
#endif
|
||||
@@ -1243,6 +1275,44 @@
|
||||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Additional options for DGUS / DWIN displays
|
||||
//
|
||||
#if HAS_DGUS_LCD
|
||||
#define DGUS_SERIAL_PORT 2
|
||||
#define DGUS_BAUDRATE 115200
|
||||
|
||||
#define DGUS_RX_BUFFER_SIZE 128
|
||||
#define DGUS_TX_BUFFER_SIZE 48
|
||||
//#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS // Fix Rx overrun situation (Currently only for AVR)
|
||||
|
||||
#define DGUS_UPDATE_INTERVAL_MS 500 // (ms) Interval between automatic screen updates
|
||||
#define BOOTSCREEN_TIMEOUT 3000 // (ms) Duration to display the boot screen
|
||||
|
||||
#if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
|
||||
#define DGUS_PRINT_FILENAME // Display the filename during printing
|
||||
#define DGUS_PREHEAT_UI // Display a preheat screen during heatup
|
||||
|
||||
#if ENABLED(DGUS_LCD_UI_FYSETC)
|
||||
//#define DUGS_UI_MOVE_DIS_OPTION // Disabled by default for UI_FYSETC
|
||||
#else
|
||||
#define DUGS_UI_MOVE_DIS_OPTION // Enabled by default for UI_HIPRECY
|
||||
#endif
|
||||
|
||||
#define DGUS_FILAMENT_LOADUNLOAD
|
||||
#if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
|
||||
#define DGUS_FILAMENT_PURGE_LENGTH 10
|
||||
#define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
|
||||
#endif
|
||||
|
||||
#define DGUS_UI_WAITING // Show a "waiting" screen between some screens
|
||||
#if ENABLED(DGUS_UI_WAITING)
|
||||
#define DGUS_UI_WAITING_STATUS 10
|
||||
#define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
|
||||
#endif
|
||||
#endif
|
||||
#endif // HAS_DGUS_LCD
|
||||
|
||||
//
|
||||
// Touch UI for the FTDI Embedded Video Engine (EVE)
|
||||
//
|
||||
@@ -1263,9 +1333,11 @@
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define S6_TFT_PINMAP // FYSETC S6 pin mapping
|
||||
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
// Pins for CS and MOD_RESET (PD) must be chosen
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
@@ -1341,6 +1413,13 @@
|
||||
//#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan
|
||||
#endif
|
||||
|
||||
//
|
||||
// ADC Button Debounce
|
||||
//
|
||||
#if HAS_ADC_BUTTONS
|
||||
#define ADC_BUTTON_DEBOUNCE_DELAY 16 // (ms) Increase if buttons bounce or repeat too fast
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
@@ -1368,6 +1447,7 @@
|
||||
*/
|
||||
//#define BABYSTEPPING
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
//#define INTEGRATED_BABYSTEPPING // EXPERIMENTAL integration of babystepping into the Stepper ISR
|
||||
//#define BABYSTEP_WITHOUT_HOMING
|
||||
//#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
|
||||
#define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
|
||||
@@ -1438,7 +1518,8 @@
|
||||
* Override MIN_PROBE_EDGE for each side of the build plate
|
||||
* Useful to get probe points to exact positions on targets or
|
||||
* to allow leveling to avoid plate clamps on only specific
|
||||
* sides of the bed.
|
||||
* sides of the bed. With NOZZLE_AS_PROBE negative values are
|
||||
* allowed, to permit probing outside the bed.
|
||||
*
|
||||
* If you are replacing the prior *_PROBE_BED_POSITION options,
|
||||
* LEFT and FRONT values in most cases will map directly over
|
||||
@@ -1483,18 +1564,57 @@
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Thermal Probe Compensation
|
||||
* Probe measurements are adjusted to compensate for temperature distortion.
|
||||
* Use G76 to calibrate this feature. Use M871 to set values manually.
|
||||
* For a more detailed explanation of the process see G76_M871.cpp.
|
||||
*/
|
||||
#if HAS_BED_PROBE && TEMP_SENSOR_PROBE && TEMP_SENSOR_BED
|
||||
// Enable thermal first layer compensation using bed and probe temperatures
|
||||
#define PROBE_TEMP_COMPENSATION
|
||||
|
||||
// Add additional compensation depending on hotend temperature
|
||||
// Note: this values cannot be calibrated and have to be set manually
|
||||
#if ENABLED(PROBE_TEMP_COMPENSATION)
|
||||
// Max temperature that can be reached by heated bed.
|
||||
// This is required only for the calibration process.
|
||||
#define PTC_MAX_BED_TEMP 110
|
||||
|
||||
// Park position to wait for probe cooldown
|
||||
#define PTC_PARK_POS_X 0.0F
|
||||
#define PTC_PARK_POS_Y 0.0F
|
||||
#define PTC_PARK_POS_Z 100.0F
|
||||
|
||||
// Probe position to probe and wait for probe to reach target temperature
|
||||
#define PTC_PROBE_POS_X 90.0F
|
||||
#define PTC_PROBE_POS_Y 100.0F
|
||||
|
||||
// Enable additional compensation using hotend temperature
|
||||
// Note: this values cannot be calibrated automatically but have to be set manually
|
||||
//#define USE_TEMP_EXT_COMPENSATION
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// @section extras
|
||||
|
||||
//
|
||||
// G60/G61 Position Save and Return
|
||||
//
|
||||
//#define SAVED_POSITIONS 1 // Each saved position slot costs 12 bytes
|
||||
|
||||
//
|
||||
// G2/G3 Arc Support
|
||||
//
|
||||
#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
|
||||
#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
|
||||
#if ENABLED(ARC_SUPPORT)
|
||||
#define MM_PER_ARC_SEGMENT 1 // Length of each arc segment
|
||||
#define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle
|
||||
#define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections
|
||||
//#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
|
||||
//#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes
|
||||
#define MM_PER_ARC_SEGMENT 1 // (mm) Length (or minimum length) of each arc segment
|
||||
//#define ARC_SEGMENTS_PER_R 1 // Max segment length, MM_PER = Min
|
||||
#define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle
|
||||
//#define ARC_SEGMENTS_PER_SEC 50 // Use feedrate to choose segment length (with MM_PER_ARC_SEGMENT as the minimum)
|
||||
#define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections
|
||||
//#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
|
||||
//#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes
|
||||
#endif
|
||||
|
||||
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||
@@ -1691,6 +1811,9 @@
|
||||
// Z raise distance for tool-change, as needed for some extruders
|
||||
#define TOOLCHANGE_ZRAISE 2 // (mm)
|
||||
//#define TOOLCHANGE_NO_RETURN // Never return to the previous position on tool-change
|
||||
#if ENABLED(TOOLCHANGE_NO_RETURN)
|
||||
//#define EVENT_GCODE_AFTER_TOOLCHANGE "G12X" // G-code to run after tool-change is complete
|
||||
#endif
|
||||
|
||||
// Retract and prime filament on tool-change
|
||||
//#define TOOLCHANGE_FILAMENT_SWAP
|
||||
@@ -1754,6 +1877,7 @@
|
||||
#define FILAMENT_UNLOAD_PURGE_RETRACT 13 // (mm) Unload initial retract length.
|
||||
#define FILAMENT_UNLOAD_PURGE_DELAY 5000 // (ms) Delay for the filament to cool after retract.
|
||||
#define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
|
||||
#define FILAMENT_UNLOAD_PURGE_FEEDRATE 25 // (mm/s) feedrate to purge before unload
|
||||
|
||||
#define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
|
||||
#define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
|
||||
@@ -1818,6 +1942,12 @@
|
||||
#define Z3_MICROSTEPS 16
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_Z4(TMC26X)
|
||||
#define Z4_MAX_CURRENT 1000
|
||||
#define Z4_SENSE_RESISTOR 91
|
||||
#define Z4_MICROSTEPS 16
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E0(TMC26X)
|
||||
#define E0_MAX_CURRENT 1000
|
||||
#define E0_SENSE_RESISTOR 91
|
||||
@@ -1854,6 +1984,18 @@
|
||||
#define E5_MICROSTEPS 16
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E6(TMC26X)
|
||||
#define E6_MAX_CURRENT 1000
|
||||
#define E6_SENSE_RESISTOR 91
|
||||
#define E6_MICROSTEPS 16
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E7(TMC26X)
|
||||
#define E7_MAX_CURRENT 1000
|
||||
#define E7_SENSE_RESISTOR 91
|
||||
#define E7_MICROSTEPS 16
|
||||
#endif
|
||||
|
||||
#endif // TMC26X
|
||||
|
||||
// @section tmc_smart
|
||||
@@ -1935,6 +2077,14 @@
|
||||
#define Z3_CHAIN_POS -1
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(Z4)
|
||||
#define Z4_CURRENT 800
|
||||
#define Z4_CURRENT_HOME Z4_CURRENT
|
||||
#define Z4_MICROSTEPS 16
|
||||
#define Z4_RSENSE 0.11
|
||||
#define Z4_CHAIN_POS -1
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(E0)
|
||||
#define E0_CURRENT 800
|
||||
#define E0_MICROSTEPS 16
|
||||
@@ -1977,6 +2127,20 @@
|
||||
#define E5_CHAIN_POS -1
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(E6)
|
||||
#define E6_CURRENT 800
|
||||
#define E6_MICROSTEPS 16
|
||||
#define E6_RSENSE 0.11
|
||||
#define E6_CHAIN_POS -1
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(E7)
|
||||
#define E7_CURRENT 800
|
||||
#define E7_MICROSTEPS 16
|
||||
#define E7_RSENSE 0.11
|
||||
#define E7_CHAIN_POS -1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
|
||||
* The default pins can be found in your board's pins file.
|
||||
@@ -1994,6 +2158,8 @@
|
||||
//#define E3_CS_PIN -1
|
||||
//#define E4_CS_PIN -1
|
||||
//#define E5_CS_PIN -1
|
||||
//#define E6_CS_PIN -1
|
||||
//#define E7_CS_PIN -1
|
||||
|
||||
/**
|
||||
* Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
|
||||
@@ -2024,12 +2190,15 @@
|
||||
#define Y2_SLAVE_ADDRESS 0
|
||||
#define Z2_SLAVE_ADDRESS 0
|
||||
#define Z3_SLAVE_ADDRESS 0
|
||||
#define Z4_SLAVE_ADDRESS 0
|
||||
#define E0_SLAVE_ADDRESS 0
|
||||
#define E1_SLAVE_ADDRESS 0
|
||||
#define E2_SLAVE_ADDRESS 0
|
||||
#define E3_SLAVE_ADDRESS 0
|
||||
#define E4_SLAVE_ADDRESS 0
|
||||
#define E5_SLAVE_ADDRESS 0
|
||||
#define E6_SLAVE_ADDRESS 0
|
||||
#define E7_SLAVE_ADDRESS 0
|
||||
|
||||
/**
|
||||
* Software enable
|
||||
@@ -2099,12 +2268,15 @@
|
||||
#define Z_HYBRID_THRESHOLD 3
|
||||
#define Z2_HYBRID_THRESHOLD 3
|
||||
#define Z3_HYBRID_THRESHOLD 3
|
||||
#define Z4_HYBRID_THRESHOLD 3
|
||||
#define E0_HYBRID_THRESHOLD 30
|
||||
#define E1_HYBRID_THRESHOLD 30
|
||||
#define E2_HYBRID_THRESHOLD 30
|
||||
#define E3_HYBRID_THRESHOLD 30
|
||||
#define E4_HYBRID_THRESHOLD 30
|
||||
#define E5_HYBRID_THRESHOLD 30
|
||||
#define E6_HYBRID_THRESHOLD 30
|
||||
#define E7_HYBRID_THRESHOLD 30
|
||||
|
||||
/**
|
||||
* Use StallGuard2 to home / probe X, Y, Z.
|
||||
@@ -2176,12 +2348,12 @@
|
||||
|
||||
#endif // HAS_TRINAMIC
|
||||
|
||||
// @section L6470
|
||||
// @section L64XX
|
||||
|
||||
/**
|
||||
* L6470 Stepper Driver options
|
||||
* L64XX Stepper Driver options
|
||||
*
|
||||
* Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
|
||||
* Arduino-L6470 library (0.8.0 or higher) is required.
|
||||
* https://github.com/ameyer/Arduino-L6470
|
||||
*
|
||||
* Requires the following to be defined in your pins_YOUR_BOARD file
|
||||
@@ -2189,114 +2361,160 @@
|
||||
* L6470_CHAIN_MISO_PIN
|
||||
* L6470_CHAIN_MOSI_PIN
|
||||
* L6470_CHAIN_SS_PIN
|
||||
* L6470_RESET_CHAIN_PIN (optional)
|
||||
* ENABLE_RESET_L64XX_CHIPS(Q) where Q is 1 to enable and 0 to reset
|
||||
*/
|
||||
#if HAS_DRIVER(L6470)
|
||||
|
||||
#if HAS_L64XX
|
||||
|
||||
//#define L6470_CHITCHAT // Display additional status info
|
||||
|
||||
#if AXIS_DRIVER_TYPE_X(L6470)
|
||||
#define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
|
||||
#define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
|
||||
#define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
|
||||
#define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
|
||||
#define X_CHAIN_POS -1 // Position in SPI chain. (<=0 : Not in chain. 1 : Nearest MOSI)
|
||||
#if AXIS_IS_L64XX(X)
|
||||
#define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128) - L6474 max is 16
|
||||
#define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current
|
||||
// L6470 & L6474 - VALID: 375 x (1 - 16) - 6A max - rounds down
|
||||
// POWERSTEP01: VALID: 1000 x (1 - 32) - 32A max - rounds down
|
||||
#define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
|
||||
// L6470 & L6474 - VALID: 31.25 * (1-128) - 4A max - rounds down
|
||||
// POWERSTEP01: VALID: 200 x (1 - 32) - 6.4A max - rounds down
|
||||
// L6474 - STALLCURRENT setting is used to set the nominal (TVAL) current
|
||||
#define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper - not used by L6474
|
||||
#define X_CHAIN_POS -1 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
|
||||
#define X_SLEW_RATE 1 // 0-3, Slew 0 is slowest, 3 is fastest
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_X2(L6470)
|
||||
#if AXIS_IS_L64XX(X2)
|
||||
#define X2_MICROSTEPS 128
|
||||
#define X2_OVERCURRENT 2000
|
||||
#define X2_STALLCURRENT 1500
|
||||
#define X2_MAX_VOLTAGE 127
|
||||
#define X2_CHAIN_POS -1
|
||||
#define X2_SLEW_RATE 1
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_Y(L6470)
|
||||
#if AXIS_IS_L64XX(Y)
|
||||
#define Y_MICROSTEPS 128
|
||||
#define Y_OVERCURRENT 2000
|
||||
#define Y_STALLCURRENT 1500
|
||||
#define Y_MAX_VOLTAGE 127
|
||||
#define Y_CHAIN_POS -1
|
||||
#define Y_SLEW_RATE 1
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_Y2(L6470)
|
||||
#if AXIS_IS_L64XX(Y2)
|
||||
#define Y2_MICROSTEPS 128
|
||||
#define Y2_OVERCURRENT 2000
|
||||
#define Y2_STALLCURRENT 1500
|
||||
#define Y2_MAX_VOLTAGE 127
|
||||
#define Y2_CHAIN_POS -1
|
||||
#define Y2_SLEW_RATE 1
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_Z(L6470)
|
||||
#if AXIS_IS_L64XX(Z)
|
||||
#define Z_MICROSTEPS 128
|
||||
#define Z_OVERCURRENT 2000
|
||||
#define Z_STALLCURRENT 1500
|
||||
#define Z_MAX_VOLTAGE 127
|
||||
#define Z_CHAIN_POS -1
|
||||
#define Z_SLEW_RATE 1
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_Z2(L6470)
|
||||
#if AXIS_IS_L64XX(Z2)
|
||||
#define Z2_MICROSTEPS 128
|
||||
#define Z2_OVERCURRENT 2000
|
||||
#define Z2_STALLCURRENT 1500
|
||||
#define Z2_MAX_VOLTAGE 127
|
||||
#define Z2_CHAIN_POS -1
|
||||
#define Z2_SLEW_RATE 1
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_Z3(L6470)
|
||||
#if AXIS_IS_L64XX(Z3)
|
||||
#define Z3_MICROSTEPS 128
|
||||
#define Z3_OVERCURRENT 2000
|
||||
#define Z3_STALLCURRENT 1500
|
||||
#define Z3_MAX_VOLTAGE 127
|
||||
#define Z3_CHAIN_POS -1
|
||||
#define Z3_SLEW_RATE 1
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E0(L6470)
|
||||
#if AXIS_IS_L64XX(Z4)
|
||||
#define Z4_MICROSTEPS 128
|
||||
#define Z4_OVERCURRENT 2000
|
||||
#define Z4_STALLCURRENT 1500
|
||||
#define Z4_MAX_VOLTAGE 127
|
||||
#define Z4_CHAIN_POS -1
|
||||
#define Z4_SLEW_RATE 1
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_L64XX(E0)
|
||||
#define E0_MICROSTEPS 128
|
||||
#define E0_OVERCURRENT 2000
|
||||
#define E0_STALLCURRENT 1500
|
||||
#define E0_MAX_VOLTAGE 127
|
||||
#define E0_CHAIN_POS -1
|
||||
#define E0_SLEW_RATE 1
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E1(L6470)
|
||||
#if AXIS_IS_L64XX(E1)
|
||||
#define E1_MICROSTEPS 128
|
||||
#define E1_OVERCURRENT 2000
|
||||
#define E1_STALLCURRENT 1500
|
||||
#define E1_MAX_VOLTAGE 127
|
||||
#define E1_CHAIN_POS -1
|
||||
#define E1_SLEW_RATE 1
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E2(L6470)
|
||||
#if AXIS_IS_L64XX(E2)
|
||||
#define E2_MICROSTEPS 128
|
||||
#define E2_OVERCURRENT 2000
|
||||
#define E2_STALLCURRENT 1500
|
||||
#define E2_MAX_VOLTAGE 127
|
||||
#define E2_CHAIN_POS -1
|
||||
#define E2_SLEW_RATE 1
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E3(L6470)
|
||||
#if AXIS_IS_L64XX(E3)
|
||||
#define E3_MICROSTEPS 128
|
||||
#define E3_OVERCURRENT 2000
|
||||
#define E3_STALLCURRENT 1500
|
||||
#define E3_MAX_VOLTAGE 127
|
||||
#define E3_CHAIN_POS -1
|
||||
#define E3_SLEW_RATE 1
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E4(L6470)
|
||||
#if AXIS_IS_L64XX(E4)
|
||||
#define E4_MICROSTEPS 128
|
||||
#define E4_OVERCURRENT 2000
|
||||
#define E4_STALLCURRENT 1500
|
||||
#define E4_MAX_VOLTAGE 127
|
||||
#define E4_CHAIN_POS -1
|
||||
#define E4_SLEW_RATE 1
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E5(L6470)
|
||||
#if AXIS_IS_L64XX(E5)
|
||||
#define E5_MICROSTEPS 128
|
||||
#define E5_OVERCURRENT 2000
|
||||
#define E5_STALLCURRENT 1500
|
||||
#define E5_MAX_VOLTAGE 127
|
||||
#define E5_CHAIN_POS -1
|
||||
#define E5_SLEW_RATE 1
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_L64XX(E6)
|
||||
#define E6_MICROSTEPS 128
|
||||
#define E6_OVERCURRENT 2000
|
||||
#define E6_STALLCURRENT 1500
|
||||
#define E6_MAX_VOLTAGE 127
|
||||
#define E6_CHAIN_POS -1
|
||||
#define E6_SLEW_RATE 1
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_L64XX(E7)
|
||||
#define E7_MICROSTEPS 128
|
||||
#define E7_OVERCURRENT 2000
|
||||
#define E7_STALLCURRENT 1500
|
||||
#define E7_MAX_VOLTAGE 127
|
||||
#define E7_CHAIN_POS -1
|
||||
#define E7_SLEW_RATE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -2308,7 +2526,7 @@
|
||||
* I not present or I0 or I1 - X, Y, Z or E0
|
||||
* I2 - X2, Y2, Z2 or E1
|
||||
* I3 - Z3 or E3
|
||||
* I4 - E4
|
||||
* I4 - Z4 or E4
|
||||
* I5 - E5
|
||||
* M916 - Increase drive level until get thermal warning
|
||||
* M917 - Find minimum current thresholds
|
||||
@@ -2322,7 +2540,15 @@
|
||||
//#define L6470_STOP_ON_ERROR
|
||||
#endif
|
||||
|
||||
#endif // L6470
|
||||
#endif // HAS_L64XX
|
||||
|
||||
// @section i2cbus
|
||||
|
||||
//
|
||||
// I2C Master ID for LPC176x LCD and Digital Current control
|
||||
// Does not apply to other peripherals based on the Wire library.
|
||||
//
|
||||
//#define I2C_MASTER_ID 1 // Set a value from 0 to 2
|
||||
|
||||
/**
|
||||
* TWI/I2C BUS
|
||||
@@ -2352,10 +2578,10 @@
|
||||
* echo:i2c-reply: from:99 bytes:5 data:hello
|
||||
*/
|
||||
|
||||
// @section i2cbus
|
||||
|
||||
//#define EXPERIMENTAL_I2CBUS
|
||||
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave
|
||||
#if ENABLED(EXPERIMENTAL_I2CBUS)
|
||||
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave
|
||||
#endif
|
||||
|
||||
// @section extras
|
||||
|
||||
@@ -2384,6 +2610,20 @@
|
||||
|
||||
// Duration to hold the switch or keep CHDK_PIN high
|
||||
//#define PHOTO_SWITCH_MS 50 // (ms) (M240 D)
|
||||
|
||||
/**
|
||||
* PHOTO_PULSES_US may need adjustment depending on board and camera model.
|
||||
* Pin must be running at 48.4kHz.
|
||||
* Be sure to use a PHOTOGRAPH_PIN which can rise and fall quick enough.
|
||||
* (e.g., MKS SBase temp sensor pin was too slow, so used P1.23 on J8.)
|
||||
*
|
||||
* Example pulse data for Nikon: https://bit.ly/2FKD0Aq
|
||||
* IR Wiring: https://git.io/JvJf7
|
||||
*/
|
||||
//#define PHOTO_PULSES_US { 2000, 27850, 400, 1580, 400, 3580, 400 } // (µs) Durations for each 48.4kHz oscillation
|
||||
#ifdef PHOTO_PULSES_US
|
||||
#define PHOTO_PULSE_DELAY_US 13 // (µs) Approximate duration of each HIGH and LOW pulse in the oscillation
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -2547,6 +2787,10 @@
|
||||
*/
|
||||
#define FASTER_GCODE_PARSER
|
||||
|
||||
#if ENABLED(FASTER_GCODE_PARSER)
|
||||
//#define GCODE_QUOTED_STRINGS // Support for quoted string parameters
|
||||
#endif
|
||||
|
||||
/**
|
||||
* CNC G-code options
|
||||
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
|
||||
@@ -2723,7 +2967,11 @@
|
||||
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
|
||||
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
|
||||
|
||||
// Use M119 to find reasonable values after connecting your hardware:
|
||||
//#define INVERT_JOY_X // Enable if X direction is reversed
|
||||
//#define INVERT_JOY_Y // Enable if Y direction is reversed
|
||||
//#define INVERT_JOY_Z // Enable if Z direction is reversed
|
||||
|
||||
// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
|
||||
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
|
||||
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
|
||||
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
|
||||
@@ -2778,12 +3026,23 @@
|
||||
/**
|
||||
* WiFi Support (Espressif ESP32 WiFi)
|
||||
*/
|
||||
//#define WIFISUPPORT
|
||||
#if ENABLED(WIFISUPPORT)
|
||||
#define WIFI_SSID "Wifi SSID"
|
||||
#define WIFI_PWD "Wifi Password"
|
||||
//#define WEBSUPPORT // Start a webserver with auto-discovery
|
||||
//#define OTASUPPORT // Support over-the-air firmware updates
|
||||
//#define WIFISUPPORT // Marlin embedded WiFi managenent
|
||||
//#define ESP3D_WIFISUPPORT // ESP3D Library WiFi management (https://github.com/luc-github/ESP3DLib)
|
||||
|
||||
#if EITHER(WIFISUPPORT, ESP3D_WIFISUPPORT)
|
||||
//#define WEBSUPPORT // Start a webserver (which may include auto-discovery)
|
||||
//#define OTASUPPORT // Support over-the-air firmware updates
|
||||
//#define WIFI_CUSTOM_COMMAND // Accept feature config commands (e.g., WiFi ESP3D) from the host
|
||||
|
||||
/**
|
||||
* To set a default WiFi SSID / Password, create a file called Configuration_Secure.h with
|
||||
* the following defines, customized for your network. This specific file is excluded via
|
||||
* .gitignore to prevent it from accidentally leaking to the public.
|
||||
*
|
||||
* #define WIFI_SSID "WiFi SSID"
|
||||
* #define WIFI_PWD "WiFi Password"
|
||||
*/
|
||||
//#include "Configuration_Secure.h" // External file with WiFi SSID / Password
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -2855,9 +3114,14 @@
|
||||
|
||||
// @section develop
|
||||
|
||||
/**
|
||||
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
|
||||
*/
|
||||
//
|
||||
// M100 Free Memory Watcher to debug memory usage
|
||||
//
|
||||
//#define M100_FREE_MEMORY_WATCHER
|
||||
|
||||
//
|
||||
// M43 - display pin status, toggle pins, watch pins, watch endstops & toggle LED, test servo probe
|
||||
//
|
||||
//#define PINS_DEBUGGING
|
||||
|
||||
// Enable Marlin dev mode which adds some special commands
|
||||
|
141
Marlin/Makefile
141
Marlin/Makefile
@@ -180,88 +180,93 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1105)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1106)
|
||||
# MKS v1.5 with Allegro A4982 stepper drivers
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1107)
|
||||
# MKS BASE 1.0 with Heroic HR4982 stepper drivers
|
||||
# MKS v1.6 with Allegro A4982 stepper drivers
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1108)
|
||||
# MKS GEN v1.3 or 1.4
|
||||
|
||||
# MKS BASE 1.0 with Heroic HR4982 stepper drivers
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1109)
|
||||
# MKS GEN L
|
||||
# MKS GEN v1.3 or 1.4
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1110)
|
||||
# zrib V2.0 control board (Chinese knock off RAMPS replica)
|
||||
# MKS GEN L
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1111)
|
||||
# BigTreeTech or BIQU KFB2.0
|
||||
# zrib V2.0 control board (Chinese knock off RAMPS replica)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1112)
|
||||
# Felix 2.0+ Electronics Board (RAMPS like)
|
||||
# BigTreeTech or BIQU KFB2.0
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
|
||||
# Invent-A-Part RigidBoard
|
||||
# Felix 2.0+ Electronics Board (RAMPS like)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1114)
|
||||
# Invent-A-Part RigidBoard V2
|
||||
# Invent-A-Part RigidBoard
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1115)
|
||||
# Sainsmart 2-in-1 board
|
||||
# Invent-A-Part RigidBoard V2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1116)
|
||||
# Ultimaker
|
||||
# Sainsmart 2-in-1 board
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1117)
|
||||
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
||||
# Ultimaker
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1118)
|
||||
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
|
||||
MCU ?= atmega1280
|
||||
|
||||
# Azteeg X3
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
|
||||
# Azteeg X3 Pro
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
|
||||
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
||||
# Azteeg X3 Pro
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
|
||||
# Rumba
|
||||
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1122)
|
||||
# Raise3D Rumba
|
||||
# Rumba
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
|
||||
# Rapide Lite RL200 Rumba
|
||||
# Raise3D Rumba
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1124)
|
||||
# Formbot T-Rex 2 Plus
|
||||
# Rapide Lite RL200 Rumba
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1125)
|
||||
# Formbot T-Rex 3
|
||||
# Formbot T-Rex 2 Plus
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1126)
|
||||
# Formbot Raptor
|
||||
# Formbot T-Rex 3
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1127)
|
||||
# Formbot Raptor 2
|
||||
# Formbot Raptor
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1128)
|
||||
# bq ZUM Mega 3D
|
||||
# Formbot Raptor 2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1129)
|
||||
# MakeBoard Mini v2.1.2 is a control board sold by MicroMake
|
||||
# bq ZUM Mega 3D
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1130)
|
||||
# TriGorilla Anycubic version 1.3 based on RAMPS EFB
|
||||
# MakeBoard Mini v2.1.2 is a control board sold by MicroMake
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1131)
|
||||
# TriGorilla Anycubic version 1.4 based on RAMPS EFB
|
||||
# TriGorilla Anycubic version 1.3 based on RAMPS EFB
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1132)
|
||||
# TriGorilla Anycubic version 1.4 Rev 1.1
|
||||
# TriGorilla Anycubic version 1.4 based on RAMPS EFB
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1133)
|
||||
# Creality: Ender-4, CR-8
|
||||
# TriGorilla Anycubic version 1.4 Rev 1.1
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1134)
|
||||
# Creality: CR10S, CR20, CR-X
|
||||
# Creality: Ender-4, CR-8
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
|
||||
# Dagoma F5
|
||||
# Creality: CR10S, CR20, CR-X
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
|
||||
# FYSETC F6
|
||||
# Dagoma F5
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
|
||||
# Duplicator i3 Plus
|
||||
# FYSETC F6 1.3
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
|
||||
# VORON
|
||||
# FYSETC F6 1.5
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1139)
|
||||
# TRONXY V3 1.0
|
||||
# Duplicator i3 Plus
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
|
||||
# Z-Bolt X Series
|
||||
# VORON
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
|
||||
# TT OSCAR
|
||||
# TRONXY V3 1.0
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
|
||||
# Overlord/Overlord Pro
|
||||
# Z-Bolt X Series
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
|
||||
# ADIMLab Gantry v1
|
||||
# TT OSCAR
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
|
||||
# ADIMLab Gantry v2
|
||||
# Overlord/Overlord Pro
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
|
||||
# BIQU Tango V1
|
||||
# ADIMLab Gantry v1
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
|
||||
# MKS GEN L V2
|
||||
# ADIMLab Gantry v2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
|
||||
# BIQU Tango V1
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
|
||||
# MKS GEN L V2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1149)
|
||||
|
||||
#
|
||||
# RAMBo and derivatives
|
||||
@@ -784,11 +789,11 @@ sym: $(BUILD_DIR)/$(TARGET).sym
|
||||
# Do not try to reset an Arduino if it's not one
|
||||
upload: $(BUILD_DIR)/$(TARGET).hex
|
||||
ifeq (${AVRDUDE_PROGRAMMER}, arduino)
|
||||
stty hup < $(UPLOAD_PORT); true
|
||||
stty hup < $(UPLOAD_PORT); true
|
||||
endif
|
||||
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)
|
||||
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)
|
||||
ifeq (${AVRDUDE_PROGRAMMER}, arduino)
|
||||
stty -hup < $(UPLOAD_PORT); true
|
||||
stty -hup < $(UPLOAD_PORT); true
|
||||
endif
|
||||
|
||||
# Display size of file.
|
||||
@@ -796,10 +801,10 @@ HEXSIZE = $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex
|
||||
ELFSIZE = $(SIZE) $(SIZE_FLAGS) $(BUILD_DIR)/$(TARGET).elf; \
|
||||
$(SIZE) $(BUILD_DIR)/$(TARGET).elf
|
||||
sizebefore:
|
||||
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi
|
||||
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi
|
||||
|
||||
sizeafter: build
|
||||
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
|
||||
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
|
||||
|
||||
|
||||
# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
|
||||
@@ -811,71 +816,71 @@ COFFCONVERT=$(OBJCOPY) --debugging \
|
||||
|
||||
|
||||
coff: $(BUILD_DIR)/$(TARGET).elf
|
||||
$(COFFCONVERT) -O coff-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
|
||||
$(COFFCONVERT) -O coff-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
|
||||
|
||||
|
||||
extcoff: $(TARGET).elf
|
||||
$(COFFCONVERT) -O coff-ext-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
|
||||
$(COFFCONVERT) -O coff-ext-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
|
||||
|
||||
|
||||
.SUFFIXES: .elf .hex .eep .lss .sym .bin
|
||||
.PRECIOUS: .o
|
||||
|
||||
.elf.hex:
|
||||
$(Pecho) " COPY $@"
|
||||
$P $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
|
||||
$(Pecho) " COPY $@"
|
||||
$P $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
|
||||
|
||||
.elf.bin:
|
||||
$(Pecho) " COPY $@"
|
||||
$P $(OBJCOPY) -O binary -R .eeprom $< $@
|
||||
$(Pecho) " COPY $@"
|
||||
$P $(OBJCOPY) -O binary -R .eeprom $< $@
|
||||
|
||||
.elf.eep:
|
||||
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
|
||||
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
|
||||
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
|
||||
|
||||
# Create extended listing file from ELF output file.
|
||||
.elf.lss:
|
||||
$(OBJDUMP) -h -S $< > $@
|
||||
$(OBJDUMP) -h -S $< > $@
|
||||
|
||||
# Create a symbol table from ELF output file.
|
||||
.elf.sym:
|
||||
$(NM) -n $< > $@
|
||||
$(NM) -n $< > $@
|
||||
|
||||
# Link: create ELF output file from library.
|
||||
|
||||
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
|
||||
$(Pecho) " CXX $@"
|
||||
$P $(CC) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
|
||||
$(Pecho) " CXX $@"
|
||||
$P $(CC) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
|
||||
|
||||
# Object files that were found in "src" will be stored in $(BUILD_DIR)
|
||||
# in directories that mirror the structure of "src"
|
||||
|
||||
$(BUILD_DIR)/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
|
||||
$(Pecho) " CC $<"
|
||||
$P $(CC) -MMD -c $(ALL_CFLAGS) $(CWARN) $< -o $@
|
||||
$(Pecho) " CC $<"
|
||||
$P $(CC) -MMD -c $(ALL_CFLAGS) $(CWARN) $< -o $@
|
||||
|
||||
$(BUILD_DIR)/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
|
||||
$(Pecho) " CXX $<"
|
||||
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(CXXWARN) $< -o $@
|
||||
$(Pecho) " CXX $<"
|
||||
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(CXXWARN) $< -o $@
|
||||
|
||||
# Object files for Arduino libs will be created in $(BUILD_DIR)/arduino
|
||||
|
||||
$(BUILD_DIR)/arduino/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
|
||||
$(Pecho) " CC $<"
|
||||
$P $(CC) -MMD -c $(ALL_CFLAGS) $(LIBWARN) $< -o $@
|
||||
$(Pecho) " CC $<"
|
||||
$P $(CC) -MMD -c $(ALL_CFLAGS) $(LIBWARN) $< -o $@
|
||||
|
||||
$(BUILD_DIR)/arduino/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
|
||||
$(Pecho) " CXX $<"
|
||||
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(LIBWARN) $< -o $@
|
||||
$(Pecho) " CXX $<"
|
||||
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(LIBWARN) $< -o $@
|
||||
|
||||
$(BUILD_DIR)/arduino/%.o: %.S $(MAKEFILE)
|
||||
$(Pecho) " CXX $<"
|
||||
$P $(CXX) -MMD -c $(ALL_ASFLAGS) $< -o $@
|
||||
$(Pecho) " CXX $<"
|
||||
$P $(CXX) -MMD -c $(ALL_ASFLAGS) $< -o $@
|
||||
|
||||
# Target: clean project.
|
||||
clean:
|
||||
$(Pecho) " RMDIR $(BUILD_DIR)/"
|
||||
$P rm -rf $(BUILD_DIR)
|
||||
$(Pecho) " RMDIR $(BUILD_DIR)/"
|
||||
$P rm -rf $(BUILD_DIR)
|
||||
|
||||
|
||||
.PHONY: all build elf hex eep lss sym program coff extcoff clean depend sizebefore sizeafter
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -28,7 +28,7 @@
|
||||
/**
|
||||
* Marlin release version identifier
|
||||
*/
|
||||
//#define SHORT_BUILD_VERSION "2.0.x"
|
||||
//#define SHORT_BUILD_VERSION "2.0.4.2"
|
||||
|
||||
/**
|
||||
* Verbose version identifier which should contain a reference to the location
|
||||
@@ -41,7 +41,7 @@
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
//#define STRING_DISTRIBUTION_DATE "2019-07-10"
|
||||
//#define STRING_DISTRIBUTION_DATE "2020-01-31"
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -53,8 +53,8 @@
|
||||
//#define analogInputToDigitalPin(IO) IO
|
||||
|
||||
#ifndef CRITICAL_SECTION_START
|
||||
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli()
|
||||
#define CRITICAL_SECTION_END SREG = _sreg
|
||||
#define CRITICAL_SECTION_START() unsigned char _sreg = SREG; cli()
|
||||
#define CRITICAL_SECTION_END() SREG = _sreg
|
||||
#endif
|
||||
#define ISRS_ENABLED() TEST(SREG, SREG_I)
|
||||
#define ENABLE_ISRS() sei()
|
||||
@@ -91,24 +91,37 @@ typedef int8_t pin_t;
|
||||
#define NUM_SERIAL 1
|
||||
#else
|
||||
#if !WITHIN(SERIAL_PORT, -1, 3)
|
||||
#error "SERIAL_PORT must be from -1 to 3"
|
||||
#error "SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
||||
#endif
|
||||
|
||||
#define MYSERIAL0 customizedSerial1
|
||||
|
||||
#ifdef SERIAL_PORT_2
|
||||
#if !WITHIN(SERIAL_PORT_2, -1, 3)
|
||||
#error "SERIAL_PORT_2 must be from -1 to 3"
|
||||
#error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
|
||||
#elif SERIAL_PORT_2 == SERIAL_PORT
|
||||
#error "SERIAL_PORT_2 must be different than SERIAL_PORT"
|
||||
#error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
|
||||
#endif
|
||||
#define NUM_SERIAL 2
|
||||
#define MYSERIAL1 customizedSerial2
|
||||
#define NUM_SERIAL 2
|
||||
#else
|
||||
#define NUM_SERIAL 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DGUS_SERIAL_PORT
|
||||
#if !WITHIN(DGUS_SERIAL_PORT, -1, 3)
|
||||
#error "DGUS_SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
||||
#elif DGUS_SERIAL_PORT == SERIAL_PORT
|
||||
#error "DGUS_SERIAL_PORT must be different than SERIAL_PORT. Please update your configuration."
|
||||
#elif defined(SERIAL_PORT_2) && DGUS_SERIAL_PORT == SERIAL_PORT_2
|
||||
#error "DGUS_SERIAL_PORT must be different than SERIAL_PORT_2. Please update your configuration."
|
||||
#endif
|
||||
#define DGUS_SERIAL internalDgusSerial
|
||||
|
||||
#define DGUS_SERIAL_GET_TX_BUFFER_FREE DGUS_SERIAL.get_tx_buffer_free
|
||||
#endif
|
||||
|
||||
// ------------------------
|
||||
// Public functions
|
||||
// ------------------------
|
||||
@@ -345,9 +358,9 @@ void TIMER0_COMPB_vect_bottom()
|
||||
|
||||
// ADC
|
||||
#ifdef DIDR2
|
||||
#define HAL_ANALOG_SELECT(pin) do{ if (pin < 8) SBI(DIDR0, pin); else SBI(DIDR2, pin & 0x07); }while(0)
|
||||
#define HAL_ANALOG_SELECT(ind) do{ if (ind < 8) SBI(DIDR0, ind); else SBI(DIDR2, ind & 0x07); }while(0)
|
||||
#else
|
||||
#define HAL_ANALOG_SELECT(pin) do{ SBI(DIDR0, pin); }while(0)
|
||||
#define HAL_ANALOG_SELECT(ind) SBI(DIDR0, ind);
|
||||
#endif
|
||||
|
||||
inline void HAL_adc_init() {
|
||||
@@ -358,11 +371,11 @@ inline void HAL_adc_init() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#define SET_ADMUX_ADCSRA(pin) ADMUX = _BV(REFS0) | (pin & 0x07); SBI(ADCSRA, ADSC)
|
||||
#define SET_ADMUX_ADCSRA(ch) ADMUX = _BV(REFS0) | (ch & 0x07); SBI(ADCSRA, ADSC)
|
||||
#ifdef MUX5
|
||||
#define HAL_START_ADC(pin) if (pin > 7) ADCSRB = _BV(MUX5); else ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
|
||||
#define HAL_START_ADC(ch) if (ch > 7) ADCSRB = _BV(MUX5); else ADCSRB = 0; SET_ADMUX_ADCSRA(ch)
|
||||
#else
|
||||
#define HAL_START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
|
||||
#define HAL_START_ADC(ch) ADCSRB = 0; SET_ADMUX_ADCSRA(ch)
|
||||
#endif
|
||||
|
||||
#define HAL_ADC_RESOLUTION 10
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -41,7 +41,7 @@
|
||||
#if !defined(USBCON) && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
|
||||
|
||||
#include "MarlinSerial.h"
|
||||
#include "../../Marlin.h"
|
||||
#include "../../MarlinCore.h"
|
||||
|
||||
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_r MarlinSerial<Cfg>::rx_buffer = { 0, 0, { 0 } };
|
||||
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_t MarlinSerial<Cfg>::tx_buffer = { 0 };
|
||||
@@ -757,6 +757,33 @@
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef DGUS_SERIAL_PORT
|
||||
|
||||
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.
|
||||
h = tx_buffer.head; // next pos for queue.
|
||||
int ret = t - h - 1;
|
||||
if (ret < 0) ret += Cfg::TX_SIZE + 1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ISR(SERIAL_REGNAME(USART,DGUS_SERIAL_PORT,_RX_vect)) {
|
||||
MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>>::store_rxd_char();
|
||||
}
|
||||
|
||||
ISR(SERIAL_REGNAME(USART,DGUS_SERIAL_PORT,_UDRE_vect)) {
|
||||
MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>>::_tx_udr_empty_irq();
|
||||
}
|
||||
|
||||
// Preinstantiate
|
||||
template class MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>>;
|
||||
|
||||
// Instantiate
|
||||
MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>> internalDgusSerial;
|
||||
|
||||
#endif
|
||||
|
||||
// For AT90USB targets use the UART for BT interfacing
|
||||
#if defined(USBCON) && ENABLED(BLUETOOTH)
|
||||
HardwareSerial bluetoothSerial;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -217,6 +217,9 @@
|
||||
static ring_buffer_pos_t available();
|
||||
static void write(const uint8_t c);
|
||||
static void flushTX();
|
||||
#ifdef DGUS_SERIAL_PORT
|
||||
static ring_buffer_pos_t get_tx_buffer_free();
|
||||
#endif
|
||||
|
||||
FORCE_INLINE static uint8_t dropped() { return Cfg::DROPPED_RX ? rx_dropped_bytes : 0; }
|
||||
FORCE_INLINE static uint8_t buffer_overruns() { return Cfg::RX_OVERRUNS ? rx_buffer_overruns : 0; }
|
||||
@@ -292,6 +295,23 @@
|
||||
extern MarlinSerial<MarlinInternalSerialCfg<INTERNAL_SERIAL_PORT>> internalSerial;
|
||||
#endif
|
||||
|
||||
#ifdef DGUS_SERIAL_PORT
|
||||
template <uint8_t serial>
|
||||
struct MarlinInternalSerialCfg {
|
||||
static constexpr int PORT = serial;
|
||||
static constexpr unsigned int RX_SIZE = 128;
|
||||
static constexpr unsigned int TX_SIZE = 48;
|
||||
static constexpr bool XONOFF = false;
|
||||
static constexpr bool EMERGENCYPARSER = false;
|
||||
static constexpr bool DROPPED_RX = false;
|
||||
static constexpr bool RX_OVERRUNS = bDGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS;
|
||||
static constexpr bool RX_FRAMING_ERRORS = false;
|
||||
static constexpr bool MAX_RX_QUEUED = false;
|
||||
};
|
||||
|
||||
extern MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>> internalDgusSerial;
|
||||
#endif
|
||||
|
||||
// Use the UART for Bluetooth in AT90USB configurations
|
||||
#if defined(USBCON) && ENABLED(BLUETOOTH)
|
||||
extern HardwareSerial bluetoothSerial;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -232,6 +232,22 @@ void setup_endstop_interrupts() {
|
||||
pciSetup(Z3_MIN_PIN);
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_Z4_MAX
|
||||
#if (digitalPinToInterrupt(Z4_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||
_ATTACH(Z4_MAX_PIN);
|
||||
#else
|
||||
static_assert(digitalPinHasPCICR(Z4_MAX_PIN), "Z4_MAX_PIN is not interrupt-capable");
|
||||
pciSetup(Z4_MAX_PIN);
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_Z4_MIN
|
||||
#if (digitalPinToInterrupt(Z4_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||
_ATTACH(Z4_MIN_PIN);
|
||||
#else
|
||||
static_assert(digitalPinHasPCICR(Z4_MIN_PIN), "Z4_MIN_PIN is not interrupt-capable");
|
||||
pciSetup(Z4_MIN_PIN);
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_Z_MIN_PROBE_PIN
|
||||
#if (digitalPinToInterrupt(Z_MIN_PROBE_PIN) != NOT_AN_INTERRUPT)
|
||||
_ATTACH(Z_MIN_PROBE_PIN);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -279,14 +279,25 @@ enum ClockSource2 : char {
|
||||
*/
|
||||
|
||||
// Determine which harware PWMs are already in use
|
||||
#define _PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == E6_AUTO_FAN_PIN || P == E7_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN)
|
||||
#if PIN_EXISTS(CONTROLLER_FAN)
|
||||
#define PWM_CHK_FAN_B(P) (P == CONTROLLER_FAN_PIN || P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN)
|
||||
#define PWM_CHK_FAN_B(P) (_PWM_CHK_FAN_B(P) || P == CONTROLLER_FAN_PIN)
|
||||
#else
|
||||
#define PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN)
|
||||
#define PWM_CHK_FAN_B(P) _PWM_CHK_FAN_B(P)
|
||||
#endif
|
||||
|
||||
#if ANY_PIN(FAN, FAN1, FAN2)
|
||||
#if PIN_EXISTS(FAN2)
|
||||
#if ANY_PIN(FAN, FAN1, FAN2, FAN3, FAN4, FAN5, FAN6, FAN7)
|
||||
#if PIN_EXISTS(FAN7)
|
||||
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN || P == FAN4_PIN || P == FAN5_PIN || P == FAN6_PIN || P == FAN7_PIN)
|
||||
#elif PIN_EXISTS(FAN6)
|
||||
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN || P == FAN4_PIN || P == FAN5_PIN || P == FAN6_PIN)
|
||||
#elif PIN_EXISTS(FAN5)
|
||||
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN || P == FAN4_PIN || P == FAN5_PIN)
|
||||
#elif PIN_EXISTS(FAN4)
|
||||
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN || P == FAN4_PIN)
|
||||
#elif PIN_EXISTS(FAN3)
|
||||
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN)
|
||||
#elif PIN_EXISTS(FAN2)
|
||||
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN)
|
||||
#elif PIN_EXISTS(FAN1)
|
||||
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -59,3 +59,7 @@
|
||||
#if HAS_TRINAMIC && ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
|
||||
#error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
|
||||
#endif
|
||||
|
||||
#if HAS_TMC_SW_SERIAL && ENABLED(MONITOR_DRIVER_STATUS)
|
||||
#error "MONITOR_DRIVER_STATUS causes performance issues when used with SoftwareSerial-connected drivers. Disable MONITOR_DRIVER_STATUS or use hardware serial to continue."
|
||||
#endif
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* 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
|
||||
@@ -231,11 +231,10 @@ static void err_is_interrupt() { SERIAL_ECHOPGM(" compare interrupt enabled"
|
||||
static void err_prob_interrupt() { SERIAL_ECHOPGM(" overflow interrupt enabled"); }
|
||||
static void print_is_also_tied() { SERIAL_ECHOPGM(" is also tied to this pin"); SERIAL_ECHO_SP(14); }
|
||||
|
||||
void com_print(uint8_t N, uint8_t Z) {
|
||||
inline void com_print(const uint8_t N, const uint8_t Z) {
|
||||
const uint8_t *TCCRA = (uint8_t*)TCCR_A(N);
|
||||
SERIAL_ECHOPGM(" COM");
|
||||
SERIAL_CHAR('0' + N);
|
||||
SERIAL_CHAR('A' + Z);
|
||||
SERIAL_CHAR('0' + N, Z);
|
||||
SERIAL_ECHOPAIR(": ", int((*TCCRA >> (6 - Z * 2)) & 0x03));
|
||||
}
|
||||
|
||||
@@ -247,8 +246,7 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N -
|
||||
if (N == 4) WGM |= ((*TCCRB & _BV(WGM_3)) >> 1);
|
||||
|
||||
SERIAL_ECHOPGM(" TIMER");
|
||||
SERIAL_CHAR(T + '0');
|
||||
SERIAL_CHAR(L);
|
||||
SERIAL_CHAR(T + '0', L);
|
||||
SERIAL_ECHO_SP(3);
|
||||
|
||||
if (N == 3) {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* 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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* 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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "watchdog.h"
|
||||
|
||||
#include "../../Marlin.h"
|
||||
#include "../../MarlinCore.h"
|
||||
|
||||
// Initialize watchdog with 8s timeout, if possible. Otherwise, make it 4s.
|
||||
void watchdog_init() {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,3 +1,24 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/* EEPROM emulation over flash with reduced wear
|
||||
*
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -94,8 +94,8 @@ int freeMemory() {
|
||||
// ADC
|
||||
// ------------------------
|
||||
|
||||
void HAL_adc_start_conversion(const uint8_t adc_pin) {
|
||||
HAL_adc_result = analogRead(adc_pin);
|
||||
void HAL_adc_start_conversion(const uint8_t ch) {
|
||||
HAL_adc_result = analogRead(ch);
|
||||
}
|
||||
|
||||
uint16_t HAL_adc_get_result() {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
|
||||
*
|
||||
@@ -56,8 +56,7 @@
|
||||
#ifdef SERIAL_PORT_2
|
||||
#if SERIAL_PORT_2 == SERIAL_PORT
|
||||
#error "SERIAL_PORT_2 must be different from SERIAL_PORT. Please update your configuration."
|
||||
#endif
|
||||
#if SERIAL_PORT_2 == -1
|
||||
#elif SERIAL_PORT_2 == -1
|
||||
#define MYSERIAL1 customizedSerial2
|
||||
#elif SERIAL_PORT_2 == 0
|
||||
#define MYSERIAL1 Serial
|
||||
@@ -75,6 +74,27 @@
|
||||
#define NUM_SERIAL 1
|
||||
#endif
|
||||
|
||||
#ifdef DGUS_SERIAL_PORT
|
||||
#if DGUS_SERIAL_PORT == SERIAL_PORT
|
||||
#error "DGUS_SERIAL_PORT must be different from SERIAL_PORT. Please update your configuration."
|
||||
#elif defined(SERIAL_PORT_2) && DGUS_SERIAL_PORT == SERIAL_PORT_2
|
||||
#error "DGUS_SERIAL_PORT must be different than SERIAL_PORT_2. Please update your configuration."
|
||||
#elif DGUS_SERIAL_PORT == -1
|
||||
#define DGUS_SERIAL internalDgusSerial
|
||||
#elif DGUS_SERIAL_PORT == 0
|
||||
#define DGUS_SERIAL Serial
|
||||
#elif DGUS_SERIAL_PORT == 1
|
||||
#define DGUS_SERIAL Serial1
|
||||
#elif DGUS_SERIAL_PORT == 2
|
||||
#define DGUS_SERIAL Serial2
|
||||
#elif DGUS_SERIAL_PORT == 3
|
||||
#define DGUS_SERIAL Serial3
|
||||
#else
|
||||
#error "DGUS_SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#include "MarlinSerial.h"
|
||||
#include "MarlinSerialUSB.h"
|
||||
|
||||
@@ -99,8 +119,8 @@ typedef int8_t pin_t;
|
||||
//
|
||||
// Interrupts
|
||||
//
|
||||
#define CRITICAL_SECTION_START uint32_t primask = __get_PRIMASK(); __disable_irq()
|
||||
#define CRITICAL_SECTION_END if (!primask) __enable_irq()
|
||||
#define CRITICAL_SECTION_START() uint32_t primask = __get_PRIMASK(); __disable_irq()
|
||||
#define CRITICAL_SECTION_END() if (!primask) __enable_irq()
|
||||
#define ISRS_ENABLED() (!__get_PRIMASK())
|
||||
#define ENABLE_ISRS() __enable_irq()
|
||||
#define DISABLE_ISRS() __disable_irq()
|
||||
@@ -128,16 +148,16 @@ extern uint16_t HAL_adc_result; // result of last ADC conversion
|
||||
#define analogInputToDigitalPin(p) ((p < 12u) ? (p) + 54u : -1)
|
||||
#endif
|
||||
|
||||
#define HAL_ANALOG_SELECT(pin)
|
||||
#define HAL_ANALOG_SELECT(ch)
|
||||
|
||||
inline void HAL_adc_init() {}//todo
|
||||
|
||||
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
||||
#define HAL_START_ADC(ch) HAL_adc_start_conversion(ch)
|
||||
#define HAL_ADC_RESOLUTION 10
|
||||
#define HAL_READ_ADC() HAL_adc_result
|
||||
#define HAL_ADC_READY() true
|
||||
|
||||
void HAL_adc_start_conversion(const uint8_t adc_pin);
|
||||
void HAL_adc_start_conversion(const uint8_t ch);
|
||||
uint16_t HAL_adc_get_result();
|
||||
|
||||
//
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -240,7 +240,7 @@
|
||||
}
|
||||
|
||||
// all the others
|
||||
static uint32_t spiDelayCyclesX4 = (F_CPU) / 1000000; // 4uS => 125khz
|
||||
static uint32_t spiDelayCyclesX4 = (F_CPU) / 1000000; // 4µs => 125khz
|
||||
|
||||
static uint8_t spiTransferX(uint8_t b) { // using Mode 0
|
||||
int bits = 8;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -63,13 +63,13 @@ static pfnISR_Handler* get_relocated_table_addr() {
|
||||
memcpy(&ram_tab, romtab, sizeof(ram_tab));
|
||||
|
||||
// Disable global interrupts
|
||||
CRITICAL_SECTION_START;
|
||||
CRITICAL_SECTION_START();
|
||||
|
||||
// Set the vector table base address to the SRAM copy
|
||||
SCB->VTOR = (uint32_t)(&ram_tab);
|
||||
|
||||
// Reenable interrupts
|
||||
CRITICAL_SECTION_END;
|
||||
CRITICAL_SECTION_END();
|
||||
|
||||
// Return the address of the table
|
||||
return (pfnISR_Handler*)(&ram_tab);
|
||||
@@ -80,7 +80,7 @@ pfnISR_Handler install_isr(IRQn_Type irq, pfnISR_Handler newHandler) {
|
||||
pfnISR_Handler *isrtab = get_relocated_table_addr();
|
||||
|
||||
// Disable global interrupts
|
||||
CRITICAL_SECTION_START;
|
||||
CRITICAL_SECTION_START();
|
||||
|
||||
// Get the original handler
|
||||
pfnISR_Handler oldHandler = isrtab[irq + 16];
|
||||
@@ -89,7 +89,7 @@ pfnISR_Handler install_isr(IRQn_Type irq, pfnISR_Handler newHandler) {
|
||||
isrtab[irq + 16] = newHandler;
|
||||
|
||||
// Reenable interrupts
|
||||
CRITICAL_SECTION_END;
|
||||
CRITICAL_SECTION_END();
|
||||
|
||||
// Return the original one
|
||||
return oldHandler;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "MarlinSerial.h"
|
||||
#include "InterruptVectors.h"
|
||||
#include "../../Marlin.h"
|
||||
#include "../../MarlinCore.h"
|
||||
|
||||
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_r MarlinSerial<Cfg>::rx_buffer = { 0, 0, { 0 } };
|
||||
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_t MarlinSerial<Cfg>::tx_buffer = { 0 };
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
#include <U8glib.h>
|
||||
|
||||
#include "../../../Marlin.h"
|
||||
#include "../../../MarlinCore.h"
|
||||
|
||||
void spiBegin();
|
||||
void spiInit(uint8_t spiRate);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -77,6 +77,12 @@ void setup_endstop_interrupts() {
|
||||
#if HAS_Z3_MIN
|
||||
_ATTACH(Z3_MIN_PIN);
|
||||
#endif
|
||||
#if HAS_Z4_MAX
|
||||
_ATTACH(Z4_MAX_PIN);
|
||||
#endif
|
||||
#if HAS_Z4_MIN
|
||||
_ATTACH(Z4_MIN_PIN);
|
||||
#endif
|
||||
#if HAS_Z_MIN_PROBE_PIN
|
||||
_ATTACH(Z_MIN_PROBE_PIN);
|
||||
#endif
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -55,3 +55,7 @@
|
||||
#if ENABLED(FAST_PWM_FAN)
|
||||
#error "FAST_PWM_FAN is not yet implemented for this platform."
|
||||
#endif
|
||||
|
||||
#if HAS_TMC_SW_SERIAL
|
||||
#error "TMC220x Software Serial is not supported on this platform."
|
||||
#endif
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
|
||||
* Copyright (c) 2016 Victor Perez victor_pv@hotmail.com
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* 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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
|
||||
*
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
@@ -1479,7 +1479,7 @@ static void udd_ctrl_in_sent(void)
|
||||
// The IN data don't must be written in endpoint 0 DPRAM during
|
||||
// a next setup reception in same endpoint 0 DPRAM.
|
||||
// Thereby, an OUT ZLP reception must check before IN data write
|
||||
// and if no OUT ZLP is recevied the data must be written quickly (800us)
|
||||
// and if no OUT ZLP is received the data must be written quickly (800µs)
|
||||
// before an eventually ZLP OUT and SETUP reception
|
||||
flags = cpu_irq_save();
|
||||
if (Is_udd_out_received(0)) {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -23,7 +23,7 @@
|
||||
#ifdef ARDUINO_ARCH_SAM
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../../Marlin.h"
|
||||
#include "../../MarlinCore.h"
|
||||
#include "watchdog.h"
|
||||
|
||||
// Override Arduino runtime to either config or disable the watchdog
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -27,13 +27,10 @@
|
||||
#include <rom/rtc.h>
|
||||
#include <driver/adc.h>
|
||||
#include <esp_adc_cal.h>
|
||||
#include <HardwareSerial.h>
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(WEBSUPPORT)
|
||||
#include "spiffs.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(WIFISUPPORT)
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#include "wifi.h"
|
||||
@@ -41,6 +38,7 @@
|
||||
#include "ota.h"
|
||||
#endif
|
||||
#if ENABLED(WEBSUPPORT)
|
||||
#include "spiffs.h"
|
||||
#include "web.h"
|
||||
#endif
|
||||
#endif
|
||||
@@ -78,31 +76,66 @@ volatile int numPWMUsed = 0,
|
||||
// Public functions
|
||||
// ------------------------
|
||||
|
||||
void HAL_init() {
|
||||
i2s_init();
|
||||
}
|
||||
#if ENABLED(WIFI_CUSTOM_COMMAND)
|
||||
|
||||
bool wifi_custom_command(char * const command_ptr) {
|
||||
#if ENABLED(ESP3D_WIFISUPPORT)
|
||||
return esp3dlib.parse(command_ptr);
|
||||
#else
|
||||
UNUSED(command_ptr);
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void HAL_init() { i2s_init(); }
|
||||
|
||||
void HAL_init_board() {
|
||||
#if ENABLED(WEBSUPPORT)
|
||||
spiffs_init();
|
||||
#endif
|
||||
|
||||
#if ENABLED(WIFISUPPORT)
|
||||
#if ENABLED(ESP3D_WIFISUPPORT)
|
||||
esp3dlib.init();
|
||||
#elif ENABLED(WIFISUPPORT)
|
||||
wifi_init();
|
||||
#if ENABLED(OTASUPPORT)
|
||||
OTA_init();
|
||||
#endif
|
||||
#if ENABLED(WEBSUPPORT)
|
||||
spiffs_init();
|
||||
web_init();
|
||||
#endif
|
||||
server.begin();
|
||||
#endif
|
||||
|
||||
// ESP32 uses a GPIO matrix that allows pins to be assigned to hardware serial ports.
|
||||
// The following code initializes hardware Serial1 and Serial2 to use user-defined pins
|
||||
// if they have been defined.
|
||||
#if defined(HARDWARE_SERIAL1_RX) && defined(HARDWARE_SERIAL1_TX)
|
||||
HardwareSerial Serial1(1);
|
||||
#ifdef TMC_BAUD_RATE // use TMC_BAUD_RATE for Serial1 if defined
|
||||
Serial1.begin(TMC_BAUD_RATE, SERIAL_8N1, HARDWARE_SERIAL1_RX, HARDWARE_SERIAL1_TX);
|
||||
#else // use default BAUDRATE if TMC_BAUD_RATE not defined
|
||||
Serial1.begin(BAUDRATE, SERIAL_8N1, HARDWARE_SERIAL1_RX, HARDWARE_SERIAL1_TX);
|
||||
#endif
|
||||
#endif
|
||||
#if defined(HARDWARE_SERIAL2_RX) && defined(HARDWARE_SERIAL2_TX)
|
||||
HardwareSerial Serial2(2);
|
||||
#ifdef TMC_BAUD_RATE // use TMC_BAUD_RATE for Serial1 if defined
|
||||
Serial2.begin(TMC_BAUD_RATE, SERIAL_8N1, HARDWARE_SERIAL2_RX, HARDWARE_SERIAL2_TX);
|
||||
#else // use default BAUDRATE if TMC_BAUD_RATE not defined
|
||||
Serial2.begin(BAUDRATE, SERIAL_8N1, HARDWARE_SERIAL2_RX, HARDWARE_SERIAL2_TX);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void HAL_idletask() {
|
||||
#if ENABLED(OTASUPPORT)
|
||||
#if BOTH(WIFISUPPORT, OTASUPPORT)
|
||||
OTA_handle();
|
||||
#endif
|
||||
#if ENABLED(ESP3D_WIFISUPPORT)
|
||||
esp3dlib.idletask();
|
||||
#endif
|
||||
}
|
||||
|
||||
void HAL_clear_reset_source() { }
|
||||
@@ -161,6 +194,12 @@ void HAL_adc_init() {
|
||||
#if HAS_TEMP_ADC_5
|
||||
adc1_set_attenuation(get_channel(TEMP_5_PIN), ADC_ATTEN_11db);
|
||||
#endif
|
||||
#if HAS_TEMP_ADC_6
|
||||
adc2_set_attenuation(get_channel(TEMP_6_PIN), ADC_ATTEN_11db);
|
||||
#endif
|
||||
#if HAS_TEMP_ADC_7
|
||||
adc3_set_attenuation(get_channel(TEMP_7_PIN), ADC_ATTEN_11db);
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
adc1_set_attenuation(get_channel(TEMP_BED_PIN), ADC_ATTEN_11db);
|
||||
#endif
|
||||
@@ -183,7 +222,7 @@ void HAL_adc_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void HAL_adc_start_conversion(uint8_t adc_pin) {
|
||||
void HAL_adc_start_conversion(const uint8_t adc_pin) {
|
||||
const adc1_channel_t chan = get_channel(adc_pin);
|
||||
uint32_t mv;
|
||||
esp_adc_cal_get_voltage((adc_channel_t)chan, &characteristics[attenuations[chan]], &mv);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -36,7 +36,14 @@
|
||||
|
||||
#include "timers.h"
|
||||
|
||||
#include "WebSocketSerial.h"
|
||||
#if ENABLED(WIFISUPPORT)
|
||||
#include "WebSocketSerial.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(ESP3D_WIFISUPPORT)
|
||||
#include "esp3dlib.h"
|
||||
#endif
|
||||
|
||||
#include "FlushableHardwareSerial.h"
|
||||
|
||||
// ------------------------
|
||||
@@ -47,20 +54,23 @@ extern portMUX_TYPE spinlock;
|
||||
|
||||
#define MYSERIAL0 flushableSerial
|
||||
|
||||
#if ENABLED(WIFISUPPORT)
|
||||
#if EITHER(WIFISUPPORT, ESP3D_WIFISUPPORT)
|
||||
#if ENABLED(ESP3D_WIFISUPPORT)
|
||||
#define MYSERIAL1 Serial2Socket
|
||||
#else
|
||||
#define MYSERIAL1 webSocketSerial
|
||||
#endif
|
||||
#define NUM_SERIAL 2
|
||||
#define MYSERIAL1 webSocketSerial
|
||||
#else
|
||||
#define NUM_SERIAL 1
|
||||
#endif
|
||||
|
||||
#define CRITICAL_SECTION_START portENTER_CRITICAL(&spinlock)
|
||||
#define CRITICAL_SECTION_END portEXIT_CRITICAL(&spinlock)
|
||||
#define CRITICAL_SECTION_START() portENTER_CRITICAL(&spinlock)
|
||||
#define CRITICAL_SECTION_END() portEXIT_CRITICAL(&spinlock)
|
||||
#define ISRS_ENABLED() (spinlock.owner == portMUX_FREE_VAL)
|
||||
#define ENABLE_ISRS() if (spinlock.owner != portMUX_FREE_VAL) portEXIT_CRITICAL(&spinlock)
|
||||
#define DISABLE_ISRS() portENTER_CRITICAL(&spinlock)
|
||||
|
||||
|
||||
// Fix bug in pgm_read_ptr
|
||||
#undef pgm_read_ptr
|
||||
#define pgm_read_ptr(addr) (*(addr))
|
||||
@@ -115,7 +125,7 @@ void HAL_adc_init();
|
||||
#define HAL_READ_ADC() HAL_adc_result
|
||||
#define HAL_ADC_READY() true
|
||||
|
||||
void HAL_adc_start_conversion(uint8_t adc_pin);
|
||||
void HAL_adc_start_conversion(const uint8_t adc_pin);
|
||||
|
||||
#define GET_PIN_MAP_PIN(index) index
|
||||
#define GET_PIN_MAP_INDEX(pin) pin
|
||||
@@ -127,3 +137,44 @@ void HAL_adc_start_conversion(uint8_t adc_pin);
|
||||
void HAL_idletask();
|
||||
void HAL_init();
|
||||
void HAL_init_board();
|
||||
|
||||
//
|
||||
// Delay in cycles (used by DELAY_NS / DELAY_US)
|
||||
//
|
||||
FORCE_INLINE static void DELAY_CYCLES(uint32_t x) {
|
||||
unsigned long start, ccount, stop;
|
||||
|
||||
/**
|
||||
* It's important to care for race conditions (and overflows) here.
|
||||
* Race condition example: If `stop` calculates to being close to the upper boundary of
|
||||
* `uint32_t` and if at the same time a longer loop interruption kicks in (e.g. due to other
|
||||
* FreeRTOS tasks or interrupts), `ccount` might overflow (and therefore be below `stop` again)
|
||||
* without the loop ever being able to notice that `ccount` had already been above `stop` once
|
||||
* (and that therefore the number of cycles to delay has already passed).
|
||||
* As DELAY_CYCLES (through DELAY_NS / DELAY_US) is used by software SPI bit banging to drive
|
||||
* LCDs and therefore might be called very, very often, this seemingly improbable situation did
|
||||
* actually happen in reality. It resulted in apparently random print pauses of ~17.9 seconds
|
||||
* (0x100000000 / 240 MHz) or multiples thereof, essentially ruining the current print by causing
|
||||
* large blobs of filament.
|
||||
*/
|
||||
|
||||
__asm__ __volatile__ ( "rsr %0, ccount" : "=a" (start) );
|
||||
stop = start + x;
|
||||
ccount = start;
|
||||
|
||||
if (stop >= start) {
|
||||
// no overflow, so only loop while in between start and stop:
|
||||
// 0x00000000 -----------------start****stop-- 0xffffffff
|
||||
while (ccount >= start && ccount < stop) {
|
||||
__asm__ __volatile__ ( "rsr %0, ccount" : "=a" (ccount) );
|
||||
}
|
||||
}
|
||||
else {
|
||||
// stop did overflow, so only loop while outside of stop and start:
|
||||
// 0x00000000 **stop-------------------start** 0xffffffff
|
||||
while (ccount >= start || ccount < stop) {
|
||||
__asm__ __volatile__ ( "rsr %0, ccount" : "=a" (ccount) );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -37,7 +37,7 @@ Servo::Servo() {
|
||||
|
||||
int8_t Servo::attach(const int inPin) {
|
||||
if (channel >= CHANNEL_MAX_NUM) return -1;
|
||||
if (pin > 0) pin = inPin;
|
||||
if (inPin > 0) pin = inPin;
|
||||
|
||||
ledcSetup(channel, 50, 16); // channel X, 50 Hz, 16-bit depth
|
||||
ledcAttachPin(pin, channel);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -72,6 +72,12 @@ void setup_endstop_interrupts() {
|
||||
#if HAS_Z3_MIN
|
||||
_ATTACH(Z3_MIN_PIN);
|
||||
#endif
|
||||
#if HAS_Z4_MAX
|
||||
_ATTACH(Z4_MAX_PIN);
|
||||
#endif
|
||||
#if HAS_Z4_MIN
|
||||
_ATTACH(Z4_MIN_PIN);
|
||||
#endif
|
||||
#if HAS_Z_MIN_PROBE_PIN
|
||||
_ATTACH(Z_MIN_PROBE_PIN);
|
||||
#endif
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -153,8 +153,8 @@ void stepperTask(void* parameter) {
|
||||
remaining--;
|
||||
}
|
||||
else {
|
||||
Stepper::stepper_pulse_phase_isr();
|
||||
remaining = Stepper::stepper_block_phase_isr();
|
||||
Stepper::pulse_phase_isr();
|
||||
remaining = Stepper::block_phase_isr();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,7 +177,7 @@ int i2s_init() {
|
||||
*
|
||||
* fwclk = fbclk / 32
|
||||
*
|
||||
* for fwclk = 250kHz (4uS pulse time)
|
||||
* for fwclk = 250kHz (4µS pulse time)
|
||||
* N = 10
|
||||
* M = 20
|
||||
*/
|
||||
@@ -308,7 +308,7 @@ int i2s_init() {
|
||||
esp_intr_enable(i2s_isr_handle);
|
||||
|
||||
// Create the task that will feed the buffer
|
||||
xTaskCreate(stepperTask, "StepperTask", 10000, nullptr, 1, nullptr);
|
||||
xTaskCreatePinnedToCore(stepperTask, "StepperTask", 10000, nullptr, 1, nullptr, CONFIG_ARDUINO_RUNNING_CORE); // run I2S stepper task on same core as rest of Marlin
|
||||
|
||||
// Route the i2s pins to the appropriate GPIO
|
||||
gpio_matrix_out_check(I2S_DATA, I2S0O_DATA_OUT23_IDX, 0, 0);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -28,3 +28,11 @@
|
||||
#if ENABLED(FAST_PWM_FAN)
|
||||
#error "FAST_PWM_FAN is not yet implemented for this platform."
|
||||
#endif
|
||||
|
||||
#if HAS_TMC_SW_SERIAL
|
||||
#error "TMC220x Software Serial is not supported on this platform."
|
||||
#endif
|
||||
|
||||
#if BOTH(WIFISUPPORT, ESP3D_WIFISUPPORT)
|
||||
#error "Only enable one WiFi option, either WIFISUPPORT or ESP3D_WIFISUPPORT."
|
||||
#endif
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(OTASUPPORT)
|
||||
#if BOTH(WIFISUPPORT, OTASUPPORT)
|
||||
|
||||
#include <WiFi.h>
|
||||
#include <ESPmDNS.h>
|
||||
@@ -67,6 +67,5 @@ void OTA_handle() {
|
||||
ArduinoOTA.handle();
|
||||
}
|
||||
|
||||
#endif // OTASUPPORT
|
||||
|
||||
#endif // WIFISUPPORT && OTASUPPORT
|
||||
#endif // ARDUINO_ARCH_ESP32
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* 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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(WEBSUPPORT)
|
||||
#if BOTH(WIFISUPPORT, WEBSUPPORT)
|
||||
|
||||
#include "../../core/serial.h"
|
||||
|
||||
@@ -40,5 +40,5 @@ void spiffs_init() {
|
||||
SERIAL_ERROR_MSG("SPIFFS mount failed");
|
||||
}
|
||||
|
||||
#endif // WEBSUPPORT
|
||||
#endif // WIFISUPPORT && WEBSUPPORT
|
||||
#endif // ARDUINO_ARCH_ESP32
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user