MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / startMassStorageWithFlash

Function startMassStorageWithFlash

Tactility/Source/hal/usb/Usb.cpp:96–109  ·  view source on GitHub ↗

NEW: Flash mass storage functions

Source from the content-addressed store, hash-verified

94
95// NEW: Flash mass storage functions
96bool startMassStorageWithFlash(bool fromBootMode) {
97 if (!canStartNewMode()) {
98 LOGGER.error("Can't start flash mass storage");
99 return false;
100 }
101
102 if (tusbStartMassStorageWithFlash(fromBootMode)) {
103 currentMode = Mode::MassStorageFlash;
104 return true;
105 } else {
106 LOGGER.error("Failed to init flash mass storage");
107 return false;
108 }
109}
110
111bool canRebootIntoMassStorageFlash() {
112 return tusbCanStartMassStorageWithFlash();

Callers 1

setupUsbBootModeMethod · 0.50

Calls 3

canStartNewModeFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected