|
@@ -1,23 +1,23 @@
|
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
|
15
|
#include "../../inc/MarlinConfig.h"
|
16
|
16
|
|
17
|
17
|
#ifdef HAS_ONBOARD_SD
|
18
|
18
|
|
19
|
19
|
#include "onboard_sd.h"
|
20
|
|
-#include "spi.h"
|
|
20
|
+#include "SPI.h"
|
21
|
21
|
#include "fastio.h"
|
22
|
22
|
|
23
|
23
|
#ifdef SHARED_SD_CARD
|
|
@@ -26,7 +26,7 @@
|
26
|
26
|
#endif
|
27
|
27
|
#define ONBOARD_SD_SPI SPI
|
28
|
28
|
#else
|
29
|
|
- SPIClass OnBoardSPI(ON_BOARD_SPI_DEVICE)
|
|
29
|
+ SPIClass OnBoardSPI(ON_BOARD_SPI_DEVICE);
|
30
|
30
|
#define ONBOARD_SD_SPI OnBoardSPI
|
31
|
31
|
#endif
|
32
|
32
|
|
|
@@ -46,8 +46,6 @@
|
46
|
46
|
Module Private Functions
|
47
|
47
|
---------------------------------------------------------------------------*/
|
48
|
48
|
|
49
|
|
-#include "onboard_sd.h"
|
50
|
|
-
|
51
|
49
|
/* MMC/SD command */
|
52
|
50
|
#define CMD0 (0) /* GO_IDLE_STATE */
|
53
|
51
|
#define CMD1 (1) /* SEND_OP_COND (MMC) */
|