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

Function toString

Sming/Libraries/OtaUpgrade/OtaUpgrade/BasicStream.cpp:204–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202} // namespace OtaUpgrade
203
204String toString(OtaUpgrade::BasicStream::Error code)
205{
206 using Error = OtaUpgrade::BasicStream::Error;
207 switch(code) {
208 case Error::None:
209 return nullptr;
210 case Error::InvalidFormat:
211 return F("Invalid/Unrecognized upgrade image format");
212 case Error::UnsupportedData:
213 return F("Upgrade image contains unsupported extended data.");
214 case Error::DecryptionFailed:
215 return F("Upgrade image decryption failed.");
216 case Error::NoRomFound:
217 return F("No suitable ROM image found");
218 case Error::RomTooLarge:
219 return F("ROM image too large");
220 case Error::DowngradeNotAllowed:
221 return F("Downgrade not allowed");
222 case Error::VerificationFailed:
223 return F("Signature/Checksum verification failed");
224 case Error::FlashWriteFailed:
225 return F("Error while writing Flash memory");
226 case Error::RomActivationFailed:
227 return F("Could not activate updated ROM");
228 case Error::OutOfMemory:
229 return F("Out of memory. Allocation failed.");
230 case Error::Internal:
231 return F("Internal error");
232 default:
233 return F("<unknown error>");
234 }
235}

Callers 7

setErrorMethod · 0.70
switchRomMethod · 0.50
getMimeTypeMethod · 0.50
getErrorStringMethod · 0.50
snapshotProducerFunction · 0.50
allowPartFunction · 0.50
setFileMapMethod · 0.50

Calls 1

FFunction · 0.50

Tested by

no test coverage detected