Browse Source

Fix compiling error BIGTREE_SKR_MINI (#15197)

Let's get STM32F1 working again!
Ludy 5 years ago
parent
commit
3c3a956a17

+ 16
- 18
Marlin/src/HAL/HAL_STM32F1/onboard_sd.cpp View File

1
-/*------------------------------------------------------------------------*/
2
-/* STM32F1: MMCv3/SDv1/SDv2 (SPI mode) control module                     */
3
-/*------------------------------------------------------------------------*/
4
-/*
5
-/ * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
6
-/ * Copyright (c) 2019 BigTreeTech [https://github.com/bigtreetech]
7
-/ * Copyright (C) 2015, ChaN, all right reserved.
8
-/
9
-/ * This software is a free software and there is NO WARRANTY.
10
-/ * No restriction on use. You can use, modify and redistribute it for
11
-/   personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY.
12
-/ * Redistributions of source code must retain the above copyright notice.
13
-/
14
-/-------------------------------------------------------------------------*/
1
+/**
2
+ * STM32F1: MMCv3/SDv1/SDv2 (SPI mode) control module
3
+ *
4
+ * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
5
+ * Copyright (c) 2019 BigTreeTech [https://github.com/bigtreetech]
6
+ * Copyright (C) 2015, ChaN, all right reserved.
7
+ *
8
+ * This software is a free software and there is NO WARRANTY.
9
+ * No restriction on use. You can use, modify and redistribute it for
10
+ * personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY.
11
+ * Redistributions of source code must retain the above copyright notice.
12
+ *
13
+ */
14
+
15
 #include "../../inc/MarlinConfig.h"
15
 #include "../../inc/MarlinConfig.h"
16
 
16
 
17
 #ifdef HAS_ONBOARD_SD
17
 #ifdef HAS_ONBOARD_SD
18
 
18
 
19
 #include "onboard_sd.h"
19
 #include "onboard_sd.h"
20
-#include "spi.h"
20
+#include "SPI.h"
21
 #include "fastio.h"
21
 #include "fastio.h"
22
 
22
 
23
 #ifdef SHARED_SD_CARD
23
 #ifdef SHARED_SD_CARD
26
   #endif
26
   #endif
27
   #define ONBOARD_SD_SPI SPI
27
   #define ONBOARD_SD_SPI SPI
28
 #else
28
 #else
29
-  SPIClass OnBoardSPI(ON_BOARD_SPI_DEVICE)
29
+  SPIClass OnBoardSPI(ON_BOARD_SPI_DEVICE);
30
   #define ONBOARD_SD_SPI OnBoardSPI
30
   #define ONBOARD_SD_SPI OnBoardSPI
31
 #endif
31
 #endif
32
 
32
 
46
    Module Private Functions
46
    Module Private Functions
47
 ---------------------------------------------------------------------------*/
47
 ---------------------------------------------------------------------------*/
48
 
48
 
49
-#include "onboard_sd.h"
50
-
51
 /* MMC/SD command */
49
 /* MMC/SD command */
52
 #define CMD0  (0)     /* GO_IDLE_STATE */
50
 #define CMD0  (0)     /* GO_IDLE_STATE */
53
 #define CMD1  (1)     /* SEND_OP_COND (MMC) */
51
 #define CMD1  (1)     /* SEND_OP_COND (MMC) */

+ 2
- 0
Marlin/src/lcd/dogm/status_screen_DOGM.cpp View File

271
       #endif
271
       #endif
272
       #if HAS_HEATED_CHAMBER
272
       #if HAS_HEATED_CHAMBER
273
         if (dodraw) _draw_centered_temp(target + 0.5, STATUS_CHAMBER_TEXT_X, 7);
273
         if (dodraw) _draw_centered_temp(target + 0.5, STATUS_CHAMBER_TEXT_X, 7);
274
+      #else
275
+        UNUSED(dodraw);
274
       #endif
276
       #endif
275
     }
277
     }
276
     if (PAGE_CONTAINS(28 - INFO_FONT_ASCENT, 28 - 1))
278
     if (PAGE_CONTAINS(28 - INFO_FONT_ASCENT, 28 - 1))

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

173
   #define MISO_PIN         PB4
173
   #define MISO_PIN         PB4
174
   #define MOSI_PIN         PB5
174
   #define MOSI_PIN         PB5
175
   #define SS_PIN           PA15
175
   #define SS_PIN           PA15
176
-#if SD_CONNECTION_IS(ONBOARD)
176
+#elif SD_CONNECTION_IS(ONBOARD)
177
   #define ENABLE_SPI1
177
   #define ENABLE_SPI1
178
   #define SD_DETECT_PIN    PA3
178
   #define SD_DETECT_PIN    PA3
179
   #define SCK_PIN          PA5
179
   #define SCK_PIN          PA5

Loading…
Cancel
Save