From fd9f067a481929b2df6ad14f28f7459f787bea53 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 6 Aug 2019 03:23:26 -0500 Subject: [PATCH] Robin FSMC / SPI pins --- Marlin/src/HAL/HAL_STM32F1/HAL_spi_STM32F1.cpp | 5 ++--- Marlin/src/pins/stm32/pins_MKS_ROBIN_MINI.h | 5 +++-- Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_spi_STM32F1.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL_spi_STM32F1.cpp index 7ed37e5a3..5acae7bf9 100644 --- a/Marlin/src/HAL/HAL_STM32F1/HAL_spi_STM32F1.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/HAL_spi_STM32F1.cpp @@ -64,10 +64,9 @@ * @details Only configures SS pin since libmaple creates and initialize the SPI object */ void spiBegin() { - #if !PIN_EXISTS(SS) - #error "SS_PIN not defined!" + #if PIN_EXISTS(SS) + OUT_WRITE(SS_PIN, HIGH); #endif - OUT_WRITE(SS_PIN, HIGH); } /** diff --git a/Marlin/src/pins/stm32/pins_MKS_ROBIN_MINI.h b/Marlin/src/pins/stm32/pins_MKS_ROBIN_MINI.h index ab5e0cc53..0b1649d01 100755 --- a/Marlin/src/pins/stm32/pins_MKS_ROBIN_MINI.h +++ b/Marlin/src/pins/stm32/pins_MKS_ROBIN_MINI.h @@ -116,6 +116,9 @@ * to let the bootloader init the screen. */ #if ENABLED(FSMC_GRAPHICAL_TFT) + #define FSMC_CS_PIN PD7 // NE4 + #define FSMC_RS_PIN PD11 // A0 + #define LCD_RESET_PIN PF6 #define NO_LCD_REINIT // Suppress LCD re-initialization @@ -123,8 +126,6 @@ #if ENABLED(TOUCH_BUTTONS) #define BTN_ENC PB3 // Not connected. TODO: Replace this hack to enable button code - #define FSMC_CS_PIN PD7 // NE4 - #define FSMC_RS_PIN PD11 // A0 #define TOUCH_CS_PIN PC2 #endif #endif diff --git a/Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h b/Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h index 406e12abc..e2ca88e71 100755 --- a/Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h +++ b/Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h @@ -120,6 +120,9 @@ * to let the bootloader init the screen. */ #if ENABLED(FSMC_GRAPHICAL_TFT) + #define FSMC_CS_PIN PD7 // NE4 + #define FSMC_RS_PIN PD11 // A0 + #define LCD_RESET_PIN PF6 #define NO_LCD_REINIT // Suppress LCD re-initialization @@ -127,8 +130,6 @@ #if ENABLED(TOUCH_BUTTONS) #define BTN_ENC PC13 // Not connected. TODO: Replace this hack to enable button code - #define FSMC_CS_PIN PD7 // NE4 - #define FSMC_RS_PIN PD11 // A0 #define TOUCH_CS_PIN PA7 #endif #endif