Skip to content

Commit d403352

Browse files
committed
♻️ SDSUPPORT => HAS_MEDIA
1 parent 2e4b037 commit d403352

File tree

161 files changed

+385
-380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+385
-380
lines changed

Marlin/src/HAL/AVR/HAL.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@ void MarlinHAL::reboot() {
145145
// Free Memory Accessor
146146
// ------------------------
147147

148-
#if ENABLED(SDSUPPORT)
148+
#if HAS_MEDIA
149149

150150
#include "../../sd/SdFatUtil.h"
151151
int freeMemory() { return SdFatUtil::FreeRam(); }
152152

153-
#else // !SDSUPPORT
153+
#else // !HAS_MEDIA
154154

155155
extern "C" {
156156
extern char __bss_end;
@@ -167,6 +167,6 @@ void MarlinHAL::reboot() {
167167
}
168168
}
169169

170-
#endif // !SDSUPPORT
170+
#endif // !HAS_MEDIA
171171

172172
#endif // __AVR__

Marlin/src/HAL/DUE/HAL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ uint16_t MarlinHAL::adc_result;
4545
#endif
4646

4747
void MarlinHAL::init() {
48-
#if ENABLED(SDSUPPORT)
48+
#if HAS_MEDIA
4949
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
5050
#endif
5151
usb_task_init(); // Initialize the USB stack

Marlin/src/HAL/DUE/inc/SanityCheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
*/
7171
#define _IS_HW_SPI(P) (defined(TMC_SW_##P) && (TMC_SW_##P == SD_MOSI_PIN || TMC_SW_##P == SD_MISO_PIN || TMC_SW_##P == SD_SCK_PIN))
7272

73-
#if ENABLED(SDSUPPORT) && HAS_DRIVER(TMC2130)
73+
#if HAS_MEDIA && HAS_DRIVER(TMC2130)
7474
#if ENABLED(TMC_USE_SW_SPI)
7575
#if DISABLED(DUE_SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
7676
#error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."

Marlin/src/HAL/DUE/usb/conf_usb.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
#define USB_DEVICE_SPECIFIC_REQUEST() usb_task_other_requests()
102102
//@}
103103

104-
#if ENABLED(SDSUPPORT)
104+
#if HAS_MEDIA
105105
/**
106106
* USB Device low level configuration
107107
* When only one interface is used, these configurations are defined by the class module.
@@ -185,7 +185,7 @@
185185
//! Enable id string of interface to add an extra USB string
186186
#define UDI_CDC_IAD_STRING_ID 4
187187

188-
#if ENABLED(SDSUPPORT)
188+
#if HAS_MEDIA
189189
/**
190190
* USB CDC low level configuration
191191
* In standalone these configurations are defined by the CDC module.

Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include "../../../inc/MarlinConfig.h"
88

9-
#if ENABLED(SDSUPPORT)
9+
#if HAS_MEDIA
1010

1111
#include "../../../sd/cardreader.h"
1212
extern "C" {
@@ -138,5 +138,5 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) {
138138

139139
#endif // ACCESS_USB == true
140140

141-
#endif // SDSUPPORT
141+
#endif // HAS_MEDIA
142142
#endif // ARDUINO_ARCH_SAM

Marlin/src/HAL/DUE/usb/udi_cdc_desc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
#include "udc_desc.h"
5252
#include "udi_cdc.h"
5353

54-
#if DISABLED(SDSUPPORT)
54+
#if !HAS_MEDIA
5555

5656
/**
5757
* \defgroup udi_cdc_group_single_desc USB device descriptors for a single interface
@@ -256,6 +256,6 @@ UDC_DESC_STORAGE udc_config_t udc_config = {
256256
//@}
257257
//@}
258258

259-
#endif // SDSUPPORT
259+
#endif // HAS_MEDIA
260260

261261
#endif // ARDUINO_ARCH_SAM

Marlin/src/HAL/DUE/usb/udi_composite_desc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
#include "udd.h"
5151
#include "udc_desc.h"
5252

53-
#if ENABLED(SDSUPPORT)
53+
#if HAS_MEDIA
5454

5555
/**
5656
* \defgroup udi_group_desc Descriptors for a USB Device
@@ -189,4 +189,4 @@ UDC_DESC_STORAGE udc_config_t udc_config = {
189189

190190
#endif // ARDUINO_ARCH_SAM
191191

192-
#endif // SDSUPPORT
192+
#endif // HAS_MEDIA

Marlin/src/HAL/DUE/usb/udi_msc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
#include "ctrl_access.h"
5858
#include <string.h>
5959

60-
#if ENABLED(SDSUPPORT)
60+
#if HAS_MEDIA
6161

6262
#ifndef UDI_MSC_NOTIFY_TRANS_EXT
6363
# define UDI_MSC_NOTIFY_TRANS_EXT()
@@ -1127,6 +1127,6 @@ bool udi_msc_trans_block(bool b_read, uint8_t * block, iram_size_t block_size,
11271127

11281128
//@}
11291129

1130-
#endif // SDSUPPORT
1130+
#endif // HAS_MEDIA
11311131

11321132
#endif // ARDUINO_ARCH_SAM

Marlin/src/HAL/DUE/usb/usb_task.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@
5151
#include "conf_usb.h"
5252
#include "udc.h"
5353

54-
#if ENABLED(SDSUPPORT)
54+
#if HAS_MEDIA
5555
static volatile bool main_b_msc_enable = false;
5656
#endif
5757
static volatile bool main_b_cdc_enable = false;
5858
static volatile bool main_b_dtr_active = false;
5959

6060
void usb_task_idle(void) {
61-
#if ENABLED(SDSUPPORT)
61+
#if HAS_MEDIA
6262
// Attend SD card access from the USB MSD -- Prioritize access to improve speed
6363
int delay = 2;
6464
while (main_b_msc_enable && --delay > 0) {
@@ -70,7 +70,7 @@ void usb_task_idle(void) {
7070
#endif
7171
}
7272

73-
#if ENABLED(SDSUPPORT)
73+
#if HAS_MEDIA
7474
bool usb_task_msc_enable(void) { return ((main_b_msc_enable = true)); }
7575
void usb_task_msc_disable(void) { main_b_msc_enable = false; }
7676
bool usb_task_msc_isenabled(void) { return main_b_msc_enable; }
@@ -206,13 +206,13 @@ static USB_MicrosoftExtendedPropertiesDescriptor microsoft_extended_properties_d
206206
bool usb_task_extra_string(void) {
207207
static uint8_t udi_msft_magic[] = "MSFT100\xEE";
208208
static uint8_t udi_cdc_name[] = "CDC interface";
209-
#if ENABLED(SDSUPPORT)
209+
#if HAS_MEDIA
210210
static uint8_t udi_msc_name[] = "MSC interface";
211211
#endif
212212

213213
struct extra_strings_desc_t {
214214
usb_str_desc_t header;
215-
#if ENABLED(SDSUPPORT)
215+
#if HAS_MEDIA
216216
le16_t string[Max(Max(sizeof(udi_cdc_name) - 1, sizeof(udi_msc_name) - 1), sizeof(udi_msft_magic) - 1)];
217217
#else
218218
le16_t string[Max(sizeof(udi_cdc_name) - 1, sizeof(udi_msft_magic) - 1)];
@@ -231,7 +231,7 @@ bool usb_task_extra_string(void) {
231231
str_lgt = sizeof(udi_cdc_name) - 1;
232232
str = udi_cdc_name;
233233
break;
234-
#if ENABLED(SDSUPPORT)
234+
#if HAS_MEDIA
235235
case UDI_MSC_STRING_ID:
236236
str_lgt = sizeof(udi_msc_name) - 1;
237237
str = udi_msc_name;

Marlin/src/HAL/ESP32/HAL_SPI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static SPISettings spiConfig;
5353
// ------------------------
5454

5555
void spiBegin() {
56-
#if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_SS)
56+
#if HAS_MEDIA && PIN_EXISTS(SD_SS)
5757
OUT_WRITE(SD_SS_PIN, HIGH);
5858
#endif
5959
}

0 commit comments

Comments
 (0)