Skip to content

Commit 489578c

Browse files
committed
Compatibility layer
1 parent dc06d84 commit 489578c

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Marlin/src/inc/Conditionals-4-adv.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,38 @@
3232
#include "MarlinConfigPre-4-adv.h"
3333
//========================================================
3434

35+
//
36+
// Compatibility layer for old Media settings
37+
// Remove for release.
38+
//
39+
#ifdef SDSUPPORT
40+
#ifdef SDCARD_CONNECTION
41+
#define _SDCARD_LCD 1
42+
#define _SDCARD_ONBOARD 2
43+
#define _SDCARD_CUSTOM_CABLE 3
44+
#define _SDCARD_ID(V) _CAT(_SDCARD_, V)
45+
#define SD_CONNECTION_IS(V) (_SDCARD_ID(SDCARD_CONNECTION) == _SDCARD_ID(V))
46+
#if SD_CONNECTION_IS(ONBOARD)
47+
#define VOLUME0 ONBOARD
48+
#elif SD_CONNECTION_IS(LCD)
49+
#define VOLUME0 LCD
50+
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
51+
#define VOLUME0 CUSTOM
52+
#endif
53+
#endif
54+
#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
55+
#ifndef VOLUME0
56+
#define VOLUME0 USBFD
57+
#else
58+
#define VOLUME1 USBFD
59+
#endif
60+
#endif
61+
#endif
62+
#if ENABLED(MULTI_VOLUME)
63+
#endif
64+
65+
//========================================================
66+
3567
#if ENABLED(MARLIN_SMALL_BUILD)
3668
#undef EEPROM_CHITCHAT
3769
#undef CAPABILITIES_REPORT

0 commit comments

Comments
 (0)