X-Git-Url: http://git.droids-corp.org/?p=aversive.git;a=blobdiff_plain;f=projects%2Fmicrob2010%2Ftests%2Fbeacon_tsop%2Fcommands.c;h=8a98f49c61a81393ca5342bd4b7fcdb70d10454e;hp=e938a73f1e41370272e4bd312e4db5107f80a3e6;hb=a56bf7c398eb727f67ed0843c6ebef948cc0dd61;hpb=5df6410920a141733e2a79689621cd955c242499 diff --git a/projects/microb2010/tests/beacon_tsop/commands.c b/projects/microb2010/tests/beacon_tsop/commands.c index e938a73..8a98f49 100644 --- a/projects/microb2010/tests/beacon_tsop/commands.c +++ b/projects/microb2010/tests/beacon_tsop/commands.c @@ -146,6 +146,35 @@ parse_pgm_inst_t cmd_debug_speed = { }, }; +/**********************************************************/ +/* Test */ + +/* this structure is filled when cmd_test is parsed successfully */ +struct cmd_test_result { + fixed_string_t arg0; +}; + +/* function called when cmd_test is parsed successfully */ +static void cmd_test_parsed(__attribute__((unused)) void *parsed_result, + __attribute__((unused)) void *data) +{ + +} + +prog_char str_test_arg0[] = "test"; +parse_pgm_token_string_t cmd_test_arg0 = TOKEN_STRING_INITIALIZER(struct cmd_test_result, arg0, str_test_arg0); + +prog_char help_test[] = "Test the board"; +parse_pgm_inst_t cmd_test = { + .f = cmd_test_parsed, /* function to call */ + .data = NULL, /* 2nd arg of func */ + .help_str = help_test, + .tokens = { /* token list, NULL terminated */ + (prog_void *)&cmd_test_arg0, + NULL, + }, +}; + /**********************************************************/ /* in progmem */ @@ -155,5 +184,6 @@ parse_pgm_ctx_t main_ctx[] = { (parse_pgm_inst_t *)&cmd_reset, (parse_pgm_inst_t *)&cmd_debug_frame, (parse_pgm_inst_t *)&cmd_debug_speed, + (parse_pgm_inst_t *)&cmd_test, NULL, };