esp32: esp_err_to_name_r: print error code as hex and decimal

This commit is contained in:
Ivan Grokhotkov
2018-06-11 20:52:30 +08:00
parent 41095f8466
commit 6f40b528fa
2 changed files with 2 additions and 2 deletions

View File

@ -473,7 +473,7 @@ const char *esp_err_to_name_r(esp_err_t code, char *buf, size_t buflen)
return buf;
}
snprintf(buf, buflen, "Unknown error %d", code);
snprintf(buf, buflen, "%s 0x%x(%d)", esp_unknown_msg, code, code);
return buf;
}

View File

@ -58,7 +58,7 @@ const char *esp_err_to_name_r(esp_err_t code, char *buf, size_t buflen)
return buf;
}
snprintf(buf, buflen, "Unknown error %d", code);
snprintf(buf, buflen, "%s 0x%x(%d)", esp_unknown_msg, code, code);
return buf;
}