MCPcopy Create free account
hub / github.com/SmingHub/Sming / listDevices

Function listDevices

Sming/Components/Storage/src/Debug.cpp:26–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26void listDevices(Print& out, bool fullPartitionInfo)
27{
28 out.println();
29 out.println(_F("Registered storage devices:"));
30 for(auto& dev : Storage::getDevices()) {
31 out << " " << dev << _F(". Partitions:");
32 if(!dev.partitions()) {
33 out.println(_F(" None."));
34 continue;
35 }
36
37 out.println();
38 for(auto part : dev.partitions()) {
39 if(fullPartitionInfo) {
40 out << " " << part << endl;
41 } else {
42 out << " " << part.name();
43 }
44 }
45 out.println();
46 }
47 out.println();
48}
49
50} // namespace Storage::Debug

Callers 1

initFunction · 0.85

Calls 3

getDevicesFunction · 0.85
printlnMethod · 0.80
nameMethod · 0.45

Tested by

no test coverage detected