| 57 | } // namespace |
| 58 | |
| 59 | String toString(Partition::Type type, uint8_t subType) |
| 60 | { |
| 61 | String s; |
| 62 | switch(type) { |
| 63 | case Partition::Type::app: |
| 64 | s = F("app/"); |
| 65 | if(auto v = appSubTypeStrings[Partition::SubType::App(subType)]) { |
| 66 | s += String(v); |
| 67 | } else { |
| 68 | s += subType; |
| 69 | } |
| 70 | break; |
| 71 | case Partition::Type::data: |
| 72 | s = F("data/"); |
| 73 | if(auto v = dataSubTypeStrings[Partition::SubType::Data(subType)]) { |
| 74 | s += String(v); |
| 75 | } else { |
| 76 | s += subType; |
| 77 | } |
| 78 | break; |
| 79 | |
| 80 | case Partition::Type::storage: |
| 81 | s = F("storage/"); |
| 82 | if(auto v = toString(Device::Type(subType))) { |
| 83 | s += v; |
| 84 | } else { |
| 85 | s += subType; |
| 86 | } |
| 87 | break; |
| 88 | |
| 89 | default: |
| 90 | s = unsigned(type); |
| 91 | s += '.'; |
| 92 | s += subType; |
| 93 | } |
| 94 | return s; |
| 95 | } |
| 96 | |
| 97 | String toLongString(Partition::Type type, uint8_t subType) |
| 98 | { |
no test coverage detected