Browse Source

STM32duino - Use SDIO for onboard SD (#16756)

Bob Kuhn 4 years ago
parent
commit
0268c1d02c
No account linked to committer's email address

+ 274
- 0
Marlin/src/HAL/HAL_STM32/Sd2Card_sdio_stm32duino.cpp View File

@@ -0,0 +1,274 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+#include "../../inc/MarlinConfig.h"
24
+
25
+#if ENABLED(SDIO_SUPPORT) && !defined(STM32GENERIC)
26
+
27
+#include <stdint.h>
28
+#include <stdbool.h>
29
+
30
+//#include "SdMscDriver.h"
31
+
32
+//#include "usbd_msc_bot.h"
33
+//#include "usbd_msc_scsi.h"
34
+//#include "usbd_msc_composite.h"
35
+//#include "usbd_msc_cdc_composite.h"
36
+
37
+//#include "usbd_msc_data.h"
38
+
39
+#if defined(STM32F103xE) || defined(STM32F103xG)
40
+  #include <stm32f1xx_hal_rcc_ex.h>
41
+  #include <stm32f1xx_hal_sd.h>
42
+#elif defined(STM32F4xx)
43
+  #include <stm32f4xx_hal_rcc.h>
44
+  #include <stm32f4xx_hal_dma.h>
45
+  #include <stm32f4xx_hal_gpio.h>
46
+  #include <stm32f4xx_hal_sd.h>
47
+#elif defined(STM32F7xx)
48
+  #include <stm32f7xx_hal_rcc.h>
49
+  #include <stm32f7xx_hal_dma.h>
50
+  #include <stm32f7xx_hal_gpio.h>
51
+  #include <stm32f7xx_hal_sd.h>
52
+#else
53
+  #error "ERROR - Only STM32F103xE, STM32F103xG, STM32F4xx or STM32F7xx CPUs supported"
54
+#endif
55
+
56
+SD_HandleTypeDef hsd;  // create SDIO structure
57
+
58
+#define TRANSFER_CLOCK_DIV ((uint8_t)SDIO_INIT_CLK_DIV/40)
59
+
60
+#ifndef USBD_OK
61
+  #define USBD_OK 0
62
+#endif
63
+
64
+void go_to_transfer_speed() {
65
+
66
+  SD_InitTypeDef Init;
67
+
68
+  /* Default SDIO peripheral configuration for SD card initialization */
69
+  Init.ClockEdge           = hsd.Init.ClockEdge;
70
+  Init.ClockBypass         = hsd.Init.ClockBypass;
71
+  Init.ClockPowerSave      = hsd.Init.ClockPowerSave;
72
+  Init.BusWide             = hsd.Init.BusWide;
73
+  Init.HardwareFlowControl = hsd.Init.HardwareFlowControl;
74
+  Init.ClockDiv            = TRANSFER_CLOCK_DIV;
75
+
76
+  /* Initialize SDIO peripheral interface with default configuration */
77
+  SDIO_Init(hsd.Instance, Init);
78
+}
79
+
80
+void SD_LowLevel_Init(void) {
81
+
82
+  uint32_t tempreg;
83
+
84
+  GPIO_InitTypeDef  GPIO_InitStruct;
85
+
86
+  __HAL_RCC_GPIOC_CLK_ENABLE(); //enable GPIO clocks
87
+  __HAL_RCC_GPIOD_CLK_ENABLE(); //enable GPIO clocks
88
+
89
+  GPIO_InitStruct.Pin = GPIO_PIN_8 | GPIO_PIN_12;  // D0 & SCK
90
+  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
91
+  GPIO_InitStruct.Pull = 1;  //GPIO_NOPULL;
92
+  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
93
+  GPIO_InitStruct.Alternate = GPIO_AF12_SDIO;
94
+  HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
95
+
96
+  #if defined(SDIO_D1_PIN) && defined(SDIO_D2_PIN) && defined(SDIO_D3_PIN)  // define D1-D3 only if have a four bit wide SDIO bus
97
+    GPIO_InitStruct.Pin = GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11;  // D1-D3
98
+    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
99
+    GPIO_InitStruct.Pull = 1;  //GPIO_NOPULL;
100
+    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
101
+    GPIO_InitStruct.Alternate = GPIO_AF12_SDIO;
102
+    HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
103
+  #endif
104
+
105
+  // Configure PD.02 CMD line
106
+  GPIO_InitStruct.Pin = GPIO_PIN_2;
107
+  HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
108
+
109
+  RCC->APB2RSTR  &= ~RCC_APB2RSTR_SDIORST_Msk;  // take SDIO out of reset
110
+  RCC->APB2ENR |= RCC_APB2RSTR_SDIORST_Msk;  // enable SDIO clock
111
+
112
+  // Enable the DMA2 Clock
113
+
114
+  //Initialize the SDIO (with initial <400Khz Clock)
115
+  tempreg = 0;  //Reset value
116
+  tempreg |= SDIO_CLKCR_CLKEN;  //Clock is enabled
117
+  tempreg |= (uint32_t)0x76;  //Clock Divider. Clock = 48000/(118+2) = 400Khz
118
+  //Keep the rest at 0 => HW_Flow Disabled, Rising Clock Edge, Disable CLK ByPass, Bus Width = 0, Power save Disable
119
+  SDIO->CLKCR = tempreg;
120
+
121
+  //Power up the SDIO
122
+  SDIO->POWER = 0x03;
123
+}
124
+
125
+
126
+void HAL_SD_MspInit(SD_HandleTypeDef *hsd) { // application specific init
127
+  UNUSED(hsd);   /* Prevent unused argument(s) compilation warning */
128
+  __HAL_RCC_SDIO_CLK_ENABLE();  // turn on SDIO clock
129
+}
130
+
131
+constexpr uint8_t SD_RETRY_COUNT = (1
132
+  #if ENABLED(SD_CHECK_AND_RETRY)
133
+    + 2
134
+  #endif
135
+);
136
+
137
+bool SDIO_Init() {
138
+  //init SDIO and get SD card info
139
+
140
+  uint8_t retryCnt = SD_RETRY_COUNT;
141
+
142
+  bool status;
143
+  hsd.Instance = SDIO;
144
+  hsd.State = (HAL_SD_StateTypeDef) 0;  // HAL_SD_STATE_RESET
145
+  SD_LowLevel_Init();
146
+
147
+  uint8_t retry_Cnt = retryCnt;
148
+  for (;;) {
149
+    status = (bool) HAL_SD_Init(&hsd);
150
+    if (!status) break;
151
+    if (!--retry_Cnt) return false;   // return failing status if retries are exhausted
152
+  }
153
+
154
+  go_to_transfer_speed();
155
+
156
+  #if defined(SDIO_D1_PIN) && defined(SDIO_D2_PIN) && defined(SDIO_D3_PIN) // go to 4 bit wide mode if pins are defined
157
+    retry_Cnt = retryCnt;
158
+    for (;;) {
159
+      if (!HAL_SD_ConfigWideBusOperation(&hsd, SDIO_BUS_WIDE_4B)) break;  // some cards are only 1 bit wide so a pass here is not required
160
+      if (!--retry_Cnt) break;
161
+    }
162
+    if (!retry_Cnt) {  // wide bus failed, go back to one bit wide mode
163
+      hsd.State = (HAL_SD_StateTypeDef) 0;  // HAL_SD_STATE_RESET
164
+      SD_LowLevel_Init();
165
+      retry_Cnt = retryCnt;
166
+      for (;;) {
167
+        status = (bool) HAL_SD_Init(&hsd);
168
+        if (!status) break;
169
+        if (!--retry_Cnt) return false;   // return failing status if retries are exhausted
170
+      }
171
+    }
172
+  #endif
173
+
174
+  return true;
175
+}
176
+
177
+void init_SDIO_pins(void) {
178
+  GPIO_InitTypeDef GPIO_InitStruct = {0};
179
+
180
+  /**SDIO GPIO Configuration
181
+  PC8     ------> SDIO_D0
182
+  PC12    ------> SDIO_CK
183
+  PD2     ------> SDIO_CMD
184
+  */
185
+  GPIO_InitStruct.Pin = GPIO_PIN_8;
186
+  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
187
+  GPIO_InitStruct.Pull = GPIO_NOPULL;
188
+  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
189
+  GPIO_InitStruct.Alternate = GPIO_AF12_SDIO;
190
+  HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
191
+
192
+  GPIO_InitStruct.Pin = GPIO_PIN_12;
193
+  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
194
+  GPIO_InitStruct.Pull = GPIO_NOPULL;
195
+  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
196
+  GPIO_InitStruct.Alternate = GPIO_AF12_SDIO;
197
+  HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
198
+
199
+  GPIO_InitStruct.Pin = GPIO_PIN_2;
200
+  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
201
+  GPIO_InitStruct.Pull = GPIO_NOPULL;
202
+  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
203
+  GPIO_InitStruct.Alternate = GPIO_AF12_SDIO;
204
+  HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
205
+}
206
+
207
+//bool SDIO_init() { return (bool) (SD_SDIO_Init() ? 1 : 0);}
208
+//bool SDIO_Init_C() { return (bool) (SD_SDIO_Init() ? 1 : 0);}
209
+
210
+bool SDIO_ReadBlock(uint32_t block, uint8_t *dst) {
211
+  bool status;
212
+
213
+  hsd.Instance = SDIO;
214
+
215
+  uint8_t retryCnt = SD_RETRY_COUNT;
216
+
217
+  for (;;) {
218
+    bool status = (bool) HAL_SD_ReadBlocks(&hsd, (uint8_t*)dst, block, 1, 1000);  // read one 512 byte block with 500mS timeout
219
+    status |= (bool) HAL_SD_GetCardState(&hsd);     // make sure all is OK
220
+    if (!status)     return false;                  // return passing status
221
+    if (!--retryCnt) return true;                   // return failing status if retries are exhausted
222
+  }
223
+
224
+  /*
225
+  return (bool) ((status_read | status_card) ? 1 : 0);
226
+
227
+  if (SDIO_GetCardState() != SDIO_CARD_TRANSFER) return false;
228
+  if (blockAddress >= SdCard.LogBlockNbr) return false;
229
+  if ((0x03 & (uint32_t)data)) return false; // misaligned data
230
+
231
+  if (SdCard.CardType != CARD_SDHC_SDXC) { blockAddress *= 512U; }
232
+
233
+  if (!SDIO_CmdReadSingleBlock(blockAddress)) {
234
+    SDIO_CLEAR_FLAG(SDIO_ICR_CMD_FLAGS);
235
+    dma_disable(SDIO_DMA_DEV, SDIO_DMA_CHANNEL);
236
+    return false;
237
+  }
238
+
239
+  while (!SDIO_GET_FLAG(SDIO_STA_DATAEND | SDIO_STA_TRX_ERROR_FLAGS)) {}
240
+
241
+  dma_disable(SDIO_DMA_DEV, SDIO_DMA_CHANNEL);
242
+
243
+  if (SDIO->STA & SDIO_STA_RXDAVL) {
244
+    while (SDIO->STA & SDIO_STA_RXDAVL) (void)SDIO->FIFO;
245
+    SDIO_CLEAR_FLAG(SDIO_ICR_CMD_FLAGS | SDIO_ICR_DATA_FLAGS);
246
+    return false;
247
+  }
248
+
249
+  if (SDIO_GET_FLAG(SDIO_STA_TRX_ERROR_FLAGS)) {
250
+    SDIO_CLEAR_FLAG(SDIO_ICR_CMD_FLAGS | SDIO_ICR_DATA_FLAGS);
251
+    return false;
252
+  }
253
+  SDIO_CLEAR_FLAG(SDIO_ICR_CMD_FLAGS | SDIO_ICR_DATA_FLAGS);
254
+  */
255
+
256
+  return true;
257
+}
258
+
259
+bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) {
260
+  bool status;
261
+
262
+  hsd.Instance = SDIO;
263
+
264
+  uint8_t retryCnt = SD_RETRY_COUNT;
265
+
266
+  for (;;) {
267
+    status = (bool) HAL_SD_WriteBlocks(&hsd, (uint8_t*)src, block, 1, 500);  // write one 512 byte block with 500mS timeout
268
+    status |= (bool) HAL_SD_GetCardState(&hsd);     // make sure all is OK
269
+    if (!status) return (bool) status;              // return passing status
270
+    if (!--retryCnt) return (bool) status;          // return failing status if retries are exhausted
271
+  }
272
+}
273
+
274
+#endif // SDIO_SUPPORT

+ 1
- 1
Marlin/src/HAL/HAL_STM32F1/timers.h View File

@@ -70,7 +70,7 @@ typedef uint16_t hal_timer_t;
70 70
 //#define TEMP_TIMER_NUM 4  // 2->4, Timer 2 for Stepper Current PWM
71 71
 #define PULSE_TIMER_NUM STEP_TIMER_NUM
72 72
 
73
-#if MB(BTT_SKR_MINI_E3_V1_0, BIGTREE_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE)
73
+#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE)
74 74
   // SKR Mini E3 boards use PA8 as FAN_PIN, so TIMER 1 is used for Fan PWM.
75 75
   #ifdef STM32_HIGH_DENSITY
76 76
     #define SERVO0_TIMER_NUM 8  // tone.cpp uses Timer 4

+ 15
- 14
Marlin/src/core/boards.h View File

@@ -208,9 +208,9 @@
208 208
 #define BOARD_BIQU_B300_V1_0          2009  // BIQU B300_V1.0 (Power outputs: Hotend0, Fan, Bed, SPI Driver)
209 209
 #define BOARD_MKS_SGEN_L              2010  // MKS-SGen-L (Power outputs: Hotend0, Hotend1, Bed, Fan)
210 210
 #define BOARD_GMARSH_X6_REV1          2011  // GMARSH X6 board, revision 1 prototype
211
-#define BOARD_BIGTREE_SKR_V1_1        2012  // BigTreeTech SKR v1.1 (Power outputs: Hotend0, Hotend1, Fan, Bed)
212
-#define BOARD_BIGTREE_SKR_V1_3        2013  // BigTreeTech SKR v1.3 (Power outputs: Hotend0, Hotend1, Fan, Bed)
213
-#define BOARD_BIGTREE_SKR_V1_4        2014  // BigTreeTech SKR v1.4 (Power outputs: Hotend0, Hotend1, Fan, Bed)
211
+#define BOARD_BTT_SKR_V1_1            2012  // BigTreeTech SKR v1.1 (Power outputs: Hotend0, Hotend1, Fan, Bed)
212
+#define BOARD_BTT_SKR_V1_3            2013  // BigTreeTech SKR v1.3 (Power outputs: Hotend0, Hotend1, Fan, Bed)
213
+#define BOARD_BTT_SKR_V1_4            2014  // BigTreeTech SKR v1.4 (Power outputs: Hotend0, Hotend1, Fan, Bed)
214 214
 
215 215
 //
216 216
 // LPC1769 ARM Cortex M3
@@ -224,7 +224,7 @@
224 224
 #define BOARD_COHESION3D_MINI         2505  // Cohesion3D Mini
225 225
 #define BOARD_SMOOTHIEBOARD           2506  // Smoothieboard
226 226
 #define BOARD_TH3D_EZBOARD            2507  // TH3D EZBoard v1.0
227
-#define BOARD_BIGTREE_SKR_V1_4_TURBO  2508  // BigTreeTech SKR v1.4 TURBO (Power outputs: Hotend0, Hotend1, Fan, Bed)
227
+#define BOARD_BTT_SKR_V1_4_TURBO      2508  // BigTreeTech SKR v1.4 TURBO (Power outputs: Hotend0, Hotend1, Fan, Bed)
228 228
 
229 229
 //
230 230
 // SAM3X8E ARM Cortex M3
@@ -281,10 +281,10 @@
281 281
 #define BOARD_MKS_ROBIN_LITE          4009  // MKS Robin Lite/Lite2 (STM32F103RCT6)
282 282
 #define BOARD_MKS_ROBIN_LITE3         4010  // MKS Robin Lite3 (STM32F103RCT6)
283 283
 #define BOARD_MKS_ROBIN_PRO           4011  // MKS Robin Pro (STM32F103ZET6)
284
-#define BOARD_BIGTREE_SKR_MINI_V1_1   4012  // BigTreeTech SKR Mini v1.1 (STM32F103RC)
284
+#define BOARD_BTT_SKR_MINI_V1_1       4012  // BigTreeTech SKR Mini v1.1 (STM32F103RC)
285 285
 #define BOARD_BTT_SKR_MINI_E3_V1_0    4013  // BigTreeTech SKR Mini E3 (STM32F103RC)
286 286
 #define BOARD_BTT_SKR_MINI_E3_V1_2    4014  // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
287
-#define BOARD_BIGTREE_SKR_E3_DIP      4015  // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
287
+#define BOARD_BTT_SKR_E3_DIP          4015  // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
288 288
 #define BOARD_JGAURORA_A5S_A1         4016  // JGAurora A5S A1 (STM32F103ZET6)
289 289
 #define BOARD_FYSETC_AIO_II           4017  // FYSETC AIO_II
290 290
 #define BOARD_FYSETC_CHEETAH          4018  // FYSETC Cheetah
@@ -313,14 +313,15 @@
313 313
 #define BOARD_BLACK_STM32F407VE       4204  // BLACK_STM32F407VE
314 314
 #define BOARD_BLACK_STM32F407ZE       4205  // BLACK_STM32F407ZE
315 315
 #define BOARD_STEVAL_3DP001V1         4206  // STEVAL-3DP001V1 3D PRINTER BOARD
316
-#define BOARD_BIGTREE_SKR_PRO_V1_1    4207  // BigTreeTech SKR Pro v1.1 (STM32F407ZG)
317
-#define BOARD_BIGTREE_BTT002_V1_0     4208  // BigTreeTech BTT002 v1.0 (STM32F407VE)
318
-#define BOARD_LERDGE_K                4209  // Lerdge K (STM32F407ZG)
319
-#define BOARD_LERDGE_X                4210  // Lerdge X (STM32F407VE)
320
-#define BOARD_VAKE403D                4211  // VAkE 403D (STM32F446VET6)
321
-#define BOARD_FYSETC_S6               4212  // FYSETC S6 board
322
-#define BOARD_FLYF407ZG               4213  // FLYF407ZG board (STM32F407ZG)
323
-#define BOARD_MKS_ROBIN2              4214  // MKS_ROBIN2 (STM32F407ZE)
316
+#define BOARD_BTT_SKR_PRO_V1_1        4207  // BigTreeTech SKR Pro v1.1 (STM32F407ZG)
317
+#define BOARD_BTT_BTT002_V1_0         4208  // BigTreeTech BTT002 v1.0 (STM32F407VE)
318
+#define BOARD_BTT_GTR_V1_0            4209  // BigTreeTech GTR v1.0 (STM32F407IGT)
319
+#define BOARD_LERDGE_K                4210  // Lerdge K (STM32F407ZG)
320
+#define BOARD_LERDGE_X                4211  // Lerdge X (STM32F407VE)
321
+#define BOARD_VAKE403D                4212  // VAkE 403D (STM32F446VET6)
322
+#define BOARD_FYSETC_S6               4213  // FYSETC S6 board
323
+#define BOARD_FLYF407ZG               4214  // FLYF407ZG board (STM32F407ZG)
324
+#define BOARD_MKS_ROBIN2              4215  // MKS_ROBIN2 (STM32F407ZE)
324 325
 
325 326
 //
326 327
 // ARM Cortex M7

+ 6
- 4
Marlin/src/core/macros.h View File

@@ -196,12 +196,14 @@
196 196
 #define EITHER(V1,V2)       ANY(V1,V2)
197 197
 
198 198
 // Macros to support pins/buttons exist testing
199
-#define _PINEX_1(PN)        (defined(PN##_PIN) && PN##_PIN >= 0)
200
-#define PIN_EXISTS(V...)    DO(PINEX,&&,V)
199
+#define PIN_EXISTS(PN)      (defined(PN##_PIN) && PN##_PIN >= 0)
200
+#define _PINEX_1            PIN_EXISTS
201
+#define PINS_EXIST(V...)    DO(PINEX,&&,V)
201 202
 #define ANY_PIN(V...)       DO(PINEX,||,V)
202 203
 
203
-#define _BTNEX_1(BN)        (defined(BTN_##BN) && BTN_##BN >= 0)
204
-#define BUTTON_EXISTS(V...) DO(BTNEX,&&,V)
204
+#define BUTTON_EXISTS(BN)   (defined(BTN_##BN) && BTN_##BN >= 0)
205
+#define _BTNEX_1            BUTTON_EXISTS
206
+#define BUTTONS_EXIST(V...) DO(BTNEX,&&,V)
205 207
 #define ANY_BUTTON(V...)    DO(BTNEX,||,V)
206 208
 
207 209
 #define WITHIN(N,L,H)       ((N) >= (L) && (N) <= (H))

+ 14
- 14
Marlin/src/inc/SanityCheck.h View File

@@ -927,7 +927,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
927 927
   #elif TOOLCHANGE_ZRAISE < 0
928 928
     #error "TOOLCHANGE_ZRAISE must be 0 or higher."
929 929
   #elif ENABLED(PARKING_EXTRUDER)
930
-    #if !PIN_EXISTS(SOL0, SOL1)
930
+    #if !PINS_EXIST(SOL0, SOL1)
931 931
       #error "PARKING_EXTRUDER requires SOL0_PIN and SOL1_PIN."
932 932
     #elif !defined(PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE) || !WITHIN(PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE, LOW, HIGH)
933 933
       #error "PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE must be defined as HIGH or LOW."
@@ -1515,9 +1515,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
1515 1515
   #error "HEATER_0_PIN not defined for this board."
1516 1516
 #elif !ANY_PIN(TEMP_0, MAX6675_SS)
1517 1517
   #error "TEMP_0_PIN not defined for this board."
1518
-#elif ((defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && !PIN_EXISTS(E0_STEP, E0_DIR))
1518
+#elif ((defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && !PINS_EXIST(E0_STEP, E0_DIR))
1519 1519
   #error "E0_STEP_PIN or E0_DIR_PIN not defined for this board."
1520
-#elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PIN_EXISTS(E0_STEP, E0_DIR) || !HAS_E0_ENABLE))
1520
+#elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PINS_EXIST(E0_STEP, E0_DIR) || !HAS_E0_ENABLE))
1521 1521
   #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
1522 1522
 #elif EXTRUDERS && TEMP_SENSOR_0 == 0
1523 1523
   #error "TEMP_SENSOR_0 is required with any extruders."
@@ -1709,35 +1709,35 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
1709 1709
  */
1710 1710
 #if DISABLED(MK2_MULTIPLEXER) // MK2_MULTIPLEXER uses E0 stepper only
1711 1711
   #if E_STEPPERS
1712
-    #if !(PIN_EXISTS(E0_STEP, E0_DIR) && HAS_E0_ENABLE)
1712
+    #if !(PINS_EXIST(E0_STEP, E0_DIR) && HAS_E0_ENABLE)
1713 1713
       #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
1714 1714
     #endif
1715 1715
     #if E_STEPPERS > 1
1716
-      #if !(PIN_EXISTS(E1_STEP, E1_DIR) && HAS_E1_ENABLE)
1716
+      #if !(PINS_EXIST(E1_STEP, E1_DIR) && HAS_E1_ENABLE)
1717 1717
         #error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board."
1718 1718
       #endif
1719 1719
       #if E_STEPPERS > 2
1720
-        #if !(PIN_EXISTS(E2_STEP, E2_DIR) && HAS_E2_ENABLE)
1720
+        #if !(PINS_EXIST(E2_STEP, E2_DIR) && HAS_E2_ENABLE)
1721 1721
           #error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board."
1722 1722
         #endif
1723 1723
         #if E_STEPPERS > 3
1724
-          #if !(PIN_EXISTS(E3_STEP, E3_DIR) && HAS_E3_ENABLE)
1724
+          #if !(PINS_EXIST(E3_STEP, E3_DIR) && HAS_E3_ENABLE)
1725 1725
             #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
1726 1726
           #endif
1727 1727
           #if E_STEPPERS > 4
1728
-            #if !(PIN_EXISTS(E4_STEP, E4_DIR) && HAS_E4_ENABLE)
1728
+            #if !(PINS_EXIST(E4_STEP, E4_DIR) && HAS_E4_ENABLE)
1729 1729
               #error "E4_STEP_PIN, E4_DIR_PIN, or E4_ENABLE_PIN not defined for this board."
1730 1730
             #endif
1731 1731
             #if E_STEPPERS > 5
1732
-              #if !(PIN_EXISTS(E5_STEP, E5_DIR) && HAS_E5_ENABLE)
1732
+              #if !(PINS_EXIST(E5_STEP, E5_DIR) && HAS_E5_ENABLE)
1733 1733
                 #error "E5_STEP_PIN, E5_DIR_PIN, or E5_ENABLE_PIN not defined for this board."
1734 1734
               #endif
1735 1735
               #if E_STEPPERS > 6
1736
-                #if !(PIN_EXISTS(E6_STEP, E6_DIR) && HAS_E6_ENABLE)
1736
+                #if !(PINS_EXIST(E6_STEP, E6_DIR) && HAS_E6_ENABLE)
1737 1737
                   #error "E6_STEP_PIN, E6_DIR_PIN, or E6_ENABLE_PIN not defined for this board."
1738 1738
                 #endif
1739 1739
                 #if E_STEPPERS > 7
1740
-                  #if !(PIN_EXISTS(E7_STEP, E7_DIR) && HAS_E7_ENABLE)
1740
+                  #if !(PINS_EXIST(E7_STEP, E7_DIR) && HAS_E7_ENABLE)
1741 1741
                     #error "E7_STEP_PIN, E7_DIR_PIN, or E7_ENABLE_PIN not defined for this board."
1742 1742
                   #endif
1743 1743
                 #endif // E_STEPPERS > 7
@@ -1926,7 +1926,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
1926 1926
 /**
1927 1927
  * RGB_LED Requirements
1928 1928
  */
1929
-#define _RGB_TEST (PIN_EXISTS(RGB_LED_R, RGB_LED_G, RGB_LED_B))
1929
+#define _RGB_TEST (PINS_EXIST(RGB_LED_R, RGB_LED_G, RGB_LED_B))
1930 1930
 #if ENABLED(PRINTER_EVENT_LEDS) && !HAS_COLOR_LEDS
1931 1931
   #error "PRINTER_EVENT_LEDS requires BLINKM, PCA9533, PCA9632, RGB_LED, RGBW_LED or NEOPIXEL_LED."
1932 1932
 #elif ENABLED(RGB_LED)
@@ -2080,7 +2080,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
2080 2080
 /**
2081 2081
  * Check existing RX/TX pins against enable TMC UART drivers.
2082 2082
  */
2083
-#define INVALID_TMC_UART(ST) (AXIS_HAS_UART(ST) && !(defined(ST##_HARDWARE_SERIAL) || (PIN_EXISTS(ST##_SERIAL_RX, ST##_SERIAL_TX))))
2083
+#define INVALID_TMC_UART(ST) (AXIS_HAS_UART(ST) && !(defined(ST##_HARDWARE_SERIAL) || (PINS_EXIST(ST##_SERIAL_RX, ST##_SERIAL_TX))))
2084 2084
 #if INVALID_TMC_UART(X)
2085 2085
   #error "TMC2208 or TMC2209 on X requires X_HARDWARE_SERIAL or X_SERIAL_(RX|TX)_PIN."
2086 2086
 #elif INVALID_TMC_UART(X2)
@@ -2442,7 +2442,7 @@ static_assert(   _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
2442 2442
   #error "PRINTCOUNTER requires EEPROM_SETTINGS. Please update your Configuration."
2443 2443
 #endif
2444 2444
 
2445
-#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && !PIN_EXISTS(USB_CS, USB_INTR)
2445
+#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && !PINS_EXIST(USB_CS, USB_INTR)
2446 2446
   #error "USB_CS_PIN and USB_INTR_PIN are required for USB_FLASH_DRIVE_SUPPORT."
2447 2447
 #endif
2448 2448
 

+ 1
- 1
Marlin/src/lcd/ultralcd.h View File

@@ -28,7 +28,7 @@
28 28
 #endif
29 29
 
30 30
 #define HAS_ENCODER_ACTION (HAS_LCD_MENU || ENABLED(ULTIPANEL_FEEDMULTIPLY))
31
-#define HAS_ENCODER_WHEEL  ((!HAS_ADC_BUTTONS && ENABLED(NEWPANEL)) || BUTTON_EXISTS(EN1, EN2))
31
+#define HAS_ENCODER_WHEEL  ((!HAS_ADC_BUTTONS && ENABLED(NEWPANEL)) || BUTTONS_EXIST(EN1, EN2))
32 32
 #define HAS_DIGITAL_BUTTONS (HAS_ENCODER_WHEEL || ANY_BUTTON(ENC, BACK, UP, DWN, LFT, RT))
33 33
 #define HAS_SHIFT_ENCODER   (!HAS_ADC_BUTTONS && (ENABLED(REPRAPWORLD_KEYPAD) || (HAS_SPI_LCD && DISABLED(NEWPANEL))))
34 34
 

+ 1
- 1
Marlin/src/module/temperature.cpp View File

@@ -59,7 +59,7 @@
59 59
   );
60 60
 #endif
61 61
 
62
-#define MAX6675_SEPARATE_SPI (EITHER(HEATER_0_USES_MAX6675, HEATER_1_USES_MAX6675) && PIN_EXISTS(MAX6675_SCK, MAX6675_DO))
62
+#define MAX6675_SEPARATE_SPI (EITHER(HEATER_0_USES_MAX6675, HEATER_1_USES_MAX6675) && PINS_EXIST(MAX6675_SCK, MAX6675_DO))
63 63
 
64 64
 #if MAX6675_SEPARATE_SPI
65 65
   #include "../libs/private_spi.h"

+ 59
- 25
Marlin/src/pins/pins.h View File

@@ -361,11 +361,11 @@
361 361
   #include "lpc1768/pins_BIQU_B300_V1.0.h"      // LPC1768                                env:LPC1768
362 362
 #elif MB(GMARSH_X6_REV1)
363 363
   #include "lpc1768/pins_GMARSH_X6_REV1.h"      // LPC1768                                env:LPC1768
364
-#elif MB(BIGTREE_SKR_V1_1)
364
+#elif MB(BTT_SKR_V1_1)
365 365
   #include "lpc1768/pins_BTT_SKR_V1_1.h"        // LPC1768                                env:LPC1768
366
-#elif MB(BIGTREE_SKR_V1_3)
366
+#elif MB(BTT_SKR_V1_3)
367 367
   #include "lpc1768/pins_BTT_SKR_V1_3.h"        // LPC1768                                env:LPC1768
368
-#elif MB(BIGTREE_SKR_V1_4)
368
+#elif MB(BTT_SKR_V1_4)
369 369
   #include "lpc1768/pins_BTT_SKR_V1_4.h"        // LPC1768                                env:LPC1768
370 370
 
371 371
 //
@@ -388,7 +388,7 @@
388 388
   #include "lpc1769/pins_SMOOTHIEBOARD.h"       // LPC1769                                env:LPC1769
389 389
 #elif MB(TH3D_EZBOARD)
390 390
   #include "lpc1769/pins_TH3D_EZBOARD.h"        // LPC1769                                env:LPC1769
391
-#elif MB(BIGTREE_SKR_V1_4_TURBO)
391
+#elif MB(BTT_SKR_V1_4_TURBO)
392 392
   #include "lpc1769/pins_BTT_SKR_V1_4_TURBO.h"  // LPC1769                                env:LPC1769
393 393
 
394 394
 //
@@ -484,13 +484,13 @@
484 484
   #include "stm32/pins_MKS_ROBIN_NANO.h"        // STM32F1                                env:mks_robin_nano
485 485
 #elif MB(MKS_ROBIN_LITE)
486 486
   #include "stm32/pins_MKS_ROBIN_LITE.h"        // STM32F1                                env:mks_robin_lite
487
-#elif MB(BIGTREE_SKR_MINI_V1_1)
487
+#elif MB(BTT_SKR_MINI_V1_1)
488 488
   #include "stm32/pins_BTT_SKR_MINI_V1_1.h"     // STM32F1                                env:STM32F103RC_bigtree env:STM32F103RC_bigtree_512K env:STM32F103RC_bigtree_USB env:STM32F103RC_bigtree_512K_USB
489 489
 #elif MB(BTT_SKR_MINI_E3_V1_0)
490 490
   #include "stm32/pins_BTT_SKR_MINI_E3_V1_0.h"  // STM32F1                                env:STM32F103RC_bigtree env:STM32F103RC_bigtree_512K env:STM32F103RC_bigtree_USB env:STM32F103RC_bigtree_512K_USB
491 491
 #elif MB(BTT_SKR_MINI_E3_V1_2)
492 492
   #include "stm32/pins_BTT_SKR_MINI_E3_V1_2.h"  // STM32F1                                env:STM32F103RC_bigtree env:STM32F103RC_bigtree_512K env:STM32F103RC_bigtree_USB env:STM32F103RC_bigtree_512K_USB
493
-#elif MB(BIGTREE_SKR_E3_DIP)
493
+#elif MB(BTT_SKR_E3_DIP)
494 494
   #include "stm32/pins_BTT_SKR_E3_DIP.h"        // STM32F1                                env:STM32F103RE_bigtree env:STM32F103RE_bigtree_USB env:STM32F103RC_bigtree env:STM32F103RC_bigtree_512K env:STM32F103RC_bigtree_USB env:STM32F103RC_bigtree_512K_USB
495 495
 #elif MB(JGAURORA_A5S_A1)
496 496
   #include "stm32/pins_JGAURORA_A5S_A1.h"       // STM32F1                                env:jgaurora_a5s_a1
@@ -527,16 +527,16 @@
527 527
 #elif MB(ARMED)
528 528
   #include "stm32/pins_ARMED.h"                 // STM32F4                                env:ARMED
529 529
 #elif MB(RUMBA32)
530
-  #include "stm32/pins_RUMBA32.h"               // STM32F4                                env:RUMBA32
530
+  #include "stm32/pins_RUMBA32.h"               // STM32F4                                env:rumba32_f446ve env:mks_rumba32
531 531
 #elif MB(BLACK_STM32F407VE)
532 532
   #include "stm32/pins_BLACK_STM32F407VE.h"     // STM32F4                                env:STM32F407VE_black
533 533
 #elif MB(STEVAL_3DP001V1)
534 534
   #include "stm32/pins_STEVAL_3DP001V1.h"       // STM32F4                                env:STM32F401VE_STEVAL
535
-#elif MB(BIGTREE_SKR_PRO_V1_1)
535
+#elif MB(BTT_SKR_PRO_V1_1)
536 536
   #include "stm32/pins_BTT_SKR_PRO_V1_1.h"      // STM32F4                                env:BIGTREE_SKR_PRO
537
-#elif MB(BIGTREE_GTR_V1_0)
538
-  #include "stm32/pins_BTT_GTR_V1_0.h"          // STM32F4                                env:BIGTREE_GTR
539
-#elif MB(BIGTREE_BTT002_V1_0)
537
+#elif MB(BTT_GTR_V1_0)
538
+  #include "stm32/pins_BTT_GTR_V1_0.h"          // STM32F4                                env:BIGTREE_GTR_V1_0
539
+#elif MB(BTT_BTT002_V1_0)
540 540
   #include "stm32/pins_BTT_BTT002_V1_0.h"       // STM32F4                                env:BIGTREE_BTT002
541 541
 #elif MB(LERDGE_K)
542 542
   #include "stm32/pins_LERDGE_K.h"              // STM32F4                                env:STM32F4
@@ -587,16 +587,24 @@
587 587
   // Obsolete or unknown board
588 588
   //
589 589
 
590
-  #define BOARD_MKS_13        -1000
591
-  #define BOARD_TRIGORILLA    -1001
592
-  #define BOARD_RURAMPS4D     -1002
593
-  #define BOARD_FORMBOT_TREX2 -1003
594
-  #define BOARD_BIQU_SKR_V1_1 -1004
595
-  #define BOARD_STM32F1R      -1005
596
-  #define BOARD_STM32F103R    -1006
597
-  #define BOARD_ESP32         -1007
598
-  #define BOARD_BIGTREE_SKR_MINI_E3 -1008
599
-  #define BOARD_STEVAL        -1009
590
+  #define BOARD_MKS_13                  -1000
591
+  #define BOARD_TRIGORILLA              -1001
592
+  #define BOARD_RURAMPS4D               -1002
593
+  #define BOARD_FORMBOT_TREX2           -1003
594
+  #define BOARD_BIQU_SKR_V1_1           -1004
595
+  #define BOARD_STM32F1R                -1005
596
+  #define BOARD_STM32F103R              -1006
597
+  #define BOARD_ESP32                   -1007
598
+  #define BOARD_STEVAL                  -1008
599
+  #define BOARD_BIGTREE_SKR_V1_1        -1009
600
+  #define BOARD_BIGTREE_SKR_V1_3        -1010
601
+  #define BOARD_BIGTREE_SKR_V1_4        -1011
602
+  #define BOARD_BIGTREE_SKR_V1_4_TURBO  -1012
603
+  #define BOARD_BIGTREE_BTT002_V1_0     -1013
604
+  #define BOARD_BIGTREE_SKR_PRO_V1_1    -1014
605
+  #define BOARD_BIGTREE_SKR_MINI_V1_1   -1015
606
+  #define BOARD_BIGTREE_SKR_MINI_E3     -1016
607
+  #define BOARD_BIGTREE_SKR_E3_DIP      -1017
600 608
 
601 609
   #if MB(MKS_13)
602 610
     #error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration."
@@ -607,15 +615,33 @@
607 615
   #elif MB(FORMBOT_TREX2)
608 616
     #error "FORMBOT_TREX2 has been renamed BOARD_FORMBOT_TREX2PLUS. Please update your configuration."
609 617
   #elif MB(BIQU_SKR_V1_1)
610
-    #error "BOARD_BIQU_SKR_V1_1 has been renamed BOARD_BIGTREE_SKR_V1_1. Please update your configuration."
618
+    #error "BOARD_BIQU_SKR_V1_1 has been renamed BOARD_BTT_SKR_V1_1. Please update your configuration."
619
+  #elif MB(BIGTREE_SKR_V1_1)
620
+    #error "BOARD_BIGTREE_SKR_V1_1 has been renamed BOARD_BTT_SKR_V1_1. Please update your configuration."
621
+  #elif MB(BIGTREE_SKR_V2_2)
622
+    #error "BOARD_BIGTREE_SKR_V1_2 has been renamed BOARD_BTT_SKR_V1_2. Please update your configuration."
623
+  #elif MB(BIGTREE_SKR_V1_3)
624
+    #error "BOARD_BIGTREE_SKR_V1_3 has been renamed BOARD_BTT_SKR_V1_3. Please update your configuration."
625
+  #elif MB(BIGTREE_SKR_V1_4)
626
+    #error "BOARD_BIGTREE_SKR_V1_4 has been renamed BOARD_BTT_SKR_V1_4. Please update your configuration."
627
+  #elif MB(BIGTREE_SKR_V1_4_TURBO)
628
+    #error "BOARD_BIGTREE_SKR_V1_4_TURBO has been renamed BOARD_BTT_SKR_V1_4_TURBO. Please update your configuration."
629
+  #elif MB(BIGTREE_BTT002_V1_0)
630
+    #error "BOARD_BIGTREE_BTT002_V1_0 has been renamed BOARD_BTT_BTT002_V1_0. Please update your configuration."
631
+  #elif MB(BIGTREE_SKR_PRO_V1_1)
632
+    #error "BOARD_BIGTREE_SKR_PRO_V1_1 has been renamed BOARD_BTT_SKR_PRO_V1_1. Please update your configuration."
633
+  #elif MB(BIGTREE_SKR_MINI_V1_1)
634
+    #error "BOARD_BIGTREE_SKR_MINI_V1_1 has been renamed BOARD_BTT_SKR_MINI_V1_1. Please update your configuration."
635
+  #elif MB(BIGTREE_SKR_MINI_E3)
636
+    #error "BOARD_BIGTREE_SKR_MINI_E3 has been renamed BOARD_BTT_SKR_MINI_E3_V1_0. Please update your configuration."
637
+  #elif MB(BIGTREE_SKR_E3_DIP)
638
+    #error "BOARD_BIGTREE_SKR_E3_DIP has been renamed BOARD_BTT_SKR_E3_DIP. Please update your configuration."
611 639
   #elif MB(STM32F1R)
612 640
     #error "BOARD_STM32F1R has been renamed BOARD_STM32F103RE. Please update your configuration."
613 641
   #elif MB(STM32F103R)
614 642
     #error "BOARD_STM32F103R has been renamed BOARD_STM32F103RE. Please update your configuration."
615 643
   #elif MOTHERBOARD == BOARD_ESP32
616 644
     #error "BOARD_ESP32 has been renamed BOARD_ESPRESSIF_ESP32. Please update your configuration."
617
-  #elif MB(BIGTREE_SKR_MINI_E3)
618
-    #error "BOARD_BIGTREE_SKR_MINI_E3 has been renamed BOARD_BTT_SKR_MINI_E3_V1_0. Please update your configuration."
619 645
   #elif MB(STEVAL)
620 646
     #error "BOARD_STEVAL has been renamed BOARD_STEVAL_3DP001V1. Please update your configuration."
621 647
   #else
@@ -630,8 +656,16 @@
630 656
   #undef BOARD_STM32F1R
631 657
   #undef BOARD_STM32F103R
632 658
   #undef BOARD_ESP32
633
-  #undef BOARD_BIGTREE_SKR_MINI_E3
634 659
   #undef BOARD_STEVAL
660
+  #undef BOARD_BIGTREE_SKR_MINI_E3
661
+  #undef BOARD_BIGTREE_SKR_V1_1
662
+  #undef BOARD_BIGTREE_SKR_V1_3
663
+  #undef BOARD_BIGTREE_SKR_V1_4
664
+  #undef BOARD_BIGTREE_SKR_V1_4_TURBO
665
+  #undef BOARD_BIGTREE_BTT002_V1_0
666
+  #undef BOARD_BIGTREE_SKR_PRO_V1_1
667
+  #undef BOARD_BIGTREE_SKR_MINI_V1_1
668
+  #undef BOARD_BIGTREE_SKR_E3_DIP
635 669
 
636 670
 #endif
637 671
 

+ 1
- 1
Marlin/src/pins/pinsDebug.h View File

@@ -168,7 +168,7 @@ const PinInfo pin_array[] PROGMEM = {
168 168
   #endif
169 169
 
170 170
   #include "pinsDebug_list.h"
171
-  #line 98
171
+  #line 172
172 172
 
173 173
 };
174 174
 

+ 23
- 376
Marlin/src/pins/pinsDebug_list.h View File

@@ -26,425 +26,72 @@
26 26
 
27 27
 #line 28 // set __LINE__ to a known value for both passes
28 28
 
29
-// Undefine pins to suppress warnings
30
-#if !PIN_EXISTS(X_MS1)
31
-  #undef X_MS1_PIN
32
-#endif
33
-#if !PIN_EXISTS(X_MS2)
34
-  #undef X_MS2_PIN
35
-#endif
36
-#if !PIN_EXISTS(X_MS3)
37
-  #undef X_MS3_PIN
38
-#endif
39
-#if !PIN_EXISTS(X2_MS1)
40
-  #undef X2_MS1_PIN
41
-#endif
42
-#if !PIN_EXISTS(X2_MS2)
43
-  #undef X2_MS2_PIN
44
-#endif
45
-#if !PIN_EXISTS(X2_MS3)
46
-  #undef X2_MS3_PIN
47
-#endif
48
-#if !PIN_EXISTS(Y_MS1)
49
-  #undef Y_MS1_PIN
50
-#endif
51
-#if !PIN_EXISTS(Y_MS2)
52
-  #undef Y_MS2_PIN
53
-#endif
54
-#if !PIN_EXISTS(Y_MS3)
55
-  #undef Y_MS3_PIN
56
-#endif
57
-#if !PIN_EXISTS(Y2_MS1)
58
-  #undef Y2_MS1_PIN
59
-#endif
60
-#if !PIN_EXISTS(Y2_MS2)
61
-  #undef Y2_MS2_PIN
62
-#endif
63
-#if !PIN_EXISTS(Y2_MS3)
64
-  #undef Y2_MS3_PIN
65
-#endif
66
-#if !PIN_EXISTS(Z_MS1)
67
-  #undef Z_MS1_PIN
68
-#endif
69
-#if !PIN_EXISTS(Z_MS2)
70
-  #undef Z_MS2_PIN
71
-#endif
72
-#if !PIN_EXISTS(Z_MS3)
73
-  #undef Z_MS3_PIN
74
-#endif
75
-#if !PIN_EXISTS(Z2_MS1)
76
-  #undef Z2_MS1_PIN
77
-#endif
78
-#if !PIN_EXISTS(Z2_MS2)
79
-  #undef Z2_MS2_PIN
80
-#endif
81
-#if !PIN_EXISTS(Z2_MS3)
82
-  #undef Z2_MS3_PIN
83
-#endif
84
-#if !PIN_EXISTS(Z3_MS1)
85
-  #undef Z3_MS1_PIN
86
-#endif
87
-#if !PIN_EXISTS(Z3_MS2)
88
-  #undef Z3_MS2_PIN
89
-#endif
90
-#if !PIN_EXISTS(Z3_MS3)
91
-  #undef Z3_MS3_PIN
92
-#endif
93
-#if !PIN_EXISTS(Z4_MS1)
94
-  #undef Z4_MS1_PIN
95
-#endif
96
-#if !PIN_EXISTS(Z4_MS2)
97
-  #undef Z4_MS2_PIN
98
-#endif
99
-#if !PIN_EXISTS(Z4_MS3)
100
-  #undef Z4_MS3_PIN
101
-#endif
102
-#if !PIN_EXISTS(E0_MS1)
103
-  #undef E0_MS1_PIN
104
-#endif
105
-#if !PIN_EXISTS(E0_MS2)
106
-  #undef E0_MS2_PIN
107
-#endif
108
-#if !PIN_EXISTS(E0_MS3)
109
-  #undef E0_MS3_PIN
110
-#endif
111
-#if !PIN_EXISTS(E1_MS1)
112
-  #undef E1_MS1_PIN
113
-#endif
114
-#if !PIN_EXISTS(E1_MS2)
115
-  #undef E1_MS2_PIN
116
-#endif
117
-#if !PIN_EXISTS(E1_MS3)
118
-  #undef E1_MS3_PIN
119
-#endif
120
-#if !PIN_EXISTS(E2_MS1)
121
-  #undef E2_MS1_PIN
122
-#endif
123
-#if !PIN_EXISTS(E2_MS2)
124
-  #undef E2_MS2_PIN
125
-#endif
126
-#if !PIN_EXISTS(E2_MS3)
127
-  #undef E2_MS3_PIN
128
-#endif
129
-#if !PIN_EXISTS(E3_MS1)
130
-  #undef E3_MS1_PIN
131
-#endif
132
-#if !PIN_EXISTS(E3_MS2)
133
-  #undef E3_MS2_PIN
134
-#endif
135
-#if !PIN_EXISTS(E3_MS3)
136
-  #undef E3_MS3_PIN
137
-#endif
138
-#if !PIN_EXISTS(E4_MS1)
139
-  #undef E4_MS1_PIN
140
-#endif
141
-#if !PIN_EXISTS(E4_MS2)
142
-  #undef E4_MS2_PIN
143
-#endif
144
-#if !PIN_EXISTS(E4_MS3)
145
-  #undef E4_MS3_PIN
146
-#endif
147
-#if !PIN_EXISTS(E5_MS1)
148
-  #undef E5_MS1_PIN
149
-#endif
150
-#if !PIN_EXISTS(E5_MS2)
151
-  #undef E5_MS2_PIN
152
-#endif
153
-#if !PIN_EXISTS(E5_MS3)
154
-  #undef E5_MS3_PIN
155
-#endif
156
-#if !PIN_EXISTS(E6_MS1)
157
-  #undef E6_MS1_PIN
158
-#endif
159
-#if !PIN_EXISTS(E6_MS2)
160
-  #undef E6_MS2_PIN
161
-#endif
162
-#if !PIN_EXISTS(E6_MS3)
163
-  #undef E6_MS3_PIN
164
-#endif
165
-#if !PIN_EXISTS(E7_MS1)
166
-  #undef E7_MS1_PIN
167
-#endif
168
-#if !PIN_EXISTS(E7_MS2)
169
-  #undef E7_MS2_PIN
170
-#endif
171
-#if !PIN_EXISTS(E7_MS3)
172
-  #undef E7_MS3_PIN
173
-#endif
174
-
175
-#if !PIN_EXISTS(E0_STEP)
176
-  #undef E0_STEP_PIN
177
-#endif
178
-#if !PIN_EXISTS(E0_DIR)
179
-  #undef E0_DIR_PIN
180
-#endif
181
-#if !PIN_EXISTS(E0_ENABLE)
182
-  #undef E0_ENABLE_PIN
183
-#endif
184
-#if !PIN_EXISTS(E1_STEP)
185
-  #undef E1_STEP_PIN
186
-#endif
187
-#if !PIN_EXISTS(E1_DIR)
188
-  #undef E1_DIR_PIN
189
-#endif
190
-#if !PIN_EXISTS(E1_ENABLE)
191
-  #undef E1_ENABLE_PIN
192
-#endif
193
-#if !PIN_EXISTS(E2_STEP)
194
-  #undef E2_STEP_PIN
195
-#endif
196
-#if !PIN_EXISTS(E2_DIR)
197
-  #undef E2_DIR_PIN
198
-#endif
199
-#if !PIN_EXISTS(E2_ENABLE)
200
-  #undef E2_ENABLE_PIN
201
-#endif
202
-#if !PIN_EXISTS(E3_STEP)
203
-  #undef E3_STEP_PIN
204
-#endif
205
-#if !PIN_EXISTS(E3_DIR)
206
-  #undef E3_DIR_PIN
207
-#endif
208
-#if !PIN_EXISTS(E3_ENABLE)
209
-  #undef E3_ENABLE_PIN
210
-#endif
211
-#if !PIN_EXISTS(E4_STEP)
212
-  #undef E4_STEP_PIN
213
-#endif
214
-#if !PIN_EXISTS(E4_DIR)
215
-  #undef E4_DIR_PIN
216
-#endif
217
-#if !PIN_EXISTS(E4_ENABLE)
218
-  #undef E4_ENABLE_PIN
219
-#endif
220
-#if !PIN_EXISTS(E5_STEP)
221
-  #undef E5_STEP_PIN
222
-#endif
223
-#if !PIN_EXISTS(E5_DIR)
224
-  #undef E5_DIR_PIN
225
-#endif
226
-#if !PIN_EXISTS(E5_ENABLE)
227
-  #undef E5_ENABLE_PIN
228
-#endif
229
-#if !PIN_EXISTS(E6_STEP)
230
-  #undef E6_STEP_PIN
231
-#endif
232
-#if !PIN_EXISTS(E6_DIR)
233
-  #undef E6_DIR_PIN
234
-#endif
235
-#if !PIN_EXISTS(E6_ENABLE)
236
-  #undef E6_ENABLE_PIN
237
-#endif
238
-#if !PIN_EXISTS(E7_STEP)
239
-  #undef E7_STEP_PIN
240
-#endif
241
-#if !PIN_EXISTS(E7_DIR)
242
-  #undef E7_DIR_PIN
243
-#endif
244
-#if !PIN_EXISTS(E7_ENABLE)
245
-  #undef E7_ENABLE_PIN
246
-#endif
247
-
248
-#if !PIN_EXISTS(X_CS)
249
-  #undef X_CS_PIN
250
-#endif
251
-#if !PIN_EXISTS(Y_CS)
252
-  #undef Y_CS_PIN
253
-#endif
254
-#if !PIN_EXISTS(Z_CS)
255
-  #undef Z_CS_PIN
256
-#endif
257
-#if !PIN_EXISTS(E0_CS)
258
-  #undef E0_CS_PIN
259
-#endif
260
-#if !PIN_EXISTS(E1_CS)
261
-  #undef E1_CS_PIN
262
-#endif
263
-#if !PIN_EXISTS(E2_CS)
264
-  #undef E2_CS_PIN
265
-#endif
266
-#if !PIN_EXISTS(E3_CS)
267
-  #undef E3_CS_PIN
268
-#endif
269
-#if !PIN_EXISTS(E4_CS)
270
-  #undef E4_CS_PIN
271
-#endif
272
-#if !PIN_EXISTS(E5_CS)
273
-  #undef E5_CS_PIN
274
-#endif
275
-#if !PIN_EXISTS(E6_CS)
276
-  #undef E6_CS_PIN
277
-#endif
278
-#if !PIN_EXISTS(E7_CS)
279
-  #undef E7_CS_PIN
280
-#endif
281
-
282
-#if !PIN_EXISTS(FAN)
283
-  #undef FAN_PIN
284
-#endif
285
-#define FAN0_PIN FAN_PIN
286
-#if !PIN_EXISTS(FAN1)
287
-  #undef FAN1_PIN
288
-#endif
289
-#if !PIN_EXISTS(FAN2)
290
-  #undef FAN2_PIN
291
-#endif
292
-#if !PIN_EXISTS(FAN3)
293
-  #undef FAN3_PIN
294
-#endif
295
-#if !PIN_EXISTS(FAN4)
296
-  #undef FAN4_PIN
297
-#endif
298
-#if !PIN_EXISTS(FAN5)
299
-  #undef FAN5_PIN
300
-#endif
301
-#if !PIN_EXISTS(FAN6)
302
-  #undef FAN6_PIN
303
-#endif
304
-#if !PIN_EXISTS(FAN7)
305
-  #undef FAN7_PIN
306
-#endif
307
-#if !PIN_EXISTS(CONTROLLER_FAN)
308
-  #undef CONTROLLER_FAN_PIN
309
-#endif
310
-
311
-#if !PIN_EXISTS(FANMUX0)
312
-  #undef FANMUX0_PIN
313
-#endif
314
-#if !PIN_EXISTS(FANMUX1)
315
-  #undef FANMUX1_PIN
316
-#endif
317
-#if !PIN_EXISTS(FANMUX2)
318
-  #undef FANMUX2_PIN
319
-#endif
320
-
321
-#if !PIN_EXISTS(HEATER_0)
322
-  #undef HEATER_0_PIN
323
-#endif
324
-#if !PIN_EXISTS(HEATER_1)
325
-  #undef HEATER_1_PIN
326
-#endif
327
-#if !PIN_EXISTS(HEATER_2)
328
-  #undef HEATER_2_PIN
329
-#endif
330
-#if !PIN_EXISTS(HEATER_3)
331
-  #undef HEATER_3_PIN
332
-#endif
333
-#if !PIN_EXISTS(HEATER_4)
334
-  #undef HEATER_4_PIN
335
-#endif
336
-#if !PIN_EXISTS(HEATER_5)
337
-  #undef HEATER_5_PIN
338
-#endif
339
-#if !PIN_EXISTS(HEATER_6)
340
-  #undef HEATER_6_PIN
341
-#endif
342
-#if !PIN_EXISTS(HEATER_7)
343
-  #undef HEATER_7_PIN
344
-#endif
345
-#if !PIN_EXISTS(HEATER_BED)
346
-  #undef HEATER_BED_PIN
347
-#endif
348
-
349
-#if !PIN_EXISTS(TEMP_0)
350
-  #undef TEMP_0_PIN
351
-#endif
352
-#if !PIN_EXISTS(TEMP_1)
353
-  #undef TEMP_1_PIN
354
-#endif
355
-#if !PIN_EXISTS(TEMP_2)
356
-  #undef TEMP_2_PIN
357
-#endif
358
-#if !PIN_EXISTS(TEMP_3)
359
-  #undef TEMP_3_PIN
360
-#endif
361
-#if !PIN_EXISTS(TEMP_4)
362
-  #undef TEMP_4_PIN
363
-#endif
364
-#if !PIN_EXISTS(TEMP_5)
365
-  #undef TEMP_5_PIN
366
-#endif
367
-#if !PIN_EXISTS(TEMP_6)
368
-  #undef TEMP_6_PIN
369
-#endif
370
-#if !PIN_EXISTS(TEMP_7)
371
-  #undef TEMP_7_PIN
372
-#endif
373
-#if !PIN_EXISTS(TEMP_BED)
374
-  #undef TEMP_BED_PIN
375
-#endif
376
-
377
-#if !PIN_EXISTS(SD_DETECT)
378
-  #undef SD_DETECT_PIN
379
-#endif
380
-#if !PIN_EXISTS(SDPOWER)
381
-  #undef SDPOWER_PIN
382
-#endif
383
-
384 29
 //
385 30
 // Analog Pin Assignments
386 31
 //
387 32
 
388
-#if defined(EXT_AUX_A0) && EXT_AUX_A0 >= 0 && EXT_AUX_A0 < NUM_ANALOG_INPUTS
33
+#define ANALOG_OK(PN) ((PN) >= 0 && (PN) < NUM_ANALOG_PINS)
34
+
35
+#if defined(EXT_AUX_A0) && ANALOG_OK(EXT_AUX_A0)
389 36
   REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0)
390 37
 #endif
391
-#if defined(EXT_AUX_A1) && EXT_AUX_A1 >= 0 && EXT_AUX_A1 < NUM_ANALOG_INPUTS
38
+#if defined(EXT_AUX_A1) && ANALOG_OK(EXT_AUX_A0)
392 39
   REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A1)
393 40
 #endif
394
-#if defined(EXT_AUX_A2) && EXT_AUX_A2 >= 0 && EXT_AUX_A2 < NUM_ANALOG_INPUTS
41
+#if defined(EXT_AUX_A2) && ANALOG_OK(EXT_AUX_A0)
395 42
   REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A2)
396 43
 #endif
397
-#if defined(EXT_AUX_A3) && EXT_AUX_A3 >= 0 && EXT_AUX_A3 < NUM_ANALOG_INPUTS
44
+#if defined(EXT_AUX_A3) && ANALOG_OK(EXT_AUX_A0)
398 45
   REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A3)
399 46
 #endif
400
-#if defined(EXT_AUX_A4) && EXT_AUX_A4 >= 0 && EXT_AUX_A4 < NUM_ANALOG_INPUTS
47
+#if defined(EXT_AUX_A4) && ANALOG_OK(EXT_AUX_A0)
401 48
   REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A4)
402 49
 #endif
403
-#if PIN_EXISTS(FILWIDTH) && FILWIDTH_PIN < NUM_ANALOG_INPUTS
50
+#if PIN_EXISTS(FILWIDTH) && ANALOG_OK(FILWIDTH_PIN)
404 51
   REPORT_NAME_ANALOG(__LINE__, FILWIDTH_PIN)
405 52
 #endif
406
-#if PIN_EXISTS(MAIN_VOLTAGE_MEASURE) && MAIN_VOLTAGE_MEASURE_PIN < NUM_ANALOG_INPUTS
53
+#if PIN_EXISTS(MAIN_VOLTAGE_MEASURE) && ANALOG_OK(MAIN_VOLTAGE_MEASURE_PIN)
407 54
   REPORT_NAME_ANALOG(__LINE__, MAIN_VOLTAGE_MEASURE_PIN)
408 55
 #endif
409
-#if !defined(ARDUINO_ARCH_SAM) && !defined(ARDUINO_ARCH_SAMD)  //TC1 & TC2 are macros in the SAM/SAMD tool chain
410
-  #if defined(TC1) && TC1 >= 0 && TC1 < NUM_ANALOG_INPUTS
56
+#if !defined(ARDUINO_ARCH_SAM) && !defined(ARDUINO_ARCH_SAMD)  // TC1 & TC2 are macros in the SAM/SAMD tool chain
57
+  #if defined(TC1) && ANALOG_OK(TC1)
411 58
     REPORT_NAME_ANALOG(__LINE__, TC1)
412 59
   #endif
413
-  #if defined(TC2) && TC2 >= 0 && TC2 < NUM_ANALOG_INPUTS
60
+  #if defined(TC2) && ANALOG_OK(TC1)
414 61
     REPORT_NAME_ANALOG(__LINE__, TC2)
415 62
   #endif
416 63
 #endif
417
-#if PIN_EXISTS(TEMP_0) && TEMP_0_PIN < NUM_ANALOG_INPUTS
64
+#if PIN_EXISTS(TEMP_0) && ANALOG_OK(TEMP_0_PIN)
418 65
   REPORT_NAME_ANALOG(__LINE__, TEMP_0_PIN)
419 66
 #endif
420
-#if PIN_EXISTS(TEMP_1) && TEMP_1_PIN < NUM_ANALOG_INPUTS
67
+#if PIN_EXISTS(TEMP_1) && ANALOG_OK(TEMP_1_PIN)
421 68
   REPORT_NAME_ANALOG(__LINE__, TEMP_1_PIN)
422 69
 #endif
423
-#if PIN_EXISTS(TEMP_2) && TEMP_2_PIN < NUM_ANALOG_INPUTS
70
+#if PIN_EXISTS(TEMP_2) && ANALOG_OK(TEMP_2_PIN)
424 71
   REPORT_NAME_ANALOG(__LINE__, TEMP_2_PIN)
425 72
 #endif
426
-#if PIN_EXISTS(TEMP_3) && TEMP_3_PIN < NUM_ANALOG_INPUTS
73
+#if PIN_EXISTS(TEMP_3) && ANALOG_OK(TEMP_3_PIN)
427 74
   REPORT_NAME_ANALOG(__LINE__, TEMP_3_PIN)
428 75
 #endif
429
-#if PIN_EXISTS(TEMP_4) && TEMP_4_PIN < NUM_ANALOG_INPUTS
76
+#if PIN_EXISTS(TEMP_4) && ANALOG_OK(TEMP_4_PIN)
430 77
   REPORT_NAME_ANALOG(__LINE__, TEMP_4_PIN)
431 78
 #endif
432
-#if PIN_EXISTS(TEMP_5) && TEMP_5_PIN < NUM_ANALOG_INPUTS
79
+#if PIN_EXISTS(TEMP_5) && ANALOG_OK(TEMP_5_PIN)
433 80
   REPORT_NAME_ANALOG(__LINE__, TEMP_5_PIN)
434 81
 #endif
435
-#if PIN_EXISTS(TEMP_6) && TEMP_6_PIN < NUM_ANALOG_INPUTS
82
+#if PIN_EXISTS(TEMP_6) && ANALOG_OK(TEMP_6_PIN)
436 83
   REPORT_NAME_ANALOG(__LINE__, TEMP_6_PIN)
437 84
 #endif
438
-#if PIN_EXISTS(TEMP_7) && TEMP_7_PIN < NUM_ANALOG_INPUTS
85
+#if PIN_EXISTS(TEMP_7) && ANALOG_OK(TEMP_7_PIN)
439 86
   REPORT_NAME_ANALOG(__LINE__, TEMP_7_PIN)
440 87
 #endif
441
-#if PIN_EXISTS(TEMP_BED) && TEMP_BED_PIN < NUM_ANALOG_INPUTS
88
+#if PIN_EXISTS(TEMP_BED) && ANALOG_OK(TEMP_BED_PIN)
442 89
   REPORT_NAME_ANALOG(__LINE__, TEMP_BED_PIN)
443 90
 #endif
444
-#if PIN_EXISTS(TEMP_CHAMBER) && TEMP_CHAMBER_PIN < NUM_ANALOG_INPUTS
91
+#if PIN_EXISTS(TEMP_CHAMBER) && ANALOG_OK(TEMP_CHAMBER_PIN)
445 92
   REPORT_NAME_ANALOG(__LINE__, TEMP_CHAMBER_PIN)
446 93
 #endif
447
-#if PIN_EXISTS(ADC_KEYPAD) && ADC_KEYPAD_PIN < NUM_ANALOG_INPUTS
94
+#if PIN_EXISTS(ADC_KEYPAD) && ANALOG_OK(ADC_KEYPAD_PIN)
448 95
   REPORT_NAME_ANALOG(__LINE__, ADC_KEYPAD_PIN)
449 96
 #endif
450 97
 

+ 3
- 0
Marlin/src/pins/stm32/pins_ARMED.h View File

@@ -19,6 +19,9 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+
23
+//  https://github.com/ktand/Armed
24
+
22 25
 #pragma once
23 26
 
24 27
 #ifndef STM32F4

+ 23
- 2
Marlin/src/pins/stm32/pins_BLACK_STM32F407VE.h View File

@@ -108,7 +108,6 @@
108 108
 //
109 109
 // Misc. Functions
110 110
 //
111
-#define SDSS               PB12
112 111
 #define LED_PIN            PA6
113 112
 //#define LED_PIN          PA7
114 113
 #define KILL_PIN           PB1
@@ -116,7 +115,7 @@
116 115
 //
117 116
 // LCD / Controller
118 117
 //
119
-#define SD_DETECT_PIN      PC5
118
+//#define SD_DETECT_PIN      PC5
120 119
 //#define SD_DETECT_PIN      PA8  // SDIO SD_DETECT_PIN, external SDIO card reader only
121 120
 
122 121
 #define BEEPER_PIN         PD10
@@ -132,3 +131,25 @@
132 131
 
133 132
 #define DOGLCD_CS          LCD_PINS_D5
134 133
 #define DOGLCD_A0          LCD_PINS_D6
134
+
135
+//
136
+// Onboard SD support
137
+//
138
+#define SDIO_D0_PIN        PC8
139
+#define SDIO_D1_PIN        PC9
140
+#define SDIO_D2_PIN        PC10
141
+#define SDIO_D3_PIN        PC11
142
+#define SDIO_CK_PIN        PC12
143
+#define SDIO_CMD_PIN       PD2
144
+
145
+#if !defined(SDCARD_CONNECTION) || SDCARD_CONNECTION == ONBOARD
146
+  #define SDIO_SUPPORT     // Use SDIO for onboard SD
147
+
148
+  #ifndef SDIO_SUPPORT
149
+    #define SOFTWARE_SPI   // Use soft SPI for onboard SD
150
+    #define SDSS           SDIO_D3_PIN
151
+    #define SCK_PIN        SDIO_CK_PIN
152
+    #define MISO_PIN       SDIO_D0_PIN
153
+    #define MOSI_PIN       SDIO_CMD_PIN
154
+  #endif
155
+#endif

+ 15
- 1
Marlin/src/pins/stm32/pins_BTT_SKR_PRO_V1_1.h View File

@@ -181,7 +181,21 @@
181 181
 //
182 182
 // Misc. Functions
183 183
 //
184
-#define SDSS               PB12
184
+
185
+//
186
+// Onboard SD card
187
+//   NOT compatible with LCD
188
+//
189
+#if SDCARD_CONNECTION == ONBOARD && !defined(HAS_SPI_LCD)
190
+  #define SOFTWARE_SPI            // Use soft SPI for onboard SD
191
+  #define SDSS             PA4
192
+  #define SCK_PIN          PA5
193
+  #define MISO_PIN         PA6
194
+  #define MOSI_PIN         PB5
195
+#else
196
+  #define SDSS             PB12
197
+#endif
198
+
185 199
 
186 200
 /**
187 201
  *               _____                                             _____

+ 24
- 0
Marlin/src/pins/stm32/pins_FLYF407ZG.h View File

@@ -153,6 +153,30 @@
153 153
 #define FAN5_PIN           PB11
154 154
 
155 155
 //
156
+// Onboard SD support
157
+//
158
+
159
+#define SDIO_D0_PIN        PC8
160
+#define SDIO_D1_PIN        PC9
161
+//#define SD_CARD_DETECT_PIN PC13
162
+#define SDIO_D2_PIN        PC10
163
+#define SDIO_D3_PIN        PC11
164
+#define SDIO_CK_PIN        PC12
165
+#define SDIO_CMD_PIN       PD2
166
+
167
+#if !defined(SDCARD_CONNECTION) || SDCARD_CONNECTION == ONBOARD
168
+  #define SDIO_SUPPORT     // Use SDIO for onboard SD
169
+
170
+  #ifndef SDIO_SUPPORT
171
+    #define SOFTWARE_SPI   // Use soft SPI for onboard SD
172
+    #define SDSS           SDIO_D3_PIN
173
+    #define SCK_PIN        SDIO_CK_PIN
174
+    #define MISO_PIN       SDIO_D0_PIN
175
+    #define MOSI_PIN       SDIO_CMD_PIN
176
+  #endif
177
+#endif
178
+
179
+//
156 180
 // Trinamic Software SPI
157 181
 //
158 182
 

+ 20
- 15
Marlin/src/pins/stm32/pins_STEVAL_3DP001V1.h View File

@@ -226,22 +226,27 @@
226 226
 // 22   // PB3   JTAG_TDO/SWO
227 227
 
228 228
 //
229
-// SD support
229
+// Onboard SD support
230 230
 //
231
-//#define SDIO_SUPPORT
232
-// 23   // PC8   SDIO_D0
233
-// 24   // PC9   SDIO_D1
234
-// 25   // PA15  SD_CARD_DETECT
235
-// 26   // PC10  SDIO_D2
236
-// 27   // PC11  SDIO_D3
237
-// 28   // PC12  SDIO_CK
238
-// 29   // PD2   SDIO_CMD
239
-
240
-#define SOFTWARE_SPI            // Use soft SPI for onboard SD
241
-#define SDSS               27   // PC11  SDIO_D3
242
-#define SCK_PIN            28   // PC12  SDIO_CK
243
-#define MISO_PIN           23   // PC8   SDIO_D0
244
-#define MOSI_PIN           29   // PD2   SDIO_CMD
231
+#define SDIO_D0_PIN       23   // PC8   SDIO_D0
232
+#define SDIO_D1_PIN       24   // PC9   SDIO_D1
233
+//#define SD_CARD_DETECT_PIN 25   // PA15  SD_CARD_DETECT
234
+#define SDIO_D2_PIN       26   // PC10  SDIO_D2
235
+#define SDIO_D3_PIN       27   // PC11  SDIO_D3
236
+#define SDIO_CK_PIN       28   // PC12  SDIO_CK
237
+#define SDIO_CMD_PIN      29   // PD2   SDIO_CMD
238
+
239
+#if !defined(SDCARD_CONNECTION) || SDCARD_CONNECTION == ONBOARD
240
+  #define SDIO_SUPPORT     // Use SDIO for onboard SD
241
+
242
+  #ifndef SDIO_SUPPORT
243
+    #define SOFTWARE_SPI   // Use soft SPI for onboard SD
244
+    #define SDSS           SDIO_D3_PIN
245
+    #define SCK_PIN        SDIO_CK_PIN
246
+    #define MISO_PIN       SDIO_D0_PIN
247
+    #define MOSI_PIN       SDIO_CMD_PIN
248
+  #endif
249
+#endif
245 250
 
246 251
 // OTG
247 252
 // 30   // PA11  OTG_DM

+ 1
- 1
buildroot/share/PlatformIO/variants/STEVAL_F401VE/variant.h View File

@@ -195,7 +195,7 @@ extern "C" {
195 195
   #define PIN_SERIAL2_RX        PD6
196 196
   #define PIN_SERIAL2_TX        PD5
197 197
 #else
198
-  #error'Invaqlid setting for SERIAL_UART_INSTANCE'
198
+  #error'Invalid setting for SERIAL_UART_INSTANCE'
199 199
 #endif
200 200
 
201 201
 // Timer Definitions

+ 1
- 1
buildroot/share/tests/BIGTREE_BTT002-tests View File

@@ -10,7 +10,7 @@ set -e
10 10
 # Build with the default configurations
11 11
 #
12 12
 restore_configs
13
-opt_set MOTHERBOARD BOARD_BIGTREE_BTT002_V1_0
13
+opt_set MOTHERBOARD BOARD_BTT_BTT002_V1_0
14 14
 opt_set SERIAL_PORT 1
15 15
 exec_test $1 $2 "BigTreeTech BTT002 Default Configuration"
16 16
 

+ 1
- 1
buildroot/share/tests/BIGTREE_SKR_PRO-tests View File

@@ -10,7 +10,7 @@ set -e
10 10
 # Build with the default configurations
11 11
 #
12 12
 restore_configs
13
-opt_set MOTHERBOARD BOARD_BIGTREE_SKR_PRO_V1_1
13
+opt_set MOTHERBOARD BOARD_BTT_SKR_PRO_V1_1
14 14
 opt_set SERIAL_PORT 1
15 15
 exec_test $1 $2 "BigTreeTech SKR Pro Default Configuration"
16 16
 

+ 1
- 1
buildroot/share/tests/STM32F103RC_bigtree_USB-tests View File

@@ -10,7 +10,7 @@ set -e
10 10
 # Build with the default configurations
11 11
 #
12 12
 restore_configs
13
-opt_set MOTHERBOARD BOARD_BIGTREE_SKR_MINI_V1_1
13
+opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_V1_1
14 14
 opt_set SERIAL_PORT 1
15 15
 opt_set SERIAL_PORT_2 -1
16 16
 exec_test $1 $2 "BigTreeTech SKR Mini v1.1 - Basic Configuration"

+ 1
- 1
buildroot/share/tests/STM32F103RE_bigtree-tests View File

@@ -10,7 +10,7 @@ set -e
10 10
 # Build with the default configurations
11 11
 #
12 12
 restore_configs
13
-opt_set MOTHERBOARD BOARD_BIGTREE_SKR_E3_DIP
13
+opt_set MOTHERBOARD BOARD_BTT_SKR_E3_DIP
14 14
 opt_set SERIAL_PORT 1
15 15
 opt_set SERIAL_PORT_2 -1
16 16
 exec_test $1 $2 "BigTreeTech SKR E3 DIP v1.0 - Basic Configuration"

+ 1
- 1
buildroot/share/tests/STM32F103RE_bigtree_USB-tests View File

@@ -10,7 +10,7 @@ set -e
10 10
 # Build with the default configurations
11 11
 #
12 12
 restore_configs
13
-opt_set MOTHERBOARD BOARD_BIGTREE_SKR_E3_DIP
13
+opt_set MOTHERBOARD BOARD_BTT_SKR_E3_DIP
14 14
 opt_set SERIAL_PORT 1
15 15
 opt_set SERIAL_PORT_2 -1
16 16
 exec_test $1 $2 "BigTreeTech SKR E3 DIP v1.0 - Basic Configuration"

Loading…
Cancel
Save