use COMMAND_HANDLER macro to define all commands
[openocd.git] / src / flash / mflash.c
index 5a392a4d64f90217f679ef26983cf0b9b8c0aedb..5a9b7c355df1e7325b87033e06200147c3459909 100644 (file)
@@ -408,7 +408,7 @@ static int mg_mflash_probe(void)
        return mg_dsk_drv_info();
 }
 
-static int mg_probe_cmd(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+COMMAND_HANDLER(mg_probe_cmd)
 {
        int ret;
 
@@ -702,7 +702,7 @@ static int mg_mflash_write(uint32_t addr, uint8_t *buff, uint32_t len)
        return ret;
 }
 
-static int mg_write_cmd(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+COMMAND_HANDLER(mg_write_cmd)
 {
        uint32_t address, buf_cnt, cnt, res, i;
        uint8_t *buffer;
@@ -766,7 +766,7 @@ mg_write_cmd_err:
        return ret;
 }
 
-static int mg_dump_cmd(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+COMMAND_HANDLER(mg_dump_cmd)
 {
        uint32_t address, size_written, size, cnt, res, i;
        uint8_t *buffer;
@@ -1208,8 +1208,7 @@ static int mg_erase_nand(void)
        return ret;
 }
 
-int mg_config_cmd(struct command_context_s *cmd_ctx, char *cmd,
-               char **args, int argc)
+COMMAND_HANDLER(mg_config_cmd)
 {
        double fin, fout;
        mg_pll_t pll;
@@ -1281,7 +1280,7 @@ int mflash_init_drivers(struct command_context_s *cmd_ctx)
        return ERROR_OK;
 }
 
-static int mg_bank_cmd(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+COMMAND_HANDLER(mg_bank_cmd)
 {
        target_t *target;
        int i;

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)