File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,10 +15,12 @@ an error occurs.
1515
1616Shell commands need to be added manually to the shell on initialization,
1717usually this is done with the macro command `SHELL_COMMAND()`.
18+ Please note that the command name is *not* written in quotes and can not have
19+ any whitespaces!
1820```c
1921#include "shell.h"
2022
21- SHELL_COMMAND("command name" , "command description", cmd_handler);
23+ SHELL_COMMAND(command_name , "command description", cmd_handler);
2224
2325/* ... */
2426 shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE)
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ static msg_t _main_msg_queue[MAIN_QUEUE_SIZE];
1010extern int udp_send (int argc , char * * argv );
1111extern int udp_server (int argc , char * * argv );
1212
13- SHELL_COMMAND (" udp" , "send udp packets" , udp_send );
14- SHELL_COMMAND (" udps" , "start udp server" , udp_server );
13+ SHELL_COMMAND (udp , "send udp packets" , udp_send );
14+ SHELL_COMMAND (udps , "start udp server" , udp_server );
1515
1616int main (void )
1717{
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ static msg_t _main_msg_queue[MAIN_QUEUE_SIZE];
3636
3737extern int udp_cmd (int argc , char * * argv );
3838
39- SHELL_COMMAND (" udp" , "send data over UDP and listen on UDP ports" , udp_cmd );
39+ SHELL_COMMAND (udp , "send data over UDP and listen on UDP ports" , udp_cmd );
4040
4141#ifdef MODULE_GNRC_SIXLOWPAN
4242static char _stack [THREAD_STACKSIZE_MAIN ];
You can’t perform that action at this time.
0 commit comments