Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x
This commit is contained in:
@@ -109,8 +109,25 @@ jobs:
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out the PR
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Cache PlatformIO
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||
|
||||
- name: Select Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax.
|
||||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
||||
@@ -120,9 +137,6 @@ jobs:
|
||||
pip install -U https://github.com/platformio/platformio-core/archive/develop.zip
|
||||
platformio update
|
||||
|
||||
- name: Check out the PR
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Run ${{ matrix.test-platform }} Tests
|
||||
run: |
|
||||
make tests-single-ci TEST_TARGET=${{ matrix.test-platform }}
|
||||
|
||||
@@ -66,14 +66,6 @@
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
//===========================================================================
|
||||
//=========================== FOAMCUTTER_XYUV ==============================
|
||||
//===========================================================================
|
||||
// For a hot wire cutter with parallel horizontal axes X, I where the hights
|
||||
// of the two wire ends are controlled by parallel axes Y, J.
|
||||
//
|
||||
//#define FOAMCUTTER_XYUV
|
||||
|
||||
// @section info
|
||||
|
||||
// Author info of this build printed to the host during boot and M115
|
||||
|
||||
@@ -734,7 +734,7 @@
|
||||
* the position of the toolhead relative to the workspace.
|
||||
*/
|
||||
|
||||
//#define SENSORLESS_BACKOFF_MM { 2, 2 } // (mm) Backoff from endstops before sensorless homing
|
||||
//#define SENSORLESS_BACKOFF_MM { 2, 2, 0 } // (mm) Backoff from endstops before sensorless homing
|
||||
|
||||
#define HOMING_BUMP_MM { 5, 5, 2 } // (mm) Backoff from endstops after first bump
|
||||
#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
|
||||
@@ -2253,7 +2253,7 @@
|
||||
* Extra G-code to run while executing tool-change commands. Can be used to use an additional
|
||||
* stepper motor (I axis, see option LINEAR_AXES in Configuration.h) to drive the tool-changer.
|
||||
*/
|
||||
//#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG1 I0" // Extra G-code to run while executing tool-change command T0
|
||||
//#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG1 A0" // Extra G-code to run while executing tool-change command T0
|
||||
//#define EVENT_GCODE_TOOLCHANGE_T1 "G1 A10" // Extra G-code to run while executing tool-change command T1
|
||||
|
||||
/**
|
||||
|
||||
@@ -163,11 +163,9 @@ static SPISettings spiConfig;
|
||||
}
|
||||
spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0);
|
||||
|
||||
#if ENABLED(CUSTOM_SPI_PINS)
|
||||
SPI.setMISO(SD_MISO_PIN);
|
||||
SPI.setMOSI(SD_MOSI_PIN);
|
||||
SPI.setSCLK(SD_SCK_PIN);
|
||||
#endif
|
||||
SPI.setMISO(SD_MISO_PIN);
|
||||
SPI.setMOSI(SD_MOSI_PIN);
|
||||
SPI.setSCLK(SD_SCK_PIN);
|
||||
|
||||
SPI.begin();
|
||||
}
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
|
||||
#include "../shared/eeprom_api.h"
|
||||
|
||||
// Better: "utility/stm32_eeprom.h", but only after updating stm32duino to 2.0.0
|
||||
// Use EEPROM.h for compatibility, for now.
|
||||
#include <EEPROM.h>
|
||||
|
||||
/**
|
||||
* The STM32 HAL supports chips that deal with "pages" and some with "sectors" and some that
|
||||
* even have multiple "banks" of flash.
|
||||
|
||||
@@ -125,12 +125,20 @@ void TFT_SPI::DataTransferBegin(uint16_t DataSize) {
|
||||
WRITE(TFT_CS_PIN, LOW);
|
||||
}
|
||||
|
||||
#ifdef TFT_DEFAULT_DRIVER
|
||||
#include "../../../lcd/tft_io/tft_ids.h"
|
||||
#endif
|
||||
|
||||
uint32_t TFT_SPI::GetID() {
|
||||
uint32_t id;
|
||||
id = ReadID(LCD_READ_ID);
|
||||
|
||||
if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF)
|
||||
if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) {
|
||||
id = ReadID(LCD_READ_ID4);
|
||||
#ifdef TFT_DEFAULT_DRIVER
|
||||
if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF)
|
||||
id = TFT_DEFAULT_DRIVER;
|
||||
#endif
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,12 +90,20 @@ void TFT_SPI::DataTransferBegin(uint16_t DataSize) {
|
||||
TFT_CS_L;
|
||||
}
|
||||
|
||||
#ifdef TFT_DEFAULT_DRIVER
|
||||
#include "../../../lcd/tft_io/tft_ids.h"
|
||||
#endif
|
||||
|
||||
uint32_t TFT_SPI::GetID() {
|
||||
uint32_t id;
|
||||
id = ReadID(LCD_READ_ID);
|
||||
|
||||
if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF)
|
||||
if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) {
|
||||
id = ReadID(LCD_READ_ID4);
|
||||
#ifdef TFT_DEFAULT_DRIVER
|
||||
if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF)
|
||||
id = TFT_DEFAULT_DRIVER;
|
||||
#endif
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,15 +36,15 @@
|
||||
#define _XMIN_ 100
|
||||
#define _YMIN_ 200
|
||||
#define _ZMIN_ 300
|
||||
#define _IMIN_ 400
|
||||
#define _JMIN_ 500
|
||||
#define _KMIN_ 600
|
||||
#define _IMIN_ 500
|
||||
#define _JMIN_ 600
|
||||
#define _KMIN_ 700
|
||||
#define _XMAX_ 101
|
||||
#define _YMAX_ 201
|
||||
#define _ZMAX_ 301
|
||||
#define _IMAX_ 401
|
||||
#define _JMAX_ 501
|
||||
#define _KMAX_ 601
|
||||
#define _IMAX_ 501
|
||||
#define _JMAX_ 601
|
||||
#define _KMAX_ 701
|
||||
#define _XDIAG_ 102
|
||||
#define _YDIAG_ 202
|
||||
#define _ZDIAG_ 302
|
||||
|
||||
@@ -1166,29 +1166,38 @@
|
||||
* - TFT_COLOR
|
||||
* - GRAPHICAL_TFT_UPSCALE
|
||||
*/
|
||||
#if ENABLED(MKS_TS35_V2_0) // Most common: ST7796
|
||||
#if ENABLED(MKS_TS35_V2_0) // ST7796
|
||||
#define TFT_DEFAULT_DRIVER ST7796
|
||||
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY)
|
||||
#define TFT_RES_480x320
|
||||
#define TFT_INTERFACE_SPI
|
||||
#elif ENABLED(MKS_ROBIN_TFT24) // Most common: ST7789
|
||||
#elif ENABLED(ANET_ET5_TFT35) // ST7796
|
||||
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY)
|
||||
#define TFT_RES_480x320
|
||||
#define TFT_INTERFACE_FSMC
|
||||
#elif ENABLED(ANET_ET4_TFT28) // ST7789
|
||||
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y)
|
||||
#define TFT_RES_320x240
|
||||
#define TFT_INTERFACE_FSMC
|
||||
#elif ENABLED(MKS_ROBIN_TFT28) // Most common: ST7789
|
||||
#elif ENABLED(MKS_ROBIN_TFT24) // ST7789
|
||||
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y)
|
||||
#define TFT_RES_320x240
|
||||
#define TFT_INTERFACE_FSMC
|
||||
#elif ENABLED(MKS_ROBIN_TFT32) // Most common: ST7789
|
||||
#elif ENABLED(MKS_ROBIN_TFT28) // ST7789
|
||||
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y)
|
||||
#define TFT_RES_320x240
|
||||
#define TFT_INTERFACE_FSMC
|
||||
#elif ENABLED(MKS_ROBIN_TFT35) // Most common: ILI9488
|
||||
#elif ENABLED(MKS_ROBIN_TFT32) // ST7789
|
||||
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y)
|
||||
#define TFT_RES_320x240
|
||||
#define TFT_INTERFACE_FSMC
|
||||
#elif ENABLED(MKS_ROBIN_TFT35) // ILI9488
|
||||
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
|
||||
#define TFT_RES_480x320
|
||||
#define TFT_INTERFACE_FSMC
|
||||
#elif ENABLED(MKS_ROBIN_TFT43)
|
||||
#define TFT_DEFAULT_ORIENTATION 0
|
||||
#define TFT_DRIVER SSD1963
|
||||
#define TFT_DEFAULT_ORIENTATION 0
|
||||
#define TFT_RES_480x272
|
||||
#define TFT_INTERFACE_FSMC
|
||||
#elif ENABLED(MKS_ROBIN_TFT_V1_1R) // ILI9328 or R61505
|
||||
@@ -1196,22 +1205,14 @@
|
||||
#define TFT_RES_320x240
|
||||
#define TFT_INTERFACE_FSMC
|
||||
#elif EITHER(TFT_TRONXY_X5SA, ANYCUBIC_TFT35) // ILI9488
|
||||
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
|
||||
#define TFT_DRIVER ILI9488
|
||||
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
|
||||
#define TFT_RES_480x320
|
||||
#define TFT_INTERFACE_FSMC
|
||||
#elif ENABLED(LONGER_LK_TFT28)
|
||||
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
|
||||
#define TFT_RES_320x240
|
||||
#define TFT_INTERFACE_FSMC
|
||||
#elif ENABLED(ANET_ET4_TFT28) // ST7789
|
||||
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y)
|
||||
#define TFT_RES_320x240
|
||||
#define TFT_INTERFACE_FSMC
|
||||
#elif ENABLED(ANET_ET5_TFT35) // ST7796
|
||||
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY)
|
||||
#define TFT_RES_480x320
|
||||
#define TFT_INTERFACE_FSMC
|
||||
#elif ENABLED(BIQU_BX_TFT70) // RGB
|
||||
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY)
|
||||
#define TFT_RES_1024x600
|
||||
|
||||
@@ -570,8 +570,8 @@
|
||||
#error "NEOPIXEL_BKGD_LED_INDEX is now NEOPIXEL_BKGD_INDEX_FIRST."
|
||||
#endif
|
||||
|
||||
constexpr float sbm[] = AXIS_RELATIVE_MODES;
|
||||
static_assert(COUNT(sbm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _LOGICAL_AXES_STR "elements.");
|
||||
constexpr float arm[] = AXIS_RELATIVE_MODES;
|
||||
static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _LOGICAL_AXES_STR "elements.");
|
||||
|
||||
/**
|
||||
* Probe temp compensation requirements
|
||||
@@ -1631,12 +1631,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "MESH_EDIT_GFX_OVERLAY requires AUTO_BED_LEVELING_UBL and a Graphical LCD."
|
||||
#endif
|
||||
|
||||
#if ENABLED(G29_RETRY_AND_RECOVER)
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#error "G29_RETRY_AND_RECOVER is not compatible with UBL."
|
||||
#elif ENABLED(MESH_BED_LEVELING)
|
||||
#error "G29_RETRY_AND_RECOVER is not compatible with MESH_BED_LEVELING."
|
||||
#endif
|
||||
#if ENABLED(G29_RETRY_AND_RECOVER) && NONE(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
|
||||
#error "G29_RETRY_AND_RECOVER requires AUTO_BED_LEVELING_3POINT, LINEAR, or BILINEAR."
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
* version was tagged.
|
||||
*/
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2021-06-05"
|
||||
#define STRING_DISTRIBUTION_DATE "2021-06-06"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define LTDC_RGB 0xABAB
|
||||
#define SSD1963 0x5761
|
||||
#define ST7735 0x89F0
|
||||
#define ST7789 0x8552
|
||||
#define ST7796 0x7796
|
||||
#define R61505 0x1505
|
||||
#define ILI9328 0x9328
|
||||
#define ILI9341 0x9341
|
||||
#define ILI9488 0x9488
|
||||
#define ILI9488_ID1 0x8066 // Some ILI9488 have 0x8066 in the 0x04
|
||||
#define LERDGE_ST7796 0xFFFE
|
||||
#define AUTO 0xFFFF
|
||||
@@ -20,18 +20,37 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "tft_io.h"
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_SPI_TFT || HAS_FSMC_TFT || HAS_LTDC_TFT
|
||||
|
||||
#include "st7735.h"
|
||||
#include "st7789v.h"
|
||||
#include "st7796s.h"
|
||||
#include "r65105.h"
|
||||
#include "ili9328.h"
|
||||
#include "ili9341.h"
|
||||
#include "ili9488.h"
|
||||
#include "ssd1963.h"
|
||||
#include "tft_io.h"
|
||||
#include "tft_ids.h"
|
||||
|
||||
#if TFT_DRIVER == ST7735 || TFT_DRIVER == AUTO
|
||||
#include "st7735.h"
|
||||
#endif
|
||||
#if TFT_DRIVER == ST7789 || TFT_DRIVER == AUTO
|
||||
#include "st7789v.h"
|
||||
#endif
|
||||
#if TFT_DRIVER == ST7796 || TFT_DRIVER == AUTO
|
||||
#include "st7796s.h"
|
||||
#endif
|
||||
#if TFT_DRIVER == R61505 || TFT_DRIVER == AUTO
|
||||
#include "r65105.h"
|
||||
#endif
|
||||
#if TFT_DRIVER == ILI9328 || TFT_DRIVER == AUTO
|
||||
#include "ili9328.h"
|
||||
#endif
|
||||
#if TFT_DRIVER == ILI9341 || TFT_DRIVER == AUTO
|
||||
#include "ili9341.h"
|
||||
#endif
|
||||
#if TFT_DRIVER == ILI9488 || TFT_DRIVER == ILI9488_ID1 || TFT_DRIVER == AUTO
|
||||
#include "ili9488.h"
|
||||
#endif
|
||||
#if TFT_DRIVER == SSD1963 || TFT_DRIVER == AUTO
|
||||
#include "ssd1963.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG_OUT ENABLED(DEBUG_GRAPHICAL_TFT)
|
||||
#include "../../core/debug_out.h"
|
||||
@@ -236,4 +255,4 @@ void TFT_IO::write_esc_sequence(const uint16_t *Sequence) {
|
||||
io.DataTransferEnd();
|
||||
}
|
||||
|
||||
#endif // HAS_SPI_TFT || HAS_FSMC_TFT
|
||||
#endif // HAS_SPI_TFT || HAS_FSMC_TFT || HAS_LTDC_TFT
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if HAS_SPI_TFT || HAS_FSMC_TFT || HAS_LTDC_TFT
|
||||
|
||||
#if HAS_SPI_TFT
|
||||
#include HAL_PATH(../../HAL, tft/tft_spi.h)
|
||||
#elif HAS_FSMC_TFT
|
||||
@@ -35,9 +33,9 @@
|
||||
#error "TFT IO only supports SPI, FSMC or LTDC interface"
|
||||
#endif
|
||||
|
||||
#define TFT_EXCHANGE_XY (1UL << 1)
|
||||
#define TFT_INVERT_X (1UL << 2)
|
||||
#define TFT_INVERT_Y (1UL << 3)
|
||||
#define TFT_EXCHANGE_XY _BV32(1)
|
||||
#define TFT_INVERT_X _BV32(2)
|
||||
#define TFT_INVERT_Y _BV32(3)
|
||||
|
||||
#define TFT_NO_ROTATION (0x00)
|
||||
#define TFT_ROTATE_90 (TFT_EXCHANGE_XY | TFT_INVERT_X)
|
||||
@@ -65,8 +63,8 @@
|
||||
// TFT_ORIENTATION is the "sum" of TFT_DEFAULT_ORIENTATION plus user TFT_ROTATION
|
||||
#define TFT_ORIENTATION ((TFT_DEFAULT_ORIENTATION) ^ (TFT_ROTATION))
|
||||
|
||||
#define TFT_COLOR_RGB (1UL << 3)
|
||||
#define TFT_COLOR_BGR (1UL << 4)
|
||||
#define TFT_COLOR_RGB _BV32(3)
|
||||
#define TFT_COLOR_BGR _BV32(4)
|
||||
|
||||
// Each TFT Driver is responsible for its default color mode.
|
||||
// #ifndef TFT_COLOR
|
||||
@@ -93,27 +91,14 @@
|
||||
#define TOUCH_ORIENTATION TOUCH_LANDSCAPE
|
||||
#endif
|
||||
|
||||
#define LTDC_RGB 0xABAB
|
||||
#define SSD1963 0x5761
|
||||
#define ST7735 0x89F0
|
||||
#define ST7789 0x8552
|
||||
#define ST7796 0x7796
|
||||
#define R61505 0x1505
|
||||
#define ILI9328 0x9328
|
||||
#define ILI9341 0x9341
|
||||
#define ILI9488 0x9488
|
||||
#define ILI9488_ID1 0x8066 //Some ILI9488 have 0x8066 in the 0x04
|
||||
#define LERDGE_ST7796 0xFFFE
|
||||
#define AUTO 0xFFFF
|
||||
|
||||
#ifndef TFT_DRIVER
|
||||
#define TFT_DRIVER AUTO
|
||||
#endif
|
||||
|
||||
#define ESC_REG(x) 0xFFFF, 0x00FF & (uint16_t)x
|
||||
#define ESC_DELAY(x) 0xFFFF, 0x8000 | (x & 0x7FFF)
|
||||
#define ESC_END 0xFFFF, 0x7FFF
|
||||
#define ESC_FFFF 0xFFFF, 0xFFFF
|
||||
#define ESC_REG(x) 0xFFFF, 0x00FF & (uint16_t)x
|
||||
#define ESC_DELAY(x) 0xFFFF, 0x8000 | (x & 0x7FFF)
|
||||
#define ESC_END 0xFFFF, 0x7FFF
|
||||
#define ESC_FFFF 0xFFFF, 0xFFFF
|
||||
|
||||
class TFT_IO {
|
||||
public:
|
||||
@@ -143,5 +128,3 @@ public:
|
||||
protected:
|
||||
static uint32_t lcd_id;
|
||||
};
|
||||
|
||||
#endif // HAS_SPI_TFT || HAS_FSMC_TFT
|
||||
|
||||
@@ -223,7 +223,7 @@ class Endstops {
|
||||
typedef struct {
|
||||
union {
|
||||
bool any;
|
||||
struct { bool x:1, y:1, z:1; };
|
||||
struct { bool LINEAR_AXIS_LIST(x:1, y:1, z:1, i:1, j:1, k:1); };
|
||||
};
|
||||
} tmc_spi_homing_t;
|
||||
static tmc_spi_homing_t tmc_spi_homing;
|
||||
|
||||
@@ -588,27 +588,27 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LINEAR_AXES == 4
|
||||
#if LINEAR_AXES >= 4
|
||||
void do_blocking_move_to_i(const_float_t ri, const_feedRate_t fr_mm_s/*=0.0*/) {
|
||||
do_blocking_move_to_xyz_i(current_position, ri, fr_mm_s);
|
||||
}
|
||||
void do_blocking_move_to_xyz_i(const xyze_pos_t &raw, const_float_t i, const_feedRate_t fr_mm_s/*=0.0f*/) {
|
||||
do_blocking_move_to(raw.x, raw.y, raw.z, i, fr_mm_s);
|
||||
do_blocking_move_to(
|
||||
LINEAR_AXIS_LIST(raw.x, raw.y, raw.z, i, raw.j, raw.k),
|
||||
fr_mm_s
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LINEAR_AXES >= 5
|
||||
void do_blocking_move_to_i(const_float_t ri, const_feedRate_t fr_mm_s/*=0.0*/) {
|
||||
do_blocking_move_to_xyz_i(current_position, ri, fr_mm_s);
|
||||
}
|
||||
void do_blocking_move_to_xyz_i(const xyze_pos_t &raw, const_float_t i, const_feedRate_t fr_mm_s/*=0.0f*/) {
|
||||
do_blocking_move_to(raw.x, raw.y, raw.z, i, raw.j, fr_mm_s);
|
||||
}
|
||||
void do_blocking_move_to_j(const_float_t rj, const_feedRate_t fr_mm_s/*=0.0*/) {
|
||||
do_blocking_move_to_xyzi_j(current_position, rj, fr_mm_s);
|
||||
}
|
||||
void do_blocking_move_to_xyzi_j(const xyze_pos_t &raw, const_float_t j, const_feedRate_t fr_mm_s/*=0.0f*/) {
|
||||
do_blocking_move_to(raw.x, raw.y, raw.z, raw.i, j, fr_mm_s);
|
||||
do_blocking_move_to(
|
||||
LINEAR_AXIS_LIST(raw.x, raw.y, raw.z, raw.i, j, raw.k),
|
||||
fr_mm_s
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -617,7 +617,10 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) {
|
||||
do_blocking_move_to_xyzij_k(current_position, rk, fr_mm_s);
|
||||
}
|
||||
void do_blocking_move_to_xyzij_k(const xyze_pos_t &raw, const_float_t k, const_feedRate_t fr_mm_s/*=0.0f*/) {
|
||||
do_blocking_move_to(raw.x, raw.y, raw.z, raw.i, raw.j, k, fr_mm_s);
|
||||
do_blocking_move_to(
|
||||
LINEAR_AXIS_LIST(raw.x, raw.y, raw.z, raw.i, raw.j, k),
|
||||
fr_mm_s
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -822,7 +825,7 @@ void restore_feedrate_and_scaling() {
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#if LINEAR_AXES >= 4 // TODO (DerAndere): Find out why this was missing / removed
|
||||
#if LINEAR_AXES >= 4
|
||||
if (axis_was_homed(I_AXIS)) {
|
||||
#if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_I)
|
||||
NOLESS(target.i, soft_endstop.min.i);
|
||||
@@ -1295,7 +1298,7 @@ void prepare_line_to_destination() {
|
||||
|
||||
bool homing_needed_error(linear_axis_bits_t axis_bits/*=linear_bits*/) {
|
||||
if ((axis_bits = axes_should_home(axis_bits))) {
|
||||
PGM_P home_first = GET_TEXT(MSG_HOME_FIRST); // TODO: (DerAndere) Set this up for extra axes
|
||||
PGM_P home_first = GET_TEXT(MSG_HOME_FIRST);
|
||||
char msg[strlen_P(home_first)+1];
|
||||
sprintf_P(msg, home_first,
|
||||
LINEAR_AXIS_LIST(
|
||||
@@ -1390,8 +1393,21 @@ void prepare_line_to_destination() {
|
||||
#if ENABLED(SPI_ENDSTOPS)
|
||||
switch (axis) {
|
||||
case X_AXIS: if (ENABLED(X_SPI_SENSORLESS)) endstops.tmc_spi_homing.x = true; break;
|
||||
case Y_AXIS: if (ENABLED(Y_SPI_SENSORLESS)) endstops.tmc_spi_homing.y = true; break;
|
||||
case Z_AXIS: if (ENABLED(Z_SPI_SENSORLESS)) endstops.tmc_spi_homing.z = true; break;
|
||||
#if HAS_Y_AXIS
|
||||
case Y_AXIS: if (ENABLED(Y_SPI_SENSORLESS)) endstops.tmc_spi_homing.y = true; break;
|
||||
#endif
|
||||
#if HAS_Z_AXIS
|
||||
case Z_AXIS: if (ENABLED(Z_SPI_SENSORLESS)) endstops.tmc_spi_homing.z = true; break;
|
||||
#endif
|
||||
#if LINEAR_AXES >= 4
|
||||
case I_AXIS: if (ENABLED(I_SPI_SENSORLESS)) endstops.tmc_spi_homing.i = true; break;
|
||||
#endif
|
||||
#if LINEAR_AXES >= 5
|
||||
case J_AXIS: if (ENABLED(J_SPI_SENSORLESS)) endstops.tmc_spi_homing.j = true; break;
|
||||
#endif
|
||||
#if LINEAR_AXES >= 6
|
||||
case K_AXIS: if (ENABLED(K_SPI_SENSORLESS)) endstops.tmc_spi_homing.k = true; break;
|
||||
#endif
|
||||
default: break;
|
||||
}
|
||||
#endif
|
||||
@@ -1454,11 +1470,21 @@ void prepare_line_to_destination() {
|
||||
#if ENABLED(SPI_ENDSTOPS)
|
||||
switch (axis) {
|
||||
case X_AXIS: if (ENABLED(X_SPI_SENSORLESS)) endstops.tmc_spi_homing.x = false; break;
|
||||
case Y_AXIS: if (ENABLED(Y_SPI_SENSORLESS)) endstops.tmc_spi_homing.y = false; break;
|
||||
case Z_AXIS: if (ENABLED(Z_SPI_SENSORLESS)) endstops.tmc_spi_homing.z = false; break;
|
||||
case I_AXIS: if (ENABLED(I_SPI_SENSORLESS)) endstops.tmc_spi_homing.i = false; break;
|
||||
case J_AXIS: if (ENABLED(J_SPI_SENSORLESS)) endstops.tmc_spi_homing.j = false; break;
|
||||
case K_AXIS: if (ENABLED(K_SPI_SENSORLESS)) endstops.tmc_spi_homing.k = false; break;
|
||||
#if HAS_Y_AXIS
|
||||
case Y_AXIS: if (ENABLED(Y_SPI_SENSORLESS)) endstops.tmc_spi_homing.y = false; break;
|
||||
#endif
|
||||
#if HAS_Z_AXIS
|
||||
case Z_AXIS: if (ENABLED(Z_SPI_SENSORLESS)) endstops.tmc_spi_homing.z = false; break;
|
||||
#endif
|
||||
#if LINEAR_AXES >= 4
|
||||
case I_AXIS: if (ENABLED(I_SPI_SENSORLESS)) endstops.tmc_spi_homing.i = false; break;
|
||||
#endif
|
||||
#if LINEAR_AXES >= 5
|
||||
case J_AXIS: if (ENABLED(J_SPI_SENSORLESS)) endstops.tmc_spi_homing.j = false; break;
|
||||
#endif
|
||||
#if LINEAR_AXES >= 6
|
||||
case K_AXIS: if (ENABLED(K_SPI_SENSORLESS)) endstops.tmc_spi_homing.k = false; break;
|
||||
#endif
|
||||
default: break;
|
||||
}
|
||||
#endif
|
||||
@@ -1734,11 +1760,11 @@ void prepare_line_to_destination() {
|
||||
#endif
|
||||
|
||||
//
|
||||
// Back away to prevent an early X/Y sensorless trigger
|
||||
// Back away to prevent an early sensorless trigger
|
||||
//
|
||||
#if DISABLED(DELTA) && defined(SENSORLESS_BACKOFF_MM)
|
||||
const xy_float_t backoff = SENSORLESS_BACKOFF_MM;
|
||||
if ((TERN0(X_SENSORLESS, axis == X_AXIS) || TERN0(Y_SENSORLESS, axis == Y_AXIS)) && backoff[axis]) {
|
||||
const xyz_float_t backoff = SENSORLESS_BACKOFF_MM;
|
||||
if ((TERN0(X_SENSORLESS, axis == X_AXIS) || TERN0(Y_SENSORLESS, axis == Y_AXIS) || TERN0(Z_SENSORLESS, axis == Z_AXIS) || TERN0(I_SENSORLESS, axis == I_AXIS) || TERN0(J_SENSORLESS, axis == J_AXIS) || TERN0(K_SENSORLESS, axis == K_AXIS)) && backoff[axis]) {
|
||||
const float backoff_length = -ABS(backoff[axis]) * axis_home_dir;
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Sensorless backoff: ", backoff_length, "mm");
|
||||
do_homing_move(axis, backoff_length, homing_feedrate(axis));
|
||||
@@ -1777,6 +1803,15 @@ void prepare_line_to_destination() {
|
||||
case X_AXIS: es = X_ENDSTOP; break;
|
||||
case Y_AXIS: es = Y_ENDSTOP; break;
|
||||
case Z_AXIS: es = Z_ENDSTOP; break;
|
||||
#if LINEAR_AXES >= 4
|
||||
case I_AXIS: es = I_ENDSTOP; break;
|
||||
#endif
|
||||
#if LINEAR_AXES >= 5
|
||||
case J_AXIS: es = J_ENDSTOP; break;
|
||||
#endif
|
||||
#if LINEAR_AXES >= 6
|
||||
case K_AXIS: es = K_ENDSTOP; break;
|
||||
#endif
|
||||
}
|
||||
if (TEST(endstops.state(), es)) {
|
||||
SERIAL_ECHO_MSG("Bad ", AS_CHAR(AXIS_CHAR(axis)), " Endstop?");
|
||||
|
||||
@@ -180,7 +180,7 @@ inline float home_bump_mm(const AxisEnum axis) {
|
||||
TERN_(MAX_SOFTWARE_ENDSTOP_Z, amax = max.z);
|
||||
break;
|
||||
#endif
|
||||
#if LINEAR_AXES >= 4 // TODO (DerAndere): Test for LINEAR_AXES >= 4
|
||||
#if LINEAR_AXES >= 4
|
||||
case I_AXIS:
|
||||
TERN_(MIN_SOFTWARE_ENDSTOP_I, amin = min.i);
|
||||
TERN_(MIN_SOFTWARE_ENDSTOP_I, amax = max.i);
|
||||
|
||||
@@ -1451,7 +1451,7 @@ void Planner::check_axes_activity() {
|
||||
float high = 0.0;
|
||||
for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) {
|
||||
block_t *block = &block_buffer[b];
|
||||
if (LINEAR_AXIS_GANG(block->steps.x, || block->steps.y, || block->steps.z, block->steps.i, || block->steps.j, || block->steps.k)) {
|
||||
if (LINEAR_AXIS_GANG(block->steps.x, || block->steps.y, || block->steps.z, || block->steps.i, || block->steps.j, || block->steps.k)) {
|
||||
const float se = (float)block->steps.e / block->step_event_count * SQRT(block->nominal_speed_sqr); // mm/sec;
|
||||
NOLESS(high, se);
|
||||
}
|
||||
@@ -2852,7 +2852,7 @@ bool Planner::buffer_segment(const abce_pos_t &abce
|
||||
int32_t(LROUND(abce.a * settings.axis_steps_per_mm[A_AXIS])),
|
||||
int32_t(LROUND(abce.b * settings.axis_steps_per_mm[B_AXIS])),
|
||||
int32_t(LROUND(abce.c * settings.axis_steps_per_mm[C_AXIS])),
|
||||
int32_t(LROUND(abce.i * settings.axis_steps_per_mm[I_AXIS])), // FIXME (DerAndere): Multiplication by 4.0 is a work-around for issue with wrong internal steps per mm
|
||||
int32_t(LROUND(abce.i * settings.axis_steps_per_mm[I_AXIS])),
|
||||
int32_t(LROUND(abce.j * settings.axis_steps_per_mm[J_AXIS])),
|
||||
int32_t(LROUND(abce.k * settings.axis_steps_per_mm[K_AXIS]))
|
||||
)
|
||||
@@ -2893,7 +2893,7 @@ bool Planner::buffer_segment(const abce_pos_t &abce
|
||||
#endif
|
||||
#if LINEAR_AXES >= 4
|
||||
SERIAL_ECHOPAIR_P(SP_I_LBL, abce.i);
|
||||
SERIAL_ECHOPAIR(" (", position.i, "->", target.i); // FIXME (DerAndere): Introduce work-around for issue with wrong internal steps per mm and feedrate for I_AXIS
|
||||
SERIAL_ECHOPAIR(" (", position.i, "->", target.i);
|
||||
SERIAL_CHAR(')');
|
||||
#endif
|
||||
#if LINEAR_AXES >= 5
|
||||
|
||||
@@ -766,11 +766,7 @@ enum StealthIndex : uint8_t {
|
||||
pwmconf.pwm_ofs = 36;
|
||||
st.PWMCONF(pwmconf.sr);
|
||||
|
||||
#if ENABLED(HYBRID_THRESHOLD)
|
||||
st.set_pwm_thrs(hyb_thrs);
|
||||
#else
|
||||
UNUSED(hyb_thrs);
|
||||
#endif
|
||||
TERN(HYBRID_THRESHOLD, st.set_pwm_thrs(hyb_thrs), UNUSED(hyb_thrs));
|
||||
st.GSTAT(); // Clear GSTAT
|
||||
}
|
||||
#endif // TMC5160
|
||||
@@ -971,11 +967,12 @@ void reset_trinamic_drivers() {
|
||||
// Using a fixed-length character array for the port name allows this to be constexpr compatible.
|
||||
struct SanityHwSerialDetails { const char port[20]; uint32_t address; };
|
||||
#define TMC_HW_DETAIL_ARGS(A) TERN(A##_HAS_HW_SERIAL, STRINGIFY(A##_HARDWARE_SERIAL), ""), TERN0(A##_HAS_HW_SERIAL, A##_SLAVE_ADDRESS)
|
||||
#define TMC_HW_DETAIL(A) {TMC_HW_DETAIL_ARGS(A)}
|
||||
#define TMC_HW_DETAIL(A) { TMC_HW_DETAIL_ARGS(A) }
|
||||
constexpr SanityHwSerialDetails sanity_tmc_hw_details[] = {
|
||||
TMC_HW_DETAIL(X), TMC_HW_DETAIL(X2),
|
||||
TMC_HW_DETAIL(Y), TMC_HW_DETAIL(Y2),
|
||||
TMC_HW_DETAIL(Z), TMC_HW_DETAIL(Z2), TMC_HW_DETAIL(Z3), TMC_HW_DETAIL(Z4),
|
||||
TMC_HW_DETAIL(I), TMC_HW_DETAIL(J), TMC_HW_DETAIL(K),
|
||||
TMC_HW_DETAIL(E0), TMC_HW_DETAIL(E1), TMC_HW_DETAIL(E2), TMC_HW_DETAIL(E3), TMC_HW_DETAIL(E4), TMC_HW_DETAIL(E5), TMC_HW_DETAIL(E6), TMC_HW_DETAIL(E7)
|
||||
};
|
||||
|
||||
@@ -995,10 +992,11 @@ void reset_trinamic_drivers() {
|
||||
|
||||
#define TMC_HWSERIAL_CONFLICT_MSG(A) STRINGIFY(A) "_SLAVE_ADDRESS conflicts with another driver using the same " STRINGIFY(A) "_HARDWARE_SERIAL"
|
||||
#define SA_NO_TMC_HW_C(A) static_assert(1 >= count_tmc_hw_serial_matches(TMC_HW_DETAIL_ARGS(A), 0, COUNT(sanity_tmc_hw_details)), TMC_HWSERIAL_CONFLICT_MSG(A));
|
||||
SA_NO_TMC_HW_C(X);SA_NO_TMC_HW_C(X2);
|
||||
SA_NO_TMC_HW_C(Y);SA_NO_TMC_HW_C(Y2);
|
||||
SA_NO_TMC_HW_C(Z);SA_NO_TMC_HW_C(Z2);SA_NO_TMC_HW_C(Z3);SA_NO_TMC_HW_C(Z4);
|
||||
SA_NO_TMC_HW_C(E0);SA_NO_TMC_HW_C(E1);SA_NO_TMC_HW_C(E2);SA_NO_TMC_HW_C(E3);SA_NO_TMC_HW_C(E4);SA_NO_TMC_HW_C(E5);SA_NO_TMC_HW_C(E6);SA_NO_TMC_HW_C(E7);
|
||||
SA_NO_TMC_HW_C(X); SA_NO_TMC_HW_C(X2);
|
||||
SA_NO_TMC_HW_C(Y); SA_NO_TMC_HW_C(Y2);
|
||||
SA_NO_TMC_HW_C(Z); SA_NO_TMC_HW_C(Z2); SA_NO_TMC_HW_C(Z3); SA_NO_TMC_HW_C(Z4);
|
||||
SA_NO_TMC_HW_C(I); SA_NO_TMC_HW_C(J); SA_NO_TMC_HW_C(K);
|
||||
SA_NO_TMC_HW_C(E0); SA_NO_TMC_HW_C(E1); SA_NO_TMC_HW_C(E2); SA_NO_TMC_HW_C(E3); SA_NO_TMC_HW_C(E4); SA_NO_TMC_HW_C(E5); SA_NO_TMC_HW_C(E6); SA_NO_TMC_HW_C(E7);
|
||||
#endif
|
||||
|
||||
#if ANY_AXIS_HAS(SW_SERIAL)
|
||||
@@ -1009,7 +1007,8 @@ void reset_trinamic_drivers() {
|
||||
TMC_SW_DETAIL(X), TMC_SW_DETAIL(X2),
|
||||
TMC_SW_DETAIL(Y), TMC_SW_DETAIL(Y2),
|
||||
TMC_SW_DETAIL(Z), TMC_SW_DETAIL(Z2), TMC_SW_DETAIL(Z3), TMC_SW_DETAIL(Z4),
|
||||
TMC_SW_DETAIL(E0), TMC_SW_DETAIL(E1), TMC_SW_DETAIL(E2), TMC_SW_DETAIL(E3), TMC_SW_DETAIL(E4), TMC_SW_DETAIL(E5), TMC_SW_DETAIL(E6), TMC_SW_DETAIL(E7)
|
||||
TMC_SW_DETAIL(I), TMC_SW_DETAIL(J), TMC_SW_DETAIL(K),
|
||||
TMC_SW_DETAIL(E0), TMC_SW_DETAIL(E1), TMC_SW_DETAIL(E2), TMC_SW_DETAIL(E3), TMC_SW_DETAIL(E4), TMC_SW_DETAIL(E5), TMC_SW_DETAIL(E6), TMC_SW_DETAIL(E7)
|
||||
};
|
||||
|
||||
constexpr bool sc_sw_done(size_t start, size_t end) { return start == end; }
|
||||
@@ -1023,10 +1022,11 @@ void reset_trinamic_drivers() {
|
||||
|
||||
#define TMC_SWSERIAL_CONFLICT_MSG(A) STRINGIFY(A) "_SLAVE_ADDRESS conflicts with another driver using the same " STRINGIFY(A) "_SERIAL_RX_PIN or " STRINGIFY(A) "_SERIAL_TX_PIN"
|
||||
#define SA_NO_TMC_SW_C(A) static_assert(1 >= count_tmc_sw_serial_matches(TMC_SW_DETAIL_ARGS(A), 0, COUNT(sanity_tmc_sw_details)), TMC_SWSERIAL_CONFLICT_MSG(A));
|
||||
SA_NO_TMC_SW_C(X);SA_NO_TMC_SW_C(X2);
|
||||
SA_NO_TMC_SW_C(Y);SA_NO_TMC_SW_C(Y2);
|
||||
SA_NO_TMC_SW_C(Z);SA_NO_TMC_SW_C(Z2);SA_NO_TMC_SW_C(Z3);SA_NO_TMC_SW_C(Z4);
|
||||
SA_NO_TMC_SW_C(E0);SA_NO_TMC_SW_C(E1);SA_NO_TMC_SW_C(E2);SA_NO_TMC_SW_C(E3);SA_NO_TMC_SW_C(E4);SA_NO_TMC_SW_C(E5);SA_NO_TMC_SW_C(E6);SA_NO_TMC_SW_C(E7);
|
||||
SA_NO_TMC_SW_C(X); SA_NO_TMC_SW_C(X2);
|
||||
SA_NO_TMC_SW_C(Y); SA_NO_TMC_SW_C(Y2);
|
||||
SA_NO_TMC_SW_C(Z); SA_NO_TMC_SW_C(Z2); SA_NO_TMC_SW_C(Z3); SA_NO_TMC_SW_C(Z4);
|
||||
SA_NO_TMC_SW_C(I); SA_NO_TMC_SW_C(J); SA_NO_TMC_SW_C(K);
|
||||
SA_NO_TMC_SW_C(E0); SA_NO_TMC_SW_C(E1); SA_NO_TMC_SW_C(E2); SA_NO_TMC_SW_C(E3); SA_NO_TMC_SW_C(E4); SA_NO_TMC_SW_C(E5); SA_NO_TMC_SW_C(E6); SA_NO_TMC_SW_C(E7);
|
||||
#endif
|
||||
|
||||
#endif // HAS_TRINAMIC_CONFIG
|
||||
|
||||
@@ -466,7 +466,7 @@
|
||||
#elif MB(STM32F103RE)
|
||||
#include "stm32f1/pins_STM32F1R.h" // STM32F103RE env:STM32F103RE env:STM32F103RE_maple
|
||||
#elif MB(MALYAN_M200)
|
||||
#include "stm32f1/pins_MALYAN_M200.h" // STM32F103CB env:STM32F103CB_malyan
|
||||
#include "stm32f1/pins_MALYAN_M200.h" // STM32F103CB env:STM32F103CB_malyan env:STM32F103CB_malyan_maple
|
||||
#elif MB(STM3R_MINI)
|
||||
#include "stm32f1/pins_STM3R_MINI.h" // STM32F103VE? env:STM32F103VE env:STM32F103RE_maple
|
||||
#elif MB(GTM32_PRO_VB)
|
||||
|
||||
@@ -212,6 +212,15 @@
|
||||
#if !AXIS_HAS_SPI(Z)
|
||||
#undef Z_CS_PIN
|
||||
#endif
|
||||
#if !AXIS_HAS_SPI(I)
|
||||
#undef I_CS_PIN
|
||||
#endif
|
||||
#if !AXIS_HAS_SPI(J)
|
||||
#undef J_CS_PIN
|
||||
#endif
|
||||
#if !AXIS_HAS_SPI(K)
|
||||
#undef K_CS_PIN
|
||||
#endif
|
||||
#if E_STEPPERS && !AXIS_HAS_SPI(E0)
|
||||
#undef E0_CS_PIN
|
||||
#endif
|
||||
@@ -246,6 +255,15 @@
|
||||
#ifndef Z_CS_PIN
|
||||
#define Z_CS_PIN -1
|
||||
#endif
|
||||
#ifndef I_CS_PIN
|
||||
#define I_CS_PIN -1
|
||||
#endif
|
||||
#ifndef J_CS_PIN
|
||||
#define J_CS_PIN -1
|
||||
#endif
|
||||
#ifndef K_CS_PIN
|
||||
#define K_CS_PIN -1
|
||||
#endif
|
||||
#ifndef E0_CS_PIN
|
||||
#define E0_CS_PIN -1
|
||||
#endif
|
||||
@@ -900,43 +918,55 @@
|
||||
#undef Z_MIN_PROBE_PIN
|
||||
#define Z_MIN_PROBE_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_XMIN_PLUG)
|
||||
#undef X_MIN_PIN
|
||||
#define X_MIN_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_XMAX_PLUG)
|
||||
#undef X_MAX_PIN
|
||||
#define X_MAX_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_YMIN_PLUG)
|
||||
#undef Y_MIN_PIN
|
||||
#define Y_MIN_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_YMAX_PLUG)
|
||||
#undef Y_MAX_PIN
|
||||
#define Y_MAX_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_ZMIN_PLUG)
|
||||
#undef Z_MIN_PIN
|
||||
#define Z_MIN_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_ZMAX_PLUG)
|
||||
#undef Z_MAX_PIN
|
||||
#define Z_MAX_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_IMIN_PLUG)
|
||||
#undef I_MIN_PIN
|
||||
#define I_MIN_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_IMAX_PLUG)
|
||||
#undef I_MAX_PIN
|
||||
#define I_MAX_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_JMIN_PLUG)
|
||||
#undef J_MIN_PIN
|
||||
#define J_MIN_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_JMAX_PLUG)
|
||||
#undef J_MAX_PIN
|
||||
#define J_MAX_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_KMIN_PLUG)
|
||||
#undef K_MIN_PIN
|
||||
#define K_MIN_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_KMAX_PLUG)
|
||||
#undef K_MAX_PIN
|
||||
#define K_MAX_PIN -1
|
||||
#endif
|
||||
|
||||
#if DISABLED(USE_XMIN_PLUG)
|
||||
#undef X_MIN_PIN
|
||||
#define X_MIN_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_YMIN_PLUG)
|
||||
#undef Y_MIN_PIN
|
||||
#define Y_MIN_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_ZMIN_PLUG)
|
||||
#undef Z_MIN_PIN
|
||||
#define Z_MIN_PIN -1
|
||||
#endif
|
||||
#if DISABLED(X_DUAL_ENDSTOPS) || X_HOME_TO_MAX
|
||||
#undef X2_MIN_PIN
|
||||
#endif
|
||||
@@ -968,19 +998,6 @@
|
||||
#undef Z4_MAX_PIN
|
||||
#endif
|
||||
|
||||
#if DISABLED(USE_IMIN_PLUG)
|
||||
#undef I_MIN_PIN
|
||||
#define I_MIN_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_JMIN_PLUG)
|
||||
#undef J_MIN_PIN
|
||||
#define J_MIN_PIN -1
|
||||
#endif
|
||||
#if DISABLED(USE_KMIN_PLUG)
|
||||
#undef K_MIN_PIN
|
||||
#define K_MIN_PIN -1
|
||||
#endif
|
||||
|
||||
//
|
||||
// Default DOGLCD SPI delays
|
||||
//
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
#else
|
||||
#define _I_MAX
|
||||
#endif
|
||||
#if PIN_EXISTS(I_CS)
|
||||
#if PIN_EXISTS(I_CS) && AXIS_HAS_SPI(I)
|
||||
#define _I_CS I_CS_PIN,
|
||||
#else
|
||||
#define _I_CS
|
||||
@@ -208,7 +208,7 @@
|
||||
#else
|
||||
#define _J_MAX
|
||||
#endif
|
||||
#if PIN_EXISTS(J_CS)
|
||||
#if PIN_EXISTS(J_CS) && AXIS_HAS_SPI(J)
|
||||
#define _J_CS J_CS_PIN,
|
||||
#else
|
||||
#define _J_CS
|
||||
@@ -249,7 +249,7 @@
|
||||
#else
|
||||
#define _K_MAX
|
||||
#endif
|
||||
#if PIN_EXISTS(K_CS)
|
||||
#if PIN_EXISTS(K_CS) && AXIS_HAS_SPI(K)
|
||||
#define _K_CS K_CS_PIN,
|
||||
#else
|
||||
#define _K_CS
|
||||
|
||||
@@ -276,6 +276,9 @@
|
||||
|
||||
#if SD_CONNECTION_IS(ONBOARD)
|
||||
#define SD_DETECT_PIN PC4
|
||||
#define SD_SCK_PIN PA5
|
||||
#define SD_MISO_PIN PA6
|
||||
#define SD_MOSI_PIN PA7
|
||||
#elif SD_CONNECTION_IS(LCD) && BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
|
||||
#define SD_DETECT_PIN PA15
|
||||
#define SD_SS_PIN PA10
|
||||
|
||||
@@ -280,11 +280,8 @@
|
||||
#define ONBOARD_SPI_DEVICE 1 // SPI1 -> used only by HAL/STM32F1...
|
||||
#define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card
|
||||
|
||||
#define CUSTOM_SPI_PINS // TODO: needed because is the only way to set SPI for SD on STM32 (for now)
|
||||
#if ENABLED(CUSTOM_SPI_PINS)
|
||||
#define ENABLE_SPI1
|
||||
#define SDSS ONBOARD_SD_CS_PIN
|
||||
#define SD_SCK_PIN PA5
|
||||
#define SD_MISO_PIN PA6
|
||||
#define SD_MOSI_PIN PA7
|
||||
#endif
|
||||
#define ENABLE_SPI1
|
||||
#define SDSS ONBOARD_SD_CS_PIN
|
||||
#define SD_SCK_PIN PA5
|
||||
#define SD_MISO_PIN PA6
|
||||
#define SD_MOSI_PIN PA7
|
||||
|
||||
@@ -186,7 +186,6 @@
|
||||
|
||||
// TODO: This is the only way to set SPI for SD on STM32 (for now)
|
||||
#define ENABLE_SPI2
|
||||
#define CUSTOM_SPI_PINS
|
||||
#define SD_SCK_PIN PB13
|
||||
#define SD_MISO_PIN PB14
|
||||
#define SD_MOSI_PIN PB15
|
||||
|
||||
@@ -205,13 +205,10 @@
|
||||
#define EXP2_10_PIN PA6
|
||||
|
||||
// HAL SPI1 pins
|
||||
#define CUSTOM_SPI_PINS
|
||||
#if ENABLED(CUSTOM_SPI_PINS)
|
||||
#define SD_SCK_PIN EXP2_09_PIN // SPI1 SCLK
|
||||
#define SD_SS_PIN EXP2_07_PIN // SPI1 SSEL
|
||||
#define SD_MISO_PIN EXP2_10_PIN // SPI1 MISO
|
||||
#define SD_MOSI_PIN EXP2_05_PIN // SPI1 MOSI
|
||||
#endif
|
||||
#define SD_SCK_PIN EXP2_09_PIN // SPI1 SCLK
|
||||
#define SD_SS_PIN EXP2_07_PIN // SPI1 SSEL
|
||||
#define SD_MISO_PIN EXP2_10_PIN // SPI1 MISO
|
||||
#define SD_MOSI_PIN EXP2_05_PIN // SPI1 MOSI
|
||||
|
||||
#define SDSS EXP2_07_PIN
|
||||
|
||||
|
||||
@@ -357,8 +357,6 @@
|
||||
|
||||
#elif SD_CONNECTION_IS(ONBOARD)
|
||||
|
||||
// Instruct the STM32 HAL to override the default SPI pins from the variant.h file
|
||||
#define CUSTOM_SPI_PINS
|
||||
#define SDSS PA4
|
||||
#define SD_SS_PIN SDSS
|
||||
#define SD_SCK_PIN PA5
|
||||
|
||||
@@ -356,7 +356,6 @@
|
||||
#define SD_DETECT_PIN PC14
|
||||
#elif SD_CONNECTION_IS(LCD)
|
||||
|
||||
#define CUSTOM_SPI_PINS
|
||||
#define SDSS PA4
|
||||
#define SD_SS_PIN SDSS
|
||||
#define SD_SCK_PIN PA5
|
||||
|
||||
@@ -348,7 +348,6 @@
|
||||
|
||||
#elif SD_CONNECTION_IS(LCD)
|
||||
|
||||
#define CUSTOM_SPI_PINS
|
||||
#define SDSS PA4
|
||||
#define SD_SS_PIN SDSS
|
||||
#define SD_SCK_PIN PA5
|
||||
|
||||
@@ -217,37 +217,31 @@
|
||||
//
|
||||
// detect pin dont work when ONBOARD and NO_SD_HOST_DRIVE disabled
|
||||
#if SD_CONNECTION_IS(ONBOARD)
|
||||
#define CUSTOM_SPI_PINS // TODO: needed because is the only way to set SPI3 for SD on STM32 (by now)
|
||||
#if ENABLED(CUSTOM_SPI_PINS)
|
||||
#define ENABLE_SPI3
|
||||
#define SD_SS_PIN -1
|
||||
#define SDSS PC9
|
||||
#define SD_SCK_PIN PC10
|
||||
#define SD_MISO_PIN PC11
|
||||
#define SD_MOSI_PIN PC12
|
||||
#define SD_DETECT_PIN PD12
|
||||
#endif
|
||||
#define ENABLE_SPI3
|
||||
#define SD_SS_PIN -1
|
||||
#define SDSS PC9
|
||||
#define SD_SCK_PIN PC10
|
||||
#define SD_MISO_PIN PC11
|
||||
#define SD_MOSI_PIN PC12
|
||||
#define SD_DETECT_PIN PD12
|
||||
#endif
|
||||
|
||||
//
|
||||
// LCD SD
|
||||
//
|
||||
#if SD_CONNECTION_IS(LCD)
|
||||
#define CUSTOM_SPI_PINS
|
||||
#if ENABLED(CUSTOM_SPI_PINS)
|
||||
#define ENABLE_SPI1
|
||||
#define SDSS PE10
|
||||
#define SD_SCK_PIN PA5
|
||||
#define SD_MISO_PIN PA6
|
||||
#define SD_MOSI_PIN PA7
|
||||
#define SD_DETECT_PIN PE12
|
||||
#endif
|
||||
#define ENABLE_SPI1
|
||||
#define SDSS PE10
|
||||
#define SD_SCK_PIN PA5
|
||||
#define SD_MISO_PIN PA6
|
||||
#define SD_MOSI_PIN PA7
|
||||
#define SD_DETECT_PIN PE12
|
||||
#endif
|
||||
|
||||
//
|
||||
// LCD / Controller
|
||||
#define SPI_FLASH
|
||||
#define HAS_SPI_FLASH 1
|
||||
#define HAS_SPI_FLASH 1
|
||||
#define SPI_DEVICE 2
|
||||
#define SPI_FLASH_SIZE 0x1000000
|
||||
#if ENABLED(SPI_FLASH)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define BOARD_INFO_NAME "MKS Robin PRO V2"
|
||||
|
||||
// Avoid conflict with TIMER_TONE
|
||||
#define STEP_TIMER 10
|
||||
#define STEP_TIMER 10
|
||||
|
||||
// Use one of these or SDCard-based Emulation will be used
|
||||
//#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation
|
||||
@@ -50,7 +50,7 @@
|
||||
//
|
||||
// Note: MKS Robin board is using SPI2 interface.
|
||||
//
|
||||
//#define SPI_MODULE 2
|
||||
//#define SPI_MODULE 2
|
||||
|
||||
//
|
||||
// Servos
|
||||
@@ -203,7 +203,7 @@
|
||||
//#define LED_PIN PB2
|
||||
|
||||
#ifndef SDCARD_CONNECTION
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#endif
|
||||
|
||||
//#define USE_NEW_SPI_API 1
|
||||
@@ -214,21 +214,17 @@
|
||||
//
|
||||
// detect pin dont work when ONBOARD and NO_SD_HOST_DRIVE disabled
|
||||
#if !defined(SDCARD_CONNECTION) || SDCARD_CONNECTION == ONBOARD
|
||||
#define CUSTOM_SPI_PINS
|
||||
#if ENABLED(CUSTOM_SPI_PINS)
|
||||
|
||||
#if USE_NEW_SPI_API
|
||||
#define SD_SPI MARLIN_SPI(HardwareSPI3, PC9)
|
||||
#else
|
||||
#define ENABLE_SPI3
|
||||
#define SD_SS_PIN -1
|
||||
#define SDSS PC9
|
||||
#define SD_SCK_PIN PC10
|
||||
#define SD_MISO_PIN PC11
|
||||
#define SD_MOSI_PIN PC12
|
||||
#endif
|
||||
#define SD_DETECT_PIN PD12
|
||||
#if USE_NEW_SPI_API
|
||||
#define SD_SPI MARLIN_SPI(HardwareSPI3, PC9)
|
||||
#else
|
||||
#define ENABLE_SPI3
|
||||
#define SD_SS_PIN -1
|
||||
#define SDSS PC9
|
||||
#define SD_SCK_PIN PC10
|
||||
#define SD_MISO_PIN PC11
|
||||
#define SD_MOSI_PIN PC12
|
||||
#endif
|
||||
#define SD_DETECT_PIN PD12
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -236,22 +232,19 @@
|
||||
// LCD SD
|
||||
//
|
||||
#if SDCARD_CONNECTION == LCD
|
||||
#define CUSTOM_SPI_PINS
|
||||
#if ENABLED(CUSTOM_SPI_PINS)
|
||||
#define ENABLE_SPI1
|
||||
#define SDSS PE10
|
||||
#define SD_SCK_PIN PA5
|
||||
#define SD_MISO_PIN PA6
|
||||
#define SD_MOSI_PIN PA7
|
||||
#define SD_DETECT_PIN PE12
|
||||
#endif
|
||||
#define ENABLE_SPI1
|
||||
#define SDSS PE10
|
||||
#define SD_SCK_PIN PA5
|
||||
#define SD_MISO_PIN PA6
|
||||
#define SD_MOSI_PIN PA7
|
||||
#define SD_DETECT_PIN PE12
|
||||
#endif
|
||||
*/
|
||||
|
||||
//
|
||||
// LCD / Controller
|
||||
#define SPI_FLASH
|
||||
#define HAS_SPI_FLASH 1
|
||||
#define HAS_SPI_FLASH 1
|
||||
#define SPI_DEVICE 2
|
||||
#define SPI_FLASH_SIZE 0x1000000
|
||||
#if ENABLED(SPI_FLASH)
|
||||
|
||||
+1
-1
@@ -24,6 +24,6 @@ monitor_speed = 250000
|
||||
#board_build.flash_mode = qio
|
||||
|
||||
[env:FYSETC_E4]
|
||||
platform = espressif32@1.11.2
|
||||
platform = espressif32@2.1.0
|
||||
extends = env:esp32
|
||||
board_build.partitions = default_16MB.csv
|
||||
|
||||
@@ -330,7 +330,7 @@ build_flags = ${common_stm32f1.build_flags}
|
||||
#
|
||||
# Malyan M200 (STM32F103CB)
|
||||
#
|
||||
[env:STM32F103CB_malyan]
|
||||
[env:STM32F103CB_malyan_maple]
|
||||
platform = ${common_stm32f1.platform}
|
||||
extends = common_stm32f1
|
||||
board = marlin_malyanM200
|
||||
|
||||
@@ -282,3 +282,14 @@ build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
|
||||
extra_scripts = ${common_stm32.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
buildroot/share/PlatformIO/scripts/stm32_bootloader.py
|
||||
|
||||
#
|
||||
# Malyan M200 (STM32F103CB)
|
||||
#
|
||||
[env:STM32F103CB_malyan]
|
||||
platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = malyanm200_f103cb
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
||||
|
||||
Reference in New Issue
Block a user