Compare commits
333 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e9dda85ddd | |||
| beea1f1d14 | |||
| a9072b00e8 | |||
| 4e41ff32e1 | |||
| cf137cb73a | |||
| d5cc11d996 | |||
| a530446b62 | |||
| d62a631467 | |||
| d6c3f45bda | |||
| 81760d6818 | |||
| 282f90c1b3 | |||
| 5de9fc556f | |||
| 3482e9632c | |||
| a6493e0cc8 | |||
| a08a7b3459 | |||
| bd4936330b | |||
| 4bb33a0cb9 | |||
| 83e38b3625 | |||
| 5b7bb3ea64 | |||
| f0b115a999 | |||
| cebed347f5 | |||
| a66b22c4f1 | |||
| fadaa2db09 | |||
| f8954ca79b | |||
| 4a3f69ad6d | |||
| 4bf13bea42 | |||
| 3a6bd6920e | |||
| 70ef7978b4 | |||
| 37bc552f3b | |||
| e310f20279 | |||
| 4708635f4f | |||
| f5d5b0a881 | |||
| 30f5dd339d | |||
| 556d716919 | |||
| 76afd5afc1 | |||
| 5c3bc2194a | |||
| 763cd7c5f2 | |||
| 11046b23a9 | |||
| 36b72926f3 | |||
| b35e16b1d8 | |||
| 767c87810b | |||
| 52b6c45451 | |||
| df5d08aec0 | |||
| 8c61606691 | |||
| e70bd3c785 | |||
| 83cc983276 | |||
| bbb8275d66 | |||
| 2afc2f268a | |||
| aa44542f76 | |||
| 248648708f | |||
| e2c0150fa8 | |||
| 4ef5372151 | |||
| a923771611 | |||
| 74ffa0cc3e | |||
| f2d585ac7f | |||
| 80cfdb182c | |||
| 39463268fb | |||
| a7b3989bca | |||
| 829212d76a | |||
| 0de4a70203 | |||
| febfb3218e | |||
| 4da46c5dd2 | |||
| 353ede8208 | |||
| 09de5e76a7 | |||
| 73b6ba8fe3 | |||
| 72b09fe4cb | |||
| e5ad13a8e2 | |||
| b122e46adb | |||
| 1a5866f5c6 | |||
| c7e62b33d1 | |||
| 1916d4e27f | |||
| ce55a7bd9b | |||
| 540120f863 | |||
| b99a26d6ab | |||
| 6528109176 | |||
| b94a0d036c | |||
| 7634ffe8e5 | |||
| 8bae8bbf7a | |||
| 5ce013f414 | |||
| da4a374b49 | |||
| 81b13456b1 | |||
| ee35fb07b0 | |||
| 99c991755a | |||
| a96ae85d88 | |||
| 45b9680c57 | |||
| 83cbed8527 | |||
| d36d9cb506 | |||
| 9e6981ea60 | |||
| 2c6f8a30f3 | |||
| 17a5a1f97d | |||
| a0815deb9a | |||
| 76a7ab6893 | |||
| 7cd56a57f9 | |||
| 56e2b60e6d | |||
| 8c15a093fd | |||
| 7901eb97ad | |||
| 7aaba66d4d | |||
| 5f0b9d429f | |||
| d34b62eafa | |||
| 3743980192 | |||
| 41d53a15f2 | |||
| f234fbf87f | |||
| 5c728d1fb1 | |||
| 162ea81894 | |||
| 97b9fe83ee | |||
| 9953230550 | |||
| 80bd10025b | |||
| 0876bcd027 | |||
| 3d7ac162fb | |||
| 68a2459808 | |||
| 21fddc1cc8 | |||
| 528a1ad3e0 | |||
| dabe374983 | |||
| 8ac0f14796 | |||
| 934fc52d06 | |||
| cf46d1880c | |||
| 4f159a94cd | |||
| b53e14c7f8 | |||
| 94e9f26544 | |||
| 9e87af70b7 | |||
| fe56f5d3a6 | |||
| 90e5826256 | |||
| bb73c335a5 | |||
| 4c1f76567c | |||
| d193c814d3 | |||
| 2cb252da4a | |||
| 9a04c32f7f | |||
| 3b8e9fdd25 | |||
| e0b045da49 | |||
| 4220491a23 | |||
| 3abe1fcf20 | |||
| 02ed020f3f | |||
| 934ac24ad8 | |||
| e2d8b2fc26 | |||
| 3e8483d389 | |||
| a9c529f004 | |||
| a664587219 | |||
| 1619838592 | |||
| 98a33d37c7 | |||
| 12a2e5ae1b | |||
| 9b472a02e9 | |||
| c84bea7110 | |||
| 20f71fafa7 | |||
| 056e5a430e | |||
| 21a604407d | |||
| deb076b9cd | |||
| b8e2ad9d8f | |||
| 0cd9643957 | |||
| 8c78315f71 | |||
| 35dad3fdfe | |||
| bebf5dc6ab | |||
| 2fd1c48e1a | |||
| 301727defc | |||
| 1afd53a933 | |||
| 381aeb94c6 | |||
| 4a36520820 | |||
| 430eedf5c0 | |||
| 793a851d10 | |||
| 2d609487ac | |||
| 295f50379f | |||
| ecfff5099a | |||
| 986344640f | |||
| 69f69606e6 | |||
| 2aa2e5487a | |||
| 23d9020a65 | |||
| 43d9d1ce1b | |||
| ed7f3b21c0 | |||
| b062a3b226 | |||
| 89b0143b09 | |||
| 0790a9d5df | |||
| e05ac66561 | |||
| 3b33f7ec03 | |||
| b94c75bcda | |||
| 8dc8906d78 | |||
| ab684dc484 | |||
| 37fb26b557 | |||
| 7397e5a41d | |||
| 4a9d380117 | |||
| 0ec1a54309 | |||
| ab6e68c312 | |||
| c509603530 | |||
| e5ce65c32b | |||
| 851257c44b | |||
| 1662e953fc | |||
| dde89795c9 | |||
| 6e69ff93ef | |||
| 01b7d6c413 | |||
| 58398832a1 | |||
| 29469a0615 | |||
| b4dd20c0eb | |||
| eab13752dd | |||
| ad60cdd030 | |||
| 78e111a4d0 | |||
| 5558729562 | |||
| 2d32f7c377 | |||
| bcbdac6f6c | |||
| acc8bf1c79 | |||
| 4f107e9fee | |||
| 7844f3fa4f | |||
| 2f3af438ee | |||
| 4483aa5b45 | |||
| 20e6b6315e | |||
| ca4248bdd5 | |||
| 4a5d8ba87e | |||
| 7a5d849857 | |||
| 95c23e55a4 | |||
| 94ce0d24d6 | |||
| cdea1b8460 | |||
| cc122bec82 | |||
| 6afaf0034c | |||
| 7f0d7e760b | |||
| 69004322f6 | |||
| 7441094a41 | |||
| 29a5006df9 | |||
| 1aca038daf | |||
| ce92eb46ec | |||
| c852e9c6a1 | |||
| 2b8db0c2e2 | |||
| 74f297c871 | |||
| 76411392b7 | |||
| 74c81117c3 | |||
| 6f04d8dc77 | |||
| ade05c045e | |||
| 5140726c70 | |||
| 5334a8f0ed | |||
| ee99eed3bf | |||
| 9a5f1d2f51 | |||
| 170df9040b | |||
| f0bc4274f8 | |||
| 20a704b154 | |||
| 30a70c480c | |||
| 1d5e9c7dee | |||
| b8ab2d4987 | |||
| ce796cec97 | |||
| ad4de747ad | |||
| 95c1b7fb31 | |||
| 29b742cfc4 | |||
| 57bda2ff3b | |||
| 228179e09b | |||
| c961f3ab2b | |||
| 3469cb9d24 | |||
| 6c09b83f30 | |||
| 17a1363f4d | |||
| 115350317c | |||
| 44c2682168 | |||
| 8b81aae870 | |||
| 72a2699b10 | |||
| b7c07f1329 | |||
| 2b9a62093a | |||
| 3385b4c280 | |||
| 7c1f82cd96 | |||
| 9ebfdc4a86 | |||
| 586313c2fb | |||
| 571783fc04 | |||
| 4af5229cee | |||
| e0dcc610da | |||
| 4aff10785e | |||
| d0e110d666 | |||
| 10ffb9cb68 | |||
| b303bb1e56 | |||
| e6a61b182f | |||
| 785b1da021 | |||
| a4d20031ec | |||
| 3c60145792 | |||
| f2940adcf1 | |||
| b5b9cc0b79 | |||
| 1d1eb97567 | |||
| 0103cffcd0 | |||
| 6fed66dd42 | |||
| c81416438d | |||
| c95825a0ff | |||
| b6284c9f01 | |||
| f84a97f51c | |||
| 563296fc8b | |||
| 13290e798b | |||
| 96e3dfed46 | |||
| cb6fd130ba | |||
| 11f90de873 | |||
| 9240ec89d0 | |||
| 8cf2a41f81 | |||
| 1f9fc665ec | |||
| bf1995140a | |||
| 7b21cd5d72 | |||
| 37fc32d972 | |||
| 9a6d4b5e56 | |||
| 1e0719dac5 | |||
| f2248f79d3 | |||
| 60d843b540 | |||
| 6d7d281559 | |||
| b3d462b890 | |||
| a7444021c6 | |||
| a93acbd35c | |||
| d978123289 | |||
| ee8dada752 | |||
| 7bc6261d2a | |||
| 013c3bcd82 | |||
| 2fc86ad836 | |||
| 082dc24865 | |||
| d7b6acc03d | |||
| a1dc2856de | |||
| 959be66cc2 | |||
| ae2843940f | |||
| 611ceedc1d | |||
| 38298076d6 | |||
| 1f0b8d6cd8 | |||
| e0d683baed | |||
| f4f75b6b12 | |||
| fb6dc90a85 | |||
| b99391c810 | |||
| d9fc4f3a99 | |||
| daeffbc944 | |||
| 87dde46fb0 | |||
| d96c6f867d | |||
| 1f2e6d5434 | |||
| 232b989d50 | |||
| d38261c908 | |||
| 3075bc3b7b | |||
| 842d0b1c9f | |||
| 042b238dd8 | |||
| c30904b631 | |||
| 225a71f4cd | |||
| 1d29a56344 | |||
| 320e00267d | |||
| 9869629b67 | |||
| 3da78e85bf | |||
| 11a4314261 | |||
| 65c19f82b9 | |||
| 0169cde8a4 | |||
| ab0173b7e6 | |||
| 95f81d2565 | |||
| 9c922f0eab | |||
| 35a03d66e5 | |||
| a4a0887fa7 |
@@ -7,7 +7,7 @@ contact_links:
|
||||
url: https://www.facebook.com/groups/1049718498464482
|
||||
about: Please ask and answer questions here.
|
||||
- name: 🕹 Marlin on Discord
|
||||
url: https://discord.gg/n5NJ59y
|
||||
url: https://discord.com/servers/marlin-firmware-461605380783472640
|
||||
about: Join the Discord server for support and discussion.
|
||||
- name: 🔗 Marlin Discussion Forum
|
||||
url: https://reprap.org/forum/list.php?415
|
||||
|
||||
@@ -43,7 +43,7 @@ We have a Message Board and a Facebook group where our knowledgable user communi
|
||||
|
||||
If chat is more your speed, you can join the MarlinFirmware Discord server:
|
||||
|
||||
* Use the link https://discord.gg/n5NJ59y to join up as a General User.
|
||||
* Use the link https://discord.com/servers/marlin-firmware-461605380783472640 to join up as a General User.
|
||||
* Even though our Discord is pretty active, it may take a while for community members to respond — please be patient!
|
||||
* Use the `#general` channel for general questions or discussion about Marlin.
|
||||
* Other channels exist for certain topics or are limited to Patrons. Check the channel list.
|
||||
|
||||
@@ -37,11 +37,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
test-platform:
|
||||
|
||||
# Native
|
||||
- linux_native
|
||||
- simulator_linux_release
|
||||
|
||||
# AVR
|
||||
- mega2560
|
||||
@@ -104,9 +106,9 @@ jobs:
|
||||
|
||||
# STM32F4
|
||||
- ARMED
|
||||
- BIGTREE_BTT002
|
||||
- BIGTREE_GTR_V1_0
|
||||
- BIGTREE_SKR_PRO
|
||||
- BTT_BTT002
|
||||
- BTT_GTR_V1_0
|
||||
- BTT_SKR_PRO
|
||||
- FLYF407ZG
|
||||
- FYSETC_S6
|
||||
- LERDGEK
|
||||
@@ -181,6 +183,13 @@ jobs:
|
||||
pio upgrade --dev
|
||||
pio pkg update --global
|
||||
|
||||
- name: Install Simulator dependencies
|
||||
run: |
|
||||
sudo apt-get install build-essential
|
||||
sudo apt-get install libsdl2-dev
|
||||
sudo apt-get install libsdl2-net-dev
|
||||
sudo apt-get install libglm-dev
|
||||
|
||||
- name: Run ${{ matrix.test-platform }} Tests
|
||||
run: |
|
||||
make tests-single-ci TEST_TARGET=${{ matrix.test-platform }}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
#
|
||||
# ci-validate-boards.yml
|
||||
# Validate boards.h to make sure it's all set up correctly
|
||||
#
|
||||
|
||||
name: CI - Validate boards.h
|
||||
|
||||
# We can do the on: section as two items, one for pull requests and one for pushes...
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- bugfix-2.1.x
|
||||
paths:
|
||||
- 'Marlin/src/core/boards.h'
|
||||
push:
|
||||
branches:
|
||||
- bugfix-2.1.x
|
||||
paths:
|
||||
- 'Marlin/src/core/boards.h'
|
||||
|
||||
jobs:
|
||||
validate_pins_files:
|
||||
name: Validate boards.h
|
||||
if: github.repository == 'MarlinFirmware/Marlin'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out the PR
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Select Python 3.9
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.9'
|
||||
architecture: 'x64'
|
||||
|
||||
- name: Validate core/boards.h
|
||||
run: |
|
||||
make validate-boards -j
|
||||
@@ -125,6 +125,7 @@ vc-fileutils.settings
|
||||
# Visual Studio Code
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
*.code-workspace
|
||||
|
||||
# Simulation files
|
||||
imgui.ini
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Marlin-specific settings for Zed
|
||||
*
|
||||
* For a full list of overridable settings, and general information on folder-specific settings,
|
||||
* see the documentation: https://zed.dev/docs/configuring-zed#settings-files
|
||||
*/
|
||||
{
|
||||
"languages": {
|
||||
"C": {
|
||||
"enable_language_server": false
|
||||
},
|
||||
"C++": {
|
||||
"enable_language_server": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,10 @@ UNIT_TEST_CONFIG ?= default
|
||||
|
||||
help:
|
||||
@echo "Tasks for local development:"
|
||||
@echo "make marlin : Build marlin for the configured board"
|
||||
@echo "make marlin : Build Marlin for the configured board"
|
||||
@echo "make format-pins -j : Reformat all pins files (-j for parallel execution)"
|
||||
@echo "make validate-pins -j : Validate all pins files, fails if any require reformatting"
|
||||
@echo "make validate-boards -j : Validate boards.h and pins.h for standards compliance"
|
||||
@echo "make tests-single-ci : Run a single test from inside the CI"
|
||||
@echo "make tests-single-local : Run a single test locally"
|
||||
@echo "make tests-single-local-docker : Run a single test locally, using docker"
|
||||
@@ -102,3 +103,11 @@ format-pins: $(PINS)
|
||||
validate-pins: format-pins
|
||||
@echo "Validating pins files"
|
||||
@git diff --exit-code || (git status && echo "\nError: Pins files are not formatted correctly. Run \"make format-pins\" to fix.\n" && exit 1)
|
||||
|
||||
BOARDS_FILE := Marlin/src/core/boards.h
|
||||
|
||||
.PHONY: validate-boards
|
||||
|
||||
validate-boards:
|
||||
@echo "Validating boards.h file"
|
||||
@python $(SCRIPTS_DIR)/validate_boards.py $(BOARDS_FILE) || (echo "\nError: boards.h file is not valid. Please check and correct it.\n" && exit 1)
|
||||
|
||||
+108
-39
@@ -50,7 +50,7 @@
|
||||
*
|
||||
* Calibration Guides: https://reprap.org/wiki/Calibration
|
||||
* https://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
|
||||
* https://web.archive.org/web/20220907014303/https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
|
||||
* https://web.archive.org/web/20220907014303/sites.google.com/site/repraplogphase/calibration-of-your-reprap
|
||||
* https://youtu.be/wAL9d7FgInk
|
||||
* https://teachingtechyt.github.io/calibration.html
|
||||
*
|
||||
@@ -61,7 +61,7 @@
|
||||
// @section info
|
||||
|
||||
// Author info of this build printed to the host during boot and M115
|
||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Original author or contributor.
|
||||
//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
|
||||
|
||||
// @section machine
|
||||
@@ -77,7 +77,7 @@
|
||||
* Serial port -1 is the USB emulated serial port, if available.
|
||||
* Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
|
||||
*
|
||||
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
|
||||
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
*/
|
||||
#define SERIAL_PORT 0
|
||||
|
||||
@@ -99,19 +99,29 @@
|
||||
/**
|
||||
* Select a secondary serial port on the board to use for communication with the host.
|
||||
* Currently Ethernet (-2) is only supported on Teensy 4.1 boards.
|
||||
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
|
||||
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
*/
|
||||
//#define SERIAL_PORT_2 -1
|
||||
//#define BAUDRATE_2 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
|
||||
|
||||
/**
|
||||
* Select a third serial port on the board to use for communication with the host.
|
||||
* Currently only supported for AVR, DUE, LPC1768/9 and STM32/STM32F1
|
||||
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
|
||||
* Currently supported for AVR, DUE, SAMD51, LPC1768/9, STM32/STM32F1/HC32, and Teensy 4.x
|
||||
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
*/
|
||||
//#define SERIAL_PORT_3 1
|
||||
//#define BAUDRATE_3 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
|
||||
|
||||
/**
|
||||
* Select a serial port to communicate with RS485 protocol
|
||||
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
*/
|
||||
//#define RS485_SERIAL_PORT 1
|
||||
#ifdef RS485_SERIAL_PORT
|
||||
//#define M485_PROTOCOL 1 // Check your host for protocol compatibility
|
||||
//#define RS485_BUS_BUFFER_SIZE 128
|
||||
#endif
|
||||
|
||||
// Enable the Bluetooth serial interface on AT90USB devices
|
||||
//#define BLUETOOTH
|
||||
|
||||
@@ -375,14 +385,15 @@
|
||||
* PRUSA_MMU1 : Průša MMU1 (The "multiplexer" version)
|
||||
* PRUSA_MMU2 : Průša MMU2
|
||||
* PRUSA_MMU2S : Průša MMU2S (Requires MK3S extruder with motion sensor, EXTRUDERS = 5)
|
||||
* PRUSA_MMU3 : Průša MMU3 (Requires MK3S extruder with motion sensor and MMU firmware version 3.x.x, EXTRUDERS = 5)
|
||||
* EXTENDABLE_EMU_MMU2 : MMU with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware)
|
||||
* EXTENDABLE_EMU_MMU2S : MMUS with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware)
|
||||
*
|
||||
* Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
|
||||
* See additional options in Configuration_adv.h.
|
||||
* :["PRUSA_MMU1", "PRUSA_MMU2", "PRUSA_MMU2S", "EXTENDABLE_EMU_MMU2", "EXTENDABLE_EMU_MMU2S"]
|
||||
* :["PRUSA_MMU1", "PRUSA_MMU2", "PRUSA_MMU2S", "PRUSA_MMU3", "EXTENDABLE_EMU_MMU2", "EXTENDABLE_EMU_MMU2S"]
|
||||
*/
|
||||
//#define MMU_MODEL PRUSA_MMU2
|
||||
//#define MMU_MODEL PRUSA_MMU3
|
||||
|
||||
// @section psu control
|
||||
|
||||
@@ -703,10 +714,13 @@
|
||||
* Use a physical model of the hotend to control temperature. When configured correctly this gives
|
||||
* better responsiveness and stability than PID and removes the need for PID_EXTRUSION_SCALING
|
||||
* and PID_FAN_SCALING. Enable MPC_AUTOTUNE and use M306 T to autotune the model.
|
||||
* @section mpctemp
|
||||
* @section mpc temp
|
||||
*/
|
||||
#if ENABLED(MPCTEMP)
|
||||
#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
//#define MPC_AUTOTUNE_DEBUG // Enable MPC debug logging (~870 bytes of flash)
|
||||
#endif
|
||||
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
|
||||
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
|
||||
|
||||
@@ -788,6 +802,40 @@
|
||||
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Peltier Bed - Heating and Cooling
|
||||
*
|
||||
* A Peltier device transfers heat from one side to the other in proportion to the amount of
|
||||
* current flowing through the device and the direction of current flow. So the same device
|
||||
* can both heat and cool.
|
||||
*
|
||||
* When "cooling" in addition to rejecting the heat transferred from the hot side to the cold
|
||||
* side, the dissipated power (voltage * current) must also be rejected. Be sure to set up a
|
||||
* fan that can be powered in sync with the Peltier unit.
|
||||
*
|
||||
* This feature is only set up to run in bang-bang mode because Peltiers don't handle PWM
|
||||
* well without filter circuitry.
|
||||
*
|
||||
* Since existing 3D printers are made to handle relatively high current for the heated bed,
|
||||
* we can use the heated bed power pins to control the Peltier power using the same G-codes
|
||||
* as the heated bed (M140, M190, etc.).
|
||||
*
|
||||
* A second GPIO pin is required to control current direction.
|
||||
* Two configurations are possible: Relay and H-Bridge
|
||||
*
|
||||
* (At this time only relay is supported. H-bridge requires 4 MOS switches configured in H-Bridge.)
|
||||
*
|
||||
* Power is handled by the bang-bang control loop: 0 or 255.
|
||||
* Cooling applications are more common than heating, so the pin states are commonly:
|
||||
* LOW = Heating = Relay Energized
|
||||
* HIGH = Cooling = Relay in "Normal" state
|
||||
*/
|
||||
//#define PELTIER_BED
|
||||
#if ENABLED(PELTIER_BED)
|
||||
#define PELTIER_DIR_PIN -1 // Relay control pin for Peltier
|
||||
#define PELTIER_DIR_HEAT_STATE LOW // The relay pin state that causes the Peltier to heat
|
||||
#endif
|
||||
|
||||
// Add 'M190 R T' for more gradual M190 R bed cooling.
|
||||
//#define BED_ANNEALING_GCODE
|
||||
|
||||
@@ -828,14 +876,16 @@
|
||||
// Lasko "MyHeat Personal Heater" (200w) modified with a Fotek SSR-10DA to control only the heating element
|
||||
// and placed inside the small Creality printer enclosure tent.
|
||||
//
|
||||
#define DEFAULT_chamberKp 37.04
|
||||
#define DEFAULT_chamberKi 1.40
|
||||
#define DEFAULT_chamberKp 37.04
|
||||
#define DEFAULT_chamberKi 1.40
|
||||
#define DEFAULT_chamberKd 655.17
|
||||
// M309 P37.04 I1.04 D655.17
|
||||
|
||||
// FIND YOUR OWN: "M303 E-2 C8 S50" to run autotune on the chamber at 50 degreesC for 8 cycles.
|
||||
#endif // PIDTEMPCHAMBER
|
||||
|
||||
// @section pid temp
|
||||
|
||||
#if ANY(PIDTEMP, PIDTEMPBED, PIDTEMPCHAMBER)
|
||||
//#define PID_OPENLOOP // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
|
||||
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
|
||||
@@ -1454,7 +1504,8 @@
|
||||
* A lightweight, solenoid-driven probe.
|
||||
* For information about this sensor https://github.com/bigtreetech/MicroProbe
|
||||
*
|
||||
* Also requires: PROBE_ENABLE_DISABLE
|
||||
* Also requires PROBE_ENABLE_DISABLE
|
||||
* With FT_MOTION requires ENDSTOP_INTERRUPTS_FEATURE
|
||||
*/
|
||||
//#define BIQU_MICROPROBE_V1 // Triggers HIGH
|
||||
//#define BIQU_MICROPROBE_V2 // Triggers LOW
|
||||
@@ -1593,7 +1644,8 @@
|
||||
// with NOZZLE_AS_PROBE this can be negative for a wider probing area.
|
||||
#define PROBING_MARGIN 10
|
||||
|
||||
// X and Y axis travel speed (mm/min) between probes
|
||||
// X and Y axis travel speed (mm/min) between probes.
|
||||
// Leave undefined to use the average of the current XY homing feedrate.
|
||||
#define XY_PROBE_FEEDRATE (133*60)
|
||||
|
||||
// Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
@@ -1624,6 +1676,7 @@
|
||||
#define PROBE_TARE_DELAY 200 // (ms) Delay after tare before
|
||||
#define PROBE_TARE_STATE HIGH // State to write pin for tare
|
||||
//#define PROBE_TARE_PIN PA5 // Override default pin
|
||||
//#define PROBE_TARE_MENU // Display a menu item to tare the probe
|
||||
#if ENABLED(PROBE_ACTIVATION_SWITCH)
|
||||
//#define PROBE_TARE_ONLY_WHILE_INACTIVE // Fail to tare/probe if PROBE_ACTIVATION_SWITCH is active
|
||||
#endif
|
||||
@@ -1661,8 +1714,8 @@
|
||||
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
|
||||
* Only integer values >= 1 are valid here.
|
||||
*
|
||||
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
|
||||
* But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
|
||||
* Example: 'M851 Z-5' with a CLEARANCE of 4 => 9mm from bed to nozzle.
|
||||
* But: 'M851 Z+1' with a CLEARANCE of 2 => 2mm from bed to nozzle.
|
||||
*/
|
||||
#define Z_CLEARANCE_DEPLOY_PROBE 10 // (mm) Z Clearance for Deploy/Stow
|
||||
#define Z_CLEARANCE_BETWEEN_PROBES 5 // (mm) Z Clearance between probe points
|
||||
@@ -1713,6 +1766,8 @@
|
||||
#define PROBING_BED_TEMP 50
|
||||
#endif
|
||||
|
||||
// @section stepper drivers
|
||||
|
||||
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
|
||||
// :{ 0:'Low', 1:'High' }
|
||||
#define X_ENABLE_ON 0
|
||||
@@ -1886,6 +1941,8 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @section filament runout sensors
|
||||
*
|
||||
* Filament Runout Sensors
|
||||
* Mechanical or opto endstops are used to check for the presence of filament.
|
||||
*
|
||||
@@ -2282,6 +2339,9 @@
|
||||
// Homing speeds (linear=mm/min, rotational=°/min)
|
||||
#define HOMING_FEEDRATE_MM_M { (50*60), (50*60), (4*60) }
|
||||
|
||||
// Edit homing feedrates with M210 and MarlinUI menu items
|
||||
//#define EDITABLE_HOMING_FEEDRATE
|
||||
|
||||
// Validate that endstops are triggered on homing moves
|
||||
#define VALIDATE_HOMING_ENDSTOPS
|
||||
|
||||
@@ -2408,9 +2468,9 @@
|
||||
#define PREHEAT_2_TEMP_CHAMBER 35
|
||||
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
|
||||
|
||||
// @section motion
|
||||
|
||||
/**
|
||||
* @section nozzle park
|
||||
*
|
||||
* Nozzle Park
|
||||
*
|
||||
* Park the nozzle at the given XYZ position on idle or G27.
|
||||
@@ -2433,6 +2493,8 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @section nozzle clean
|
||||
*
|
||||
* Clean Nozzle Feature
|
||||
*
|
||||
* Adds the G12 command to perform a nozzle cleaning process.
|
||||
@@ -2593,9 +2655,24 @@
|
||||
//#include "Configuration_Secure.h" // External file with PASSWORD_DEFAULT_VALUE
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
//============================= LCD and SD support ============================
|
||||
//=============================================================================
|
||||
// @section media
|
||||
|
||||
/**
|
||||
* SD CARD
|
||||
*
|
||||
* SD Card support is disabled by default. If your controller has an SD slot,
|
||||
* you must uncomment the following option or it won't work.
|
||||
*/
|
||||
//#define SDSUPPORT
|
||||
|
||||
/**
|
||||
* SD CARD: ENABLE CRC
|
||||
*
|
||||
* Use CRC checks and retries on the SD communication.
|
||||
*/
|
||||
#if ENABLED(SDSUPPORT)
|
||||
//#define SD_CHECK_AND_RETRY
|
||||
#endif
|
||||
|
||||
// @section interface
|
||||
|
||||
@@ -2642,21 +2719,6 @@
|
||||
*/
|
||||
#define LCD_INFO_SCREEN_STYLE 0
|
||||
|
||||
/**
|
||||
* SD CARD
|
||||
*
|
||||
* SD Card support is disabled by default. If your controller has an SD slot,
|
||||
* you must uncomment the following option or it won't work.
|
||||
*/
|
||||
//#define SDSUPPORT
|
||||
|
||||
/**
|
||||
* SD CARD: ENABLE CRC
|
||||
*
|
||||
* Use CRC checks and retries on the SD communication.
|
||||
*/
|
||||
//#define SD_CHECK_AND_RETRY
|
||||
|
||||
/**
|
||||
* LCD Menu Items
|
||||
*
|
||||
@@ -2785,7 +2847,7 @@
|
||||
|
||||
//
|
||||
// Original RADDS LCD Display+Encoder+SDCardReader
|
||||
// https://web.archive.org/web/20200719145306/http://doku.radds.org/dokumentation/lcd-display/
|
||||
// https://web.archive.org/web/20200719145306/doku.radds.org/dokumentation/lcd-display/
|
||||
//
|
||||
//#define RADDS_DISPLAY
|
||||
|
||||
@@ -2851,7 +2913,7 @@
|
||||
|
||||
//
|
||||
// Elefu RA Board Control Panel
|
||||
// https://web.archive.org/web/20140823033947/http://www.elefu.com/index.php?route=product/product&product_id=53
|
||||
// https://web.archive.org/web/20140823033947/www.elefu.com/index.php?route=product/product&product_id=53
|
||||
//
|
||||
//#define RA_CONTROL_PANEL
|
||||
|
||||
@@ -2983,7 +3045,7 @@
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// https://web.archive.org/web/20180605050442/http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
// https://web.archive.org/web/20180605050442/mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
@@ -3220,6 +3282,11 @@
|
||||
//
|
||||
//#define ANYCUBIC_LCD_VYPER
|
||||
|
||||
//
|
||||
// Sovol SV-06 Resistive Touch Screen
|
||||
//
|
||||
//#define SOVOL_SV06_RTS
|
||||
|
||||
//
|
||||
// 320x240 Nextion 2.8" serial TFT Resistive Touch Screen NX3224T028
|
||||
//
|
||||
@@ -3415,7 +3482,9 @@
|
||||
#define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens
|
||||
#define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus
|
||||
|
||||
//#define DISABLE_ENCODER // Disable the click encoder, if any
|
||||
#if ANY(TFT_CLASSIC_UI, TFT_COLOR_UI)
|
||||
//#define NO_BACK_MENU_ITEM // Don't display a top menu item to go back to the parent menu
|
||||
#endif
|
||||
|
||||
#define TOUCH_SCREEN_CALIBRATION
|
||||
|
||||
|
||||
+226
-96
@@ -47,8 +47,9 @@
|
||||
* 2 = config.ini - File format for PlatformIO preprocessing.
|
||||
* 3 = schema.json - The entire configuration schema. (13 = pattern groups)
|
||||
* 4 = schema.yml - The entire configuration schema.
|
||||
* 5 = Config.h - Minimal configuration by popular demand.
|
||||
*/
|
||||
//#define CONFIG_EXPORT 2 // :[1:'JSON', 2:'config.ini', 3:'schema.json', 4:'schema.yml']
|
||||
//#define CONFIG_EXPORT 105 // :[1:'JSON', 2:'config.ini', 3:'schema.json', 4:'schema.yml', 5:'Config.h']
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Settings ============================
|
||||
@@ -202,7 +203,7 @@
|
||||
//
|
||||
#if DISABLED(PIDTEMPBED)
|
||||
#define BED_CHECK_INTERVAL 5000 // (ms) Interval between checks in bang-bang control
|
||||
#if ENABLED(BED_LIMIT_SWITCHING)
|
||||
#if ANY(BED_LIMIT_SWITCHING, PELTIER_BED)
|
||||
#define BED_HYSTERESIS 2 // (°C) Only set the relevant heater state when ABS(T-target) > BED_HYSTERESIS
|
||||
#endif
|
||||
#endif
|
||||
@@ -303,9 +304,9 @@
|
||||
* If you get false positives for "Thermal Runaway", increase
|
||||
* THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // (seconds)
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // (°C)
|
||||
#if ALL(HAS_HOTEND, THERMAL_PROTECTION_HOTENDS)
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // (seconds)
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // (°C)
|
||||
|
||||
//#define ADAPTIVE_FAN_SLOWING // Slow down the part-cooling fan if the temperature drops
|
||||
#if ENABLED(ADAPTIVE_FAN_SLOWING)
|
||||
@@ -334,7 +335,7 @@
|
||||
/**
|
||||
* Thermal Protection parameters for the bed are just as above for hotends.
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_BED)
|
||||
#if TEMP_SENSOR_BED && ENABLED(THERMAL_PROTECTION_BED)
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // (seconds)
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // (°C)
|
||||
|
||||
@@ -348,7 +349,7 @@
|
||||
/**
|
||||
* Thermal Protection parameters for the heated chamber.
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_CHAMBER)
|
||||
#if TEMP_SENSOR_CHAMBER && ENABLED(THERMAL_PROTECTION_CHAMBER)
|
||||
#define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // (seconds)
|
||||
#define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // (°C)
|
||||
|
||||
@@ -362,7 +363,7 @@
|
||||
/**
|
||||
* Thermal Protection parameters for the laser cooler.
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_COOLER)
|
||||
#if TEMP_SENSOR_COOLER && ENABLED(THERMAL_PROTECTION_COOLER)
|
||||
#define THERMAL_PROTECTION_COOLER_PERIOD 10 // (seconds)
|
||||
#define THERMAL_PROTECTION_COOLER_HYSTERESIS 3 // (°C)
|
||||
|
||||
@@ -590,6 +591,8 @@
|
||||
// Use TEMP_SENSOR_SOC as a trigger for enabling the controller fan
|
||||
//#define CONTROLLER_FAN_MIN_SOC_TEMP 40 // (°C) Turn on the fan if the SoC reaches this temperature
|
||||
|
||||
#define CONTROLLER_FAN_BED_HEATING // Turn on the fan when heating the bed
|
||||
|
||||
//#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings
|
||||
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
||||
#define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu
|
||||
@@ -604,6 +607,8 @@
|
||||
*/
|
||||
//#define FAN_KICKSTART_TIME 100 // (ms)
|
||||
//#define FAN_KICKSTART_POWER 180 // 64-255
|
||||
//#define FAN_KICKSTART_LINEAR // Set kickstart time linearly based on the speed, e.g., for 20% (51) it will be FAN_KICKSTART_TIME * 0.2.
|
||||
// Useful for quick speed up to low speed. Kickstart power must be set to 255.
|
||||
|
||||
// Some coolers may require a non-zero "off" state.
|
||||
//#define FAN_OFF_PWM 1
|
||||
@@ -1079,9 +1084,11 @@
|
||||
#define HOME_AFTER_G34
|
||||
#endif
|
||||
|
||||
//
|
||||
// Add the G35 command to read bed corners to help adjust screws. Requires a bed probe.
|
||||
//
|
||||
/**
|
||||
* Assisted Tramming
|
||||
*
|
||||
* Add the G35 command to measure bed corners and help adjust screws. Requires a bed probe.
|
||||
*/
|
||||
//#define ASSISTED_TRAMMING
|
||||
#if ENABLED(ASSISTED_TRAMMING)
|
||||
|
||||
@@ -1102,29 +1109,35 @@
|
||||
//#define ASSISTED_TRAMMING_WAIT_POSITION { X_CENTER, Y_CENTER, 30 } // Move the nozzle out of the way for adjustment
|
||||
|
||||
/**
|
||||
* Screw thread:
|
||||
* M3: 30 = Clockwise, 31 = Counter-Clockwise
|
||||
* M4: 40 = Clockwise, 41 = Counter-Clockwise
|
||||
* M5: 50 = Clockwise, 51 = Counter-Clockwise
|
||||
* Screw Thread. Use one of the following defines:
|
||||
*
|
||||
* M3_CW = M3 Clockwise, M3_CCW = M3 Counter-Clockwise
|
||||
* M4_CW = M4 Clockwise, M4_CCW = M4 Counter-Clockwise
|
||||
* M5_CW = M5 Clockwise, M5_CCW = M5 Counter-Clockwise
|
||||
*
|
||||
* :{'M3_CW':'M3 Clockwise','M3_CCW':'M3 Counter-Clockwise','M4_CW':'M4 Clockwise','M4_CCW':'M4 Counter-Clockwise','M5_CW':'M5 Clockwise','M5_CCW':'M5 Counter-Clockwise'}
|
||||
*/
|
||||
#define TRAMMING_SCREW_THREAD 30
|
||||
#define TRAMMING_SCREW_THREAD M3_CW
|
||||
|
||||
#endif
|
||||
|
||||
// @section motion control
|
||||
|
||||
/**
|
||||
* Fixed-time-based Motion Control -- EXPERIMENTAL
|
||||
* Fixed-time-based Motion Control -- BETA FEATURE
|
||||
* Enable/disable and set parameters with G-code M493.
|
||||
* See ft_types.h for named values used by FTM options.
|
||||
*/
|
||||
//#define FT_MOTION
|
||||
#if ENABLED(FT_MOTION)
|
||||
#define FTM_DEFAULT_MODE ftMotionMode_DISABLED // Default mode of fixed time control. (Enums in ft_types.h)
|
||||
#define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h)
|
||||
#define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers
|
||||
#define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers
|
||||
//#define FTM_IS_DEFAULT_MOTION // Use FT Motion as the factory default?
|
||||
#define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (DISABLED, Z_BASED, MASS_BASED)
|
||||
#define FTM_DEFAULT_SHAPER_X ftMotionShaper_NONE // Default shaper mode on X axis (NONE, ZV, ZVD, ZVDD, ZVDDD, EI, 2HEI, 3HEI, MZV)
|
||||
#define FTM_DEFAULT_SHAPER_Y ftMotionShaper_NONE // Default shaper mode on Y axis
|
||||
#define FTM_SHAPING_DEFAULT_FREQ_X 37.0f // (Hz) Default peak frequency used by input shapers
|
||||
#define FTM_SHAPING_DEFAULT_FREQ_Y 37.0f // (Hz) Default peak frequency used by input shapers
|
||||
#define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false)
|
||||
#define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain
|
||||
#define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. (Acceleration-based scaling factor.)
|
||||
#define FTM_SHAPING_ZETA_X 0.1f // Zeta used by input shapers for X axis
|
||||
#define FTM_SHAPING_ZETA_Y 0.1f // Zeta used by input shapers for Y axis
|
||||
|
||||
@@ -1147,18 +1160,13 @@
|
||||
#define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (Reciprocal of FTM_TS)
|
||||
#define FTM_TS 0.001f // (s) Time step for trajectory generation. (Reciprocal of FTM_FS)
|
||||
|
||||
// These values may be configured to adjust the duration of loop().
|
||||
#define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop()
|
||||
#define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop()
|
||||
|
||||
#if DISABLED(COREXY)
|
||||
#define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update
|
||||
|
||||
// Use this to adjust the time required to consume the command buffer.
|
||||
// Try increasing this value if stepper motion is choppy.
|
||||
#define FTM_STEPPERCMD_BUFF_SIZE 3000 // Size of the stepper command buffers
|
||||
// (FTM_STEPS_PER_LOOP * FTM_POINTS_PER_LOOP) is a good start
|
||||
// If you run out of memory, fall back to 3000 and increase progressively
|
||||
|
||||
#else
|
||||
// CoreXY motion needs a larger buffer size. These values are based on our testing.
|
||||
#define FTM_STEPPER_FS 30000
|
||||
@@ -1180,7 +1188,7 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Input Shaping -- EXPERIMENTAL
|
||||
* Input Shaping
|
||||
*
|
||||
* Zero Vibration (ZV) Input Shaping for X and/or Y movements.
|
||||
*
|
||||
@@ -1331,8 +1339,6 @@
|
||||
//#define CALIBRATION_SCRIPT_PRE "M117 Starting Auto-Calibration\nT0\nG28\nG12\nM117 Calibrating..."
|
||||
//#define CALIBRATION_SCRIPT_POST "M500\nM117 Calibration data saved"
|
||||
|
||||
#define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
|
||||
|
||||
#define CALIBRATION_FEEDRATE_SLOW 60 // mm/min
|
||||
#define CALIBRATION_FEEDRATE_FAST 1200 // mm/min
|
||||
#define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/min
|
||||
@@ -1491,8 +1497,17 @@
|
||||
#define FEEDRATE_CHANGE_BEEP_FREQUENCY 440
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Probe Offset Wizard
|
||||
* Add a Probe Z Offset calibration option to the LCD menu.
|
||||
* Use this helper to get a perfect 'M851 Z' probe offset.
|
||||
* When launched this powerful wizard:
|
||||
* - Measures the bed height at the configured position with the probe.
|
||||
* - Moves the nozzle to the same position for a "paper" measurement.
|
||||
* - The difference is used to set the probe Z offset.
|
||||
*/
|
||||
#if HAS_BED_PROBE && ANY(HAS_MARLINUI_MENU, HAS_TFT_LVGL_UI)
|
||||
//#define PROBE_OFFSET_WIZARD // Add a Probe Z Offset calibration option to the LCD menu
|
||||
//#define PROBE_OFFSET_WIZARD
|
||||
#if ENABLED(PROBE_OFFSET_WIZARD)
|
||||
/**
|
||||
* Enable to init the Probe Z-Offset when starting the Wizard.
|
||||
@@ -1509,6 +1524,10 @@
|
||||
#if HAS_MARLINUI_MENU
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
|
||||
// Show Deploy / Stow Probe options in the Motion menu.
|
||||
#define PROBE_DEPLOY_STOW_MENU
|
||||
|
||||
// Add calibration in the Probe Offsets menu to compensate for X-axis twist.
|
||||
//#define X_AXIS_TWIST_COMPENSATION
|
||||
#if ENABLED(X_AXIS_TWIST_COMPENSATION)
|
||||
@@ -1523,8 +1542,6 @@
|
||||
#define XATC_Z_OFFSETS { 0, 0, 0 } // Z offsets for X axis sample points
|
||||
#endif
|
||||
|
||||
// Show Deploy / Stow Probe options in the Motion menu.
|
||||
#define PROBE_DEPLOY_STOW_MENU
|
||||
#endif
|
||||
|
||||
// Include a page of printer information in the LCD Main Menu
|
||||
@@ -1555,6 +1572,9 @@
|
||||
// BACK menu items keep the highlight at the top
|
||||
//#define TURBO_BACK_MENU_ITEM
|
||||
|
||||
// BACK menu items show "Back" instead of the previous menu name
|
||||
//#define GENERIC_BACK_MENU_ITEM
|
||||
|
||||
// Insert a menu for preheating at the top level to allow for quick access
|
||||
//#define PREHEAT_SHORTCUT_MENU_ITEM
|
||||
|
||||
@@ -2329,6 +2349,7 @@
|
||||
*
|
||||
* Control extrusion rate based on instantaneous extruder velocity. Can be used to correct for
|
||||
* underextrusion at high extruder speeds that are otherwise well-behaved (i.e., not skipping).
|
||||
* For better results also enable ADAPTIVE_STEP_SMOOTHING.
|
||||
*/
|
||||
//#define NONLINEAR_EXTRUSION
|
||||
|
||||
@@ -2556,27 +2577,28 @@
|
||||
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
|
||||
|
||||
/**
|
||||
* Minimum stepper driver pulse width (in µs)
|
||||
* 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
|
||||
* 0 : Minimum 500ns for LV8729, adjusted in stepper.h
|
||||
* 1 : Minimum for A4988 and A5984 stepper drivers
|
||||
* 2 : Minimum for DRV8825 stepper drivers
|
||||
* 3 : Minimum for TB6600 stepper drivers
|
||||
* 30 : Minimum for TB6560 stepper drivers
|
||||
* Minimum stepper driver pulse width (in ns)
|
||||
* If undefined, these defaults (from Conditionals-4-adv.h) apply:
|
||||
* 100 : Minimum for TMC2xxx stepper drivers
|
||||
* 500 : Minimum for LV8729
|
||||
* 1000 : Minimum for A4988 and A5984 stepper drivers
|
||||
* 2000 : Minimum for DRV8825 stepper drivers
|
||||
* 3000 : Minimum for TB6600 stepper drivers
|
||||
* 30000 : Minimum for TB6560 stepper drivers
|
||||
*
|
||||
* Override the default value based on the driver type set in Configuration.h.
|
||||
*/
|
||||
//#define MINIMUM_STEPPER_PULSE 2
|
||||
//#define MINIMUM_STEPPER_PULSE_NS 2000
|
||||
|
||||
/**
|
||||
* Maximum stepping rate (in Hz) the stepper driver allows
|
||||
* If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
|
||||
* If undefined, these defaults (from Conditionals-4-adv.h) apply:
|
||||
* 5000000 : Maximum for TMC2xxx stepper drivers
|
||||
* 1000000 : Maximum for LV8729 stepper driver
|
||||
* 500000 : Maximum for A4988 stepper driver
|
||||
* 250000 : Maximum for DRV8825 stepper driver
|
||||
* 150000 : Maximum for TB6600 stepper driver
|
||||
* 15000 : Maximum for TB6560 stepper driver
|
||||
* 500000 : Maximum for A4988 stepper driver
|
||||
* 250000 : Maximum for DRV8825 stepper driver
|
||||
* 150000 : Maximum for TB6600 stepper driver
|
||||
* 15000 : Maximum for TB6560 stepper driver
|
||||
*
|
||||
* Override the default value based on the driver type set in Configuration.h.
|
||||
*/
|
||||
@@ -2704,7 +2726,7 @@
|
||||
|
||||
/**
|
||||
* Set the number of proportional font spaces required to fill up a typical character space.
|
||||
* This can help to better align the output of commands like `G29 O` Mesh Output.
|
||||
* This can help to better align the output of commands like 'G29 O' Mesh Output.
|
||||
*
|
||||
* For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0.
|
||||
* Otherwise, adjust according to your client and font.
|
||||
@@ -2969,7 +2991,7 @@
|
||||
|
||||
#if AXIS_IS_TMC_CONFIG(X)
|
||||
#define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
|
||||
#define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing
|
||||
#define X_CURRENT_HOME X_CURRENT // (mA) RMS current for homing. (Typically lower than *_CURRENT.)
|
||||
#define X_MICROSTEPS 16 // 0..256
|
||||
#define X_RSENSE 0.11
|
||||
#define X_CHAIN_POS -1 // -1..0: Not chained. 1: MCU MOSI connected. 2: Next in chain, ...
|
||||
@@ -3179,6 +3201,13 @@
|
||||
//#define E7_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Use the homing current for all probing. (e.g., Current may be reduced to the
|
||||
* point where a collision makes the motor skip instead of damaging the bed,
|
||||
* though this is unlikely to save delicate probes from being damaged.
|
||||
*/
|
||||
//#define PROBING_USE_CURRENT_HOME
|
||||
|
||||
// @section tmc/spi
|
||||
|
||||
/**
|
||||
@@ -3443,7 +3472,7 @@
|
||||
/**
|
||||
* Step on both rising and falling edge signals (as with a square wave).
|
||||
*/
|
||||
//#define EDGE_STEPPING
|
||||
#define EDGE_STEPPING
|
||||
|
||||
/**
|
||||
* Enable M122 debugging command for TMC stepper drivers.
|
||||
@@ -3525,7 +3554,7 @@
|
||||
//#define PHOTOGRAPH_PIN 23
|
||||
|
||||
// Canon Hack Development Kit
|
||||
// https://web.archive.org/web/20200920094805/https://captain-slow.dk/2014/03/09/3d-printing-timelapses/
|
||||
// https://web.archive.org/web/20200920094805/captain-slow.dk/2014/03/09/3d-printing-timelapses/
|
||||
//#define CHDK_PIN 4
|
||||
|
||||
// Optional second move with delay to trigger the camera shutter
|
||||
@@ -4378,58 +4407,81 @@
|
||||
//#define E_MUX0_PIN 40 // Always Required
|
||||
//#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs
|
||||
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
|
||||
#elif HAS_PRUSA_MMU2
|
||||
// Serial port used for communication with MMU2.
|
||||
#define MMU2_SERIAL_PORT 2
|
||||
|
||||
// Use hardware reset for MMU if a pin is defined for it
|
||||
//#define MMU2_RST_PIN 23
|
||||
#elif HAS_PRUSA_MMU2 || HAS_PRUSA_MMU3
|
||||
// Common settings for MMU2/MMU2S/MMU3
|
||||
// Serial port used for communication with MMU2/MMU2S/MMU3.
|
||||
#define MMU_SERIAL_PORT 2
|
||||
#define MMU_BAUD 115200
|
||||
|
||||
// Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
|
||||
//#define MMU2_MODE_12V
|
||||
//#define MMU_RST_PIN 23 // Define this pin to use Hardware Reset for MMU2/MMU2S/MMU3
|
||||
|
||||
// G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
|
||||
#define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
//#define MMU_MENUS // Add an LCD menu for MMU2/MMU2S/MMU3
|
||||
|
||||
// Add an LCD menu for MMU2
|
||||
//#define MMU2_MENUS
|
||||
//#define MMU_DEBUG // Write debug info to serial output
|
||||
|
||||
// Settings for filament load / unload from the LCD menu.
|
||||
// This is for Průša MK3-style extruders. Customize for your hardware.
|
||||
#define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
|
||||
#define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
|
||||
{ 7.2, 1145 }, \
|
||||
{ 14.4, 871 }, \
|
||||
{ 36.0, 1393 }, \
|
||||
{ 14.4, 871 }, \
|
||||
{ 50.0, 198 }
|
||||
// Options pertaining to MMU2 and MMU2S
|
||||
#if HAS_PRUSA_MMU2
|
||||
// Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
|
||||
//#define MMU2_MODE_12V
|
||||
|
||||
#define MMU2_RAMMING_SEQUENCE \
|
||||
{ 1.0, 1000 }, \
|
||||
{ 1.0, 1500 }, \
|
||||
{ 2.0, 2000 }, \
|
||||
{ 1.5, 3000 }, \
|
||||
{ 2.5, 4000 }, \
|
||||
{ -15.0, 5000 }, \
|
||||
{ -14.0, 1200 }, \
|
||||
{ -6.0, 600 }, \
|
||||
{ 10.0, 700 }, \
|
||||
{ -10.0, 400 }, \
|
||||
{ -50.0, 2000 }
|
||||
// Settings for filament load / unload from the LCD menu.
|
||||
// This is for Průša MK3-style extruders. Customize for your hardware.
|
||||
#define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
|
||||
|
||||
// G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
|
||||
#define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
|
||||
// MMU2 sequences use mm/min. Not compatible with MMU3, which use mm/sec.
|
||||
#define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
|
||||
{ 4.4, 871 }, \
|
||||
{ 10.0, 1393 }, \
|
||||
{ 4.4, 871 }, \
|
||||
{ 10.0, 198 }
|
||||
|
||||
#define MMU2_RAMMING_SEQUENCE \
|
||||
{ 1.0, 1000 }, \
|
||||
{ 1.0, 1500 }, \
|
||||
{ 2.0, 2000 }, \
|
||||
{ 1.5, 3000 }, \
|
||||
{ 2.5, 4000 }, \
|
||||
{ -15.0, 5000 }, \
|
||||
{ -14.0, 1200 }, \
|
||||
{ -6.0, 600 }, \
|
||||
{ 10.0, 700 }, \
|
||||
{ -10.0, 400 }, \
|
||||
{ -50.0, 2000 }
|
||||
|
||||
#endif // HAS_PRUSA_MMU2
|
||||
|
||||
/**
|
||||
* Using a sensor like the MMU2S
|
||||
* This mode requires a MK3S extruder with a sensor at the extruder idler, like the MMU2S.
|
||||
* Options pertaining to MMU2S devices
|
||||
* Requires the MK3S extruder with a sensor at the extruder idler, like the MMU2S.
|
||||
* See https://help.prusa3d.com/guide/3b-mk3s-mk2-5s-extruder-upgrade_41560#42048, step 11
|
||||
*/
|
||||
#if HAS_PRUSA_MMU2S
|
||||
#define MMU2_C0_RETRY 5 // Number of retries (total time = timeout*retries)
|
||||
|
||||
/**
|
||||
* This is called after the filament runout sensor is triggered to check if
|
||||
* the filament has been loaded properly by moving the filament back and
|
||||
* forth to see if the filament runout sensor is going to get triggered
|
||||
* again, which should not occur if the filament is properly loaded.
|
||||
*
|
||||
* Thus, the MMU2_CAN_LOAD_SEQUENCE should contain some forward and
|
||||
* backward moves. The forward moves should be greater than the backward
|
||||
* moves.
|
||||
*
|
||||
* This is useless if your filament runout sensor is way behind the gears.
|
||||
* In that case use {0, MMU2_CAN_LOAD_FEEDRATE}
|
||||
*
|
||||
* Adjust MMU2_CAN_LOAD_SEQUENCE according to your setup.
|
||||
*/
|
||||
#define MMU2_CAN_LOAD_FEEDRATE 800 // (mm/min)
|
||||
#define MMU2_CAN_LOAD_SEQUENCE \
|
||||
{ 0.1, MMU2_CAN_LOAD_FEEDRATE }, \
|
||||
{ 60.0, MMU2_CAN_LOAD_FEEDRATE }, \
|
||||
{ -52.0, MMU2_CAN_LOAD_FEEDRATE }
|
||||
{ 5.0, MMU2_CAN_LOAD_FEEDRATE }, \
|
||||
{ 15.0, MMU2_CAN_LOAD_FEEDRATE }, \
|
||||
{ -10.0, MMU2_CAN_LOAD_FEEDRATE }
|
||||
|
||||
#define MMU2_CAN_LOAD_RETRACT 6.0 // (mm) Keep under the distance between Load Sequence values
|
||||
#define MMU2_CAN_LOAD_DEVIATION 0.8 // (mm) Acceptable deviation
|
||||
@@ -4440,10 +4492,90 @@
|
||||
|
||||
// Continue unloading if sensor detects filament after the initial unload move
|
||||
//#define MMU_IR_UNLOAD_MOVE
|
||||
#else
|
||||
|
||||
#elif HAS_PRUSA_MMU3
|
||||
|
||||
// MMU3 settings
|
||||
|
||||
#define MMU3_HAS_CUTTER // Enable cutter related functionality
|
||||
|
||||
#define MMU3_MAX_RETRIES 3 // Number of retries (total time = timeout*retries)
|
||||
|
||||
// As discussed with our PrusaSlicer profile specialist
|
||||
// - ToolChange shall not try to push filament into the very tip of the nozzle
|
||||
// to have some space for additional G-code to tune the extruded filament length
|
||||
// in the profile
|
||||
// Beware - this value is used to initialize the MMU logic layer - it will be sent to the MMU upon line up (written into its 8bit register 0x0b)
|
||||
// However - in the G-code we can get a request to set the extra load distance at runtime to something else (M708 A0xb Xsomething).
|
||||
// The printer intercepts such a call and sets its extra load distance to match the new value as well.
|
||||
#define MMU3_FILAMENT_SENSOR_E_POSITION 0 // (mm)
|
||||
#define _MMU3_LOAD_DISTANCE_PAST_GEARS 5 // (mm)
|
||||
#define MMU3_TOOL_CHANGE_LOAD_LENGTH (MMU3_FILAMENT_SENSOR_E_POSITION + _MMU3_LOAD_DISTANCE_PAST_GEARS) // (mm)
|
||||
|
||||
#define MMU3_LOAD_TO_NOZZLE_FEED_RATE 20.0 // (mm/s)
|
||||
|
||||
#define MMU3_VERIFY_LOAD_TO_NOZZLE_FEED_RATE 50.0 // (mm/s)
|
||||
#define _MMU3_VERIFY_LOAD_TO_NOZZLE_TWEAK -5.0 // (mm) Amount to adjust the length for verifying load-to-nozzle
|
||||
|
||||
// The first thing the MMU does is initialize its axis.
|
||||
// Meanwhile the E-motor will unload 20mm of filament in about 1 second.
|
||||
#define MMU3_RETRY_UNLOAD_TO_FINDA_LENGTH 80.0 // (mm)
|
||||
#define MMU3_RETRY_UNLOAD_TO_FINDA_FEED_RATE 80.0 // (mm/s)
|
||||
|
||||
// After loading a new filament, the printer will extrude this length of filament
|
||||
// then retract to the original position. This is used to check if the filament sensor
|
||||
// reading flickers or filament is jammed.
|
||||
#define _MMU_EXTRUDER_PTFE_LENGTH 42.3 // (mm)
|
||||
#define _MMU_EXTRUDER_HEATBREAK_LENGTH 17.7 // (mm)
|
||||
#define MMU3_CHECK_FILAMENT_PRESENCE_EXTRUSION_LENGTH (MMU3_FILAMENT_SENSOR_E_POSITION + _MMU_EXTRUDER_PTFE_LENGTH + _MMU_EXTRUDER_HEATBREAK_LENGTH + _MMU3_VERIFY_LOAD_TO_NOZZLE_TWEAK) // (mm)
|
||||
|
||||
/**
|
||||
* MMU1 Extruder Sensor
|
||||
* SpoolJoin Consumes All Filament -- EXPERIMENTAL
|
||||
*
|
||||
* SpoolJoin normally triggers when FINDA sensor untriggers while printing.
|
||||
* This is the default behaviour and it doesn't consume all the filament
|
||||
* before triggering a filament change. This leaves some filament in the
|
||||
* current slot and before switching to the next slot it is unloaded.
|
||||
*
|
||||
* Enabling this option will trigger the filament change when both FINDA
|
||||
* and Filament Runout Sensor triggers during the print and it allows the
|
||||
* filament in the current slot to be completely consumed before doing the
|
||||
* filament change. But this can cause problems as a little bit of filament
|
||||
* will be left between the extruder gears (thinking that the filament
|
||||
* sensor is triggered through the gears) and the end of the PTFE tube and
|
||||
* can cause filament load issues.
|
||||
*/
|
||||
//#define MMU3_SPOOL_JOIN_CONSUMES_ALL_FILAMENT
|
||||
|
||||
// MMU3 sequences use mm/sec. Not compatible with MMU2 which use mm/min.
|
||||
#define MMU3_LOAD_TO_NOZZLE_SEQUENCE \
|
||||
{ _MMU_EXTRUDER_PTFE_LENGTH, MMM_TO_MMS(810) }, /* (13.5 mm/s) Fast load ahead of heatbreak */ \
|
||||
{ _MMU_EXTRUDER_HEATBREAK_LENGTH, MMM_TO_MMS(198) } /* ( 3.3 mm/s) Slow load after heatbreak */
|
||||
|
||||
#define MMU3_RAMMING_SEQUENCE \
|
||||
{ 0.2816, MMM_TO_MMS(1339.0) }, \
|
||||
{ 0.3051, MMM_TO_MMS(1451.0) }, \
|
||||
{ 0.3453, MMM_TO_MMS(1642.0) }, \
|
||||
{ 0.3990, MMM_TO_MMS(1897.0) }, \
|
||||
{ 0.4761, MMM_TO_MMS(2264.0) }, \
|
||||
{ 0.5767, MMM_TO_MMS(2742.0) }, \
|
||||
{ 0.5691, MMM_TO_MMS(3220.0) }, \
|
||||
{ 0.1081, MMM_TO_MMS(3220.0) }, \
|
||||
{ 0.7644, MMM_TO_MMS(3635.0) }, \
|
||||
{ 0.8248, MMM_TO_MMS(3921.0) }, \
|
||||
{ 0.8483, MMM_TO_MMS(4033.0) }, \
|
||||
{ -15.0, MMM_TO_MMS(6000.0) }, \
|
||||
{ -24.5, MMM_TO_MMS(1200.0) }, \
|
||||
{ -7.0, MMM_TO_MMS( 600.0) }, \
|
||||
{ -3.5, MMM_TO_MMS( 360.0) }, \
|
||||
{ 20.0, MMM_TO_MMS( 454.0) }, \
|
||||
{ -20.0, MMM_TO_MMS( 303.0) }, \
|
||||
{ -35.0, MMM_TO_MMS(2000.0) }
|
||||
|
||||
#else // MMU2 (not MMU2S)
|
||||
|
||||
/**
|
||||
* MMU2 Extruder Sensor
|
||||
*
|
||||
* Support for a Průša (or other) IR Sensor to detect filament near the extruder
|
||||
* and make loading more reliable. Suitable for an extruder equipped with a filament
|
||||
@@ -4453,16 +4585,14 @@
|
||||
* move up to the gears. If no filament is detected, the MMU2 can make some more attempts.
|
||||
* If all attempts fail, a filament runout will be triggered.
|
||||
*/
|
||||
//#define MMU_EXTRUDER_SENSOR
|
||||
#if ENABLED(MMU_EXTRUDER_SENSOR)
|
||||
#define MMU_LOADING_ATTEMPTS_NR 5 // max. number of attempts to load filament if first load fail
|
||||
//#define MMU2_EXTRUDER_SENSOR
|
||||
#if ENABLED(MMU2_EXTRUDER_SENSOR)
|
||||
#define MMU2_LOADING_ATTEMPTS_NR 5 // Number of times to try loading filament before failure
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//#define MMU2_DEBUG // Write debug info to serial output
|
||||
|
||||
#endif // HAS_PRUSA_MMU2
|
||||
#endif // HAS_PRUSA_MMU2 || HAS_PRUSA_MMU3
|
||||
|
||||
/**
|
||||
* Advanced Print Counter settings
|
||||
|
||||
+108
-77
@@ -187,6 +187,17 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1033)
|
||||
# RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1034)
|
||||
|
||||
# RAMPS 1.6+ (Power outputs: Hotend, Fan, Bed)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1035)
|
||||
# RAMPS 1.6+ (Power outputs: Hotend0, Hotend1, Bed)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1036)
|
||||
# RAMPS 1.6+ (Power outputs: Hotend, Fan0, Fan1)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1037)
|
||||
# RAMPS 1.6+ (Power outputs: Hotend0, Hotend1, Fan)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1038)
|
||||
# RAMPS 1.6+ (Power outputs: Spindle, Controller Fan)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1039)
|
||||
|
||||
#
|
||||
# RAMPS Derivatives - ATmega1280, ATmega2560
|
||||
#
|
||||
@@ -221,108 +232,113 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1112)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
|
||||
# BigTreeTech or BIQU KFB2.0
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1114)
|
||||
# zrib V2.0 (Chinese RAMPS replica)
|
||||
# Zonestar zrib V2.0 (Chinese RAMPS replica)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1115)
|
||||
# zrib V5.2 (Chinese RAMPS replica)
|
||||
# Zonestar zrib V5.2 (Chinese RAMPS replica)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1116)
|
||||
# Felix 2.0+ Electronics Board (RAMPS like)
|
||||
# Zonestar zrib V5.3 (Chinese RAMPS replica)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1117)
|
||||
# Invent-A-Part RigidBoard
|
||||
# Felix 2.0+ Electronics Board (RAMPS like)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1118)
|
||||
# Invent-A-Part RigidBoard V2
|
||||
# Invent-A-Part RigidBoard
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
|
||||
# Sainsmart 2-in-1 board
|
||||
# Invent-A-Part RigidBoard V2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
|
||||
# Ultimaker
|
||||
# Sainsmart 2-in-1 board
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
|
||||
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
||||
# Ultimaker
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1122)
|
||||
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
|
||||
MCU ?= atmega1280
|
||||
PROG_MCU ?= m1280
|
||||
# Azteeg X3
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
|
||||
# Azteeg X3 Pro
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1124)
|
||||
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
||||
# Azteeg X3 Pro
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1125)
|
||||
# Rumba
|
||||
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1126)
|
||||
# Raise3D N series Rumba derivative
|
||||
# Rumba
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1127)
|
||||
# Rapide Lite 200 (v1, low-cost RUMBA clone with drv)
|
||||
# Raise3D N series Rumba derivative
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1128)
|
||||
# Formbot T-Rex 2 Plus
|
||||
# Rapide Lite 200 (v1, low-cost RUMBA clone with drv)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1129)
|
||||
# Formbot T-Rex 3
|
||||
# Formbot T-Rex 2 Plus
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1130)
|
||||
# Formbot Raptor
|
||||
# Formbot T-Rex 3
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1131)
|
||||
# Formbot Raptor 2
|
||||
# Formbot Raptor
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1132)
|
||||
# bq ZUM Mega 3D
|
||||
# Formbot Raptor 2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1133)
|
||||
# MakeBoard Mini v2.1.2 by MicroMake
|
||||
# bq ZUM Mega 3D
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1134)
|
||||
# TriGorilla Anycubic version 1.3-based on RAMPS EFB
|
||||
# MakeBoard Mini v2.1.2 by MicroMake
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
|
||||
# ... Ver 1.4
|
||||
# TriGorilla Anycubic version 1.3-based on RAMPS EFB
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
|
||||
# ... Rev 1.1 (new servo pin order)
|
||||
# ... Ver 1.4
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
|
||||
# Creality: Ender-4, CR-8
|
||||
# ... Rev 1.1 (new servo pin order)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
|
||||
# Creality: CR10S, CR20, CR-X
|
||||
# Creality: Ender-4, CR-8
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1139)
|
||||
# Dagoma F5
|
||||
# Creality: CR10S, CR20, CR-X
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
|
||||
# FYSETC F6 1.3
|
||||
# Dagoma F5
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
|
||||
# FYSETC F6 1.4
|
||||
# Dagoma D6 (as found in the Dagoma DiscoUltimate V2 TMC)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
|
||||
# Wanhao Duplicator i3 Plus
|
||||
# FYSETC F6 1.3
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
|
||||
# VORON Design
|
||||
# FYSETC F6 1.4
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
|
||||
# Tronxy TRONXY-V3-1.0
|
||||
# Wanhao Duplicator i3 Plus
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
|
||||
# Z-Bolt X Series
|
||||
# VORON Design
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
|
||||
# TT OSCAR
|
||||
# Tronxy TRONXY-V3-1.0
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
|
||||
# Overlord/Overlord Pro
|
||||
# Z-Bolt X Series
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
|
||||
# ADIMLab Gantry v1
|
||||
# TT OSCAR
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1149)
|
||||
# ADIMLab Gantry v2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1150)
|
||||
# BIQU Tango V1
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1151)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1150)
|
||||
# MKS GEN L V2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1152)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1151)
|
||||
# MKS GEN L V2.1
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1153)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1152)
|
||||
# Copymaster 3D
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1154)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1153)
|
||||
# Ortur 4
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1155)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1154)
|
||||
# Tenlog D3 Hero IDEX printer
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1155)
|
||||
# Tenlog D3, D5, D6 IDEX Printer
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1156)
|
||||
# Tenlog D3,5,6 Pro IDEX printers
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1157)
|
||||
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1158)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1157)
|
||||
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1159)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1158)
|
||||
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1160)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1159)
|
||||
# Longer LK1 PRO / Alfawise U20 Pro (PRO version)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1161)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1160)
|
||||
# Longer LKx PRO / Alfawise Uxx Pro (PRO version)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1162)
|
||||
# Zonestar zrib V5.3 (Chinese RAMPS replica)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1163)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1161)
|
||||
# Pxmalion Core I3
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1162)
|
||||
# Panowin Cutlass (as found in the Panowin F1)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1163)
|
||||
# Kodama Bardo V1.x (as found in the Kodama Trinus)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1164)
|
||||
# XTLW MFF V1.0
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1165)
|
||||
# XTLW MFF V2.0
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1166)
|
||||
|
||||
|
||||
#
|
||||
# RAMBo and derivatives
|
||||
@@ -340,7 +356,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1203)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1204)
|
||||
# abee Scoovo X9H
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1205)
|
||||
# Rambo ThinkerV2
|
||||
# ThinkerV2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1206)
|
||||
|
||||
#
|
||||
@@ -383,30 +399,40 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1315)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1316)
|
||||
# Geeetech GT2560 Rev B for A10(M/T/D)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1317)
|
||||
# Geeetech GT2560 Rev B for A10(M/T/D)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
|
||||
# Geeetech GT2560 Rev B for Mecreator2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
|
||||
# Geeetech GT2560 Rev B for A20(M/T/D)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1319)
|
||||
# Geeetech GT2560 Rev B for A20(M/T/D)
|
||||
# Geeetech GT2560 Rev B for A10(M/T/D)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1320)
|
||||
# Einstart retrofit
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1321)
|
||||
# Wanhao 0ne+ i3 Mini
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1322)
|
||||
# Leapfrog Xeed 2015
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1323)
|
||||
# PICA Shield (original version)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1324)
|
||||
# PICA Shield (rev C or later)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1325)
|
||||
# Intamsys 4.0 (Funmat HT)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1326)
|
||||
# Malyan M180 Mainboard Version 2 (no display function, direct G-code only)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1327)
|
||||
# Geeetech GT2560 Rev B for A20(M/T/D)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1321)
|
||||
# Einstart retrofit
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1322)
|
||||
# Wanhao 0ne+ i3 Mini
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1323)
|
||||
# Overlord/Overlord Pro
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1324)
|
||||
# ADIMLab Gantry v1
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1325)
|
||||
# ADIMLab Gantry v2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1326)
|
||||
# Leapfrog Xeed 2015
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1327)
|
||||
# PICA Shield (original version)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1328)
|
||||
# Mega controller & Protoneer CNC Shield V3.00
|
||||
# PICA Shield (rev C or later)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1329)
|
||||
# Intamsys 4.0 (Funmat HT)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1330)
|
||||
# Malyan M180 Mainboard Version 2 (no display function, direct G-code only)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1331)
|
||||
# Mega controller & Protoneer CNC Shield V3.00
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1332)
|
||||
# WEEDO 62A board (TINA2, Monoprice Cadet, etc.)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1333)
|
||||
# Geeetech GT2560 V4.1B for A10(M/T/D)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1334)
|
||||
|
||||
#
|
||||
# ATmega1281, ATmega2561
|
||||
@@ -440,7 +466,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1502)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega644p
|
||||
PROG_MCU ?= m644p
|
||||
# Melzi V2.0
|
||||
# Melzi V2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1503)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
@@ -450,36 +476,41 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1504)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
PROG_MCU ?= m1284p
|
||||
# Melzi Creality3D board (for CR-10 etc)
|
||||
# Melzi Creality3D (for CR-10 etc)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1505)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
PROG_MCU ?= m1284p
|
||||
# Melzi Malyan M150 board
|
||||
# Melzi Creality3D (for Ender-2)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1506)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
PROG_MCU ?= m1284p
|
||||
# Tronxy X5S
|
||||
# Melzi Malyan M150
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1507)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
PROG_MCU ?= m1284p
|
||||
# STB V1.1
|
||||
# Tronxy X5S
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1508)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
PROG_MCU ?= m1284p
|
||||
# Azteeg X1
|
||||
# STB V1.1
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1509)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
PROG_MCU ?= m1284p
|
||||
# Anet 1.0 (Melzi clone)
|
||||
# Azteeg X1
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1510)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
PROG_MCU ?= m1284p
|
||||
# Anet 1.0 (Melzi clone)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1511)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
PROG_MCU ?= m1284p
|
||||
# ZoneStar ZMIB V2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1511)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
//#define STRING_DISTRIBUTION_DATE "2024-05-27"
|
||||
//#define STRING_DISTRIBUTION_DATE "2024-10-17"
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
|
||||
@@ -129,11 +129,11 @@ typedef Servo hal_servo_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#if !WITHIN(MMU2_SERIAL_PORT, 0, 3)
|
||||
#error "MMU2_SERIAL_PORT must be from 0 to 3"
|
||||
#ifdef MMU_SERIAL_PORT
|
||||
#if !WITHIN(MMU_SERIAL_PORT, 0, 3)
|
||||
#error "MMU_SERIAL_PORT must be from 0 to 3"
|
||||
#endif
|
||||
#define MMU2_SERIAL mmuSerial
|
||||
#define MMU_SERIAL mmuSerial
|
||||
#endif
|
||||
|
||||
#ifdef LCD_SERIAL_PORT
|
||||
@@ -141,7 +141,7 @@ typedef Servo hal_servo_t;
|
||||
#error "LCD_SERIAL_PORT must be from 0 to 3."
|
||||
#endif
|
||||
#define LCD_SERIAL lcdSerial
|
||||
#if HAS_DGUS_LCD
|
||||
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
|
||||
#endif
|
||||
#endif
|
||||
@@ -159,7 +159,7 @@ typedef Servo hal_servo_t;
|
||||
#define GET_PIN_MAP_INDEX(pin) pin
|
||||
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
|
||||
|
||||
#define HAL_SENSITIVE_PINS 0, 1,
|
||||
#define HAL_SENSITIVE_PINS 0, 1
|
||||
|
||||
#ifdef __AVR_AT90USB1286__
|
||||
#define JTAG_DISABLE() do{ MCUCR = 0x80; MCUCR = 0x80; }while(0)
|
||||
|
||||
@@ -601,20 +601,20 @@ MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser);
|
||||
|
||||
#endif // SERIAL_PORT_3
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#ifdef MMU_SERIAL_PORT
|
||||
|
||||
ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _RX_vect)) {
|
||||
MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>::store_rxd_char();
|
||||
ISR(SERIAL_REGNAME(USART, MMU_SERIAL_PORT, _RX_vect)) {
|
||||
MarlinSerial<MMU2SerialCfg<MMU_SERIAL_PORT>>::store_rxd_char();
|
||||
}
|
||||
|
||||
ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _UDRE_vect)) {
|
||||
MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>::_tx_udr_empty_irq();
|
||||
ISR(SERIAL_REGNAME(USART, MMU_SERIAL_PORT, _UDRE_vect)) {
|
||||
MarlinSerial<MMU2SerialCfg<MMU_SERIAL_PORT>>::_tx_udr_empty_irq();
|
||||
}
|
||||
|
||||
template class MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> >;
|
||||
template class MarlinSerial< MMU2SerialCfg<MMU_SERIAL_PORT> >;
|
||||
MSerialMMU2 mmuSerial(MSerialMMU2::HasEmergencyParser);
|
||||
|
||||
#endif // MMU2_SERIAL_PORT
|
||||
#endif // MMU_SERIAL_PORT
|
||||
|
||||
#ifdef LCD_SERIAL_PORT
|
||||
|
||||
@@ -629,7 +629,7 @@ MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser);
|
||||
template class MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> >;
|
||||
MSerialLCD lcdSerial(MSerialLCD::HasEmergencyParser);
|
||||
|
||||
#if HAS_DGUS_LCD
|
||||
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
template<typename Cfg>
|
||||
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::get_tx_buffer_free() {
|
||||
const ring_buffer_pos_t t = tx_buffer.tail, // next byte to send.
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
static ring_buffer_pos_t available();
|
||||
static void write(const uint8_t c);
|
||||
static void flushTX();
|
||||
#if HAS_DGUS_LCD
|
||||
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
static ring_buffer_pos_t get_tx_buffer_free();
|
||||
#endif
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
|
||||
#endif // !USBCON
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#ifdef MMU_SERIAL_PORT
|
||||
template <uint8_t serial>
|
||||
struct MMU2SerialCfg {
|
||||
static constexpr int PORT = serial;
|
||||
@@ -260,7 +260,7 @@
|
||||
static constexpr bool RX_OVERRUNS = false;
|
||||
};
|
||||
|
||||
typedef Serial1Class< MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> > > MSerialMMU2;
|
||||
typedef Serial1Class< MarlinSerial< MMU2SerialCfg<MMU_SERIAL_PORT> > > MSerialMMU2;
|
||||
extern MSerialMMU2 mmuSerial;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -345,6 +345,14 @@ void setup_endstop_interrupts() {
|
||||
pciSetup(Z_MIN_PROBE_PIN);
|
||||
#endif
|
||||
#endif
|
||||
#if USE_CALIBRATION
|
||||
#if (digitalPinToInterrupt(CALIBRATION_PIN) != NOT_AN_INTERRUPT)
|
||||
_ATTACH(CALIBRATION_PIN);
|
||||
#else
|
||||
static_assert(digitalPinHasPCICR(CALIBRATION_PIN), "CALIBRATION_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
||||
pciSetup(CALIBRATION_PIN);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// If we arrive here without raising an assertion, each pin has either an EXT-interrupt or a PCI.
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
|
||||
else {
|
||||
if (p == 32 || p == 128) continue; // Skip TIMER2 specific prescalers when not TIMER2
|
||||
const uint16_t rft = (F_CPU) / (p * f_desired);
|
||||
DEBUG_ECHOLNPGM("(Not Timer 2) F_CPU=" STRINGIFY(F_CPU), " prescaler=", p, " f_desired=", f_desired);
|
||||
DEBUG_ECHOLNPGM("(Not Timer 2) F_CPU=", STRINGIFY(F_CPU), " prescaler=", p, " f_desired=", f_desired);
|
||||
res_fast_temp = rft - 1;
|
||||
res_pc_temp = rft / 2;
|
||||
}
|
||||
|
||||
@@ -28,9 +28,6 @@
|
||||
* Port : E0 E1 E4 E5 G5 E3 H3 H4 H5 H6 B4 B5 B6 B7 J1 J0 H1 H0 D3 D2 D1 D0 A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 C1 C0 D7 G2 G1 G0 L7 L6 L5 L4 L3 L2 L1 L0 B3 B2 B1 B0 F0 F1 F2 F3 F4 F5 F6 F7 K0 K1 K2 K3 K4 K5 K6 K7 | E2 E6 E7 xx xx H2 H7 G3 G4 xx xx xx xx xx D4 D5 D6 xx xx J2 J3 J4 J5 J6 J7 xx xx xx xx xx
|
||||
* Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 78 79 80 xx xx 84 85 71 70 xx xx xx xx xx 81 82 83 xx xx 72 73 75 76 77 74 xx xx xx xx xx
|
||||
* Analog Input : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||
*
|
||||
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
|
||||
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
|
||||
*/
|
||||
|
||||
#include "../fastio.h"
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
*
|
||||
* Logical Pin: 38 39 40 41 42 43 44 45 16 10 11 12 06 07 08 09 30 31 32 33 34 35 36 37 17 18 19 20 21 22 23 24 00 01 13 05 02 03 14 15 46 47 48 49 50 51 52 53 25 26 27 28 29 04
|
||||
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5
|
||||
*
|
||||
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
|
||||
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
|
||||
*/
|
||||
|
||||
#include "../fastio.h"
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
*
|
||||
* Logical Pin: 08 09 10 11 12 13 14 15 16 17 18 19 20 21 00 01 02 03 04 05 06 07
|
||||
* Port: B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7
|
||||
*
|
||||
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
|
||||
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
|
||||
*/
|
||||
|
||||
#include "../fastio.h"
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
*
|
||||
* Logical Pin: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
||||
* Port: B0 B1 B2 B3 B4 B5 B6 B7 D0 D1 D2 D3 D4 D5 D6 D7 C0 C1 C2 C3 C4 C5 C6 C7 A7 A6 A5 A4 A3 A2 A1 A0
|
||||
*
|
||||
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
|
||||
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
|
||||
*/
|
||||
|
||||
/** ATMega644
|
||||
|
||||
@@ -26,10 +26,7 @@
|
||||
*
|
||||
* Logical Pin: 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
|
||||
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
|
||||
* The logical pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3
|
||||
*
|
||||
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
|
||||
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
|
||||
* Logical pins 46-47 aren't supported by Teensyduino, but are supported below as E2 and E3
|
||||
*/
|
||||
|
||||
#include "../fastio.h"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
|
||||
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
|
||||
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
|
||||
#define GET_PINMODE(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin))
|
||||
#define getValidPinMode(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin))
|
||||
|
||||
#elif AVR_ATmega2560_FAMILY_PLUS_70 // So we can access/display all the pins on boards using more than 70
|
||||
|
||||
@@ -50,32 +50,32 @@
|
||||
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer_plus_70(p)
|
||||
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask_plus_70(p)
|
||||
#define digitalPinToPort_DEBUG(p) digitalPinToPort_plus_70(p)
|
||||
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
||||
bool getValidPinMode(pin_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
||||
|
||||
#else
|
||||
|
||||
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
|
||||
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
|
||||
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
|
||||
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
||||
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin)
|
||||
bool getValidPinMode(pin_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
||||
#define getPinByIndex(p) pgm_read_byte(&pin_array[p].pin)
|
||||
|
||||
#endif
|
||||
|
||||
#define VALID_PIN(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0)
|
||||
#define isValidPin(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0)
|
||||
#if AVR_ATmega1284_FAMILY
|
||||
#define IS_ANALOG(P) WITHIN(P, analogInputToDigitalPin(7), analogInputToDigitalPin(0))
|
||||
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int(IS_ANALOG(P) ? (P) - analogInputToDigitalPin(7) : -1)
|
||||
#define isAnalogPin(P) WITHIN(P, analogInputToDigitalPin(7), analogInputToDigitalPin(0))
|
||||
#define digitalPinToAnalogIndex(P) int(isAnalogPin(P) ? (P) - analogInputToDigitalPin(7) : -1)
|
||||
#else
|
||||
#define _ANALOG1(P) WITHIN(P, analogInputToDigitalPin(0), analogInputToDigitalPin(7))
|
||||
#define _ANALOG2(P) WITHIN(P, analogInputToDigitalPin(8), analogInputToDigitalPin(15))
|
||||
#define IS_ANALOG(P) (_ANALOG1(P) || _ANALOG2(P))
|
||||
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int(_ANALOG1(P) ? (P) - analogInputToDigitalPin(0) : _ANALOG2(P) ? (P) - analogInputToDigitalPin(8) + 8 : -1)
|
||||
#define isAnalogPin(P) (_ANALOG1(P) || _ANALOG2(P))
|
||||
#define digitalPinToAnalogIndex(P) int(_ANALOG1(P) ? (P) - analogInputToDigitalPin(0) : _ANALOG2(P) ? (P) - analogInputToDigitalPin(8) + 8 : -1)
|
||||
#endif
|
||||
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin)
|
||||
#define getPinByIndex(p) pgm_read_byte(&pin_array[p].pin)
|
||||
#define MULTI_NAME_PAD 26 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
void PRINT_ARRAY_NAME(uint8_t x) {
|
||||
void printPinNameByIndex(uint8_t x) {
|
||||
PGM_P const name_mem_pointer = (PGM_P)pgm_read_ptr(&pin_array[x].name);
|
||||
for (uint8_t y = 0; y < MAX_NAME_LENGTH; ++y) {
|
||||
char temp_char = pgm_read_byte(name_mem_pointer + y);
|
||||
@@ -88,7 +88,7 @@ void PRINT_ARRAY_NAME(uint8_t x) {
|
||||
}
|
||||
}
|
||||
|
||||
#define GET_ARRAY_IS_DIGITAL(x) pgm_read_byte(&pin_array[x].is_digital)
|
||||
#define getPinIsDigitalByIndex(x) pgm_read_byte(&pin_array[x].is_digital)
|
||||
|
||||
#if defined(__AVR_ATmega1284P__) // 1284 IDE extensions set this to the number of
|
||||
#undef NUM_DIGITAL_PINS // digital only pins while all other CPUs have it
|
||||
@@ -276,7 +276,7 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N -
|
||||
if (TEST(*TMSK, TOIE)) err_prob_interrupt();
|
||||
}
|
||||
|
||||
void pwm_details(uint8_t pin) {
|
||||
void printPinPWM(uint8_t pin) {
|
||||
switch (digitalPinToTimer_DEBUG(pin)) {
|
||||
|
||||
#if ABTEST(0)
|
||||
@@ -347,7 +347,7 @@ void pwm_details(uint8_t pin) {
|
||||
#else
|
||||
UNUSED(print_is_also_tied);
|
||||
#endif
|
||||
} // pwm_details
|
||||
} // printPinPWM
|
||||
|
||||
#ifndef digitalRead_mod // Use Teensyduino's version of digitalRead - it doesn't disable the PWMs
|
||||
int digitalRead_mod(const pin_t pin) { // same as digitalRead except the PWM stop section has been removed
|
||||
@@ -356,7 +356,7 @@ void pwm_details(uint8_t pin) {
|
||||
}
|
||||
#endif
|
||||
|
||||
void print_port(const pin_t pin) { // print port number
|
||||
void printPinPort(const pin_t pin) { // print port number
|
||||
#ifdef digitalPinToPort_DEBUG
|
||||
uint8_t x;
|
||||
SERIAL_ECHOPGM(" Port: ");
|
||||
@@ -386,7 +386,7 @@ void print_port(const pin_t pin) { // print port number
|
||||
#endif
|
||||
}
|
||||
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
|
||||
#undef ABTEST
|
||||
|
||||
@@ -120,7 +120,7 @@ void u8g_spiSend_sw_AVR_mode_3(uint8_t val) {
|
||||
U8G_ATOMIC_END();
|
||||
}
|
||||
|
||||
#if ENABLED(FYSETC_MINI_12864)
|
||||
#if U8G_SPI_USE_MODE_3
|
||||
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_3
|
||||
#else
|
||||
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_0
|
||||
@@ -143,9 +143,9 @@ uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
|
||||
break;
|
||||
|
||||
case U8G_COM_MSG_CHIP_SELECT:
|
||||
#if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
#if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
u8g_com_arduino_digital_write(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
|
||||
u8g_com_arduino_digital_write(u8g, U8G_PI_CS, LOW);
|
||||
}
|
||||
|
||||
@@ -81,11 +81,11 @@ extern DefaultSerial4 MSerial3;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#if WITHIN(MMU2_SERIAL_PORT, 0, 3)
|
||||
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
|
||||
#ifdef MMU_SERIAL_PORT
|
||||
#if WITHIN(MMU_SERIAL_PORT, 0, 3)
|
||||
#define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT)
|
||||
#else
|
||||
#error "MMU2_SERIAL_PORT must be from 0 to 3."
|
||||
#error "MMU_SERIAL_PORT must be from 0 to 3."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -127,7 +127,7 @@ typedef Servo hal_servo_t;
|
||||
#define HAL_ADC_RESOLUTION 10
|
||||
|
||||
#ifndef analogInputToDigitalPin
|
||||
#define analogInputToDigitalPin(p) ((p < 12U) ? (p) + 54U : -1)
|
||||
#define analogInputToDigitalPin(p) pin_t((p < 12U) ? (p) + 54U : -1)
|
||||
#endif
|
||||
|
||||
//
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
static Flags<_Nbr_16timers> DisablePending; // ISR should disable the timer at the next timer reset
|
||||
|
||||
// ------------------------
|
||||
/// Interrupt handler for the TC0 channel 1.
|
||||
// Interrupt handler for the TC0 channel 1.
|
||||
// ------------------------
|
||||
void Servo_Handler(const timer16_Sequence_t, Tc*, const uint8_t);
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ void setup_endstop_interrupts() {
|
||||
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
|
||||
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
|
||||
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
|
||||
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
|
||||
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
|
||||
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
|
||||
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
|
||||
|
||||
@@ -68,16 +68,15 @@
|
||||
* Usually the hardware SPI pins are only available to the LCD. This makes the DUE hard SPI used at the same time
|
||||
* as the TMC2130 soft SPI the most common setup.
|
||||
*/
|
||||
#define _IS_HW_SPI(P) (defined(TMC_SPI_##P) && (TMC_SPI_##P == SD_MOSI_PIN || TMC_SPI_##P == SD_MISO_PIN || TMC_SPI_##P == SD_SCK_PIN))
|
||||
|
||||
#if HAS_MEDIA && HAS_DRIVER(TMC2130)
|
||||
#if ENABLED(TMC_USE_SW_SPI)
|
||||
#if DISABLED(SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
|
||||
#error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."
|
||||
#endif
|
||||
#elif ENABLED(SOFTWARE_SPI)
|
||||
#define _IS_HW_SPI(P) (defined(TMC_SPI_##P) && (TMC_SPI_##P == SD_MOSI_PIN || TMC_SPI_##P == SD_MISO_PIN || TMC_SPI_##P == SD_SCK_PIN))
|
||||
#if DISABLED(SOFTWARE_SPI) && ENABLED(TMC_USE_SW_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
|
||||
#error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."
|
||||
#endif
|
||||
#if ENABLED(SOFTWARE_SPI) && DISABLED(TMC_USE_SW_SPI)
|
||||
#error "DUE software SPI is required but is incompatible with TMC2130 hardware SPI. Enable TMC_USE_SW_SPI to fix."
|
||||
#endif
|
||||
#undef _IS_HW_SPI
|
||||
#endif
|
||||
|
||||
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
|
||||
|
||||
@@ -64,19 +64,19 @@
|
||||
#define NUMBER_PINS_TOTAL PINS_COUNT
|
||||
|
||||
#define digitalRead_mod(p) extDigitalRead(p) // AVR digitalRead disabled PWM before it read the pin
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
||||
#define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital
|
||||
#define VALID_PIN(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL))
|
||||
#define DIGITAL_PIN_TO_ANALOG_PIN(p) int(p - analogInputToDigitalPin(0))
|
||||
#define IS_ANALOG(P) WITHIN(P, char(analogInputToDigitalPin(0)), char(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1)))
|
||||
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define getPinByIndex(p) pin_array[p].pin
|
||||
#define getPinIsDigitalByIndex(p) pin_array[p].is_digital
|
||||
#define isValidPin(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL))
|
||||
#define digitalPinToAnalogIndex(p) int(p - analogInputToDigitalPin(0))
|
||||
#define isAnalogPin(P) WITHIN(P, pin_t(analogInputToDigitalPin(0)), pin_t(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1)))
|
||||
#define pwm_status(pin) (((g_pinStatus[pin] & 0xF) == PIN_STATUS_PWM) && \
|
||||
((g_APinDescription[pin].ulPinAttribute & PIN_ATTR_PWM) == PIN_ATTR_PWM))
|
||||
#define MULTI_NAME_PAD 14 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
|
||||
bool getValidPinMode(int8_t pin) { // 1: output, 0: input
|
||||
volatile Pio* port = g_APinDescription[pin].pPort;
|
||||
uint32_t mask = g_APinDescription[pin].ulPin;
|
||||
uint8_t pin_status = g_pinStatus[pin] & 0xF;
|
||||
@@ -85,14 +85,14 @@ bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
|
||||
|| pwm_status(pin));
|
||||
}
|
||||
|
||||
void pwm_details(int32_t pin) {
|
||||
void printPinPWM(int32_t pin) {
|
||||
if (pwm_status(pin)) {
|
||||
uint32_t chan = g_APinDescription[pin].ulPWMChannel;
|
||||
SERIAL_ECHOPGM("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY);
|
||||
}
|
||||
}
|
||||
|
||||
void print_port(const pin_t) {}
|
||||
void printPinPort(const pin_t) {}
|
||||
|
||||
/**
|
||||
* DUE Board pin | PORT | Label
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
/**
|
||||
* Define SPI Pins: SCK, MISO, MOSI, SS
|
||||
*
|
||||
* Available chip select pins for HW SPI are 4 10 52 77
|
||||
* Available chip select pins for HW SPI are 4 10 52 77 87
|
||||
*/
|
||||
#if SDSS == 4 || SDSS == 10 || SDSS == 52 || SDSS == 77 || SDSS == 87
|
||||
#if SDSS == 4
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
#include <U8glib-HAL.h>
|
||||
|
||||
#if ENABLED(FYSETC_MINI_12864)
|
||||
#if U8G_SPI_USE_MODE_3
|
||||
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_3
|
||||
#else
|
||||
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_0
|
||||
@@ -96,15 +96,15 @@ uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
|
||||
break;
|
||||
|
||||
case U8G_COM_MSG_CHIP_SELECT:
|
||||
#if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 1); //set SCK to mode 3 idle state before CS goes active
|
||||
#if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
|
||||
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, LOW);
|
||||
}
|
||||
else {
|
||||
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, HIGH);
|
||||
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0); //set SCK to mode 0 idle state after CS goes inactive
|
||||
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
|
||||
}
|
||||
#else
|
||||
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, !arg_val);
|
||||
|
||||
@@ -11,7 +11,7 @@ if pioutil.is_pio_build():
|
||||
|
||||
if current_OS == 'Windows':
|
||||
|
||||
Import("env")
|
||||
env = pioutil.env
|
||||
|
||||
# Use bossac.exe on Windows
|
||||
env.Replace(
|
||||
|
||||
@@ -19,7 +19,7 @@ void sd_mmc_spi_mem_init() {
|
||||
}
|
||||
|
||||
inline bool media_ready() {
|
||||
return IS_SD_INSERTED() && !IS_SD_PRINTING() && !IS_SD_FILE_OPEN() && card.isMounted();
|
||||
return IS_SD_MOUNTED() && IS_SD_INSERTED() && !IS_SD_FILE_OPEN() && !IS_SD_PRINTING();
|
||||
}
|
||||
|
||||
bool sd_mmc_spi_unload(bool) { return true; }
|
||||
@@ -32,14 +32,14 @@ Ctrl_status sd_mmc_spi_test_unit_ready() {
|
||||
#ifdef DISABLE_DUE_SD_MMC
|
||||
return CTRL_NO_PRESENT;
|
||||
#endif
|
||||
if (!media_ready()) return CTRL_NO_PRESENT;
|
||||
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
|
||||
return CTRL_GOOD;
|
||||
}
|
||||
|
||||
// NOTE: This function is defined as returning the address of the last block
|
||||
// in the card, which is cardSize() - 1
|
||||
Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector) {
|
||||
if (!media_ready()) return CTRL_NO_PRESENT;
|
||||
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
|
||||
*nb_sector = card.diskIODriver()->cardSize() - 1;
|
||||
return CTRL_GOOD;
|
||||
}
|
||||
@@ -61,7 +61,7 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) {
|
||||
#ifdef DISABLE_DUE_SD_MMC
|
||||
return CTRL_NO_PRESENT;
|
||||
#endif
|
||||
if (!media_ready()) return CTRL_NO_PRESENT;
|
||||
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
|
||||
|
||||
#ifdef DEBUG_MMC
|
||||
{
|
||||
@@ -100,7 +100,7 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) {
|
||||
#ifdef DISABLE_DUE_SD_MMC
|
||||
return CTRL_NO_PRESENT;
|
||||
#endif
|
||||
if (!media_ready()) return CTRL_NO_PRESENT;
|
||||
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
|
||||
|
||||
#ifdef DEBUG_MMC
|
||||
{
|
||||
|
||||
@@ -209,16 +209,17 @@ int MarlinHAL::freeMemory() { return ESP.getFreeHeap(); }
|
||||
// ADC
|
||||
// ------------------------
|
||||
|
||||
#define ADC1_CHANNEL(pin) ADC1_GPIO ## pin ## _CHANNEL
|
||||
|
||||
// https://docs.espressif.com/projects/esp-idf/en/release-v4.4/esp32/api-reference/peripherals/adc.html
|
||||
adc1_channel_t get_channel(int pin) {
|
||||
switch (pin) {
|
||||
case 39: return ADC1_CHANNEL(39);
|
||||
case 36: return ADC1_CHANNEL(36);
|
||||
case 35: return ADC1_CHANNEL(35);
|
||||
case 34: return ADC1_CHANNEL(34);
|
||||
case 33: return ADC1_CHANNEL(33);
|
||||
case 32: return ADC1_CHANNEL(32);
|
||||
case 39: return ADC1_CHANNEL_3;
|
||||
case 36: return ADC1_CHANNEL_0;
|
||||
case 35: return ADC1_CHANNEL_7;
|
||||
case 34: return ADC1_CHANNEL_6;
|
||||
case 33: return ADC1_CHANNEL_5;
|
||||
case 32: return ADC1_CHANNEL_4;
|
||||
case 37: return ADC1_CHANNEL_1;
|
||||
case 38: return ADC1_CHANNEL_2;
|
||||
}
|
||||
return ADC1_CHANNEL_MAX;
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ void setup_endstop_interrupts() {
|
||||
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
|
||||
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
|
||||
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
|
||||
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
|
||||
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
|
||||
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
|
||||
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
|
||||
|
||||
@@ -152,7 +152,7 @@ void stepperTask(void *parameter) {
|
||||
xQueueReceive(dma.queue, &dma.current, portMAX_DELAY);
|
||||
dma.rw_pos = 0;
|
||||
|
||||
const bool using_ftMotion = TERN0(FT_MOTION, ftMotion.cfg.mode);
|
||||
const bool using_ftMotion = TERN0(FT_MOTION, ftMotion.cfg.active);
|
||||
|
||||
while (dma.rw_pos < DMA_SAMPLE_COUNT) {
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
||||
config.counter_en = TIMER_PAUSE;
|
||||
config.alarm_en = TIMER_ALARM_EN;
|
||||
config.intr_type = TIMER_INTR_LEVEL;
|
||||
config.auto_reload = true;
|
||||
config.auto_reload = TIMER_AUTORELOAD_EN;
|
||||
|
||||
// Select and initialize the timer
|
||||
timer_init(timer.group, timer.idx, &config);
|
||||
|
||||
@@ -53,12 +53,11 @@ typedef uint64_t hal_timer_t;
|
||||
#if ENABLED(I2S_STEPPER_STREAM)
|
||||
#define STEPPER_TIMER_PRESCALE 1
|
||||
#define STEPPER_TIMER_RATE 250000 // 250khz, 4µs pulses of i2s word clock
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs // wrong would be 0.25
|
||||
#else
|
||||
#define STEPPER_TIMER_PRESCALE 40
|
||||
#define STEPPER_TIMER_RATE ((HAL_TIMER_RATE) / (STEPPER_TIMER_PRESCALE)) // frequency of stepper timer, 2MHz
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
|
||||
#endif
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
|
||||
|
||||
#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
|
||||
|
||||
|
||||
+10
-13
@@ -114,22 +114,19 @@
|
||||
// Misc. Functions
|
||||
//
|
||||
#ifndef analogInputToDigitalPin
|
||||
#define analogInputToDigitalPin(p) (p)
|
||||
#define analogInputToDigitalPin(p) pin_t(p)
|
||||
#endif
|
||||
|
||||
#define CRITICAL_SECTION_START \
|
||||
uint32_t primask = __get_PRIMASK(); \
|
||||
(void)__iCliRetVal()
|
||||
#define CRITICAL_SECTION_START() \
|
||||
const bool irqon = !__get_PRIMASK(); \
|
||||
__disable_irq(); \
|
||||
__DSB();
|
||||
#define CRITICAL_SECTION_END() \
|
||||
__DSB(); \
|
||||
if (irqon) __enable_irq();
|
||||
|
||||
#define CRITICAL_SECTION_END \
|
||||
if (!primask) \
|
||||
(void)__iSeiRetVal()
|
||||
|
||||
// Disable interrupts
|
||||
#define cli() noInterrupts()
|
||||
|
||||
// Enable interrupts
|
||||
#define sei() interrupts()
|
||||
#define cli() __disable_irq()
|
||||
#define sei() __enable_irq()
|
||||
|
||||
// bss_end alias
|
||||
#define __bss_end __bss_end__
|
||||
|
||||
@@ -101,12 +101,14 @@ void setup_endstop_interrupts() {
|
||||
|
||||
SETUP(Z_MIN_PROBE);
|
||||
|
||||
SETUP(CALIBRATION);
|
||||
|
||||
#undef SETUP
|
||||
}
|
||||
|
||||
// Ensure 1 - 10 IRQs are registered
|
||||
// Disable some endstops if you encounter this error
|
||||
#define ENDSTOPS_INTERRUPTS_COUNT COUNT_ENABLED(USE_X_MAX, USE_X_MIN, USE_X2_MAX, USE_X2_MIN, USE_Y_MAX, USE_Y_MIN, USE_Y2_MAX, USE_Y2_MIN, USE_Z_MAX, USE_Z_MIN, USE_Z2_MAX, USE_Z2_MIN, USE_Z3_MAX, USE_Z3_MIN, USE_Z4_MAX, USE_Z4_MIN, USE_Z_MIN_PROBE)
|
||||
#define ENDSTOPS_INTERRUPTS_COUNT COUNT_ENABLED(USE_X_MAX, USE_X_MIN, USE_X2_MAX, USE_X2_MIN, USE_Y_MAX, USE_Y_MIN, USE_Y2_MAX, USE_Y2_MIN, USE_Z_MAX, USE_Z_MIN, USE_Z2_MAX, USE_Z2_MIN, USE_Z3_MAX, USE_Z3_MIN, USE_Z4_MAX, USE_Z4_MIN, USE_Z_MIN_PROBE, USE_CALIBRATION)
|
||||
#if ENDSTOPS_INTERRUPTS_COUNT > 10
|
||||
#error "Too many endstop interrupts! HC32F460 only supports 10 endstop interrupts."
|
||||
#elif ENDSTOPS_INTERRUPTS_COUNT == 0
|
||||
|
||||
@@ -94,8 +94,10 @@
|
||||
#error "SERIAL_DMA requires USART_RX_DMA_SUPPORT to be enabled in the arduino core."
|
||||
#endif
|
||||
|
||||
// USART_RX_DMA_SUPPORT does not implement core_hook_usart_rx_irq, which is required for the emergency parser
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
// Before arduino core version 1.2.0, USART_RX_DMA_SUPPORT did not implement
|
||||
// core_hook_usart_rx_irq, which is required for the emergency parser.
|
||||
// With 1.2.0, this was fixed (see https://github.com/shadow578/framework-arduino-hc32f46x/pull/25).
|
||||
#if ENABLED(EMERGENCY_PARSER) && ARDUINO_CORE_VERSION_INT < GET_VERSION_INT(1, 2, 0)
|
||||
#error "EMERGENCY_PARSER is not supported with SERIAL_DMA. Please disable either SERIAL_DMA or EMERGENCY_PARSER."
|
||||
#endif
|
||||
|
||||
|
||||
@@ -31,24 +31,24 @@
|
||||
|
||||
#define NUM_DIGITAL_PINS BOARD_NR_GPIO_PINS
|
||||
#define NUMBER_PINS_TOTAL BOARD_NR_GPIO_PINS
|
||||
#define VALID_PIN(pin) IS_GPIO_PIN(pin)
|
||||
#define isValidPin(pin) IS_GPIO_PIN(pin)
|
||||
|
||||
// Note: pin_array is defined in `Marlin/src/pins/pinsDebug.h`, and since this file is included
|
||||
// after it, it is available in this file as well.
|
||||
#define GET_ARRAY_PIN(p) pin_t(pin_array[p].pin)
|
||||
#define getPinByIndex(p) pin_t(pin_array[p].pin)
|
||||
#define digitalRead_mod(p) extDigitalRead(p)
|
||||
#define PRINT_PIN(p) \
|
||||
#define printPinNumber(p) \
|
||||
do { \
|
||||
sprintf_P(buffer, PSTR("%3hd "), int16_t(p)); \
|
||||
SERIAL_ECHO(buffer); \
|
||||
} while (0)
|
||||
#define PRINT_PIN_ANALOG(p) \
|
||||
#define printPinAnalog(p) \
|
||||
do { \
|
||||
sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); \
|
||||
sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); \
|
||||
SERIAL_ECHO(buffer); \
|
||||
} while (0)
|
||||
#define PRINT_PORT(p) print_port(p)
|
||||
#define PRINT_ARRAY_NAME(x) \
|
||||
#define PRINT_PORT(p) printPinPort(p)
|
||||
#define printPinNameByIndex(x) \
|
||||
do { \
|
||||
sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); \
|
||||
SERIAL_ECHO(buffer); \
|
||||
@@ -71,14 +71,14 @@
|
||||
#define M43_NEVER_TOUCH(Q) (IS_HOST_USART_PIN(Q) || IS_OSC_PIN(Q))
|
||||
#endif
|
||||
|
||||
static pin_t DIGITAL_PIN_TO_ANALOG_PIN(pin_t pin) {
|
||||
if (!VALID_PIN(pin)) return -1;
|
||||
static int8_t digitalPinToAnalogIndex(pin_t pin) {
|
||||
if (!isValidPin(pin)) return -1;
|
||||
const int8_t adc_channel = int8_t(PIN_MAP[pin].adc_info.channel);
|
||||
return pin_t(adc_channel);
|
||||
}
|
||||
|
||||
static bool IS_ANALOG(pin_t pin) {
|
||||
if (!VALID_PIN(pin)) return false;
|
||||
static bool isAnalogPin(pin_t pin) {
|
||||
if (!isValidPin(pin)) return false;
|
||||
|
||||
if (PIN_MAP[pin].adc_info.channel != ADC_PIN_INVALID)
|
||||
return _GET_MODE(pin) == INPUT_ANALOG && !M43_NEVER_TOUCH(pin);
|
||||
@@ -86,13 +86,13 @@ static bool IS_ANALOG(pin_t pin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool GET_PINMODE(const pin_t pin) {
|
||||
return VALID_PIN(pin) && !IS_INPUT(pin);
|
||||
static bool getValidPinMode(const pin_t pin) {
|
||||
return isValidPin(pin) && !IS_INPUT(pin);
|
||||
}
|
||||
|
||||
static bool GET_ARRAY_IS_DIGITAL(const int16_t array_pin) {
|
||||
const pin_t pin = GET_ARRAY_PIN(array_pin);
|
||||
return (!IS_ANALOG(pin));
|
||||
static bool getPinIsDigitalByIndex(const int16_t array_pin) {
|
||||
const pin_t pin = getPinByIndex(array_pin);
|
||||
return (!isAnalogPin(pin));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,7 +117,7 @@ bool pwm_status(const pin_t pin) {
|
||||
return timera_is_unit_initialized(unit) && timera_is_channel_active(unit, channel) && getPinMode(pin) == OUTPUT_PWM;
|
||||
}
|
||||
|
||||
void pwm_details(const pin_t pin) {
|
||||
void printPinPWM(const pin_t pin) {
|
||||
// Get timer assignment for pin
|
||||
timera_config_t *unit;
|
||||
en_timera_channel_t channel;
|
||||
@@ -161,7 +161,7 @@ void pwm_details(const pin_t pin) {
|
||||
}
|
||||
}
|
||||
|
||||
void print_port(pin_t pin) {
|
||||
void printPinPort(pin_t pin) {
|
||||
const char port = 'A' + char(pin >> 4); // Pin div 16
|
||||
const int16_t gbit = PIN_MAP[pin].bit_pos;
|
||||
char buffer[8];
|
||||
|
||||
@@ -97,7 +97,7 @@ void core_hook_sysclock_init() {
|
||||
#endif
|
||||
|
||||
// sysclk is now configured according to F_CPU (i.e., 200MHz PLL output)
|
||||
constexpr uint32_t sysclock = F_CPU;
|
||||
const uint32_t sysclock = F_CPU;
|
||||
|
||||
// Setup clock divisors for sysclk = 200 MHz
|
||||
// Note: PCLK1 is used for step+temp timers, and need to be kept at 50 MHz (until there is a better solution)
|
||||
|
||||
@@ -82,7 +82,7 @@ static inline uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, c
|
||||
}
|
||||
|
||||
static void u8g_sw_spi_shift_out(uint8_t val) {
|
||||
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864)
|
||||
#if U8G_SPI_USE_MODE_3
|
||||
swSpiTransfer_mode_3(val, SPI_speed);
|
||||
#else
|
||||
swSpiTransfer_mode_0(val, SPI_speed);
|
||||
@@ -116,15 +116,15 @@ uint8_t u8g_com_HAL_HC32_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, voi
|
||||
break;
|
||||
|
||||
case U8G_COM_MSG_CHIP_SELECT:
|
||||
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // This LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
WRITE(DOGLCD_SCK, HIGH); // Set SCK to mode 3 idle state before CS goes active
|
||||
#if U8G_SPI_USE_MODE_3 // This LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
WRITE(DOGLCD_SCK, HIGH); // Set SCK to mode 3 idle state before CS goes active
|
||||
WRITE(DOGLCD_CS, LOW);
|
||||
}
|
||||
else {
|
||||
WRITE(DOGLCD_CS, HIGH);
|
||||
WRITE(DOGLCD_SCK, LOW); // Set SCK to mode 0 idle state after CS goes inactive
|
||||
WRITE(DOGLCD_SCK, LOW); // Set SCK to mode 0 idle state after CS goes inactive
|
||||
}
|
||||
#else
|
||||
WRITE(DOGLCD_CS, !arg_val);
|
||||
|
||||
@@ -52,7 +52,7 @@ uint8_t MarlinHAL::active_ch = 0;
|
||||
|
||||
uint16_t MarlinHAL::adc_value() {
|
||||
const pin_t pin = analogInputToDigitalPin(active_ch);
|
||||
if (!VALID_PIN(pin)) return 0;
|
||||
if (!isValidPin(pin)) return 0;
|
||||
return uint16_t((Gpio::get(pin) >> 2) & 0x3FF); // return 10bit value as Marlin expects
|
||||
}
|
||||
|
||||
|
||||
@@ -49,28 +49,28 @@ extern "C" void delay(const int msec) {
|
||||
// IO functions
|
||||
// As defined by Arduino INPUT(0x0), OUTPUT(0x1), INPUT_PULLUP(0x2)
|
||||
void pinMode(const pin_t pin, const uint8_t mode) {
|
||||
if (!VALID_PIN(pin)) return;
|
||||
if (!isValidPin(pin)) return;
|
||||
Gpio::setMode(pin, mode);
|
||||
}
|
||||
|
||||
void digitalWrite(pin_t pin, uint8_t pin_status) {
|
||||
if (!VALID_PIN(pin)) return;
|
||||
if (!isValidPin(pin)) return;
|
||||
Gpio::set(pin, pin_status);
|
||||
}
|
||||
|
||||
bool digitalRead(pin_t pin) {
|
||||
if (!VALID_PIN(pin)) return false;
|
||||
if (!isValidPin(pin)) return false;
|
||||
return Gpio::get(pin);
|
||||
}
|
||||
|
||||
void analogWrite(pin_t pin, int pwm_value) { // 1 - 254: pwm_value, 0: LOW, 255: HIGH
|
||||
if (!VALID_PIN(pin)) return;
|
||||
if (!isValidPin(pin)) return;
|
||||
Gpio::set(pin, pwm_value);
|
||||
}
|
||||
|
||||
uint16_t analogRead(pin_t adc_pin) {
|
||||
if (!VALID_PIN(DIGITAL_PIN_TO_ANALOG_PIN(adc_pin))) return 0;
|
||||
return Gpio::get(DIGITAL_PIN_TO_ANALOG_PIN(adc_pin));
|
||||
if (!isValidPin(digitalPinToAnalogIndex(adc_pin))) return 0;
|
||||
return Gpio::get(digitalPinToAnalogIndex(adc_pin));
|
||||
}
|
||||
|
||||
char *dtostrf(double __val, signed char __width, unsigned char __prec, char *__s) {
|
||||
|
||||
@@ -42,7 +42,7 @@ constexpr pin_t analogInputToDigitalPin(const int8_t p) {
|
||||
}
|
||||
|
||||
// Get the analog index for a digital pin
|
||||
constexpr int8_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t p) {
|
||||
constexpr int8_t digitalPinToAnalogIndex(const pin_t p) {
|
||||
return (WITHIN(p, analog_offset, NUM_DIGITAL_PINS) ? p - analog_offset : P_NC);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ constexpr int8_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t p) {
|
||||
constexpr int16_t GET_PIN_MAP_INDEX(const pin_t pin) { return pin; }
|
||||
|
||||
// Test whether the pin is valid
|
||||
constexpr bool VALID_PIN(const pin_t p) { return WITHIN(p, 0, NUM_DIGITAL_PINS); }
|
||||
constexpr bool isValidPin(const pin_t p) { return WITHIN(p, 0, NUM_DIGITAL_PINS); }
|
||||
|
||||
// Test whether the pin is PWM
|
||||
constexpr bool PWM_PIN(const pin_t p) { return false; }
|
||||
|
||||
@@ -29,20 +29,20 @@
|
||||
*/
|
||||
|
||||
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
|
||||
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0)
|
||||
#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0 ? 1 : 0)
|
||||
#define digitalRead_mod(p) digitalRead(p)
|
||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define getPinByIndex(p) pin_array[p].pin
|
||||
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
// active ADC function/mode/code values for PINSEL registers
|
||||
constexpr int8_t ADC_pin_mode(pin_t pin) { return -1; }
|
||||
|
||||
int8_t get_pin_mode(const pin_t pin) { return VALID_PIN(pin) ? 0 : -1; }
|
||||
int8_t get_pin_mode(const pin_t pin) { return isValidPin(pin) ? 0 : -1; }
|
||||
|
||||
bool GET_PINMODE(const pin_t pin) {
|
||||
bool getValidPinMode(const pin_t pin) {
|
||||
const int8_t pin_mode = get_pin_mode(pin);
|
||||
if (pin_mode == -1 || pin_mode == ADC_pin_mode(pin)) // Invalid pin or active analog pin
|
||||
return false;
|
||||
@@ -50,11 +50,11 @@ bool GET_PINMODE(const pin_t pin) {
|
||||
return (Gpio::getMode(pin) != 0); // Input/output state
|
||||
}
|
||||
|
||||
bool GET_ARRAY_IS_DIGITAL(const pin_t pin) {
|
||||
return (!IS_ANALOG(pin) || get_pin_mode(pin) != ADC_pin_mode(pin));
|
||||
bool getPinIsDigitalByIndex(const pin_t pin) {
|
||||
return (!isAnalogPin(pin) || get_pin_mode(pin) != ADC_pin_mode(pin));
|
||||
}
|
||||
|
||||
void pwm_details(const pin_t pin) {}
|
||||
void printPinPWM(const pin_t pin) {}
|
||||
bool pwm_status(const pin_t) { return false; }
|
||||
|
||||
void print_port(const pin_t) {}
|
||||
void printPinPort(const pin_t) {}
|
||||
|
||||
@@ -28,12 +28,6 @@
|
||||
// spiBeginTransaction.
|
||||
#endif
|
||||
|
||||
// Onboard SD
|
||||
//#define SD_SCK_PIN P0_07
|
||||
//#define SD_MISO_PIN P0_08
|
||||
//#define SD_MOSI_PIN P0_09
|
||||
//#define SD_SS_PIN P0_06
|
||||
|
||||
// External SD
|
||||
#ifndef SD_SCK_PIN
|
||||
#define SD_SCK_PIN 50
|
||||
|
||||
@@ -82,13 +82,13 @@ extern DefaultSerial1 USBSerial;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#if MMU2_SERIAL_PORT == -1
|
||||
#define MMU2_SERIAL USBSerial
|
||||
#elif WITHIN(MMU2_SERIAL_PORT, 0, 3)
|
||||
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
|
||||
#ifdef MMU_SERIAL_PORT
|
||||
#if MMU_SERIAL_PORT == -1
|
||||
#define MMU_SERIAL USBSerial
|
||||
#elif WITHIN(MMU_SERIAL_PORT, 0, 3)
|
||||
#define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT)
|
||||
#else
|
||||
#error "MMU2_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
||||
#error "MMU_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -100,7 +100,7 @@ extern DefaultSerial1 USBSerial;
|
||||
#else
|
||||
#error "LCD_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
||||
#endif
|
||||
#if HAS_DGUS_LCD
|
||||
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.available()
|
||||
#endif
|
||||
#endif
|
||||
@@ -137,12 +137,12 @@ extern DefaultSerial1 USBSerial;
|
||||
//
|
||||
|
||||
// Test whether the pin is valid
|
||||
constexpr bool VALID_PIN(const pin_t pin) {
|
||||
constexpr bool isValidPin(const pin_t pin) {
|
||||
return LPC176x::pin_is_valid(pin);
|
||||
}
|
||||
|
||||
// Get the analog index for a digital pin
|
||||
constexpr int8_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t pin) {
|
||||
constexpr int8_t digitalPinToAnalogIndex(const pin_t pin) {
|
||||
return (LPC176x::pin_is_valid(pin) && LPC176x::pin_has_adc(pin)) ? pin : -1;
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ constexpr pin_t GET_PIN_MAP_PIN(const int16_t index) {
|
||||
// Parse a G-code word into a pin index
|
||||
int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
|
||||
// P0.6 thru P0.9 are for the onboard SD card
|
||||
#define HAL_SENSITIVE_PINS P0_06, P0_07, P0_08, P0_09,
|
||||
#define HAL_SENSITIVE_PINS P0_06, P0_07, P0_08, P0_09
|
||||
|
||||
// ------------------------
|
||||
// Defines
|
||||
|
||||
@@ -146,6 +146,12 @@ void setup_endstop_interrupts() {
|
||||
#endif
|
||||
_ATTACH(Z_MIN_PROBE_PIN);
|
||||
#endif
|
||||
#if USE_CALIBRATION
|
||||
#if !LPC1768_PIN_INTERRUPT_M(CALIBRATION_PIN)
|
||||
#error "CALIBRATION_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
|
||||
#endif
|
||||
_ATTACH(CALIBRATION_PIN);
|
||||
#endif
|
||||
#if USE_I_MAX
|
||||
#if !LPC1768_PIN_INTERRUPT_M(I_MAX_PIN)
|
||||
#error "I_MAX_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
|
||||
|
||||
@@ -26,8 +26,10 @@
|
||||
|
||||
void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
|
||||
if (!LPC176x::pin_is_valid(pin)) return;
|
||||
if (LPC176x::pwm_attach_pin(pin))
|
||||
LPC176x::pwm_write_ratio(pin, invert ? 1.0f - (float)v / v_size : (float)v / v_size); // map 1-254 onto PWM range
|
||||
if (LPC176x::pwm_attach_pin(pin)) {
|
||||
const uint32_t duty = map(invert ? v_size - v : v, 0, v_size, 0, LPC176x::pwm_get_period(pin));
|
||||
LPC176x::pwm_write(pin, duty);
|
||||
}
|
||||
}
|
||||
|
||||
void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
#define _WRITE(IO,V) WRITE_PIN(IO,V)
|
||||
|
||||
/// toggle a pin
|
||||
#define _TOGGLE(IO) _WRITE(IO, !READ(IO))
|
||||
#define _TOGGLE(IO) LPC176x::gpio_toggle(IO)
|
||||
|
||||
/// set pin as input
|
||||
#define _SET_INPUT(IO) SET_DIR_INPUT(IO)
|
||||
|
||||
@@ -29,12 +29,12 @@
|
||||
*/
|
||||
|
||||
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
|
||||
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0)
|
||||
#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0 ? 1 : 0)
|
||||
#define digitalRead_mod(p) extDigitalRead(p)
|
||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("P%d_%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR("_A%d "), LPC176x::pin_get_adc_channel(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define getPinByIndex(p) pin_array[p].pin
|
||||
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("P%d_%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR("_A%d "), LPC176x::pin_get_adc_channel(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define MULTI_NAME_PAD 17 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
// pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities
|
||||
@@ -42,15 +42,15 @@
|
||||
#define M43_NEVER_TOUCH(Q) ((Q) == P0_29 || (Q) == P0_30 || (Q) == P2_09) // USB pins
|
||||
#endif
|
||||
|
||||
bool GET_PINMODE(const pin_t pin) {
|
||||
bool getValidPinMode(const pin_t pin) {
|
||||
if (!LPC176x::pin_is_valid(pin) || LPC176x::pin_adc_enabled(pin)) // Invalid pin or active analog pin
|
||||
return false;
|
||||
|
||||
return LPC176x::gpio_direction(pin);
|
||||
}
|
||||
|
||||
#define GET_ARRAY_IS_DIGITAL(x) ((bool) pin_array[x].is_digital)
|
||||
#define getPinIsDigitalByIndex(x) ((bool) pin_array[x].is_digital)
|
||||
|
||||
void print_port(const pin_t) {}
|
||||
void pwm_details(const pin_t) {}
|
||||
void printPinPort(const pin_t) {}
|
||||
void printPinPWM(const pin_t) {}
|
||||
bool pwm_status(const pin_t) { return false; }
|
||||
|
||||
@@ -28,12 +28,13 @@
|
||||
// spiBeginTransaction.
|
||||
#endif
|
||||
|
||||
/** onboard SD card */
|
||||
//#define SD_SCK_PIN P0_07
|
||||
//#define SD_MISO_PIN P0_08
|
||||
//#define SD_MOSI_PIN P0_09
|
||||
//#define SD_SS_PIN P0_06
|
||||
/** external */
|
||||
// Onboard SD
|
||||
//#define SD_SCK_PIN P0_07
|
||||
//#define SD_MISO_PIN P0_08
|
||||
//#define SD_MOSI_PIN P0_09
|
||||
//#define SD_SS_PIN P0_06
|
||||
|
||||
// External SD
|
||||
#ifndef SD_SCK_PIN
|
||||
#define SD_SCK_PIN P0_15
|
||||
#endif
|
||||
|
||||
@@ -132,7 +132,7 @@ uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, const pin_t sck
|
||||
static uint8_t SPI_speed = 0;
|
||||
|
||||
static void u8g_sw_spi_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) {
|
||||
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864)
|
||||
#if U8G_SPI_USE_MODE_3
|
||||
swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin);
|
||||
#else
|
||||
swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin);
|
||||
@@ -160,15 +160,15 @@ uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val,
|
||||
break;
|
||||
|
||||
case U8G_COM_MSG_CHIP_SELECT:
|
||||
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
|
||||
#if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
|
||||
u8g_SetPILevel(u8g, U8G_PI_CS, LOW);
|
||||
}
|
||||
else {
|
||||
u8g_SetPILevel(u8g, U8G_PI_CS, HIGH);
|
||||
u8g_SetPILevel(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
|
||||
u8g_SetPILevel(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
|
||||
}
|
||||
#else
|
||||
u8g_SetPILevel(u8g, U8G_PI_CS, !arg_val);
|
||||
|
||||
@@ -13,9 +13,9 @@ if pioutil.is_pio_build():
|
||||
target_drive = "REARM"
|
||||
|
||||
import platform
|
||||
|
||||
current_OS = platform.system()
|
||||
Import("env")
|
||||
|
||||
env = pioutil.env
|
||||
|
||||
def print_error(e):
|
||||
print('\nUnable to find destination disk (%s)\n' \
|
||||
|
||||
@@ -87,11 +87,11 @@ extern MSerialT serial_stream_3;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#if WITHIN(MMU2_SERIAL_PORT, 0, 3)
|
||||
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
|
||||
#ifdef MMU_SERIAL_PORT
|
||||
#if WITHIN(MMU_SERIAL_PORT, 0, 3)
|
||||
#define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT)
|
||||
#else
|
||||
#error "MMU2_SERIAL_PORT must be from 0 to 3. Please update your configuration."
|
||||
#error "MMU_SERIAL_PORT must be from 0 to 3. Please update your configuration."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
|
||||
int8_t ADC_pin_mode(pin_t pin) { return -1; }
|
||||
|
||||
int8_t get_pin_mode(const pin_t pin) { return VALID_PIN(pin) ? 0 : -1; }
|
||||
int8_t get_pin_mode(const pin_t pin) { return isValidPin(pin) ? 0 : -1; }
|
||||
|
||||
bool GET_PINMODE(const pin_t pin) {
|
||||
bool getValidPinMode(const pin_t pin) {
|
||||
const int8_t pin_mode = get_pin_mode(pin);
|
||||
if (pin_mode == -1 || pin_mode == ADC_pin_mode(pin)) // Invalid pin or active analog pin
|
||||
return false;
|
||||
@@ -37,12 +37,12 @@ bool GET_PINMODE(const pin_t pin) {
|
||||
return (Gpio::getMode(pin) != 0); // Input/output state
|
||||
}
|
||||
|
||||
bool GET_ARRAY_IS_DIGITAL(const pin_t pin) {
|
||||
return !IS_ANALOG(pin) || get_pin_mode(pin) != ADC_pin_mode(pin);
|
||||
bool getPinIsDigitalByIndex(const pin_t pin) {
|
||||
return !isAnalogPin(pin) || get_pin_mode(pin) != ADC_pin_mode(pin);
|
||||
}
|
||||
|
||||
void print_port(const pin_t) {}
|
||||
void pwm_details(const pin_t) {}
|
||||
void printPinPort(const pin_t) {}
|
||||
void printPinPWM(const pin_t) {}
|
||||
bool pwm_status(const pin_t) { return false; }
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,19 +30,19 @@
|
||||
*/
|
||||
|
||||
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
|
||||
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0)
|
||||
#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0 ? 1 : 0)
|
||||
#define digitalRead_mod(p) digitalRead(p)
|
||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define getPinByIndex(p) pin_array[p].pin
|
||||
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
// Active ADC function/mode/code values for PINSEL registers
|
||||
int8_t ADC_pin_mode(pin_t pin);
|
||||
int8_t get_pin_mode(const pin_t pin);
|
||||
bool GET_PINMODE(const pin_t pin);
|
||||
bool GET_ARRAY_IS_DIGITAL(const pin_t pin);
|
||||
void print_port(const pin_t);
|
||||
void pwm_details(const pin_t);
|
||||
bool getValidPinMode(const pin_t pin);
|
||||
bool getPinIsDigitalByIndex(const pin_t pin);
|
||||
void printPinPort(const pin_t);
|
||||
void printPinPWM(const pin_t);
|
||||
bool pwm_status(const pin_t);
|
||||
|
||||
@@ -131,7 +131,7 @@ static uint8_t swSpiInit(const uint8_t spi_speed, const uint8_t clk_pin, const u
|
||||
}
|
||||
|
||||
static void u8g_sw_spi_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) {
|
||||
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864)
|
||||
#if U8G_SPI_USE_MODE_3
|
||||
swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin);
|
||||
#else
|
||||
swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin);
|
||||
@@ -159,15 +159,15 @@ uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_pt
|
||||
break;
|
||||
|
||||
case U8G_COM_MSG_CHIP_SELECT:
|
||||
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
|
||||
#if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
|
||||
u8g_SetPILevel(u8g, U8G_PI_CS, LOW);
|
||||
}
|
||||
else {
|
||||
u8g_SetPILevel(u8g, U8G_PI_CS, HIGH);
|
||||
u8g_SetPILevel(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
|
||||
u8g_SetPILevel(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
|
||||
}
|
||||
#else
|
||||
u8g_SetPILevel(u8g, U8G_PI_CS, !arg_val);
|
||||
|
||||
@@ -69,13 +69,13 @@ extern DefaultSerial3 MSerial1;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#if WITHIN(MMU2_SERIAL_PORT, 0, 1)
|
||||
#define MMU2_SERIAL MSERIAL(SERIAL_PORT)
|
||||
#elif MMU2_SERIAL_PORT == -1
|
||||
#define MMU2_SERIAL MSerialUSB
|
||||
#ifdef MMU_SERIAL_PORT
|
||||
#if WITHIN(MMU_SERIAL_PORT, 0, 1)
|
||||
#define MMU_SERIAL MSERIAL(SERIAL_PORT)
|
||||
#elif MMU_SERIAL_PORT == -1
|
||||
#define MMU_SERIAL MSerialUSB
|
||||
#else
|
||||
#error "MMU2_SERIAL_PORT must be -1 (Native USB only)."
|
||||
#error "MMU_SERIAL_PORT must be -1 (Native USB only)."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
#define MATCH_Z4_MAX_EILINE(P) TERN0(USE_Z4_MAX, DEFER4(MATCH_EILINE)(P, Z4_MAX_PIN))
|
||||
#define MATCH_Z4_MIN_EILINE(P) TERN0(USE_Z4_MIN, DEFER4(MATCH_EILINE)(P, Z4_MIN_PIN))
|
||||
#define MATCH_Z_MIN_PROBE_EILINE(P) TERN0(USE_Z_MIN_PROBE, DEFER4(MATCH_EILINE)(P, Z_MIN_PROBE_PIN))
|
||||
#define MATCH_CALIBRATION_EILINE(P) TERN0(USE_CALIBRATION, DEFER4(MATCH_EILINE)(P, CALIBRATION_PIN))
|
||||
|
||||
#define AVAILABLE_EILINE(P) ( PIN_TO_EILINE(P) != -1 \
|
||||
&& !MATCH_X_MAX_EILINE(P) && !MATCH_X_MIN_EILINE(P) \
|
||||
@@ -99,7 +100,8 @@
|
||||
&& !MATCH_Z2_MAX_EILINE(P) && !MATCH_Z2_MIN_EILINE(P) \
|
||||
&& !MATCH_Z3_MAX_EILINE(P) && !MATCH_Z3_MIN_EILINE(P) \
|
||||
&& !MATCH_Z4_MAX_EILINE(P) && !MATCH_Z4_MIN_EILINE(P) \
|
||||
&& !MATCH_Z_MIN_PROBE_EILINE(P) )
|
||||
&& !MATCH_Z_MIN_PROBE_EILINE(P) \
|
||||
&& !MATCH_CALIBRATION_EILINE(P) )
|
||||
|
||||
// One ISR for all EXT-Interrupts
|
||||
void endstop_ISR() { endstops.update(); }
|
||||
@@ -208,6 +210,12 @@ void setup_endstop_interrupts() {
|
||||
#endif
|
||||
_ATTACH(Z_MIN_PROBE_PIN);
|
||||
#endif
|
||||
#if USE_CALIBRATION
|
||||
#if !AVAILABLE_EILINE(CALIBRATION_PIN)
|
||||
#error "CALIBRATION_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
|
||||
#endif
|
||||
_ATTACH(CALIBRATION_PIN);
|
||||
#endif
|
||||
#if USE_I_MAX
|
||||
#if !AVAILABLE_EILINE(I_MAX_PIN)
|
||||
#error "I_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
: ((P) == 14) ? ADC_INPUTCTRL_MUXPOS_PIN14 \
|
||||
: ADC_INPUTCTRL_MUXPOS_PIN15)
|
||||
|
||||
#define digitalPinToAnalogInput(P) (WITHIN(P, 67, 74) ? (P) - 67 : WITHIN(P, 54, 61) ? 8 + (P) - 54 : WITHIN(P, 12, 13) ? 16 + (P) - 12 : P == 9 ? 18 : -1)
|
||||
#define digitalPinToAnalogIndex(P) (WITHIN(P, 67, 74) ? (P) - 67 : WITHIN(P, 54, 61) ? 8 + (P) - 54 : WITHIN(P, 12, 13) ? 16 + (P) - 12 : P == 9 ? 18 : -1)
|
||||
|
||||
/**
|
||||
* pins
|
||||
|
||||
@@ -30,14 +30,13 @@
|
||||
|
||||
#define digitalRead_mod(p) extDigitalRead(p)
|
||||
#define PRINT_PORT(p) do{ SERIAL_ECHOPGM(" Port: "); sprintf_P(buffer, PSTR("%c%02ld"), 'A' + g_APinDescription[p].ulPort, g_APinDescription[p].ulPin); SERIAL_ECHO(buffer); }while (0)
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
||||
#define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital
|
||||
#define VALID_PIN(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL)
|
||||
#define DIGITAL_PIN_TO_ANALOG_PIN(p) digitalPinToAnalogInput(p)
|
||||
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P)!=-1)
|
||||
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define getPinByIndex(p) pin_array[p].pin
|
||||
#define getPinIsDigitalByIndex(p) pin_array[p].is_digital
|
||||
#define isValidPin(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL)
|
||||
#define isAnalogPin(P) (digitalPinToAnalogIndex(P)!=-1)
|
||||
#define pwm_status(pin) digitalPinHasPWM(pin)
|
||||
#define MULTI_NAME_PAD 27 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
@@ -45,13 +44,13 @@
|
||||
// uses pin index
|
||||
#define M43_NEVER_TOUCH(Q) ((Q) >= 75)
|
||||
|
||||
bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
|
||||
bool getValidPinMode(int8_t pin) { // 1: output, 0: input
|
||||
const EPortType samdport = g_APinDescription[pin].ulPort;
|
||||
const uint32_t samdpin = g_APinDescription[pin].ulPin;
|
||||
return PORT->Group[samdport].DIR.reg & MASK(samdpin) || (PORT->Group[samdport].PINCFG[samdpin].reg & (PORT_PINCFG_INEN | PORT_PINCFG_PULLEN)) == PORT_PINCFG_PULLEN;
|
||||
}
|
||||
|
||||
void pwm_details(int32_t pin) {
|
||||
void printPinPWM(int32_t pin) {
|
||||
if (pwm_status(pin)) {
|
||||
//uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative;
|
||||
//SERIAL_ECHOPGM("PWM = ", duty);
|
||||
|
||||
@@ -69,13 +69,23 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#if MMU2_SERIAL_PORT == -1
|
||||
#define MMU2_SERIAL MSerial0
|
||||
#elif WITHIN(MMU2_SERIAL_PORT, 0, 3)
|
||||
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
|
||||
#ifdef SERIAL_PORT_3
|
||||
#if SERIAL_PORT_3 == -1
|
||||
#define MYSERIAL3 MSerial0
|
||||
#elif WITHIN(SERIAL_PORT_3, 0, 3)
|
||||
#define MYSERIAL3 MSERIAL(SERIAL_PORT_3)
|
||||
#else
|
||||
#error "MMU2_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
||||
#error "SERIAL_PORT_3 must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MMU_SERIAL_PORT
|
||||
#if MMU_SERIAL_PORT == -1
|
||||
#define MMU_SERIAL MSerial0
|
||||
#elif WITHIN(MMU_SERIAL_PORT, 0, 3)
|
||||
#define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT)
|
||||
#else
|
||||
#error "MMU_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
#define MATCH_Z4_MAX_EILINE(P) TERN0(USE_Z4_MAX, DEFER4(MATCH_EILINE)(P, Z4_MAX_PIN))
|
||||
#define MATCH_Z4_MIN_EILINE(P) TERN0(USE_Z4_MIN, DEFER4(MATCH_EILINE)(P, Z4_MIN_PIN))
|
||||
#define MATCH_Z_MIN_PROBE_EILINE(P) TERN0(USE_Z_MIN_PROBE, DEFER4(MATCH_EILINE)(P, Z_MIN_PROBE_PIN))
|
||||
#define MATCH_CALIBRATION_EILINE(P) TERN0(USE_CALIBRATION, DEFER4(MATCH_EILINE)(P, CALIBRATION_PIN))
|
||||
|
||||
#define AVAILABLE_EILINE(P) ( PIN_TO_EILINE(P) != -1 \
|
||||
&& !MATCH_X_MAX_EILINE(P) && !MATCH_X_MIN_EILINE(P) \
|
||||
@@ -98,7 +99,8 @@
|
||||
&& !MATCH_Z2_MAX_EILINE(P) && !MATCH_Z2_MIN_EILINE(P) \
|
||||
&& !MATCH_Z3_MAX_EILINE(P) && !MATCH_Z3_MIN_EILINE(P) \
|
||||
&& !MATCH_Z4_MAX_EILINE(P) && !MATCH_Z4_MIN_EILINE(P) \
|
||||
&& !MATCH_Z_MIN_PROBE_EILINE(P) )
|
||||
&& !MATCH_Z_MIN_PROBE_EILINE(P) \
|
||||
&& !MATCH_CALIBRATION_EILINE(P) )
|
||||
|
||||
// One ISR for all EXT-Interrupts
|
||||
void endstop_ISR() { endstops.update(); }
|
||||
@@ -183,6 +185,12 @@ void setup_endstop_interrupts() {
|
||||
#endif
|
||||
_ATTACH(Z_MIN_PROBE_PIN);
|
||||
#endif
|
||||
#if USE_CALIBRATION
|
||||
#if !AVAILABLE_EILINE(CALIBRATION_PIN)
|
||||
#error "CALIBRATION_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
|
||||
#endif
|
||||
_ATTACH(CALIBRATION_PIN);
|
||||
#endif
|
||||
#if USE_I_MAX
|
||||
#if !AVAILABLE_EILINE(I_MAX_PIN)
|
||||
#error "I_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
: (P == 17) ? PIN_TO_SAMD_PIN(13) \
|
||||
: PIN_TO_SAMD_PIN(9))
|
||||
|
||||
#define digitalPinToAnalogInput(P) (WITHIN(P, 67, 74) ? (P) - 67 : WITHIN(P, 54, 61) ? 8 + (P) - 54 : WITHIN(P, 12, 13) ? 16 + (P) - 12 : P == 9 ? 18 : -1)
|
||||
#define digitalPinToAnalogIndex(P) (WITHIN(P, 67, 74) ? (P) - 67 : WITHIN(P, 54, 61) ? 8 + (P) - 54 : WITHIN(P, 12, 13) ? 16 + (P) - 12 : P == 9 ? 18 : -1)
|
||||
|
||||
/**
|
||||
* pins
|
||||
|
||||
@@ -29,14 +29,13 @@
|
||||
|
||||
#define digitalRead_mod(p) extDigitalRead(p)
|
||||
#define PRINT_PORT(p) do{ SERIAL_ECHOPGM(" Port: "); sprintf_P(buffer, PSTR("%c%02ld"), 'A' + g_APinDescription[p].ulPort, g_APinDescription[p].ulPin); SERIAL_ECHO(buffer); }while (0)
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
||||
#define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital
|
||||
#define VALID_PIN(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL))
|
||||
#define DIGITAL_PIN_TO_ANALOG_PIN(p) digitalPinToAnalogInput(p)
|
||||
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P)!=-1)
|
||||
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define getPinByIndex(p) pin_array[p].pin
|
||||
#define getPinIsDigitalByIndex(p) pin_array[p].is_digital
|
||||
#define isValidPin(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL))
|
||||
#define isAnalogPin(P) (digitalPinToAnalogIndex(P)!=-1)
|
||||
#define pwm_status(pin) digitalPinHasPWM(pin)
|
||||
#define MULTI_NAME_PAD 27 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
@@ -44,13 +43,13 @@
|
||||
// uses pin index
|
||||
#define M43_NEVER_TOUCH(Q) ((Q) >= 75)
|
||||
|
||||
bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
|
||||
bool getValidPinMode(int8_t pin) { // 1: output, 0: input
|
||||
const EPortType samdport = g_APinDescription[pin].ulPort;
|
||||
const uint32_t samdpin = g_APinDescription[pin].ulPin;
|
||||
return PORT->Group[samdport].DIR.reg & MASK(samdpin) || (PORT->Group[samdport].PINCFG[samdpin].reg & (PORT_PINCFG_INEN | PORT_PINCFG_PULLEN)) == PORT_PINCFG_PULLEN;
|
||||
}
|
||||
|
||||
void pwm_details(int32_t pin) {
|
||||
void printPinPWM(int32_t pin) {
|
||||
if (pwm_status(pin)) {
|
||||
//uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative;
|
||||
//SERIAL_ECHOPGM("PWM = ", duty);
|
||||
|
||||
@@ -90,15 +90,15 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#if WITHIN(MMU2_SERIAL_PORT, 1, 9)
|
||||
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
|
||||
#ifdef MMU_SERIAL_PORT
|
||||
#if WITHIN(MMU_SERIAL_PORT, 1, 9)
|
||||
#define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT)
|
||||
#elif !defined(USBCON)
|
||||
#error "MMU2_SERIAL_PORT must be from 1 to 9."
|
||||
#elif MMU2_SERIAL_PORT == -1
|
||||
#define MMU2_SERIAL MSerialUSB
|
||||
#error "MMU_SERIAL_PORT must be from 1 to 9."
|
||||
#elif MMU_SERIAL_PORT == -1
|
||||
#define MMU_SERIAL MSerialUSB
|
||||
#else
|
||||
#error "MMU2_SERIAL_PORT must be from 1 to 9, or -1 for Native USB."
|
||||
#error "MMU_SERIAL_PORT must be from 1 to 9, or -1 for Native USB."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -112,16 +112,24 @@
|
||||
#else
|
||||
#error "LCD_SERIAL_PORT must be from 1 to 9, or -1 for Native USB."
|
||||
#endif
|
||||
#if HAS_DGUS_LCD
|
||||
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef RS485_SERIAL_PORT
|
||||
#if WITHIN(RS485_SERIAL_PORT, 1, 9)
|
||||
#define RS485_SERIAL MSERIAL(RS485_SERIAL_PORT)
|
||||
#else
|
||||
#error "RS485_SERIAL_PORT must be from 1 to 9."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* TODO: review this to return 1 for pins that are not analog input
|
||||
*/
|
||||
#ifndef analogInputToDigitalPin
|
||||
#define analogInputToDigitalPin(p) (p)
|
||||
#define analogInputToDigitalPin(p) pin_t(p)
|
||||
#endif
|
||||
|
||||
//
|
||||
|
||||
@@ -37,7 +37,7 @@ static SPISettings spiConfig;
|
||||
// Public functions
|
||||
// ------------------------
|
||||
|
||||
#if ENABLED(SOFTWARE_SPI)
|
||||
#if ANY(SOFTWARE_SPI, FORCE_SOFT_SPI)
|
||||
|
||||
// ------------------------
|
||||
// Software SPI
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
#ifndef USART5
|
||||
#define USART5 UART5
|
||||
#endif
|
||||
#ifndef USART6
|
||||
#define USART6 UART6
|
||||
#endif
|
||||
#ifndef USART7
|
||||
#define USART7 UART7
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm / Ryan Power
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAL_STM32
|
||||
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
|
||||
#if ALL(HAS_MARLINUI_U8GLIB, FORCE_SOFT_SPI)
|
||||
|
||||
#include <U8glib-HAL.h>
|
||||
#include "../../shared/HAL_SPI.h"
|
||||
|
||||
#define nop asm volatile ("\tnop\n")
|
||||
|
||||
static inline uint8_t swSpiTransfer_mode_0(uint8_t b) {
|
||||
for (uint8_t i = 0; i < 8; ++i) {
|
||||
const uint8_t state = (b & 0x80) ? HIGH : LOW;
|
||||
WRITE(DOGLCD_SCK, HIGH);
|
||||
WRITE(DOGLCD_MOSI, state);
|
||||
b <<= 1;
|
||||
WRITE(DOGLCD_SCK, LOW);
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
static inline uint8_t swSpiTransfer_mode_3(uint8_t b) {
|
||||
for (uint8_t i = 0; i < 8; ++i) {
|
||||
const uint8_t state = (b & 0x80) ? HIGH : LOW;
|
||||
WRITE(DOGLCD_SCK, LOW);
|
||||
WRITE(DOGLCD_MOSI, state);
|
||||
b <<= 1;
|
||||
WRITE(DOGLCD_SCK, HIGH);
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
static void u8g_sw_spi_shift_out(uint8_t val) {
|
||||
#if U8G_SPI_USE_MODE_3
|
||||
swSpiTransfer_mode_3(val);
|
||||
#else
|
||||
swSpiTransfer_mode_0(val);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void swSpiInit() {
|
||||
#if PIN_EXISTS(LCD_RESET)
|
||||
SET_OUTPUT(LCD_RESET_PIN);
|
||||
#endif
|
||||
SET_OUTPUT(DOGLCD_A0);
|
||||
OUT_WRITE(DOGLCD_SCK, LOW);
|
||||
OUT_WRITE(DOGLCD_MOSI, LOW);
|
||||
OUT_WRITE(DOGLCD_CS, HIGH);
|
||||
}
|
||||
|
||||
uint8_t u8g_com_HAL_STM32_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
|
||||
switch (msg) {
|
||||
case U8G_COM_MSG_INIT:
|
||||
swSpiInit();
|
||||
break;
|
||||
|
||||
case U8G_COM_MSG_STOP:
|
||||
break;
|
||||
|
||||
case U8G_COM_MSG_RESET:
|
||||
#if PIN_EXISTS(LCD_RESET)
|
||||
WRITE(LCD_RESET_PIN, arg_val);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case U8G_COM_MSG_CHIP_SELECT:
|
||||
#if U8G_SPI_USE_MODE_3 // This LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
WRITE(DOGLCD_SCK, HIGH); // Set SCK to mode 3 idle state before CS goes active
|
||||
WRITE(DOGLCD_CS, LOW);
|
||||
nop; // hold SCK high for a few ns
|
||||
nop;
|
||||
}
|
||||
else {
|
||||
WRITE(DOGLCD_CS, HIGH);
|
||||
WRITE(DOGLCD_SCK, LOW); // Set SCK to mode 0 idle state after CS goes inactive
|
||||
}
|
||||
#else
|
||||
WRITE(DOGLCD_CS, !arg_val);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case U8G_COM_MSG_WRITE_BYTE:
|
||||
u8g_sw_spi_shift_out(arg_val);
|
||||
break;
|
||||
|
||||
case U8G_COM_MSG_WRITE_SEQ: {
|
||||
uint8_t *ptr = (uint8_t *)arg_ptr;
|
||||
while (arg_val > 0) {
|
||||
u8g_sw_spi_shift_out(*ptr++);
|
||||
arg_val--;
|
||||
}
|
||||
} break;
|
||||
|
||||
case U8G_COM_MSG_WRITE_SEQ_P: {
|
||||
uint8_t *ptr = (uint8_t *)arg_ptr;
|
||||
while (arg_val > 0) {
|
||||
u8g_sw_spi_shift_out(u8g_pgm_read(ptr));
|
||||
ptr++;
|
||||
arg_val--;
|
||||
}
|
||||
} break;
|
||||
|
||||
case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
|
||||
WRITE(DOGLCD_A0, arg_val);
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // HAS_MARLINUI_U8GLIB && FORCE_SOFT_SPI
|
||||
#endif // HAL_STM32
|
||||
@@ -45,6 +45,7 @@ void setup_endstop_interrupts() {
|
||||
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
|
||||
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
|
||||
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
|
||||
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
|
||||
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
|
||||
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
|
||||
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
|
||||
|
||||
@@ -30,6 +30,3 @@
|
||||
#undef F_CPU
|
||||
#define F_CPU BOARD_F_CPU
|
||||
#endif
|
||||
|
||||
// The Sensitive Pins array is not optimizable
|
||||
#define RUNTIME_ONLY_ANALOG_TO_DIGITAL
|
||||
|
||||
@@ -115,16 +115,16 @@ const XrefInfo pin_xref[] PROGMEM = {
|
||||
#define NUM_ANALOG_LAST ((NUM_ANALOG_FIRST) + (NUM_ANALOG_INPUTS) - 1)
|
||||
#endif
|
||||
#define NUMBER_PINS_TOTAL ((NUM_DIGITAL_PINS) + TERN0(HAS_HIGH_ANALOG_PINS, NUM_ANALOG_INPUTS))
|
||||
#define VALID_PIN(P) (WITHIN(P, 0, (NUM_DIGITAL_PINS) - 1) || TERN0(HAS_HIGH_ANALOG_PINS, WITHIN(P, NUM_ANALOG_FIRST, NUM_ANALOG_LAST)))
|
||||
#define isValidPin(P) (WITHIN(P, 0, (NUM_DIGITAL_PINS) - 1) || TERN0(HAS_HIGH_ANALOG_PINS, WITHIN(P, NUM_ANALOG_FIRST, NUM_ANALOG_LAST)))
|
||||
#define digitalRead_mod(Ard_num) extDigitalRead(Ard_num) // must use Arduino pin numbers when doing reads
|
||||
#define PRINT_PIN(Q)
|
||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define DIGITAL_PIN_TO_ANALOG_PIN(ANUM) -1 // will report analog pin number in the print port routine
|
||||
#define printPinNumber(Q)
|
||||
#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define digitalPinToAnalogIndex(ANUM) -1 // will report analog pin number in the print port routine
|
||||
|
||||
// x is a variable used to search pin_array
|
||||
#define GET_ARRAY_IS_DIGITAL(x) ((bool) pin_array[x].is_digital)
|
||||
#define GET_ARRAY_PIN(x) ((pin_t) pin_array[x].pin)
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define getPinIsDigitalByIndex(x) ((bool) pin_array[x].is_digital)
|
||||
#define getPinByIndex(x) ((pin_t) pin_array[x].pin)
|
||||
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define MULTI_NAME_PAD 33 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
//
|
||||
@@ -164,7 +164,7 @@ uint8_t get_pin_mode(const pin_t Ard_num) {
|
||||
}
|
||||
}
|
||||
|
||||
bool GET_PINMODE(const pin_t Ard_num) {
|
||||
bool getValidPinMode(const pin_t Ard_num) {
|
||||
const uint8_t pin_mode = get_pin_mode(Ard_num);
|
||||
return pin_mode == MODE_PIN_OUTPUT || pin_mode == MODE_PIN_ALT; // assume all alt definitions are PWM
|
||||
}
|
||||
@@ -173,11 +173,11 @@ int8_t digital_pin_to_analog_pin(const pin_t Ard_num) {
|
||||
if (WITHIN(Ard_num, NUM_ANALOG_FIRST, NUM_ANALOG_LAST))
|
||||
return Ard_num - NUM_ANALOG_FIRST;
|
||||
|
||||
const uint32_t ind = digitalPinToAnalogInput(Ard_num);
|
||||
const int8_t ind = digitalPinToAnalogIndex(Ard_num);
|
||||
return (ind < NUM_ANALOG_INPUTS) ? ind : -1;
|
||||
}
|
||||
|
||||
bool IS_ANALOG(const pin_t Ard_num) {
|
||||
bool isAnalogPin(const pin_t Ard_num) {
|
||||
return get_pin_mode(Ard_num) == MODE_PIN_ANALOG;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ bool is_digital(const pin_t Ard_num) {
|
||||
return pin_mode == MODE_PIN_INPUT || pin_mode == MODE_PIN_OUTPUT;
|
||||
}
|
||||
|
||||
void print_port(const pin_t Ard_num) {
|
||||
void printPinPort(const pin_t Ard_num) {
|
||||
char buffer[16];
|
||||
pin_t Index;
|
||||
for (Index = 0; Index < NUMBER_PINS_TOTAL; Index++)
|
||||
@@ -226,7 +226,7 @@ bool pwm_status(const pin_t Ard_num) {
|
||||
return get_pin_mode(Ard_num) == MODE_PIN_ALT;
|
||||
}
|
||||
|
||||
void pwm_details(const pin_t Ard_num) {
|
||||
void printPinPWM(const pin_t Ard_num) {
|
||||
#ifndef STM32F1xx
|
||||
if (pwm_status(Ard_num)) {
|
||||
uint32_t alt_all = 0;
|
||||
@@ -285,4 +285,4 @@ void pwm_details(const pin_t Ard_num) {
|
||||
#else
|
||||
// TODO: F1 doesn't support changing pins function, so we need to check the function of the PIN and if it's enabled
|
||||
#endif
|
||||
} // pwm_details
|
||||
} // printPinPWM
|
||||
|
||||
@@ -238,7 +238,7 @@ void HAL_SD_MspInit(SD_HandleTypeDef *hsd) {
|
||||
hdma_sdio.Init.MemInc = DMA_MINC_ENABLE;
|
||||
hdma_sdio.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
|
||||
hdma_sdio.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
|
||||
hdma_sdio.Init.Priority = DMA_PRIORITY_LOW;
|
||||
hdma_sdio.Init.Priority = DMA_PRIORITY_MEDIUM;
|
||||
__HAL_LINKDMA(&hsd, hdmarx, hdma_sdio);
|
||||
__HAL_LINKDMA(&hsd, hdmatx, hdma_sdio);
|
||||
|
||||
|
||||
@@ -182,6 +182,7 @@ void TFT_FSMC::transmitDMA(uint32_t memoryIncrease, uint16_t *data, uint16_t cou
|
||||
DMAtx.Init.PeriphInc = memoryIncrease;
|
||||
HAL_DMA_Init(&DMAtx);
|
||||
HAL_DMA_Start(&DMAtx, (uint32_t)data, (uint32_t)&(LCD->RAM), count);
|
||||
TERN_(TFT_SHARED_IO, while (isBusy()));
|
||||
}
|
||||
|
||||
void TFT_FSMC::transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count) {
|
||||
|
||||
@@ -337,7 +337,7 @@ void TFT_SPI::transmitDMA(uint32_t memoryIncrease, uint16_t *data, uint16_t coun
|
||||
SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN); // Enable Tx DMA Request
|
||||
#endif
|
||||
|
||||
TERN_(TFT_SHARED_IO, while (isBusy()) { /* nada */ });
|
||||
TERN_(TFT_SHARED_IO, while (isBusy()));
|
||||
}
|
||||
|
||||
void TFT_SPI::transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count) {
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
* STM32 LCD-specific defines
|
||||
*/
|
||||
|
||||
uint8_t u8g_com_std_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); // See U8glib-HAL
|
||||
uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); // See U8glib-HAL
|
||||
uint8_t u8g_com_HAL_STM32_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); // u8g_com_stm32duino_swspi.cpp
|
||||
#define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_STM32_sw_spi_fn
|
||||
|
||||
#define U8G_COM_HAL_SW_SPI_FN u8g_com_std_sw_spi_fn
|
||||
uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); // See U8glib-HAL
|
||||
#define U8G_COM_HAL_HW_SPI_FN u8g_com_stm32duino_hw_spi_fn
|
||||
|
||||
@@ -118,14 +118,14 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#if MMU2_SERIAL_PORT == -1
|
||||
#define MMU2_SERIAL UsbSerial
|
||||
#elif WITHIN(MMU2_SERIAL_PORT, 1, NUM_UARTS)
|
||||
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
|
||||
#ifdef MMU_SERIAL_PORT
|
||||
#if MMU_SERIAL_PORT == -1
|
||||
#define MMU_SERIAL UsbSerial
|
||||
#elif WITHIN(MMU_SERIAL_PORT, 1, NUM_UARTS)
|
||||
#define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT)
|
||||
#else
|
||||
#define MMU2_SERIAL MSERIAL(1) // dummy port
|
||||
static_assert(false, "MMU2_SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.")
|
||||
#define MMU_SERIAL MSERIAL(1) // dummy port
|
||||
static_assert(false, "MMU_SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -138,16 +138,27 @@
|
||||
#define LCD_SERIAL MSERIAL(1) // dummy port
|
||||
static_assert(false, "LCD_SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.")
|
||||
#endif
|
||||
#if HAS_DGUS_LCD
|
||||
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef RS485_SERIAL_PORT
|
||||
#if RS485_SERIAL_PORT == -1
|
||||
#define RS485_SERIAL UsbSerial
|
||||
#elif WITHIN(RS485_SERIAL_PORT, 1, NUM_UARTS)
|
||||
#define RS485_SERIAL MSERIAL(RS485_SERIAL_PORT)
|
||||
#else
|
||||
#define RS485_SERIAL MSERIAL(1) // dummy port
|
||||
static_assert(false, "RS485_SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ".")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* TODO: review this to return 1 for pins that are not analog input
|
||||
*/
|
||||
#ifndef analogInputToDigitalPin
|
||||
#define analogInputToDigitalPin(p) (p)
|
||||
#define analogInputToDigitalPin(p) pin_t(p)
|
||||
#endif
|
||||
|
||||
#ifndef digitalPinHasPWM
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
from __future__ import print_function
|
||||
import sys
|
||||
|
||||
#dynamic build flags for generic compile options
|
||||
if __name__ == "__main__":
|
||||
args = " ".join([ "-std=gnu++14",
|
||||
"-Os",
|
||||
"-mcpu=cortex-m3",
|
||||
"-mthumb",
|
||||
|
||||
"-fsigned-char",
|
||||
"-fno-move-loop-invariants",
|
||||
"-fno-strict-aliasing",
|
||||
"-fsingle-precision-constant",
|
||||
|
||||
"--specs=nano.specs",
|
||||
"--specs=nosys.specs",
|
||||
|
||||
"-IMarlin/src/HAL/STM32F1",
|
||||
|
||||
"-MMD",
|
||||
"-MP",
|
||||
"-DTARGET_STM32F1"
|
||||
])
|
||||
|
||||
for i in range(1, len(sys.argv)):
|
||||
args += " " + sys.argv[i]
|
||||
|
||||
print(args)
|
||||
|
||||
# extra script for linker options
|
||||
else:
|
||||
import pioutil
|
||||
if pioutil.is_pio_build():
|
||||
from SCons.Script import DefaultEnvironment
|
||||
env = DefaultEnvironment()
|
||||
env.Append(
|
||||
ARFLAGS=["rcs"],
|
||||
|
||||
ASFLAGS=["-x", "assembler-with-cpp"],
|
||||
|
||||
CXXFLAGS=[
|
||||
"-fabi-version=0",
|
||||
"-fno-use-cxa-atexit",
|
||||
"-fno-threadsafe-statics"
|
||||
],
|
||||
LINKFLAGS=[
|
||||
"-Os",
|
||||
"-mcpu=cortex-m3",
|
||||
"-ffreestanding",
|
||||
"-mthumb",
|
||||
"--specs=nano.specs",
|
||||
"--specs=nosys.specs",
|
||||
"-u_printf_float",
|
||||
],
|
||||
)
|
||||
@@ -89,7 +89,7 @@ static inline uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, c
|
||||
}
|
||||
|
||||
static void u8g_sw_spi_shift_out(uint8_t val) {
|
||||
#if ENABLED(FYSETC_MINI_12864)
|
||||
#if U8G_SPI_USE_MODE_3
|
||||
swSpiTransfer_mode_3(val, SPI_speed);
|
||||
#else
|
||||
swSpiTransfer_mode_0(val, SPI_speed);
|
||||
@@ -123,15 +123,15 @@ uint8_t u8g_com_HAL_STM32F1_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val,
|
||||
break;
|
||||
|
||||
case U8G_COM_MSG_CHIP_SELECT:
|
||||
#if ENABLED(FYSETC_MINI_12864) // This LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
WRITE(DOGLCD_SCK, HIGH); // Set SCK to mode 3 idle state before CS goes active
|
||||
#if U8G_SPI_USE_MODE_3 // This LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
WRITE(DOGLCD_SCK, HIGH); // Set SCK to mode 3 idle state before CS goes active
|
||||
WRITE(DOGLCD_CS, LOW);
|
||||
}
|
||||
else {
|
||||
WRITE(DOGLCD_CS, HIGH);
|
||||
WRITE(DOGLCD_SCK, LOW); // Set SCK to mode 0 idle state after CS goes inactive
|
||||
WRITE(DOGLCD_SCK, LOW); // Set SCK to mode 0 idle state after CS goes inactive
|
||||
}
|
||||
#else
|
||||
WRITE(DOGLCD_CS, !arg_val);
|
||||
|
||||
@@ -70,6 +70,7 @@ void setup_endstop_interrupts() {
|
||||
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
|
||||
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
|
||||
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
|
||||
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
|
||||
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
|
||||
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
|
||||
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
|
||||
|
||||
@@ -39,12 +39,12 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS];
|
||||
|
||||
#define NUM_DIGITAL_PINS BOARD_NR_GPIO_PINS
|
||||
#define NUMBER_PINS_TOTAL BOARD_NR_GPIO_PINS
|
||||
#define VALID_PIN(pin) (pin >= 0 && pin < BOARD_NR_GPIO_PINS)
|
||||
#define GET_ARRAY_PIN(p) pin_t(pin_array[p].pin)
|
||||
#define isValidPin(pin) (pin >= 0 && pin < BOARD_NR_GPIO_PINS)
|
||||
#define getPinByIndex(p) pin_t(pin_array[p].pin)
|
||||
#define digitalRead_mod(p) extDigitalRead(p)
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3hd "), int16_t(p)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3hd "), int16_t(p)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define MULTI_NAME_PAD 21 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
// pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities
|
||||
@@ -52,10 +52,10 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS];
|
||||
#define M43_NEVER_TOUCH(Q) (Q >= 9 && Q <= 12) // SERIAL/USB pins PA9(TX) PA10(RX)
|
||||
#endif
|
||||
|
||||
int8_t get_pin_mode(const pin_t pin) { return VALID_PIN(pin) ? _GET_MODE(pin) : -1; }
|
||||
int8_t get_pin_mode(const pin_t pin) { return isValidPin(pin) ? _GET_MODE(pin) : -1; }
|
||||
|
||||
pin_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t pin) {
|
||||
if (!VALID_PIN(pin)) return -1;
|
||||
int8_t digitalPinToAnalogIndex(const pin_t pin) {
|
||||
if (!isValidPin(pin)) return -1;
|
||||
pin_t adc_channel = pin_t(PIN_MAP[pin].adc_channel);
|
||||
#ifdef NUM_ANALOG_INPUTS
|
||||
if (adc_channel >= NUM_ANALOG_INPUTS) adc_channel = (pin_t)ADCx;
|
||||
@@ -63,8 +63,8 @@ pin_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t pin) {
|
||||
return adc_channel;
|
||||
}
|
||||
|
||||
bool IS_ANALOG(const pin_t pin) {
|
||||
if (!VALID_PIN(pin)) return false;
|
||||
bool isAnalogPin(const pin_t pin) {
|
||||
if (!isValidPin(pin)) return false;
|
||||
if (PIN_MAP[pin].adc_channel != ADCx) {
|
||||
#ifdef NUM_ANALOG_INPUTS
|
||||
if (PIN_MAP[pin].adc_channel >= NUM_ANALOG_INPUTS) return false;
|
||||
@@ -74,13 +74,13 @@ bool IS_ANALOG(const pin_t pin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GET_PINMODE(const pin_t pin) {
|
||||
return VALID_PIN(pin) && !IS_INPUT(pin);
|
||||
bool getValidPinMode(const pin_t pin) {
|
||||
return isValidPin(pin) && !IS_INPUT(pin);
|
||||
}
|
||||
|
||||
bool GET_ARRAY_IS_DIGITAL(const int16_t array_pin) {
|
||||
const pin_t pin = GET_ARRAY_PIN(array_pin);
|
||||
return (!IS_ANALOG(pin)
|
||||
bool getPinIsDigitalByIndex(const int16_t array_pin) {
|
||||
const pin_t pin = getPinByIndex(array_pin);
|
||||
return (!isAnalogPin(pin)
|
||||
#ifdef NUM_ANALOG_INPUTS
|
||||
|| PIN_MAP[pin].adc_channel >= NUM_ANALOG_INPUTS
|
||||
#endif
|
||||
@@ -89,7 +89,7 @@ bool GET_ARRAY_IS_DIGITAL(const int16_t array_pin) {
|
||||
|
||||
#include "../../inc/MarlinConfig.h" // Allow pins/pins.h to set density
|
||||
|
||||
void pwm_details(const pin_t pin) {
|
||||
void printPinPWM(const pin_t pin) {
|
||||
if (PWM_PIN(pin)) {
|
||||
timer_dev * const tdev = PIN_MAP[pin].timer_device;
|
||||
const uint8_t channel = PIN_MAP[pin].timer_channel;
|
||||
@@ -111,7 +111,7 @@ void pwm_details(const pin_t pin) {
|
||||
|
||||
bool pwm_status(const pin_t pin) { return PWM_PIN(pin); }
|
||||
|
||||
void print_port(const pin_t pin) {
|
||||
void printPinPort(const pin_t pin) {
|
||||
const char port = 'A' + char(pin >> 4); // pin div 16
|
||||
const int16_t gbit = PIN_MAP[pin].gpio_bit;
|
||||
char buffer[8];
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* STM32F1 (Maple) LCD-specific defines
|
||||
*/
|
||||
|
||||
uint8_t u8g_com_HAL_STM32F1_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
||||
uint8_t u8g_com_HAL_STM32F1_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); // u8g_com_stm32duino_swspi.cpp
|
||||
uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); // See U8glib-HAL
|
||||
|
||||
#define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_STM32F1_sw_spi_fn
|
||||
|
||||
@@ -98,7 +98,7 @@ uint32_t __get_PRIMASK(void); // CMSIS
|
||||
// ------------------------
|
||||
|
||||
#ifndef analogInputToDigitalPin
|
||||
#define analogInputToDigitalPin(p) ((p < 12U) ? (p) + 54U : -1)
|
||||
#define analogInputToDigitalPin(p) pin_t((p < 12U) ? (p) + 54U : -1)
|
||||
#endif
|
||||
|
||||
#define HAL_ADC_VREF_MV 3300
|
||||
|
||||
@@ -64,6 +64,7 @@ void setup_endstop_interrupts() {
|
||||
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
|
||||
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
|
||||
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
|
||||
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
|
||||
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
|
||||
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
|
||||
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
|
||||
|
||||
@@ -41,7 +41,7 @@ typedef uint32_t hal_timer_t;
|
||||
#define FTM0_TIMER_PRESCALE_BITS 0b011
|
||||
#define FTM1_TIMER_PRESCALE_BITS 0b010
|
||||
|
||||
#define FTM0_TIMER_RATE (F_BUS / (FTM0_TIMER_PRESCALE)) // 60MHz / 8 = 7500kHz
|
||||
#define FTM0_TIMER_RATE (F_BUS / (FTM0_TIMER_PRESCALE)) // 60MHz / 8 = 7.5MHz
|
||||
#define FTM1_TIMER_RATE (F_BUS / (FTM1_TIMER_PRESCALE)) // 60MHz / 4 = 15MHz
|
||||
|
||||
#define HAL_TIMER_RATE (FTM0_TIMER_RATE)
|
||||
|
||||
@@ -103,7 +103,7 @@ typedef int8_t pin_t;
|
||||
// ------------------------
|
||||
|
||||
#ifndef analogInputToDigitalPin
|
||||
#define analogInputToDigitalPin(p) ((p < 12U) ? (p) + 54U : -1)
|
||||
#define analogInputToDigitalPin(p) pin_t((p < 12U) ? (p) + 54U : -1)
|
||||
#endif
|
||||
|
||||
#define HAL_ADC_VREF_MV 3300
|
||||
|
||||
@@ -63,6 +63,7 @@ void setup_endstop_interrupts() {
|
||||
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
|
||||
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
|
||||
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
|
||||
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
|
||||
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
|
||||
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
|
||||
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
|
||||
|
||||
@@ -53,9 +53,9 @@
|
||||
#define TPM1_CH1_PIN 17
|
||||
#endif
|
||||
|
||||
#define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(0) && (P) <= analogInputToDigitalPin(9)) || ((P) >= analogInputToDigitalPin(12) && (P) <= analogInputToDigitalPin(20))
|
||||
#define isAnalogPin(P) ((P) >= analogInputToDigitalPin(0) && (P) <= analogInputToDigitalPin(9)) || ((P) >= analogInputToDigitalPin(12) && (P) <= analogInputToDigitalPin(20))
|
||||
|
||||
void print_analog_pin(char buffer[], int8_t pin) {
|
||||
void printAnalogPin(char buffer[], int8_t pin) {
|
||||
if (pin <= 23) sprintf_P(buffer, PSTR("(A%2d) "), int(pin - 14));
|
||||
else if (pin <= 39) sprintf_P(buffer, PSTR("(A%2d) "), int(pin - 19));
|
||||
}
|
||||
@@ -108,4 +108,4 @@ bool pwm_status(int8_t pin) {
|
||||
SERIAL_ECHOPGM(" ");
|
||||
}
|
||||
|
||||
void pwm_details(uint8_t pin) { /* TODO */ }
|
||||
void printPinPWM(uint8_t pin) { /* TODO */ }
|
||||
|
||||
@@ -133,7 +133,7 @@ typedef int8_t pin_t;
|
||||
// ------------------------
|
||||
|
||||
#ifndef analogInputToDigitalPin
|
||||
#define analogInputToDigitalPin(p) ((p < 12U) ? (p) + 54U : -1)
|
||||
#define analogInputToDigitalPin(p) pin_t((p < 12U) ? (p) + 54U : -1)
|
||||
#endif
|
||||
|
||||
#define HAL_ADC_VREF_MV 3300
|
||||
|
||||
@@ -63,6 +63,7 @@ void setup_endstop_interrupts() {
|
||||
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
|
||||
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
|
||||
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
|
||||
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
|
||||
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
|
||||
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
|
||||
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
|
||||
|
||||
@@ -30,17 +30,18 @@
|
||||
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
|
||||
|
||||
#define digitalRead_mod(p) extDigitalRead(p) // AVR digitalRead disabled PWM before it read the pin
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
||||
#define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital
|
||||
#define VALID_PIN(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL))
|
||||
#define DIGITAL_PIN_TO_ANALOG_PIN(p) int(p - analogInputToDigitalPin(0))
|
||||
#define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(0) && (P) <= analogInputToDigitalPin(13)) || ((P) >= analogInputToDigitalPin(14) && (P) <= analogInputToDigitalPin(17))
|
||||
#define GET_PINMODE(PIN) (VALID_PIN(pin) && IS_OUTPUT(pin))
|
||||
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define getPinByIndex(p) pin_array[p].pin
|
||||
#define getPinIsDigitalByIndex(p) pin_array[p].is_digital
|
||||
#define isValidPin(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL))
|
||||
#define digitalPinToAnalogIndex(p) int(p - analogInputToDigitalPin(0))
|
||||
#define getValidPinMode(PIN) (isValidPin(pin) && IS_OUTPUT(pin))
|
||||
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
#define isAnalogPin(P) (pin_t(P) >= analogInputToDigitalPin(0) && pin_t(P) <= analogInputToDigitalPin(13)) || (pin_t(P) >= analogInputToDigitalPin(14) && pin_t(P) <= analogInputToDigitalPin(17))
|
||||
|
||||
struct pwm_pin_info_struct {
|
||||
uint8_t type; // 0=no pwm, 1=flexpwm, 2=quad
|
||||
uint8_t module; // 0-3, 0-3
|
||||
@@ -118,7 +119,7 @@ const struct pwm_pin_info_struct pwm_pin_info[] = {
|
||||
#endif
|
||||
};
|
||||
|
||||
void print_analog_pin(char buffer[], const pin_t pin) {
|
||||
void printAnalogPin(char buffer[], const pin_t pin) {
|
||||
if (pin <= 23) sprintf_P(buffer, PSTR("(A%2d) "), int(pin - 14));
|
||||
else if (pin <= 41) sprintf_P(buffer, PSTR("(A%2d) "), int(pin - 24));
|
||||
}
|
||||
@@ -149,6 +150,6 @@ bool pwm_status(const pin_t pin) {
|
||||
return (*(portConfigRegister(pin)) == info->muxval);
|
||||
}
|
||||
|
||||
void pwm_details(const pin_t) { /* TODO */ }
|
||||
void printPinPWM(const pin_t) { /* TODO */ }
|
||||
|
||||
void print_port(const pin_t) {}
|
||||
void printPinPort(const pin_t) {}
|
||||
|
||||
@@ -36,13 +36,13 @@
|
||||
typedef uint32_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFE
|
||||
|
||||
#define GPT_TIMER_RATE F_BUS_ACTUAL // 150MHz
|
||||
#define GPT_TIMER_RATE (F_CPU / 4) // 150MHz (Can't use F_BUS_ACTUAL because it's extern volatile)
|
||||
|
||||
#define GPT1_TIMER_PRESCALE 2
|
||||
#define GPT2_TIMER_PRESCALE 10
|
||||
|
||||
#define GPT1_TIMER_RATE (GPT_TIMER_RATE / GPT1_TIMER_PRESCALE) // 75MHz
|
||||
#define GPT2_TIMER_RATE (GPT_TIMER_RATE / GPT2_TIMER_PRESCALE) // 15MHz
|
||||
#define GPT1_TIMER_RATE (GPT_TIMER_RATE / GPT1_TIMER_PRESCALE) // 150MHz / 2 = 75MHz
|
||||
#define GPT2_TIMER_RATE (GPT_TIMER_RATE / GPT2_TIMER_PRESCALE) // 150MHz / 10 = 15MHz
|
||||
|
||||
#ifndef MF_TIMER_STEP
|
||||
#define MF_TIMER_STEP 0 // Timer Index for Stepper
|
||||
@@ -57,7 +57,8 @@ typedef uint32_t hal_timer_t;
|
||||
#define TEMP_TIMER_RATE 1000000
|
||||
#define TEMP_TIMER_FREQUENCY 1000
|
||||
|
||||
#define STEPPER_TIMER_RATE GPT1_TIMER_RATE
|
||||
#define HAL_TIMER_RATE GPT1_TIMER_RATE
|
||||
#define STEPPER_TIMER_RATE HAL_TIMER_RATE
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000)
|
||||
#define STEPPER_TIMER_PRESCALE ((GPT_TIMER_RATE / 1000000) / STEPPER_TIMER_TICKS_PER_US)
|
||||
|
||||
|
||||
@@ -81,4 +81,4 @@ void eeprom_write_byte(uint8_t *pos, uint8_t value) {
|
||||
}
|
||||
|
||||
#endif // USE_SHARED_EEPROM
|
||||
#endif // I2C_EEPROM
|
||||
#endif // SPI_EEPROM
|
||||
|
||||
+71
-40
@@ -79,6 +79,8 @@
|
||||
#include "lcd/e3v2/creality/dwin.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
|
||||
#include "lcd/e3v2/jyersui/dwin.h"
|
||||
#elif ENABLED(SOVOL_SV06_RTS)
|
||||
#include "lcd/sovol_rts/sovol_rts.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -229,12 +231,14 @@
|
||||
#include "feature/controllerfan.h"
|
||||
#endif
|
||||
|
||||
#if HAS_PRUSA_MMU1
|
||||
#include "feature/mmu/mmu.h"
|
||||
#endif
|
||||
|
||||
#if HAS_PRUSA_MMU2
|
||||
#if HAS_PRUSA_MMU3
|
||||
#include "feature/mmu3/mmu3.h"
|
||||
#include "feature/mmu3/mmu3_reporting.h"
|
||||
#include "feature/mmu3/SpoolJoin.h"
|
||||
#elif HAS_PRUSA_MMU2
|
||||
#include "feature/mmu/mmu2.h"
|
||||
#elif HAS_PRUSA_MMU1
|
||||
#include "feature/mmu/mmu.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(PASSWORD_FEATURE)
|
||||
@@ -261,16 +265,20 @@
|
||||
#include "tests/marlin_tests.h"
|
||||
#endif
|
||||
|
||||
#if HAS_RS485_SERIAL
|
||||
#include "feature/rs485.h"
|
||||
#endif
|
||||
|
||||
PGMSTR(M112_KILL_STR, "M112 Shutdown");
|
||||
|
||||
MarlinState marlin_state = MF_INITIALIZING;
|
||||
MarlinState marlin_state = MarlinState::MF_INITIALIZING;
|
||||
|
||||
// For M109 and M190, this flag may be cleared (by M108) to exit the wait loop
|
||||
bool wait_for_heatup = false;
|
||||
|
||||
// For M0/M1, this flag may be cleared (by M108) to exit the wait-for-user loop
|
||||
#if HAS_RESUME_CONTINUE
|
||||
bool wait_for_user; // = false;
|
||||
bool wait_for_user; // = false
|
||||
|
||||
void wait_for_user_response(millis_t ms/*=0*/, const bool no_sleep/*=false*/) {
|
||||
UNUSED(no_sleep);
|
||||
@@ -307,31 +315,21 @@ bool wait_for_heatup = false;
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wnarrowing"
|
||||
|
||||
#ifndef RUNTIME_ONLY_ANALOG_TO_DIGITAL
|
||||
template <pin_t ...D>
|
||||
constexpr pin_t OnlyPins<_SP_END, D...>::table[sizeof...(D)];
|
||||
#endif
|
||||
#pragma GCC diagnostic ignored "-Wsign-compare"
|
||||
|
||||
bool pin_is_protected(const pin_t pin) {
|
||||
#ifdef RUNTIME_ONLY_ANALOG_TO_DIGITAL
|
||||
static const pin_t sensitive_pins[] PROGMEM = { SENSITIVE_PINS };
|
||||
const size_t pincount = COUNT(sensitive_pins);
|
||||
#else
|
||||
static constexpr size_t pincount = OnlyPins<SENSITIVE_PINS>::size;
|
||||
static const pin_t (&sensitive_pins)[pincount] PROGMEM = OnlyPins<SENSITIVE_PINS>::table;
|
||||
#endif
|
||||
for (uint8_t i = 0; i < pincount; ++i) {
|
||||
const pin_t * const pptr = &sensitive_pins[i];
|
||||
if (pin == (sizeof(pin_t) == 2 ? (pin_t)pgm_read_word(pptr) : (pin_t)pgm_read_byte(pptr))) return true;
|
||||
}
|
||||
#define pgm_read_pin(P) (sizeof(pin_t) == 2 ? (pin_t)pgm_read_word(P) : (pin_t)pgm_read_byte(P))
|
||||
for (uint8_t i = 0; i < COUNT(sensitive_dio); ++i)
|
||||
if (pin == pgm_read_pin(&sensitive_dio[i])) return true;
|
||||
for (uint8_t i = 0; i < COUNT(sensitive_aio); ++i)
|
||||
if (pin == analogInputToDigitalPin(pgm_read_pin(&sensitive_aio[i]))) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
bool printer_busy() {
|
||||
return planner.movesplanned() || printingIsActive();
|
||||
return planner.has_blocks_queued() || printingIsActive();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -357,6 +355,7 @@ void startOrResumeJob() {
|
||||
TERN_(CANCEL_OBJECTS, cancelable.reset());
|
||||
TERN_(LCD_SHOW_E_TOTAL, e_move_accumulator = 0);
|
||||
TERN_(SET_REMAINING_TIME, ui.reset_remaining_time());
|
||||
TERN_(HAS_PRUSA_MMU3, MMU3::operation_statistics.reset_per_print_stats());
|
||||
}
|
||||
print_job_timer.start();
|
||||
}
|
||||
@@ -388,8 +387,8 @@ void startOrResumeJob() {
|
||||
}
|
||||
|
||||
inline void finishSDPrinting() {
|
||||
if (queue.enqueue_one(F("M1001"))) { // Keep trying until it gets queued
|
||||
marlin_state = MF_RUNNING; // Signal to stop trying
|
||||
if (queue.enqueue_one(F("M1001"))) { // Keep trying until it gets queued
|
||||
marlin_state = MarlinState::MF_RUNNING; // Signal to stop trying
|
||||
TERN_(PASSWORD_AFTER_SD_PRINT_END, password.lock_machine());
|
||||
TERN_(DGUS_LCD_UI_MKS, screen.sdPrintingFinished());
|
||||
}
|
||||
@@ -784,14 +783,14 @@ void idle(const bool no_stepper_sleep/*=false*/) {
|
||||
TERN_(MAX7219_DEBUG, max7219.idle_tasks());
|
||||
|
||||
// Return if setup() isn't completed
|
||||
if (marlin_state == MF_INITIALIZING) goto IDLE_DONE;
|
||||
if (marlin_state == MarlinState::MF_INITIALIZING) goto IDLE_DONE;
|
||||
|
||||
// TODO: Still causing errors
|
||||
TERN_(TOOL_SENSOR, (void)check_tool_sensor_stats(active_extruder, true));
|
||||
|
||||
// Handle filament runout sensors
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
if (TERN1(HAS_PRUSA_MMU2, !mmu2.enabled()))
|
||||
if (TERN1(HAS_PRUSA_MMU2, !mmu2.enabled()) && TERN1(HAS_PRUSA_MMU3, !mmu3.enabled()))
|
||||
runout.run();
|
||||
#endif
|
||||
|
||||
@@ -828,7 +827,11 @@ void idle(const bool no_stepper_sleep/*=false*/) {
|
||||
TERN_(HAS_BEEPER, buzzer.tick());
|
||||
|
||||
// Handle UI input / draw events
|
||||
ui.update();
|
||||
#if ENABLED(SOVOL_SV06_RTS)
|
||||
RTS_Update();
|
||||
#else
|
||||
ui.update();
|
||||
#endif
|
||||
|
||||
// Run i2c Position Encoders
|
||||
#if ENABLED(I2C_POSITION_ENCODERS)
|
||||
@@ -856,7 +859,11 @@ void idle(const bool no_stepper_sleep/*=false*/) {
|
||||
#endif
|
||||
|
||||
// Update the Průša MMU2
|
||||
TERN_(HAS_PRUSA_MMU2, mmu2.mmu_loop());
|
||||
#if HAS_PRUSA_MMU3
|
||||
mmu3.mmu_loop();
|
||||
#elif HAS_PRUSA_MMU2
|
||||
mmu2.mmu_loop();
|
||||
#endif
|
||||
|
||||
// Handle Joystick jogging
|
||||
TERN_(POLL_JOG, joystick.inject_jog_moves());
|
||||
@@ -970,7 +977,7 @@ void stop() {
|
||||
SERIAL_ERROR_MSG(STR_ERR_STOPPED);
|
||||
LCD_MESSAGE(MSG_STOPPED);
|
||||
safe_delay(350); // allow enough time for messages to get out before stopping
|
||||
marlin_state = MF_STOPPED;
|
||||
marlin_state = MarlinState::MF_STOPPED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1161,6 +1168,12 @@ void setup() {
|
||||
millis_t serial_connect_timeout = millis() + 1000UL;
|
||||
while (!MYSERIAL1.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
|
||||
|
||||
#if ENABLED(SOVOL_SV06_RTS)
|
||||
LCD_SERIAL.begin(BAUDRATE);
|
||||
serial_connect_timeout = millis() + 1000UL;
|
||||
while (!LCD_SERIAL.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
|
||||
#endif
|
||||
|
||||
#if HAS_MULTI_SERIAL && !HAS_ETHERNET
|
||||
#ifndef BAUDRATE_2
|
||||
#define BAUDRATE_2 BAUDRATE
|
||||
@@ -1284,7 +1297,7 @@ void setup() {
|
||||
|
||||
// Identify myself as Marlin x.x.x
|
||||
SERIAL_ECHOLNPGM("Marlin " SHORT_BUILD_VERSION);
|
||||
#if defined(STRING_DISTRIBUTION_DATE) && defined(STRING_CONFIG_H_AUTHOR)
|
||||
#ifdef STRING_DISTRIBUTION_DATE
|
||||
SERIAL_ECHO_MSG(
|
||||
" Last Updated: " STRING_DISTRIBUTION_DATE
|
||||
" | Author: " STRING_CONFIG_H_AUTHOR
|
||||
@@ -1318,8 +1331,11 @@ void setup() {
|
||||
|
||||
// UI must be initialized before EEPROM
|
||||
// (because EEPROM code calls the UI).
|
||||
|
||||
SETUP_RUN(ui.init());
|
||||
#if ENABLED(SOVOL_SV06_RTS)
|
||||
SETUP_RUN(RTS_Update());
|
||||
#else
|
||||
SETUP_RUN(ui.init());
|
||||
#endif
|
||||
|
||||
#if PIN_EXISTS(SAFE_POWER)
|
||||
#if HAS_DRIVER_SAFE_POWER_PROTECT
|
||||
@@ -1330,18 +1346,23 @@ void setup() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ALL(HAS_MEDIA, SDCARD_EEPROM_EMULATION)
|
||||
#if HAS_MEDIA && ANY(SDCARD_EEPROM_EMULATION, POWER_LOSS_RECOVERY)
|
||||
SETUP_RUN(card.mount()); // Mount media with settings before first_load
|
||||
#endif
|
||||
|
||||
SETUP_RUN(settings.first_load()); // Load data from EEPROM if available (or use defaults)
|
||||
// This also updates variables in the planner, elsewhere
|
||||
// Prepare some LCDs to display early
|
||||
#if HAS_EARLY_LCD_SETTINGS
|
||||
SETUP_RUN(settings.load_lcd_state());
|
||||
#endif
|
||||
|
||||
#if ALL(HAS_WIRED_LCD, SHOW_BOOTSCREEN)
|
||||
SETUP_RUN(ui.show_bootscreen());
|
||||
const millis_t bootscreen_ms = millis();
|
||||
#endif
|
||||
|
||||
SETUP_RUN(settings.first_load()); // Load data from EEPROM if available (or use defaults)
|
||||
// This also updates variables in the planner, elsewhere
|
||||
|
||||
#if ENABLED(PROBE_TARE)
|
||||
SETUP_RUN(probe.tare_init());
|
||||
#endif
|
||||
@@ -1587,7 +1608,11 @@ void setup() {
|
||||
SETUP_RUN(stepper_driver_backward_report());
|
||||
#endif
|
||||
|
||||
#if HAS_PRUSA_MMU2
|
||||
#if HAS_PRUSA_MMU3
|
||||
if (mmu3.mmu_hw_enabled) SETUP_RUN(mmu3.start());
|
||||
SETUP_RUN(mmu3.status());
|
||||
SETUP_RUN(spooljoin.initStatus());
|
||||
#elif HAS_PRUSA_MMU2
|
||||
SETUP_RUN(mmu2.init());
|
||||
#endif
|
||||
|
||||
@@ -1599,6 +1624,8 @@ void setup() {
|
||||
|
||||
#if ENABLED(DWIN_CREALITY_LCD)
|
||||
SETUP_RUN(dwinInitScreen());
|
||||
#elif ENABLED(SOVOL_SV06_RTS)
|
||||
SETUP_RUN(rts.init());
|
||||
#endif
|
||||
|
||||
#if HAS_SERVICE_INTERVALS && DISABLED(DWIN_CREALITY_LCD)
|
||||
@@ -1648,11 +1675,15 @@ void setup() {
|
||||
SETUP_RUN(bdl.init(I2C_BD_SDA_PIN, I2C_BD_SCL_PIN, I2C_BD_DELAY));
|
||||
#endif
|
||||
|
||||
#if HAS_RS485_SERIAL
|
||||
SETUP_RUN(rs485_init());
|
||||
#endif
|
||||
|
||||
#if ENABLED(FT_MOTION)
|
||||
SETUP_RUN(ftMotion.init());
|
||||
#endif
|
||||
|
||||
marlin_state = MF_RUNNING;
|
||||
marlin_state = MarlinState::MF_RUNNING;
|
||||
|
||||
#ifdef STARTUP_TUNE
|
||||
// Play a short startup tune before continuing.
|
||||
@@ -1684,7 +1715,7 @@ void loop() {
|
||||
|
||||
#if HAS_MEDIA
|
||||
if (card.flag.abort_sd_printing) abortSDPrinting();
|
||||
if (marlin_state == MF_SD_COMPLETE) finishSDPrinting();
|
||||
if (marlin_state == MarlinState::MF_SD_COMPLETE) finishSDPrinting();
|
||||
#endif
|
||||
|
||||
queue.advance();
|
||||
|
||||
@@ -42,7 +42,7 @@ void kill(FSTR_P const lcd_error=nullptr, FSTR_P const lcd_component=nullptr, co
|
||||
void minkill(const bool steppers_off=false);
|
||||
|
||||
// Global State of the firmware
|
||||
enum MarlinState : uint8_t {
|
||||
enum class MarlinState : uint8_t {
|
||||
MF_INITIALIZING = 0,
|
||||
MF_STOPPED,
|
||||
MF_KILLED,
|
||||
@@ -53,8 +53,8 @@ enum MarlinState : uint8_t {
|
||||
};
|
||||
|
||||
extern MarlinState marlin_state;
|
||||
inline bool IsRunning() { return marlin_state >= MF_RUNNING; }
|
||||
inline bool IsStopped() { return marlin_state == MF_STOPPED; }
|
||||
inline bool IsRunning() { return marlin_state >= MarlinState::MF_RUNNING; }
|
||||
inline bool IsStopped() { return marlin_state == MarlinState::MF_STOPPED; }
|
||||
|
||||
bool printingIsActive();
|
||||
bool printJobOngoing();
|
||||
|
||||
+170
-165
@@ -79,59 +79,58 @@
|
||||
#define BOARD_MKS_GEN_13 1112 // MKS GEN v1.3 or 1.4
|
||||
#define BOARD_MKS_GEN_L 1113 // MKS GEN L
|
||||
#define BOARD_KFB_2 1114 // BigTreeTech or BIQU KFB2.0
|
||||
#define BOARD_ZRIB_V20 1115 // zrib V2.0 (Chinese RAMPS replica)
|
||||
#define BOARD_ZRIB_V52 1116 // zrib V5.2 (Chinese RAMPS replica)
|
||||
#define BOARD_FELIX2 1117 // Felix 2.0+ Electronics Board (RAMPS like)
|
||||
#define BOARD_RIGIDBOARD 1118 // Invent-A-Part RigidBoard
|
||||
#define BOARD_RIGIDBOARD_V2 1119 // Invent-A-Part RigidBoard V2
|
||||
#define BOARD_SAINSMART_2IN1 1120 // Sainsmart 2-in-1 board
|
||||
#define BOARD_ULTIMAKER 1121 // Ultimaker
|
||||
#define BOARD_ULTIMAKER_OLD 1122 // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
||||
#define BOARD_AZTEEG_X3 1123 // Azteeg X3
|
||||
#define BOARD_AZTEEG_X3_PRO 1124 // Azteeg X3 Pro
|
||||
#define BOARD_ULTIMAIN_2 1125 // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
||||
#define BOARD_RUMBA 1126 // Rumba
|
||||
#define BOARD_RUMBA_RAISE3D 1127 // Raise3D N series Rumba derivative
|
||||
#define BOARD_RL200 1128 // Rapide Lite 200 (v1, low-cost RUMBA clone with drv)
|
||||
#define BOARD_FORMBOT_TREX2PLUS 1129 // Formbot T-Rex 2 Plus
|
||||
#define BOARD_FORMBOT_TREX3 1130 // Formbot T-Rex 3
|
||||
#define BOARD_FORMBOT_RAPTOR 1131 // Formbot Raptor
|
||||
#define BOARD_FORMBOT_RAPTOR2 1132 // Formbot Raptor 2
|
||||
#define BOARD_BQ_ZUM_MEGA_3D 1133 // bq ZUM Mega 3D
|
||||
#define BOARD_MAKEBOARD_MINI 1134 // MakeBoard Mini v2.1.2 by MicroMake
|
||||
#define BOARD_TRIGORILLA_13 1135 // TriGorilla Anycubic version 1.3-based on RAMPS EFB
|
||||
#define BOARD_TRIGORILLA_14 1136 // ... Ver 1.4
|
||||
#define BOARD_TRIGORILLA_14_11 1137 // ... Rev 1.1 (new servo pin order)
|
||||
#define BOARD_RAMPS_ENDER_4 1138 // Creality: Ender-4, CR-8
|
||||
#define BOARD_RAMPS_CREALITY 1139 // Creality: CR10S, CR20, CR-X
|
||||
#define BOARD_DAGOMA_F5 1140 // Dagoma F5
|
||||
#define BOARD_FYSETC_F6_13 1141 // FYSETC F6 1.3
|
||||
#define BOARD_FYSETC_F6_14 1142 // FYSETC F6 1.4
|
||||
#define BOARD_DUPLICATOR_I3_PLUS 1143 // Wanhao Duplicator i3 Plus
|
||||
#define BOARD_VORON 1144 // VORON Design
|
||||
#define BOARD_TRONXY_V3_1_0 1145 // Tronxy TRONXY-V3-1.0
|
||||
#define BOARD_Z_BOLT_X_SERIES 1146 // Z-Bolt X Series
|
||||
#define BOARD_TT_OSCAR 1147 // TT OSCAR
|
||||
#define BOARD_OVERLORD 1148 // Overlord/Overlord Pro
|
||||
#define BOARD_HJC2560C_REV1 1149 // ADIMLab Gantry v1
|
||||
#define BOARD_HJC2560C_REV2 1150 // ADIMLab Gantry v2
|
||||
#define BOARD_TANGO 1151 // BIQU Tango V1
|
||||
#define BOARD_MKS_GEN_L_V2 1152 // MKS GEN L V2
|
||||
#define BOARD_MKS_GEN_L_V21 1153 // MKS GEN L V2.1
|
||||
#define BOARD_COPYMASTER_3D 1154 // Copymaster 3D
|
||||
#define BOARD_ORTUR_4 1155 // Ortur 4
|
||||
#define BOARD_TENLOG_D3_HERO 1156 // Tenlog D3 Hero IDEX printer
|
||||
#define BOARD_TENLOG_MB1_V23 1157 // Tenlog D3, D5, D6 IDEX Printer
|
||||
#define BOARD_RAMPS_S_12_EEFB 1158 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed)
|
||||
#define BOARD_RAMPS_S_12_EEEB 1159 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed)
|
||||
#define BOARD_RAMPS_S_12_EFFB 1160 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed)
|
||||
#define BOARD_LONGER3D_LK1_PRO 1161 // Longer LK1 PRO / Alfawise U20 Pro (PRO version)
|
||||
#define BOARD_LONGER3D_LKx_PRO 1162 // Longer LKx PRO / Alfawise Uxx Pro (PRO version)
|
||||
#define BOARD_ZRIB_V53 1163 // Zonestar zrib V5.3 (Chinese RAMPS replica)
|
||||
#define BOARD_PXMALION_CORE_I3 1164 // Pxmalion Core I3
|
||||
#define BOARD_PANOWIN_CUTLASS 1165 // Panowin Cutlass (as found in the Panowin F1)
|
||||
#define BOARD_KODAMA_BARDO 1166 // Kodama Bardo V1.x (as found in the Kodama Trinus)
|
||||
#define BOARD_DAGOMA_D6 1167 // Dagoma D6 (as found in the Dagoma DiscoUltimate V2 TMC)
|
||||
#define BOARD_ZRIB_V20 1115 // Zonestar zrib V2.0 (Chinese RAMPS replica)
|
||||
#define BOARD_ZRIB_V52 1116 // Zonestar zrib V5.2 (Chinese RAMPS replica)
|
||||
#define BOARD_ZRIB_V53 1117 // Zonestar zrib V5.3 (Chinese RAMPS replica)
|
||||
#define BOARD_FELIX2 1118 // Felix 2.0+ Electronics Board (RAMPS like)
|
||||
#define BOARD_RIGIDBOARD 1119 // Invent-A-Part RigidBoard
|
||||
#define BOARD_RIGIDBOARD_V2 1120 // Invent-A-Part RigidBoard V2
|
||||
#define BOARD_SAINSMART_2IN1 1121 // Sainsmart 2-in-1 board
|
||||
#define BOARD_ULTIMAKER 1122 // Ultimaker
|
||||
#define BOARD_ULTIMAKER_OLD 1123 // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
||||
#define BOARD_AZTEEG_X3 1124 // Azteeg X3
|
||||
#define BOARD_AZTEEG_X3_PRO 1125 // Azteeg X3 Pro
|
||||
#define BOARD_ULTIMAIN_2 1126 // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
||||
#define BOARD_RUMBA 1127 // Rumba
|
||||
#define BOARD_RUMBA_RAISE3D 1128 // Raise3D N series Rumba derivative
|
||||
#define BOARD_RL200 1129 // Rapide Lite 200 (v1, low-cost RUMBA clone with drv)
|
||||
#define BOARD_FORMBOT_TREX2PLUS 1130 // Formbot T-Rex 2 Plus
|
||||
#define BOARD_FORMBOT_TREX3 1131 // Formbot T-Rex 3
|
||||
#define BOARD_FORMBOT_RAPTOR 1132 // Formbot Raptor
|
||||
#define BOARD_FORMBOT_RAPTOR2 1133 // Formbot Raptor 2
|
||||
#define BOARD_BQ_ZUM_MEGA_3D 1134 // bq ZUM Mega 3D
|
||||
#define BOARD_MAKEBOARD_MINI 1135 // MakeBoard Mini v2.1.2 by MicroMake
|
||||
#define BOARD_TRIGORILLA_13 1136 // TriGorilla Anycubic version 1.3-based on RAMPS EFB
|
||||
#define BOARD_TRIGORILLA_14 1137 // ... Ver 1.4
|
||||
#define BOARD_TRIGORILLA_14_11 1138 // ... Rev 1.1 (new servo pin order)
|
||||
#define BOARD_RAMPS_ENDER_4 1139 // Creality: Ender-4, CR-8
|
||||
#define BOARD_RAMPS_CREALITY 1140 // Creality: CR10S, CR20, CR-X
|
||||
#define BOARD_DAGOMA_F5 1141 // Dagoma F5
|
||||
#define BOARD_DAGOMA_D6 1142 // Dagoma D6 (as found in the Dagoma DiscoUltimate V2 TMC)
|
||||
#define BOARD_FYSETC_F6_13 1143 // FYSETC F6 1.3
|
||||
#define BOARD_FYSETC_F6_14 1144 // FYSETC F6 1.4
|
||||
#define BOARD_DUPLICATOR_I3_PLUS 1145 // Wanhao Duplicator i3 Plus
|
||||
#define BOARD_VORON 1146 // VORON Design
|
||||
#define BOARD_TRONXY_V3_1_0 1147 // Tronxy TRONXY-V3-1.0
|
||||
#define BOARD_Z_BOLT_X_SERIES 1148 // Z-Bolt X Series
|
||||
#define BOARD_TT_OSCAR 1149 // TT OSCAR
|
||||
#define BOARD_TANGO 1150 // BIQU Tango V1
|
||||
#define BOARD_MKS_GEN_L_V2 1151 // MKS GEN L V2
|
||||
#define BOARD_MKS_GEN_L_V21 1152 // MKS GEN L V2.1
|
||||
#define BOARD_COPYMASTER_3D 1153 // Copymaster 3D
|
||||
#define BOARD_ORTUR_4 1154 // Ortur 4
|
||||
#define BOARD_TENLOG_D3_HERO 1155 // Tenlog D3 Hero IDEX printer
|
||||
#define BOARD_TENLOG_MB1_V23 1156 // Tenlog D3, D5, D6 IDEX Printer
|
||||
#define BOARD_RAMPS_S_12_EEFB 1157 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed)
|
||||
#define BOARD_RAMPS_S_12_EEEB 1158 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed)
|
||||
#define BOARD_RAMPS_S_12_EFFB 1159 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed)
|
||||
#define BOARD_LONGER3D_LK1_PRO 1160 // Longer LK1 PRO / Alfawise U20 Pro (PRO version)
|
||||
#define BOARD_LONGER3D_LKx_PRO 1161 // Longer LKx PRO / Alfawise Uxx Pro (PRO version)
|
||||
#define BOARD_PXMALION_CORE_I3 1162 // Pxmalion Core I3
|
||||
#define BOARD_PANOWIN_CUTLASS 1163 // Panowin Cutlass (as found in the Panowin F1)
|
||||
#define BOARD_KODAMA_BARDO 1164 // Kodama Bardo V1.x (as found in the Kodama Trinus)
|
||||
#define BOARD_XTLW_MFF_V1 1165 // XTLW MFF V1.0
|
||||
#define BOARD_XTLW_MFF_V2 1166 // XTLW MFF V2.0
|
||||
|
||||
//
|
||||
// RAMBo and derivatives
|
||||
@@ -167,20 +166,23 @@
|
||||
#define BOARD_GT2560_REV_A_PLUS 1315 // Geeetech GT2560 Rev A+ (with auto level probe)
|
||||
#define BOARD_GT2560_REV_B 1316 // Geeetech GT2560 Rev B
|
||||
#define BOARD_GT2560_V3 1317 // Geeetech GT2560 Rev B for A10(M/T/D)
|
||||
#define BOARD_GT2560_V4 1318 // Geeetech GT2560 Rev B for A10(M/T/D)
|
||||
#define BOARD_GT2560_V3_MC2 1319 // Geeetech GT2560 Rev B for Mecreator2
|
||||
#define BOARD_GT2560_V3_A20 1320 // Geeetech GT2560 Rev B for A20(M/T/D)
|
||||
#define BOARD_EINSTART_S 1321 // Einstart retrofit
|
||||
#define BOARD_WANHAO_ONEPLUS 1322 // Wanhao 0ne+ i3 Mini
|
||||
#define BOARD_LEAPFROG_XEED2015 1323 // Leapfrog Xeed 2015
|
||||
#define BOARD_PICA_REVB 1324 // PICA Shield (original version)
|
||||
#define BOARD_PICA 1325 // PICA Shield (rev C or later)
|
||||
#define BOARD_INTAMSYS40 1326 // Intamsys 4.0 (Funmat HT)
|
||||
#define BOARD_MALYAN_M180 1327 // Malyan M180 Mainboard Version 2 (no display function, direct G-code only)
|
||||
#define BOARD_GT2560_V4_A20 1328 // Geeetech GT2560 Rev B for A20(M/T/D)
|
||||
#define BOARD_PROTONEER_CNC_SHIELD_V3 1329 // Mega controller & Protoneer CNC Shield V3.00
|
||||
#define BOARD_WEEDO_62A 1330 // WEEDO 62A board (TINA2, Monoprice Cadet, etc.)
|
||||
#define BOARD_GT2560_V41B 1331 // Geeetech GT2560 V4.1B for A10(M/T/D)
|
||||
#define BOARD_GT2560_V3_MC2 1318 // Geeetech GT2560 Rev B for Mecreator2
|
||||
#define BOARD_GT2560_V3_A20 1319 // Geeetech GT2560 Rev B for A20(M/T/D)
|
||||
#define BOARD_GT2560_V4 1320 // Geeetech GT2560 Rev B for A10(M/T/D)
|
||||
#define BOARD_GT2560_V4_A20 1321 // Geeetech GT2560 Rev B for A20(M/T/D)
|
||||
#define BOARD_EINSTART_S 1322 // Einstart retrofit
|
||||
#define BOARD_WANHAO_ONEPLUS 1323 // Wanhao 0ne+ i3 Mini
|
||||
#define BOARD_OVERLORD 1324 // Overlord/Overlord Pro
|
||||
#define BOARD_HJC2560C_REV1 1325 // ADIMLab Gantry v1
|
||||
#define BOARD_HJC2560C_REV2 1326 // ADIMLab Gantry v2
|
||||
#define BOARD_LEAPFROG_XEED2015 1327 // Leapfrog Xeed 2015
|
||||
#define BOARD_PICA_REVB 1328 // PICA Shield (original version)
|
||||
#define BOARD_PICA 1329 // PICA Shield (rev C or later)
|
||||
#define BOARD_INTAMSYS40 1330 // Intamsys 4.0 (Funmat HT)
|
||||
#define BOARD_MALYAN_M180 1331 // Malyan M180 Mainboard Version 2 (no display function, direct G-code only)
|
||||
#define BOARD_PROTONEER_CNC_SHIELD_V3 1332 // Mega controller & Protoneer CNC Shield V3.00
|
||||
#define BOARD_WEEDO_62A 1333 // WEEDO 62A board (TINA2, Monoprice Cadet, etc.)
|
||||
#define BOARD_GT2560_V41B 1334 // Geeetech GT2560 V4.1B for A10(M/T/D)
|
||||
|
||||
//
|
||||
// ATmega1281, ATmega2561
|
||||
@@ -273,6 +275,7 @@
|
||||
#define BOARD_MKS_SGEN_L_V2 2509 // MKS SGEN_L V2
|
||||
#define BOARD_BTT_SKR_E3_TURBO 2510 // BigTreeTech SKR E3 Turbo
|
||||
#define BOARD_FLY_CDY 2511 // FLYmaker FLY CDY
|
||||
#define BOARD_XTLW_CLIMBER_8TH_LPC 2512 // XTLW_CLIMBER_8TH_LPC
|
||||
|
||||
//
|
||||
// SAM3X8E ARM Cortex-M3
|
||||
@@ -325,6 +328,7 @@
|
||||
#define BOARD_BTT_MANTA_M5P_V1_0 4004 // BigTreeTech Manta M5P V1.0 (STM32G0B1RE)
|
||||
#define BOARD_BTT_MANTA_M8P_V1_0 4005 // BigTreeTech Manta M8P V1.0 (STM32G0B1VE)
|
||||
#define BOARD_BTT_MANTA_M8P_V1_1 4006 // BigTreeTech Manta M8P V1.1 (STM32G0B1VE)
|
||||
#define BOARD_BTT_SKRAT_V1_0 4007 // BigTreeTech SKRat V1.0 (STM32G0B1VE)
|
||||
|
||||
//
|
||||
// STM32 ARM Cortex-M3
|
||||
@@ -336,62 +340,62 @@
|
||||
#define BOARD_MALYAN_M200 5003 // STM32C8 Libmaple-based STM32F1 controller
|
||||
#define BOARD_STM3R_MINI 5004 // STM32F103RE Libmaple-based STM32F1 controller
|
||||
#define BOARD_GTM32_PRO_VB 5005 // STM32F103VE controller
|
||||
#define BOARD_GTM32_MINI 5006 // STM32F103VE controller
|
||||
#define BOARD_GTM32_MINI_A30 5007 // STM32F103VE controller
|
||||
#define BOARD_GTM32_REV_B 5008 // STM32F103VE controller
|
||||
#define BOARD_MORPHEUS 5009 // STM32F103C8 / STM32F103CB Libmaple-based STM32F1 controller
|
||||
#define BOARD_CHITU3D 5010 // Chitu3D (STM32F103RE)
|
||||
#define BOARD_MKS_ROBIN 5011 // MKS Robin (STM32F103ZE)
|
||||
#define BOARD_MKS_ROBIN_MINI 5012 // MKS Robin Mini (STM32F103VE)
|
||||
#define BOARD_MKS_ROBIN_NANO 5013 // MKS Robin Nano (STM32F103VE)
|
||||
#define BOARD_MKS_ROBIN_NANO_V2 5014 // MKS Robin Nano V2 (STM32F103VE)
|
||||
#define BOARD_MKS_ROBIN_LITE 5015 // MKS Robin Lite/Lite2 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_LITE3 5016 // MKS Robin Lite3 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_PRO 5017 // MKS Robin Pro (STM32F103ZE)
|
||||
#define BOARD_MKS_ROBIN_E3 5018 // MKS Robin E3 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_E3_V1_1 5019 // MKS Robin E3 V1.1 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_E3D 5020 // MKS Robin E3D (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_E3D_V1_1 5021 // MKS Robin E3D V1.1 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_E3P 5022 // MKS Robin E3P (STM32F103VE)
|
||||
#define BOARD_BTT_SKR_MINI_V1_1 5023 // BigTreeTech SKR Mini v1.1 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V1_0 5024 // BigTreeTech SKR Mini E3 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V1_2 5025 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V2_0 5026 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_BTT_SKR_MINI_MZ_V1_0 5027 // BigTreeTech SKR Mini MZ V1.0 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_E3_DIP 5028 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_BTT_SKR_CR6 5029 // BigTreeTech SKR CR6 v1.0 (STM32F103RE)
|
||||
#define BOARD_JGAURORA_A5S_A1 5030 // JGAurora A5S A1 (STM32F103ZE)
|
||||
#define BOARD_FYSETC_AIO_II 5031 // FYSETC AIO_II (STM32F103RC)
|
||||
#define BOARD_FYSETC_CHEETAH 5032 // FYSETC Cheetah (STM32F103RC)
|
||||
#define BOARD_FYSETC_CHEETAH_V12 5033 // FYSETC Cheetah V1.2 (STM32F103RC)
|
||||
#define BOARD_LONGER3D_LK 5034 // Longer3D LK1/2 - Alfawise U20/U20+/U30 (STM32F103VE)
|
||||
#define BOARD_CCROBOT_MEEB_3DP 5035 // ccrobot-online.com MEEB_3DP (STM32F103RC)
|
||||
#define BOARD_CHITU3D_V5 5036 // Chitu3D TronXY X5SA V5 Board (STM32F103ZE)
|
||||
#define BOARD_CHITU3D_V6 5037 // Chitu3D TronXY X5SA V6 Board (STM32F103ZE)
|
||||
#define BOARD_CHITU3D_V9 5038 // Chitu3D TronXY X5SA V9 Board (STM32F103ZE)
|
||||
#define BOARD_CREALITY_V4 5039 // Creality v4.x (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V422 5040 // Creality v4.2.2 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V423 5041 // Creality v4.2.3 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V425 5042 // Creality v4.2.5 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V427 5043 // Creality v4.2.7 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V4210 5044 // Creality v4.2.10 (STM32F103RC / STM32F103RE) as found in the CR-30
|
||||
#define BOARD_CREALITY_V431 5045 // Creality v4.3.1 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_A 5046 // Creality v4.3.1a (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_B 5047 // Creality v4.3.1b (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_C 5048 // Creality v4.3.1c (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_D 5049 // Creality v4.3.1d (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V452 5050 // Creality v4.5.2 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V453 5051 // Creality v4.5.3 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V521 5052 // Creality v5.2.1 (STM32F103VE) as found in the SV04
|
||||
#define BOARD_CREALITY_V24S1 5053 // Creality v2.4.S1 (STM32F103RC / STM32F103RE) CR-FDM-v2.4.S1_v101 as found in the Ender-7
|
||||
#define BOARD_CREALITY_V24S1_301 5054 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) CR-FDM-v24S1_301 as found in the Ender-3 S1
|
||||
#define BOARD_CREALITY_V25S1 5055 // Creality v2.5.S1 (STM32F103RE) CR-FDM-v2.5.S1_100 as found in the CR-10 Smart Pro
|
||||
#define BOARD_TRIGORILLA_PRO 5056 // Trigorilla Pro (STM32F103ZE)
|
||||
#define BOARD_FLY_MINI 5057 // FLYmaker FLY MINI (STM32F103RC)
|
||||
#define BOARD_FLSUN_HISPEED 5058 // FLSUN HiSpeedV1 (STM32F103VE)
|
||||
#define BOARD_BEAST 5059 // STM32F103RE Libmaple-based controller
|
||||
#define BOARD_MINGDA_MPX_ARM_MINI 5060 // STM32F103ZE Mingda MD-16
|
||||
#define BOARD_GTM32_PRO_VD 5061 // STM32F103VE controller
|
||||
#define BOARD_GTM32_PRO_VD 5006 // STM32F103VE controller
|
||||
#define BOARD_GTM32_MINI 5007 // STM32F103VE controller
|
||||
#define BOARD_GTM32_MINI_A30 5008 // STM32F103VE controller
|
||||
#define BOARD_GTM32_REV_B 5009 // STM32F103VE controller
|
||||
#define BOARD_MORPHEUS 5010 // STM32F103C8 / STM32F103CB Libmaple-based STM32F1 controller
|
||||
#define BOARD_CHITU3D 5011 // Chitu3D (STM32F103RE)
|
||||
#define BOARD_MKS_ROBIN 5012 // MKS Robin (STM32F103ZE)
|
||||
#define BOARD_MKS_ROBIN_MINI 5013 // MKS Robin Mini (STM32F103VE)
|
||||
#define BOARD_MKS_ROBIN_NANO 5014 // MKS Robin Nano (STM32F103VE)
|
||||
#define BOARD_MKS_ROBIN_NANO_V2 5015 // MKS Robin Nano V2 (STM32F103VE)
|
||||
#define BOARD_MKS_ROBIN_LITE 5016 // MKS Robin Lite/Lite2 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_LITE3 5017 // MKS Robin Lite3 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_PRO 5018 // MKS Robin Pro (STM32F103ZE)
|
||||
#define BOARD_MKS_ROBIN_E3 5019 // MKS Robin E3 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_E3_V1_1 5020 // MKS Robin E3 V1.1 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_E3D 5021 // MKS Robin E3D (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_E3D_V1_1 5022 // MKS Robin E3D V1.1 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_E3P 5023 // MKS Robin E3P (STM32F103VE)
|
||||
#define BOARD_BTT_SKR_MINI_V1_1 5024 // BigTreeTech SKR Mini v1.1 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V1_0 5025 // BigTreeTech SKR Mini E3 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V1_2 5026 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V2_0 5027 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_BTT_SKR_MINI_MZ_V1_0 5028 // BigTreeTech SKR Mini MZ V1.0 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_E3_DIP 5029 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_BTT_SKR_CR6 5030 // BigTreeTech SKR CR6 v1.0 (STM32F103RE)
|
||||
#define BOARD_JGAURORA_A5S_A1 5031 // JGAurora A5S A1 (STM32F103ZE)
|
||||
#define BOARD_FYSETC_AIO_II 5032 // FYSETC AIO_II (STM32F103RC)
|
||||
#define BOARD_FYSETC_CHEETAH 5033 // FYSETC Cheetah (STM32F103RC)
|
||||
#define BOARD_FYSETC_CHEETAH_V12 5034 // FYSETC Cheetah V1.2 (STM32F103RC)
|
||||
#define BOARD_LONGER3D_LK 5035 // Longer3D LK1/2 - Alfawise U20/U20+/U30 (STM32F103VE)
|
||||
#define BOARD_CCROBOT_MEEB_3DP 5036 // ccrobot-online.com MEEB_3DP (STM32F103RC)
|
||||
#define BOARD_CHITU3D_V5 5037 // Chitu3D TronXY X5SA V5 Board (STM32F103ZE)
|
||||
#define BOARD_CHITU3D_V6 5038 // Chitu3D TronXY X5SA V6 Board (STM32F103ZE)
|
||||
#define BOARD_CHITU3D_V9 5039 // Chitu3D TronXY X5SA V9 Board (STM32F103ZE)
|
||||
#define BOARD_CREALITY_V4 5040 // Creality v4.x (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V422 5041 // Creality v4.2.2 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V423 5042 // Creality v4.2.3 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V425 5043 // Creality v4.2.5 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V427 5044 // Creality v4.2.7 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V4210 5045 // Creality v4.2.10 (STM32F103RC / STM32F103RE) as found in the CR-30
|
||||
#define BOARD_CREALITY_V431 5046 // Creality v4.3.1 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_A 5047 // Creality v4.3.1a (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_B 5048 // Creality v4.3.1b (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_C 5049 // Creality v4.3.1c (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_D 5050 // Creality v4.3.1d (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V452 5051 // Creality v4.5.2 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V453 5052 // Creality v4.5.3 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V521 5053 // Creality v5.2.1 (STM32F103VE) as found in the SV04
|
||||
#define BOARD_CREALITY_V24S1 5054 // Creality v2.4.S1 (STM32F103RC / STM32F103RE) CR-FDM-v2.4.S1_v101 as found in the Ender-7
|
||||
#define BOARD_CREALITY_V24S1_301 5055 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) CR-FDM-v24S1_301 as found in the Ender-3 S1
|
||||
#define BOARD_CREALITY_V25S1 5056 // Creality v2.5.S1 (STM32F103RE) CR-FDM-v2.5.S1_100 as found in the CR-10 Smart Pro
|
||||
#define BOARD_TRIGORILLA_PRO 5057 // Trigorilla Pro (STM32F103ZE)
|
||||
#define BOARD_FLY_MINI 5058 // FLYmaker FLY MINI (STM32F103RC)
|
||||
#define BOARD_FLSUN_HISPEED 5059 // FLSUN HiSpeedV1 (STM32F103VE)
|
||||
#define BOARD_BEAST 5060 // STM32F103RE Libmaple-based controller
|
||||
#define BOARD_MINGDA_MPX_ARM_MINI 5061 // STM32F103ZE Mingda MD-16
|
||||
#define BOARD_ZONESTAR_ZM3E2 5062 // Zonestar ZM3E2 (STM32F103RC)
|
||||
#define BOARD_ZONESTAR_ZM3E4 5063 // Zonestar ZM3E4 V1 (STM32F103VC)
|
||||
#define BOARD_ZONESTAR_ZM3E4V2 5064 // Zonestar ZM3E4 V2 (STM32F103VC)
|
||||
@@ -420,8 +424,8 @@
|
||||
#define BOARD_RUMBA32_V1_1 5202 // RUMBA32 STM32F446VE based controller from Aus3D
|
||||
#define BOARD_RUMBA32_MKS 5203 // RUMBA32 STM32F446VE based controller from Makerbase
|
||||
#define BOARD_RUMBA32_BTT 5204 // RUMBA32 STM32F446VE based controller from BIGTREETECH
|
||||
#define BOARD_BLACK_STM32F407VE 5205 // BLACK_STM32F407VE
|
||||
#define BOARD_BLACK_STM32F407ZE 5206 // BLACK_STM32F407ZE
|
||||
#define BOARD_BLACK_STM32F407VE 5205 // Black STM32F407VE development board
|
||||
#define BOARD_BLACK_STM32F407ZE 5206 // Black STM32F407ZE development board
|
||||
#define BOARD_BTT_SKR_MINI_E3_V3_0_1 5207 // BigTreeTech SKR Mini E3 V3.0.1 (STM32F401RC)
|
||||
#define BOARD_BTT_SKR_PRO_V1_1 5208 // BigTreeTech SKR Pro v1.1 (STM32F407ZG)
|
||||
#define BOARD_BTT_SKR_PRO_V1_2 5209 // BigTreeTech SKR Pro v1.2 (STM32F407ZG)
|
||||
@@ -439,34 +443,35 @@
|
||||
#define BOARD_FYSETC_S6 5221 // FYSETC S6 (STM32F446VE)
|
||||
#define BOARD_FYSETC_S6_V2_0 5222 // FYSETC S6 v2.0 (STM32F446VE)
|
||||
#define BOARD_FYSETC_SPIDER 5223 // FYSETC Spider (STM32F446VE)
|
||||
#define BOARD_FLYF407ZG 5224 // FLYmaker FLYF407ZG (STM32F407ZG)
|
||||
#define BOARD_MKS_ROBIN2 5225 // MKS Robin2 V1.0 (STM32F407ZE)
|
||||
#define BOARD_MKS_ROBIN_PRO_V2 5226 // MKS Robin Pro V2 (STM32F407VE)
|
||||
#define BOARD_MKS_ROBIN_NANO_V3 5227 // MKS Robin Nano V3 (STM32F407VG)
|
||||
#define BOARD_MKS_ROBIN_NANO_V3_1 5228 // MKS Robin Nano V3.1 (STM32F407VE)
|
||||
#define BOARD_MKS_MONSTER8_V1 5229 // MKS Monster8 V1 (STM32F407VE)
|
||||
#define BOARD_MKS_MONSTER8_V2 5230 // MKS Monster8 V2 (STM32F407VE)
|
||||
#define BOARD_ANET_ET4 5231 // ANET ET4 V1.x (STM32F407VG)
|
||||
#define BOARD_ANET_ET4P 5232 // ANET ET4P V1.x (STM32F407VG)
|
||||
#define BOARD_FYSETC_CHEETAH_V20 5233 // FYSETC Cheetah V2.0 (STM32F401RC)
|
||||
#define BOARD_TH3D_EZBOARD_V2 5234 // TH3D EZBoard v2.0 (STM32F405RG)
|
||||
#define BOARD_OPULO_LUMEN_REV3 5235 // Opulo Lumen PnP Controller REV3 (STM32F407VE / STM32F407VG)
|
||||
#define BOARD_MKS_ROBIN_NANO_V1_3_F4 5236 // MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 (STM32F407VE)
|
||||
#define BOARD_MKS_EAGLE 5237 // MKS Eagle (STM32F407VE)
|
||||
#define BOARD_ARTILLERY_RUBY 5238 // Artillery Ruby (STM32F401RC)
|
||||
#define BOARD_FYSETC_SPIDER_V2_2 5239 // FYSETC Spider V2.2 (STM32F446VE)
|
||||
#define BOARD_CREALITY_V24S1_301F4 5240 // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4
|
||||
#define BOARD_CREALITY_CR4NTXXC10 5241 // Creality E3 Free-runs Silent Motherboard (STM32F401RET6)
|
||||
#define BOARD_OPULO_LUMEN_REV4 5242 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG)
|
||||
#define BOARD_FYSETC_SPIDER_KING407 5243 // FYSETC Spider King407 (STM32F407ZG)
|
||||
#define BOARD_MKS_SKIPR_V1 5244 // MKS SKIPR v1.0 all-in-one board (STM32F407VE)
|
||||
#define BOARD_TRONXY_CXY_446_V10 5245 // TRONXY CXY-446-V10-220413/CXY-V6-191121 (STM32F446ZE)
|
||||
#define BOARD_CREALITY_F401RE 5246 // Creality CR4NS200141C13 (STM32F401RE) as found in the Ender-5 S1
|
||||
#define BOARD_BLACKPILL_CUSTOM 5247 // Custom board based on STM32F401CDU6.
|
||||
#define BOARD_I3DBEEZ9_V1 5248 // I3DBEEZ9 V1 (STM32F407ZG)
|
||||
#define BOARD_MELLOW_FLY_E3_V2 5249 // Mellow Fly E3 V2 (STM32F407VG)
|
||||
#define BOARD_FYSETC_CHEETAH_V30 5250 // FYSETC Cheetah V3.0 (STM32F446RC)
|
||||
#define BOARD_FYSETC_SPIDER_V2_2 5224 // FYSETC Spider V2.2 (STM32F446VE)
|
||||
#define BOARD_FLYF407ZG 5225 // FLYmaker FLYF407ZG (STM32F407ZG)
|
||||
#define BOARD_MKS_ROBIN2 5226 // MKS Robin2 V1.0 (STM32F407ZE)
|
||||
#define BOARD_MKS_ROBIN_PRO_V2 5227 // MKS Robin Pro V2 (STM32F407VE)
|
||||
#define BOARD_MKS_ROBIN_NANO_V3 5228 // MKS Robin Nano V3 (STM32F407VG)
|
||||
#define BOARD_MKS_ROBIN_NANO_V3_1 5229 // MKS Robin Nano V3.1 (STM32F407VE)
|
||||
#define BOARD_MKS_MONSTER8_V1 5230 // MKS Monster8 V1 (STM32F407VE)
|
||||
#define BOARD_MKS_MONSTER8_V2 5231 // MKS Monster8 V2 (STM32F407VE)
|
||||
#define BOARD_ANET_ET4 5232 // ANET ET4 V1.x (STM32F407VG)
|
||||
#define BOARD_ANET_ET4P 5233 // ANET ET4P V1.x (STM32F407VG)
|
||||
#define BOARD_FYSETC_CHEETAH_V20 5234 // FYSETC Cheetah V2.0 (STM32F401RC)
|
||||
#define BOARD_FYSETC_CHEETAH_V30 5235 // FYSETC Cheetah V3.0 (STM32F446RC)
|
||||
#define BOARD_TH3D_EZBOARD_V2 5236 // TH3D EZBoard v2.0 (STM32F405RG)
|
||||
#define BOARD_OPULO_LUMEN_REV3 5237 // Opulo Lumen PnP Controller REV3 (STM32F407VE / STM32F407VG)
|
||||
#define BOARD_MKS_ROBIN_NANO_V1_3_F4 5238 // MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 (STM32F407VE)
|
||||
#define BOARD_MKS_EAGLE 5239 // MKS Eagle (STM32F407VE)
|
||||
#define BOARD_ARTILLERY_RUBY 5240 // Artillery Ruby (STM32F401RC)
|
||||
#define BOARD_CREALITY_V24S1_301F4 5241 // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4
|
||||
#define BOARD_CREALITY_CR4NTXXC10 5242 // Creality E3 Free-runs Silent Motherboard (STM32F401RET6)
|
||||
#define BOARD_OPULO_LUMEN_REV4 5243 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG)
|
||||
#define BOARD_FYSETC_SPIDER_KING407 5244 // FYSETC Spider King407 (STM32F407ZG)
|
||||
#define BOARD_MKS_SKIPR_V1 5245 // MKS SKIPR v1.0 all-in-one board (STM32F407VE)
|
||||
#define BOARD_TRONXY_CXY_446_V10 5246 // TRONXY CXY-446-V10-220413/CXY-V6-191121 (STM32F446ZE)
|
||||
#define BOARD_CREALITY_F401RE 5247 // Creality CR4NS200141C13 (STM32F401RE) as found in the Ender-5 S1
|
||||
#define BOARD_BLACKPILL_CUSTOM 5248 // Custom board based on STM32F401CDU6.
|
||||
#define BOARD_I3DBEEZ9_V1 5249 // I3DBEEZ9 V1 (STM32F407ZG)
|
||||
#define BOARD_MELLOW_FLY_E3_V2 5250 // Mellow Fly E3 V2 (STM32F407VG)
|
||||
#define BOARD_BLACKBEEZMINI_V1 5251 // BlackBeezMini V1 (STM32F401CCU6)
|
||||
#define BOARD_XTLW_CLIMBER_8TH 5252 // XTLW Climber-8th (STM32F407VGT6)
|
||||
|
||||
//
|
||||
// Other ARM Cortex-M4
|
||||
@@ -478,18 +483,18 @@
|
||||
//
|
||||
|
||||
#define BOARD_REMRAM_V1 6000 // RemRam v1
|
||||
#define BOARD_TEENSY41 6001 // Teensy 4.1
|
||||
#define BOARD_T41U5XBB 6002 // T41U5XBB Teensy 4.1 breakout board
|
||||
#define BOARD_NUCLEO_F767ZI 6003 // ST NUCLEO-F767ZI Dev Board
|
||||
#define BOARD_BTT_SKR_SE_BX_V2 6004 // BigTreeTech SKR SE BX V2.0 (STM32H743II)
|
||||
#define BOARD_BTT_SKR_SE_BX_V3 6005 // BigTreeTech SKR SE BX V3.0 (STM32H743II)
|
||||
#define BOARD_BTT_SKR_V3_0 6006 // BigTreeTech SKR V3.0 (STM32H743VI / STM32H723VG)
|
||||
#define BOARD_BTT_SKR_V3_0_EZ 6007 // BigTreeTech SKR V3.0 EZ (STM32H743VI / STM32H723VG)
|
||||
#define BOARD_BTT_OCTOPUS_MAX_EZ_V1_0 6008 // BigTreeTech Octopus Max EZ V1.0 (STM32H723ZE)
|
||||
#define BOARD_BTT_OCTOPUS_PRO_V1_0_1 6009 // BigTreeTech Octopus Pro v1.0.1 (STM32H723ZE)
|
||||
#define BOARD_BTT_OCTOPUS_PRO_V1_1 6010 // BigTreeTech Octopus Pro v1.1 (STM32H723ZE)
|
||||
#define BOARD_BTT_MANTA_M8P_V2_0 6011 // BigTreeTech Manta M8P V2.0 (STM32H723ZE)
|
||||
#define BOARD_BTT_KRAKEN_V1_0 6012 // BigTreeTech Kraken v1.0 (STM32H723ZG)
|
||||
#define BOARD_NUCLEO_F767ZI 6001 // ST NUCLEO-F767ZI Dev Board
|
||||
#define BOARD_BTT_SKR_SE_BX_V2 6002 // BigTreeTech SKR SE BX V2.0 (STM32H743II)
|
||||
#define BOARD_BTT_SKR_SE_BX_V3 6003 // BigTreeTech SKR SE BX V3.0 (STM32H743II)
|
||||
#define BOARD_BTT_SKR_V3_0 6004 // BigTreeTech SKR V3.0 (STM32H743VI / STM32H723VG)
|
||||
#define BOARD_BTT_SKR_V3_0_EZ 6005 // BigTreeTech SKR V3.0 EZ (STM32H743VI / STM32H723VG)
|
||||
#define BOARD_BTT_OCTOPUS_MAX_EZ_V1_0 6006 // BigTreeTech Octopus Max EZ V1.0 (STM32H723ZE)
|
||||
#define BOARD_BTT_OCTOPUS_PRO_V1_0_1 6007 // BigTreeTech Octopus Pro v1.0.1 (STM32H723ZE)
|
||||
#define BOARD_BTT_OCTOPUS_PRO_V1_1 6008 // BigTreeTech Octopus Pro v1.1 (STM32H723ZE)
|
||||
#define BOARD_BTT_MANTA_M8P_V2_0 6009 // BigTreeTech Manta M8P V2.0 (STM32H723ZE)
|
||||
#define BOARD_BTT_KRAKEN_V1_0 6010 // BigTreeTech Kraken v1.0 (STM32H723ZG)
|
||||
#define BOARD_TEENSY41 6011 // Teensy 4.1
|
||||
#define BOARD_T41U5XBB 6012 // T41U5XBB Teensy 4.1 breakout board
|
||||
|
||||
//
|
||||
// Espressif ESP32 WiFi
|
||||
@@ -539,7 +544,7 @@
|
||||
// Simulations
|
||||
//
|
||||
|
||||
#define BOARD_SIMULATED 9999
|
||||
#define BOARD_SIMULATED 9999 // Simulated 3D Printer with LCD / TFT for development
|
||||
|
||||
#define _MB_1(B) (defined(BOARD_##B) && MOTHERBOARD==BOARD_##B)
|
||||
#define MB(V...) DO(MB,||,V)
|
||||
|
||||
@@ -103,7 +103,8 @@
|
||||
|
||||
#define HAS_TRINAMIC HAS_TRINAMIC_CONFIG
|
||||
|
||||
#if ( HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2160_STANDALONE) \
|
||||
#if ( HAS_DRIVER(TMC2100) \
|
||||
|| HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2160_STANDALONE) \
|
||||
|| HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC2209_STANDALONE) \
|
||||
|| HAS_DRIVER(TMC2660_STANDALONE) || HAS_DRIVER(TMC5130_STANDALONE) \
|
||||
|| HAS_DRIVER(TMC5160_STANDALONE) )
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user