MCPcopy Create free account
hub / github.com/Heltec-Aaron-Lee/WiFi_Kit_series / _err2str

Function _err2str

libraries/Update/src/Updater.cpp:16–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14#endif /* UPDATE_NOCRYPT */
15
16static const char *_err2str(uint8_t _error) {
17 if (_error == UPDATE_ERROR_OK) {
18 return ("No Error");
19 } else if (_error == UPDATE_ERROR_WRITE) {
20 return ("Flash Write Failed");
21 } else if (_error == UPDATE_ERROR_ERASE) {
22 return ("Flash Erase Failed");
23 } else if (_error == UPDATE_ERROR_READ) {
24 return ("Flash Read Failed");
25 } else if (_error == UPDATE_ERROR_SPACE) {
26 return ("Not Enough Space");
27 } else if (_error == UPDATE_ERROR_SIZE) {
28 return ("Bad Size Given");
29 } else if (_error == UPDATE_ERROR_STREAM) {
30 return ("Stream Read Timeout");
31 } else if (_error == UPDATE_ERROR_MD5) {
32 return ("MD5 Check Failed");
33 } else if (_error == UPDATE_ERROR_MAGIC_BYTE) {
34 return ("Wrong Magic Byte");
35 } else if (_error == UPDATE_ERROR_ACTIVATE) {
36 return ("Could Not Activate The Firmware");
37 } else if (_error == UPDATE_ERROR_NO_PARTITION) {
38 return ("Partition Could Not be Found");
39 } else if (_error == UPDATE_ERROR_BAD_ARGUMENT) {
40 return ("Bad Argument");
41 } else if (_error == UPDATE_ERROR_ABORT) {
42 return ("Aborted");
43#ifndef UPDATE_NOCRYPT
44 } else if (_error == UPDATE_ERROR_DECRYPT) {
45 return ("Decryption error");
46#endif /* UPDATE_NOCRYPT */
47#ifdef UPDATE_SIGN
48 } else if (_error == UPDATE_ERROR_SIGN) {
49 return ("Signature Verification Failed");
50#endif /* UPDATE_SIGN */
51 }
52 return ("UNKNOWN");
53}
54
55static bool _partitionIsBootable(const esp_partition_t *partition) {
56 uint8_t buf[ENCRYPTED_BLOCK_SIZE];

Callers 2

printErrorMethod · 0.85
errorStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected