|
|
|
@ -12,6 +12,7 @@ |
|
|
|
|
#include <shell.h> |
|
|
|
|
|
|
|
|
|
static void do_flash_probe(const char *s); |
|
|
|
|
static void do_flash_release(const char *s); |
|
|
|
|
static void do_flash_info(const char *s); |
|
|
|
|
static void do_flash_read(const char *s); |
|
|
|
|
static void do_flash_write(const char *s); |
|
|
|
@ -19,6 +20,7 @@ static void do_flash_erase(const char *s); |
|
|
|
|
|
|
|
|
|
static struct cmd flash_cmds[] = { |
|
|
|
|
{ "probe", do_flash_probe }, |
|
|
|
|
{ "release", do_flash_release }, |
|
|
|
|
{ "info", do_flash_info }, |
|
|
|
|
{ "read", do_flash_read }, |
|
|
|
|
{ "write", do_flash_write }, |
|
|
|
@ -110,6 +112,17 @@ static void do_flash_probe(const char *s) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void do_flash_release(const char *s) |
|
|
|
|
{ |
|
|
|
|
(void)s; |
|
|
|
|
|
|
|
|
|
if (!flash) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
flash_release(flash); |
|
|
|
|
flash = NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void do_flash_info(const char *s) |
|
|
|
|
{ |
|
|
|
|
size_t size, capacity; |
|
|
|
|