Pārlūkot izejas kodu

Robin FSMC / SPI pins

Scott Lahteine 5 gadus atpakaļ
vecāks
revīzija
fd9f067a48

+ 2
- 3
Marlin/src/HAL/HAL_STM32F1/HAL_spi_STM32F1.cpp Parādīt failu

@@ -64,10 +64,9 @@
64 64
  * @details Only configures SS pin since libmaple creates and initialize the SPI object
65 65
  */
66 66
 void spiBegin() {
67
-  #if !PIN_EXISTS(SS)
68
-    #error "SS_PIN not defined!"
67
+  #if PIN_EXISTS(SS)
68
+    OUT_WRITE(SS_PIN, HIGH);
69 69
   #endif
70
-  OUT_WRITE(SS_PIN, HIGH);
71 70
 }
72 71
 
73 72
 /**

+ 3
- 2
Marlin/src/pins/stm32/pins_MKS_ROBIN_MINI.h Parādīt failu

@@ -116,6 +116,9 @@
116 116
  * to let the bootloader init the screen.
117 117
  */
118 118
 #if ENABLED(FSMC_GRAPHICAL_TFT)
119
+  #define FSMC_CS_PIN      PD7    // NE4
120
+  #define FSMC_RS_PIN      PD11   // A0
121
+
119 122
   #define LCD_RESET_PIN    PF6
120 123
   #define NO_LCD_REINIT           // Suppress LCD re-initialization
121 124
 
@@ -123,8 +126,6 @@
123 126
 
124 127
   #if ENABLED(TOUCH_BUTTONS)
125 128
     #define BTN_ENC        PB3    // Not connected. TODO: Replace this hack to enable button code
126
-    #define FSMC_CS_PIN    PD7    // NE4
127
-    #define FSMC_RS_PIN    PD11   // A0
128 129
     #define TOUCH_CS_PIN   PC2
129 130
   #endif
130 131
 #endif

+ 3
- 2
Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h Parādīt failu

@@ -120,6 +120,9 @@
120 120
  * to let the bootloader init the screen.
121 121
  */
122 122
 #if ENABLED(FSMC_GRAPHICAL_TFT)
123
+  #define FSMC_CS_PIN        PD7    // NE4
124
+  #define FSMC_RS_PIN        PD11   // A0
125
+
123 126
   #define LCD_RESET_PIN      PF6
124 127
   #define NO_LCD_REINIT             // Suppress LCD re-initialization
125 128
 
@@ -127,8 +130,6 @@
127 130
 
128 131
   #if ENABLED(TOUCH_BUTTONS)
129 132
     #define BTN_ENC          PC13   // Not connected. TODO: Replace this hack to enable button code
130
-    #define FSMC_CS_PIN      PD7    // NE4
131
-    #define FSMC_RS_PIN      PD11   // A0
132 133
     #define TOUCH_CS_PIN     PA7
133 134
   #endif
134 135
 #endif

Notiek ielāde…
Atcelt
Saglabāt