added crc32 command to usb shell (#1911)

This commit is contained in:
Bernd Herzog 2024-02-17 10:38:09 +01:00 committed by GitHub
parent ed834e3553
commit 27dc37713b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 37 additions and 2 deletions

View file

@ -42,6 +42,7 @@ void cmd_sd_read(BaseSequentialStream* chp, int argc, char* argv[]);
void cmd_sd_read_binary(BaseSequentialStream* chp, int argc, char* argv[]);
void cmd_sd_write(BaseSequentialStream* chp, int argc, char* argv[]);
void cmd_sd_write_binary(BaseSequentialStream* chp, int argc, char* argv[]);
void cmd_sd_crc32(BaseSequentialStream* chp, int argc, char* argv[]);
static std::filesystem::path path_from_string8(char* path) {
std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t> conv;
@ -62,6 +63,7 @@ static std::filesystem::path path_from_string8(char* path) {
{"ftell", cmd_sd_tell}, \
{"fread", cmd_sd_read}, \
{"frb", cmd_sd_read_binary}, \
{"fwrite", cmd_sd_write}, \
{"fwb", cmd_sd_write_binary}
{"fwrite", cmd_sd_write}, \
{"fwb", cmd_sd_write_binary}, \
{"crc32", cmd_sd_crc32}
// clang-format on