Skip to content

Commit

Permalink
fix stick build error
Browse files Browse the repository at this point in the history
  • Loading branch information
rennancockles committed Mar 7, 2025
1 parent 877de70 commit d64ba89
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/massStorage.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#ifdef ARDUINO_USB_MODE

#include "massStorage.h"
#include "core/display.h"
#include <USB.h>
Expand Down Expand Up @@ -196,3 +198,5 @@ void drawUSBStickIcon(bool plugged) {
// Led
tft.fillRoundRect(ledX, ledY, ledW, ledH, radius, plugged ? TFT_GREEN : TFT_RED);
}

#endif // ARDUINO_USB_MODE
3 changes: 3 additions & 0 deletions src/core/massStorage.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#ifdef ARDUINO_USB_MODE

#ifndef __MASS_STORAGE_H__
#define __MASS_STORAGE_H__

Expand Down Expand Up @@ -49,3 +51,4 @@ bool usbStartStopCallback(uint8_t power_condition, bool start, bool load_eject);
void drawUSBStickIcon(bool plugged);

#endif // MASS_STORAGE_H
#endif // ARDUINO_USB_MODE
2 changes: 2 additions & 0 deletions src/core/menu_items/FileMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ void FileMenu::optionsMenu() {
{"SD Card", [=]() { loopSD(SD); }},
{"LittleFS", [=]() { loopSD(LittleFS); }},
{"WebUI", [=]() { loopOptionsWebUi(); }},
#ifdef ARDUINO_USB_MODE
{"Mass Storage", [=]() { MassStorage(); }},
#endif
{"Main Menu", [=]() { backToMenu(); }},
};

Expand Down

0 comments on commit d64ba89

Please sign in to comment.