4
4
// SPDX-License-Identifier: MIT
5
5
6
6
#include <SdFat.h> // SDFat - Adafruit Fork
7
- #include <Adafruit_TinyUSB.h>
8
7
#include <PicoDVI.h>
9
8
#include "../../console.h"
10
9
#include "../../arduino_hooks.h"
11
10
12
11
#undef USE_DISPLAY
13
12
#define USE_DISPLAY (1)
14
13
14
+ #ifndef USE_MSC
15
+ #define USE_MSC (0)
16
+ #endif
17
+
15
18
#if USE_DISPLAY
16
19
DVItext1 display (DVI_RES_800x240p30 , adafruit_feather_dvi_cfg );
17
20
#endif
@@ -20,7 +23,6 @@ DVItext1 display(DVI_RES_800x240p30, adafruit_feather_dvi_cfg);
20
23
#define SD_CONFIG SdSpiConfig(SD_CS_PIN, DEDICATED_SPI, SPI_CLOCK)
21
24
DedicatedSpiCard blockdevice ;
22
25
FatFileSystem SD ; // Filesystem object from SdFat
23
- Adafruit_USBD_MSC usb_msc ; // USB mass storage object
24
26
25
27
// =========================================================================================
26
28
// Define Board-Data
@@ -34,6 +36,8 @@ Adafruit_USBD_MSC usb_msc; // USB mass storage object
34
36
35
37
// FUNCTIONS REQUIRED FOR USB MASS STORAGE ---------------------------------
36
38
39
+ #if USE_MSC
40
+ Adafruit_USBD_MSC usb_msc ; // USB mass storage object
37
41
static bool msc_changed = true; // Is set true on filesystem changes
38
42
39
43
// Callback on READ10 command.
@@ -54,6 +58,7 @@ void msc_flush_cb(void) {
54
58
digitalWrite (LED_BUILTIN , LOW );
55
59
msc_changed = true;
56
60
}
61
+ #endif
57
62
58
63
#if USE_DISPLAY
59
64
uint16_t underCursor = ' ' ;
@@ -110,6 +115,7 @@ bool port_init_early() {
110
115
if (!usb_msc .begin ()) {
111
116
_puts ("Failed to initialize USB MSC" ); return false;
112
117
}
118
+ #endif
113
119
return true;
114
120
}
115
121
0 commit comments