mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-26 21:36:21 +00:00
Style, spacing, typo cleanup for recent changes
This commit is contained in:
parent
66834cf324
commit
885b0d2ec5
@ -53,5 +53,5 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) && NOT_TARGET(STM32F4xx, STM32F1xx)
|
#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) && NOT_TARGET(STM32F4xx, STM32F1xx)
|
||||||
#error "TFT_COLOR_UI, TFT_LVGL_UI and TFT_CLASSIC_U are currently only supported on STM32F4 and STM32F1 hardware."
|
#error "TFT_COLOR_UI, TFT_LVGL_UI and TFT_CLASSIC_UI are currently only supported on STM32F4 and STM32F1 hardware."
|
||||||
#endif
|
#endif
|
||||||
|
@ -141,8 +141,7 @@ uint8_t get_pin_mode(const pin_t Ard_num) {
|
|||||||
uint32_t ll_pin = STM_LL_GPIO_PIN(dp);
|
uint32_t ll_pin = STM_LL_GPIO_PIN(dp);
|
||||||
GPIO_TypeDef *port = get_GPIO_Port(STM_PORT(dp));
|
GPIO_TypeDef *port = get_GPIO_Port(STM_PORT(dp));
|
||||||
uint32_t mode = LL_GPIO_GetPinMode(port, ll_pin);
|
uint32_t mode = LL_GPIO_GetPinMode(port, ll_pin);
|
||||||
switch (mode)
|
switch (mode) {
|
||||||
{
|
|
||||||
case LL_GPIO_MODE_ANALOG: return MODE_PIN_ANALOG;
|
case LL_GPIO_MODE_ANALOG: return MODE_PIN_ANALOG;
|
||||||
case LL_GPIO_MODE_INPUT: return MODE_PIN_INPUT;
|
case LL_GPIO_MODE_INPUT: return MODE_PIN_INPUT;
|
||||||
case LL_GPIO_MODE_OUTPUT: return MODE_PIN_OUTPUT;
|
case LL_GPIO_MODE_OUTPUT: return MODE_PIN_OUTPUT;
|
||||||
|
@ -40,19 +40,15 @@ void TFT_SPI::Init() {
|
|||||||
if ((spiInstance = (SPI_TypeDef *)pinmap_peripheral(digitalPinToPinName(TFT_SCK_PIN), PinMap_SPI_SCLK)) == NP) return;
|
if ((spiInstance = (SPI_TypeDef *)pinmap_peripheral(digitalPinToPinName(TFT_SCK_PIN), PinMap_SPI_SCLK)) == NP) return;
|
||||||
if (spiInstance != (SPI_TypeDef *)pinmap_peripheral(digitalPinToPinName(TFT_MOSI_PIN), PinMap_SPI_MOSI)) return;
|
if (spiInstance != (SPI_TypeDef *)pinmap_peripheral(digitalPinToPinName(TFT_MOSI_PIN), PinMap_SPI_MOSI)) return;
|
||||||
|
|
||||||
#if PIN_EXISTS(TFT_MISO)
|
#if PIN_EXISTS(TFT_MISO) && TFT_MISO_PIN != TFT_MOSI_PIN
|
||||||
if (TFT_MISO_PIN != TFT_MOSI_PIN)
|
if (spiInstance != (SPI_TypeDef *)pinmap_peripheral(digitalPinToPinName(TFT_MISO_PIN), PinMap_SPI_MISO)) return;
|
||||||
if (spiInstance != (SPI_TypeDef *)pinmap_peripheral(digitalPinToPinName(TFT_MISO_PIN), PinMap_SPI_MISO)) return;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SPIx.Instance = spiInstance;
|
SPIx.Instance = spiInstance;
|
||||||
SPIx.State = HAL_SPI_STATE_RESET;
|
SPIx.State = HAL_SPI_STATE_RESET;
|
||||||
SPIx.Init.NSS = SPI_NSS_SOFT;
|
SPIx.Init.NSS = SPI_NSS_SOFT;
|
||||||
SPIx.Init.Mode = SPI_MODE_MASTER;
|
SPIx.Init.Mode = SPI_MODE_MASTER;
|
||||||
if (TFT_MISO_PIN == TFT_MOSI_PIN)
|
SPIx.Init.Direction = (TFT_MISO_PIN == TFT_MOSI_PIN) ? SPI_DIRECTION_1LINE : SPI_DIRECTION_2LINES;
|
||||||
SPIx.Init.Direction = SPI_DIRECTION_1LINE;
|
|
||||||
else
|
|
||||||
SPIx.Init.Direction = SPI_DIRECTION_2LINES;
|
|
||||||
SPIx.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
|
SPIx.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
|
||||||
SPIx.Init.CLKPhase = SPI_PHASE_1EDGE;
|
SPIx.Init.CLKPhase = SPI_PHASE_1EDGE;
|
||||||
SPIx.Init.CLKPolarity = SPI_POLARITY_LOW;
|
SPIx.Init.CLKPolarity = SPI_POLARITY_LOW;
|
||||||
@ -64,9 +60,8 @@ void TFT_SPI::Init() {
|
|||||||
|
|
||||||
pinmap_pinout(digitalPinToPinName(TFT_SCK_PIN), PinMap_SPI_SCLK);
|
pinmap_pinout(digitalPinToPinName(TFT_SCK_PIN), PinMap_SPI_SCLK);
|
||||||
pinmap_pinout(digitalPinToPinName(TFT_MOSI_PIN), PinMap_SPI_MOSI);
|
pinmap_pinout(digitalPinToPinName(TFT_MOSI_PIN), PinMap_SPI_MOSI);
|
||||||
#if PIN_EXISTS(TFT_MISO)
|
#if PIN_EXISTS(TFT_MISO) && TFT_MISO_PIN != TFT_MOSI_PIN
|
||||||
if (TFT_MISO_PIN != TFT_MOSI_PIN)
|
pinmap_pinout(digitalPinToPinName(TFT_MISO_PIN), PinMap_SPI_MISO);
|
||||||
pinmap_pinout(digitalPinToPinName(TFT_MISO_PIN), PinMap_SPI_MISO);
|
|
||||||
#endif
|
#endif
|
||||||
pin_PullConfig(get_GPIO_Port(STM_PORT(digitalPinToPinName(TFT_SCK_PIN))), STM_LL_GPIO_PIN(digitalPinToPinName(TFT_SCK_PIN)), GPIO_PULLDOWN);
|
pin_PullConfig(get_GPIO_Port(STM_PORT(digitalPinToPinName(TFT_SCK_PIN))), STM_LL_GPIO_PIN(digitalPinToPinName(TFT_SCK_PIN)), GPIO_PULLDOWN);
|
||||||
|
|
||||||
@ -119,7 +114,7 @@ void TFT_SPI::Init() {
|
|||||||
DMAtx.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD;
|
DMAtx.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD;
|
||||||
DMAtx.Init.Mode = DMA_NORMAL;
|
DMAtx.Init.Mode = DMA_NORMAL;
|
||||||
DMAtx.Init.Priority = DMA_PRIORITY_LOW;
|
DMAtx.Init.Priority = DMA_PRIORITY_LOW;
|
||||||
#if defined(STM32F4xx)
|
#ifdef STM32F4xx
|
||||||
DMAtx.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
|
DMAtx.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -140,11 +135,10 @@ uint32_t TFT_SPI::GetID() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t TFT_SPI::ReadID(uint16_t Reg) {
|
uint32_t TFT_SPI::ReadID(uint16_t Reg) {
|
||||||
#if !PIN_EXISTS(TFT_MISO)
|
uint32_t Data = 0;
|
||||||
return 0;
|
#if PIN_EXISTS(TFT_MISO)
|
||||||
#else
|
|
||||||
uint32_t BaudRatePrescaler = SPIx.Init.BaudRatePrescaler;
|
uint32_t BaudRatePrescaler = SPIx.Init.BaudRatePrescaler;
|
||||||
uint32_t i, Data = 0;
|
uint32_t i;
|
||||||
|
|
||||||
SPIx.Init.BaudRatePrescaler = SPIx.Instance == SPI1 ? SPI_BAUDRATEPRESCALER_8 : SPI_BAUDRATEPRESCALER_4;
|
SPIx.Init.BaudRatePrescaler = SPIx.Instance == SPI1 ? SPI_BAUDRATEPRESCALER_8 : SPI_BAUDRATEPRESCALER_4;
|
||||||
DataTransferBegin(DATASIZE_8BIT);
|
DataTransferBegin(DATASIZE_8BIT);
|
||||||
@ -154,12 +148,12 @@ uint32_t TFT_SPI::ReadID(uint16_t Reg) {
|
|||||||
__HAL_SPI_ENABLE(&SPIx);
|
__HAL_SPI_ENABLE(&SPIx);
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
if (TFT_MISO_PIN != TFT_MOSI_PIN) {
|
#if TFT_MISO_PIN != TFT_MOSI_PIN
|
||||||
//if (hspi->Init.Direction == SPI_DIRECTION_2LINES) {
|
//if (hspi->Init.Direction == SPI_DIRECTION_2LINES) {
|
||||||
while ((SPIx.Instance->SR & SPI_FLAG_TXE) != SPI_FLAG_TXE) {}
|
while ((SPIx.Instance->SR & SPI_FLAG_TXE) != SPI_FLAG_TXE) {}
|
||||||
SPIx.Instance->DR = 0;
|
SPIx.Instance->DR = 0;
|
||||||
//}
|
//}
|
||||||
}
|
#endif
|
||||||
while ((SPIx.Instance->SR & SPI_FLAG_RXNE) != SPI_FLAG_RXNE) {}
|
while ((SPIx.Instance->SR & SPI_FLAG_RXNE) != SPI_FLAG_RXNE) {}
|
||||||
Data = (Data << 8) | SPIx.Instance->DR;
|
Data = (Data << 8) | SPIx.Instance->DR;
|
||||||
}
|
}
|
||||||
@ -168,9 +162,9 @@ uint32_t TFT_SPI::ReadID(uint16_t Reg) {
|
|||||||
DataTransferEnd();
|
DataTransferEnd();
|
||||||
|
|
||||||
SPIx.Init.BaudRatePrescaler = BaudRatePrescaler;
|
SPIx.Init.BaudRatePrescaler = BaudRatePrescaler;
|
||||||
|
|
||||||
return Data >> 7;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return Data >> 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TFT_SPI::isBusy() {
|
bool TFT_SPI::isBusy() {
|
||||||
@ -183,9 +177,8 @@ bool TFT_SPI::isBusy() {
|
|||||||
if (__HAL_DMA_GET_FLAG(&DMAtx, __HAL_DMA_GET_TC_FLAG_INDEX(&DMAtx)) != 0 || __HAL_DMA_GET_FLAG(&DMAtx, __HAL_DMA_GET_TE_FLAG_INDEX(&DMAtx)) != 0)
|
if (__HAL_DMA_GET_FLAG(&DMAtx, __HAL_DMA_GET_TC_FLAG_INDEX(&DMAtx)) != 0 || __HAL_DMA_GET_FLAG(&DMAtx, __HAL_DMA_GET_TE_FLAG_INDEX(&DMAtx)) != 0)
|
||||||
Abort();
|
Abort();
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
Abort();
|
Abort();
|
||||||
}
|
|
||||||
return dmaEnabled;
|
return dmaEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Marlin 3D Printer Firmware
|
* Marlin 3D Printer Firmware
|
||||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
*
|
*
|
||||||
* Based on Sprinter and grbl.
|
* Based on Sprinter and grbl.
|
||||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
// SD Connection
|
// SD Connection
|
||||||
//
|
//
|
||||||
#ifndef SDCARD_CONNECTION
|
#ifndef SDCARD_CONNECTION
|
||||||
#define SDCARD_CONNECTION LCD
|
#define SDCARD_CONNECTION LCD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -244,7 +244,7 @@
|
|||||||
// SD Connection
|
// SD Connection
|
||||||
//
|
//
|
||||||
#if SD_CONNECTION_IS(LCD)
|
#if SD_CONNECTION_IS(LCD)
|
||||||
#define SS_PIN EXPA2_07_PIN
|
#define SS_PIN EXPA2_07_PIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -286,24 +286,24 @@
|
|||||||
* LCD LCD
|
* LCD LCD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LCD_PINS_RS EXPA1_03_PIN
|
#define LCD_PINS_RS EXPA1_03_PIN
|
||||||
|
|
||||||
#define BTN_EN1 EXPA1_06_PIN
|
#define BTN_EN1 EXPA1_06_PIN
|
||||||
#define BTN_EN2 EXPA1_04_PIN
|
#define BTN_EN2 EXPA1_04_PIN
|
||||||
#define BTN_ENC EXPA1_08_PIN
|
#define BTN_ENC EXPA1_08_PIN
|
||||||
|
|
||||||
#define LCD_PINS_ENABLE EXPA1_05_PIN
|
#define LCD_PINS_ENABLE EXPA1_05_PIN
|
||||||
#define LCD_PINS_D4 EXPA1_07_PIN
|
#define LCD_PINS_D4 EXPA1_07_PIN
|
||||||
|
|
||||||
#elif ENABLED(CR10_STOCKDISPLAY)
|
#elif ENABLED(CR10_STOCKDISPLAY)
|
||||||
#define BTN_ENC EXPA1_09_PIN // (58) open-drain
|
#define BTN_ENC EXPA1_09_PIN // (58) open-drain
|
||||||
#define LCD_PINS_RS EXPA1_04_PIN
|
#define LCD_PINS_RS EXPA1_04_PIN
|
||||||
|
|
||||||
#define BTN_EN1 EXPA1_08_PIN
|
#define BTN_EN1 EXPA1_08_PIN
|
||||||
#define BTN_EN2 EXPA1_06_PIN
|
#define BTN_EN2 EXPA1_06_PIN
|
||||||
|
|
||||||
#define LCD_PINS_ENABLE EXPA1_03_PIN
|
#define LCD_PINS_ENABLE EXPA1_03_PIN
|
||||||
#define LCD_PINS_D4 EXPA1_05_PIN
|
#define LCD_PINS_D4 EXPA1_05_PIN
|
||||||
|
|
||||||
#elif ENABLED(ENDER2_STOCKDISPLAY)
|
#elif ENABLED(ENDER2_STOCKDISPLAY)
|
||||||
|
|
||||||
@ -318,36 +318,36 @@
|
|||||||
* EXP1
|
* EXP1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define BTN_EN1 EXPA1_08_PIN
|
#define BTN_EN1 EXPA1_08_PIN
|
||||||
#define BTN_EN2 EXPA1_06_PIN
|
#define BTN_EN2 EXPA1_06_PIN
|
||||||
#define BTN_ENC EXPA1_09_PIN
|
#define BTN_ENC EXPA1_09_PIN
|
||||||
|
|
||||||
#define DOGLCD_CS EXPA1_04_PIN
|
#define DOGLCD_CS EXPA1_04_PIN
|
||||||
#define DOGLCD_A0 EXPA1_05_PIN
|
#define DOGLCD_A0 EXPA1_05_PIN
|
||||||
#define DOGLCD_SCK EXPA1_10_PIN
|
#define DOGLCD_SCK EXPA1_10_PIN
|
||||||
#define DOGLCD_MOSI EXPA1_03_PIN
|
#define DOGLCD_MOSI EXPA1_03_PIN
|
||||||
#define FORCE_SOFT_SPI
|
#define FORCE_SOFT_SPI
|
||||||
#define LCD_BACKLIGHT_PIN -1
|
#define LCD_BACKLIGHT_PIN -1
|
||||||
|
|
||||||
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
|
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
|
||||||
#define TFT_CS_PIN EXPA1_04_PIN
|
#define TFT_CS_PIN EXPA1_04_PIN
|
||||||
#define TFT_A0_PIN EXPA1_03_PIN
|
#define TFT_A0_PIN EXPA1_03_PIN
|
||||||
#define TFT_DC_PIN EXPA1_03_PIN
|
#define TFT_DC_PIN EXPA1_03_PIN
|
||||||
#define TFT_MISO_PIN EXPA2_10_PIN
|
#define TFT_MISO_PIN EXPA2_10_PIN
|
||||||
#define TFT_BACKLIGHT_PIN EXPA1_08_PIN
|
#define TFT_BACKLIGHT_PIN EXPA1_08_PIN
|
||||||
#define TFT_RESET_PIN EXPA1_07_PIN
|
#define TFT_RESET_PIN EXPA1_07_PIN
|
||||||
|
|
||||||
#define LCD_USE_DMA_SPI
|
#define LCD_USE_DMA_SPI
|
||||||
|
|
||||||
#define TOUCH_INT_PIN EXPA1_05_PIN
|
#define TOUCH_INT_PIN EXPA1_05_PIN
|
||||||
#define TOUCH_CS_PIN EXPA1_06_PIN
|
#define TOUCH_CS_PIN EXPA1_06_PIN
|
||||||
#define TOUCH_BUTTONS_HW_SPI
|
#define TOUCH_BUTTONS_HW_SPI
|
||||||
#define TOUCH_BUTTONS_HW_SPI_DEVICE 1
|
#define TOUCH_BUTTONS_HW_SPI_DEVICE 1
|
||||||
|
|
||||||
// SPI 1
|
// SPI 1
|
||||||
#define SCK_PIN EXPA2_09_PIN
|
#define SCK_PIN EXPA2_09_PIN
|
||||||
#define MISO_PIN EXPA2_10_PIN
|
#define MISO_PIN EXPA2_10_PIN
|
||||||
#define MOSI_PIN EXPA2_05_PIN
|
#define MOSI_PIN EXPA2_05_PIN
|
||||||
|
|
||||||
// Disable any LCD related PINs config
|
// Disable any LCD related PINs config
|
||||||
#define LCD_PINS_ENABLE -1
|
#define LCD_PINS_ENABLE -1
|
||||||
@ -358,72 +358,72 @@
|
|||||||
#elif IS_TFTGLCD_PANEL
|
#elif IS_TFTGLCD_PANEL
|
||||||
|
|
||||||
#if ENABLED(TFTGLCD_PANEL_SPI)
|
#if ENABLED(TFTGLCD_PANEL_SPI)
|
||||||
#define TFTGLCD_CS EXPA2_08_PIN
|
#define TFTGLCD_CS EXPA2_08_PIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SD_DETECT_PIN EXPA2_04_PIN
|
#define SD_DETECT_PIN EXPA2_04_PIN
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define BTN_ENC EXPA1_09_PIN // (58) open-drain
|
#define BTN_ENC EXPA1_09_PIN // (58) open-drain
|
||||||
#define LCD_PINS_RS EXPA1_07_PIN
|
#define LCD_PINS_RS EXPA1_07_PIN
|
||||||
|
|
||||||
#define BTN_EN1 EXPA2_08_PIN // (31) J3-2 & AUX-4
|
#define BTN_EN1 EXPA2_08_PIN // (31) J3-2 & AUX-4
|
||||||
#define BTN_EN2 EXPA2_06_PIN // (33) J3-4 & AUX-4
|
#define BTN_EN2 EXPA2_06_PIN // (33) J3-4 & AUX-4
|
||||||
|
|
||||||
#define LCD_PINS_ENABLE EXPA1_08_PIN
|
#define LCD_PINS_ENABLE EXPA1_08_PIN
|
||||||
#define LCD_PINS_D4 EXPA1_06_PIN
|
#define LCD_PINS_D4 EXPA1_06_PIN
|
||||||
|
|
||||||
#define LCD_SDSS EXPA2_07_PIN // (16) J3-7 & AUX-4
|
#define LCD_SDSS EXPA2_07_PIN // (16) J3-7 & AUX-4
|
||||||
|
|
||||||
#if SD_CONNECTION_IS(LCD)
|
#if SD_CONNECTION_IS(LCD)
|
||||||
#define SD_DETECT_PIN EXPA2_04_PIN // (49) (NOT 5V tolerant)
|
#define SD_DETECT_PIN EXPA2_04_PIN // (49) (NOT 5V tolerant)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(FYSETC_MINI_12864)
|
#if ENABLED(FYSETC_MINI_12864)
|
||||||
#define DOGLCD_CS EXPA1_08_PIN
|
#define DOGLCD_CS EXPA1_08_PIN
|
||||||
#define DOGLCD_A0 EXPA1_07_PIN
|
#define DOGLCD_A0 EXPA1_07_PIN
|
||||||
#define DOGLCD_SCK EXPA2_09_PIN
|
#define DOGLCD_SCK EXPA2_09_PIN
|
||||||
#define DOGLCD_MOSI EXPA2_05_PIN
|
#define DOGLCD_MOSI EXPA2_05_PIN
|
||||||
|
|
||||||
#define LCD_BACKLIGHT_PIN -1
|
#define LCD_BACKLIGHT_PIN -1
|
||||||
|
|
||||||
#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
|
#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
|
||||||
// results in LCD soft SPI mode 3, SD soft SPI mode 0
|
// results in LCD soft SPI mode 3, SD soft SPI mode 0
|
||||||
|
|
||||||
#define LCD_RESET_PIN EXPA1_06_PIN // Must be high or open for LCD to operate normally.
|
#define LCD_RESET_PIN EXPA1_06_PIN // Must be high or open for LCD to operate normally.
|
||||||
|
|
||||||
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
|
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
|
||||||
#ifndef RGB_LED_R_PIN
|
#ifndef RGB_LED_R_PIN
|
||||||
#define RGB_LED_R_PIN EXPA1_05_PIN
|
#define RGB_LED_R_PIN EXPA1_05_PIN
|
||||||
#endif
|
#endif
|
||||||
#ifndef RGB_LED_G_PIN
|
#ifndef RGB_LED_G_PIN
|
||||||
#define RGB_LED_G_PIN EXPA1_04_PIN
|
#define RGB_LED_G_PIN EXPA1_04_PIN
|
||||||
#endif
|
#endif
|
||||||
#ifndef RGB_LED_B_PIN
|
#ifndef RGB_LED_B_PIN
|
||||||
#define RGB_LED_B_PIN EXPA1_03_PIN
|
#define RGB_LED_B_PIN EXPA1_03_PIN
|
||||||
#endif
|
#endif
|
||||||
#elif ENABLED(FYSETC_MINI_12864_2_1)
|
#elif ENABLED(FYSETC_MINI_12864_2_1)
|
||||||
#define NEOPIXEL_PIN EXPA1_05_PIN
|
#define NEOPIXEL_PIN EXPA1_05_PIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else // !FYSETC_MINI_12864
|
#else // !FYSETC_MINI_12864
|
||||||
|
|
||||||
#if ENABLED(MKS_MINI_12864)
|
#if ENABLED(MKS_MINI_12864)
|
||||||
#define DOGLCD_CS EXPA1_05_PIN
|
#define DOGLCD_CS EXPA1_05_PIN
|
||||||
#define DOGLCD_A0 EXPA1_04_PIN
|
#define DOGLCD_A0 EXPA1_04_PIN
|
||||||
#define DOGLCD_SCK EXPA2_09_PIN
|
#define DOGLCD_SCK EXPA2_09_PIN
|
||||||
#define DOGLCD_MOSI EXPA2_05_PIN
|
#define DOGLCD_MOSI EXPA2_05_PIN
|
||||||
#define FORCE_SOFT_SPI
|
#define FORCE_SOFT_SPI
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if IS_ULTIPANEL
|
#if IS_ULTIPANEL
|
||||||
#define LCD_PINS_D5 EXPA1_05_PIN
|
#define LCD_PINS_D5 EXPA1_05_PIN
|
||||||
#define LCD_PINS_D6 EXPA1_04_PIN
|
#define LCD_PINS_D6 EXPA1_04_PIN
|
||||||
#define LCD_PINS_D7 EXPA1_03_PIN
|
#define LCD_PINS_D7 EXPA1_03_PIN
|
||||||
|
|
||||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||||
#define BTN_ENC_EN EXPA1_03_PIN // Detect the presence of the encoder
|
#define BTN_ENC_EN EXPA1_03_PIN // Detect the presence of the encoder
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -33,8 +33,8 @@
|
|||||||
// https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT
|
// https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT
|
||||||
//#define HAS_BTT_EXP_MOT 1
|
//#define HAS_BTT_EXP_MOT 1
|
||||||
|
|
||||||
#if BOTH(HAS_WIRED_LCD,HAS_BTT_EXP_MOT)
|
#if BOTH(HAS_WIRED_LCD, HAS_BTT_EXP_MOT)
|
||||||
#if EITHER(CR10_STOCKDISPLAY,ENDER2_STOCKDISPLAY)
|
#if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY)
|
||||||
#define EXP_MOT_USE_EXP2_ONLY
|
#define EXP_MOT_USE_EXP2_ONLY
|
||||||
#else
|
#else
|
||||||
#error "Having a LCD that uses both EXP1/EXP2 and a expanion motor module on EXP1/EXP2 is not possible."
|
#error "Having a LCD that uses both EXP1/EXP2 and a expanion motor module on EXP1/EXP2 is not possible."
|
||||||
@ -129,56 +129,60 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_BTT_EXP_MOT
|
#if HAS_BTT_EXP_MOT
|
||||||
/* _____ _____
|
|
||||||
* NC | · · | GND NC | · · | GND
|
/** _____ _____
|
||||||
* NC | · · | 1.31 (M1EN) (M2EN) 1.23 | · · | 1.22 (M3EN)
|
* NC | · · | GND NC | · · | GND
|
||||||
* (M1STP) 0.18 | · · 3.25 (M1DIR) (M1RX) 1.21 | · · 1.20 (M1DIAG)
|
* NC | · · | 1.31 (M1EN) (M2EN) 1.23 | · · | 1.22 (M3EN)
|
||||||
* (M2DIR) 0.16 | · · | 3.26 (M2STP) (M2RX) 1.19 | · · | 1.18 (M2DIAG)
|
* (M1STP) 0.18 | · · 3.25 (M1DIR) (M1RX) 1.21 | · · 1.20 (M1DIAG)
|
||||||
* (M3DIR) 0.15 | · · | 0.17 (M3STP) (M3RX) 0.28 | · · | 1.30 (M3DIAG)
|
* (M2DIR) 0.16 | · · | 3.26 (M2STP) (M2RX) 1.19 | · · | 1.18 (M2DIAG)
|
||||||
* ----- -----
|
* (M3DIR) 0.15 | · · | 0.17 (M3STP) (M3RX) 0.28 | · · | 1.30 (M3DIAG)
|
||||||
* EXP2 EXP1
|
* ----- -----
|
||||||
*
|
* EXP2 EXP1
|
||||||
* NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN
|
*
|
||||||
*/
|
* NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN
|
||||||
|
*/
|
||||||
|
|
||||||
// M1 on Driver Expansion Module
|
// M1 on Driver Expansion Module
|
||||||
#define E2_STEP_PIN EXPA2_05_PIN
|
#define E2_STEP_PIN EXPA2_05_PIN
|
||||||
#define E2_DIR_PIN EXPA2_06_PIN
|
#define E2_DIR_PIN EXPA2_06_PIN
|
||||||
#define E2_ENABLE_PIN EXPA2_04_PIN
|
#define E2_ENABLE_PIN EXPA2_04_PIN
|
||||||
#ifndef EXP_MOT_USE_EXP2_ONLY
|
#ifndef EXP_MOT_USE_EXP2_ONLY
|
||||||
#define E2_DIAG_PIN EXPA1_06_PIN
|
#define E2_DIAG_PIN EXPA1_06_PIN
|
||||||
#define E2_CS_PIN EXPA1_05_PIN
|
#define E2_CS_PIN EXPA1_05_PIN
|
||||||
#if HAS_TMC_UART
|
#if HAS_TMC_UART
|
||||||
#define E2_SERIAL_TX_PIN EXPA1_05_PIN
|
#define E2_SERIAL_TX_PIN EXPA1_05_PIN
|
||||||
#define E2_SERIAL_RX_PIN EXPA1_05_PIN
|
#define E2_SERIAL_RX_PIN EXPA1_05_PIN
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// M2 on Driver Expansion Module
|
// M2 on Driver Expansion Module
|
||||||
#define E3_STEP_PIN EXPA2_08_PIN
|
#define E3_STEP_PIN EXPA2_08_PIN
|
||||||
#define E3_DIR_PIN EXPA2_07_PIN
|
#define E3_DIR_PIN EXPA2_07_PIN
|
||||||
#ifndef EXP_MOT_USE_EXP2_ONLY
|
#ifndef EXP_MOT_USE_EXP2_ONLY
|
||||||
#define E3_ENABLE_PIN EXPA1_03_PIN
|
#define E3_ENABLE_PIN EXPA1_03_PIN
|
||||||
#define E3_DIAG_PIN EXPA1_08_PIN
|
#define E3_DIAG_PIN EXPA1_08_PIN
|
||||||
#define E3_CS_PIN EXPA1_07_PIN
|
#define E3_CS_PIN EXPA1_07_PIN
|
||||||
#if HAS_TMC_UART
|
#if HAS_TMC_UART
|
||||||
#define E3_SERIAL_TX_PIN EXPA1_07_PIN
|
#define E3_SERIAL_TX_PIN EXPA1_07_PIN
|
||||||
#define E3_SERIAL_RX_PIN EXPA1_07_PIN
|
#define E3_SERIAL_RX_PIN EXPA1_07_PIN
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define E3_ENABLE_PIN EXPA2_04_PIN
|
#define E3_ENABLE_PIN EXPA2_04_PIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// M3 on Driver Expansion Module
|
// M3 on Driver Expansion Module
|
||||||
#define E4_STEP_PIN EXPA2_10_PIN
|
#define E4_STEP_PIN EXPA2_10_PIN
|
||||||
#define E4_DIR_PIN EXPA2_09_PIN
|
#define E4_DIR_PIN EXPA2_09_PIN
|
||||||
#ifndef EXP_MOT_USE_EXP2_ONLY
|
#ifndef EXP_MOT_USE_EXP2_ONLY
|
||||||
#define E4_ENABLE_PIN EXPA1_04_PIN
|
#define E4_ENABLE_PIN EXPA1_04_PIN
|
||||||
#define E4_DIAG_PIN EXPA1_10_PIN
|
#define E4_DIAG_PIN EXPA1_10_PIN
|
||||||
#define E4_CS_PIN EXPA1_09_PIN
|
#define E4_CS_PIN EXPA1_09_PIN
|
||||||
#if HAS_TMC_UART
|
#if HAS_TMC_UART
|
||||||
#define E4_SERIAL_TX_PIN EXPA1_09_PIN
|
#define E4_SERIAL_TX_PIN EXPA1_09_PIN
|
||||||
#define E4_SERIAL_RX_PIN EXPA1_09_PIN
|
#define E4_SERIAL_RX_PIN EXPA1_09_PIN
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define E4_ENABLE_PIN EXPA2_04_PIN
|
#define E4_ENABLE_PIN EXPA2_04_PIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // HAS_BTT_EXP_MOT
|
#endif // HAS_BTT_EXP_MOT
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Marlin 3D Printer Firmware
|
* Marlin 3D Printer Firmware
|
||||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
*
|
*
|
||||||
* Based on Sprinter and grbl.
|
* Based on Sprinter and grbl.
|
||||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Marlin 3D Printer Firmware
|
* Marlin 3D Printer Firmware
|
||||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
*
|
*
|
||||||
* Based on Sprinter and grbl.
|
* Based on Sprinter and grbl.
|
||||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Marlin 3D Printer Firmware
|
* Marlin 3D Printer Firmware
|
||||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
*
|
*
|
||||||
* Based on Sprinter and grbl.
|
* Based on Sprinter and grbl.
|
||||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Marlin 3D Printer Firmware
|
* Marlin 3D Printer Firmware
|
||||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
*
|
*
|
||||||
* Based on Sprinter and grbl.
|
* Based on Sprinter and grbl.
|
||||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Marlin 3D Printer Firmware
|
* Marlin 3D Printer Firmware
|
||||||
* Copyright (C) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
*
|
*
|
||||||
* Based on Sprinter and grbl.
|
* Based on Sprinter and grbl.
|
||||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1355,10 +1355,10 @@ extra_scripts = ${common.extra_scripts}
|
|||||||
# MKS Robin Pro V2
|
# MKS Robin Pro V2
|
||||||
#
|
#
|
||||||
[env:mks_robin_pro2]
|
[env:mks_robin_pro2]
|
||||||
platform = ${common_stm32.platform}
|
platform = ${common_stm32.platform}
|
||||||
extends = common_stm32
|
extends = common_stm32
|
||||||
build_flags = ${common_stm32.build_flags} -DHAL_HCD_MODULE_ENABLED -DUSBHOST -DARDUINO_BLACK_F407VE
|
build_flags = ${common_stm32.build_flags} -DHAL_HCD_MODULE_ENABLED -DUSBHOST -DARDUINO_BLACK_F407VE
|
||||||
board = genericSTM32F407VET6
|
board = genericSTM32F407VET6
|
||||||
board_build.core = stm32
|
board_build.core = stm32
|
||||||
board_build.variant = MARLIN_F407VE
|
board_build.variant = MARLIN_F407VE
|
||||||
board_build.ldscript = ldscript.ld
|
board_build.ldscript = ldscript.ld
|
||||||
|
Loading…
Reference in New Issue
Block a user