shell: flash: show JEDEC ID when running flash info

tags/0.1.0
S.J.R. van Schaik 7 years ago
parent 81430df971
commit 84454c8054
  1. 6
      source/shell/flash.c

@ -93,6 +93,7 @@ static int do_flash_release(struct console *con, size_t argc, const char **argv)
static int do_flash_info(struct console *con, size_t argc, const char **argv)
{
char jedec_id[3] = { 0, 0, 0 };
size_t size, capacity;
(void)argv;
@ -103,6 +104,11 @@ static int do_flash_info(struct console *con, size_t argc, const char **argv)
return -1;
}
if (flash_get_jedec_id(flash, jedec_id, 3)) {
fprintf(con->fp, " JEDEC ID: %02x%02x%02x\n",
jedec_id[0], jedec_id[1], jedec_id[2]);
}
size = flash_get_size(flash);
capacity = flash_get_capacity(flash);

Loading…
Cancel
Save