X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/8eef03acb9747a40aaf92175c49e43397b872404..ddc40c70cfce8c93b228bc28a3144da45acd6708:/rtems/gw/cangw/helpers.h diff --git a/rtems/gw/cangw/helpers.h b/rtems/gw/cangw/helpers.h index 95dcf39..daed658 100644 --- a/rtems/gw/cangw/helpers.h +++ b/rtems/gw/cangw/helpers.h @@ -1,80 +1,80 @@ -#ifndef __HELPERS_H_ -#define __HELPERS_H_ - -int start_can(int argc, char** argv); -int end_can(int argc, char** argv); -int print_clocks(int argc, char** argv); -int print_can_totals(int argc, char** argv); -int start_net(int argc, char** argv); -int show_net(int argc, char** argv); -int start_load(int argc, char** argv); -int stop_load(int argc, char** argv); - -/* chain of shell command descriptors */ -static rtems_shell_cmd_t shell_command_stop_load = { - "stop_load", /* name */ - "stops cpu loading threads", /* usage */ - "user", /* topic */ - stop_load, /* command */ - NULL, /* alias */ - NULL /* next */ -}; -static rtems_shell_cmd_t shell_command_start_load = { - "start_load", /* name */ - "starts cpu loading threads", /* usage */ - "user", /* topic */ - start_load, /* command */ - NULL, /* alias */ - &shell_command_stop_load /* next */ -}; -static rtems_shell_cmd_t shell_command_start_net = { - "startNET", /* name */ - "starts ethernet driver", /* usage */ - "user", /* topic */ - start_net, /* command */ - NULL, /* alias */ - &shell_command_start_load /* next */ -}; -static rtems_shell_cmd_t shell_command_stop_gw = { - "stopGW", /* name */ - "stops CAN gateway", /* usage */ - "user", /* topic */ - end_can, /* command */ - NULL, /* alias */ - &shell_command_start_net /* next */ -}; -static rtems_shell_cmd_t shell_command_start_gw = { - "startGW", /* name */ - "starts CAN gateway", /* usage */ - "user", /* topic */ - start_can, /* command */ - NULL, /* alias */ - &shell_command_stop_gw /* next */ -}; -static rtems_shell_cmd_t shell_command_print_net = { - "show_net", /* name */ - "shows some debug information about bsdnet", /* usage */ - "user", /* topic */ - show_net, /* command */ - NULL, /* alias */ - &shell_command_start_gw /* next */ -}; -static rtems_shell_cmd_t shell_command_print_clocks = { - "print_clocks", /* name */ - "prints clock as taken from uboot", /* usage */ - "user", /* topic */ - print_clocks, /* command */ - NULL, /* alias */ - &shell_command_print_net /* next */ -}; -static rtems_shell_cmd_t shell_command_print_can_totals = { - "printcan", /* name */ - "prints can stats", /* usage */ - "user", /* topic */ - print_can_totals, /* command */ - NULL, /* alias */ - &shell_command_print_clocks /* next */ -}; - - +#ifndef __HELPERS_H_ +#define __HELPERS_H_ + +int start_can(int argc, char** argv); +int end_can(int argc, char** argv); +int print_clocks(int argc, char** argv); +int print_can_totals(int argc, char** argv); +int start_net(int argc, char** argv); +int show_net(int argc, char** argv); +int start_load(int argc, char** argv); +int stop_load(int argc, char** argv); + +/* chain of shell command descriptors */ +static rtems_shell_cmd_t shell_command_stop_load = { + "stop_load", /* name */ + "stops cpu loading threads", /* usage */ + "user", /* topic */ + stop_load, /* command */ + NULL, /* alias */ + NULL /* next */ +}; +static rtems_shell_cmd_t shell_command_start_load = { + "start_load", /* name */ + "starts cpu loading threads", /* usage */ + "user", /* topic */ + start_load, /* command */ + NULL, /* alias */ + &shell_command_stop_load /* next */ +}; +static rtems_shell_cmd_t shell_command_start_net = { + "startNET", /* name */ + "starts ethernet driver", /* usage */ + "user", /* topic */ + start_net, /* command */ + NULL, /* alias */ + &shell_command_start_load /* next */ +}; +static rtems_shell_cmd_t shell_command_stop_gw = { + "stopGW", /* name */ + "stops CAN gateway", /* usage */ + "user", /* topic */ + end_can, /* command */ + NULL, /* alias */ + &shell_command_start_net /* next */ +}; +static rtems_shell_cmd_t shell_command_start_gw = { + "startGW", /* name */ + "starts CAN gateway", /* usage */ + "user", /* topic */ + start_can, /* command */ + NULL, /* alias */ + &shell_command_stop_gw /* next */ +}; +static rtems_shell_cmd_t shell_command_print_net = { + "show_net", /* name */ + "shows some debug information about bsdnet", /* usage */ + "user", /* topic */ + show_net, /* command */ + NULL, /* alias */ + &shell_command_start_gw /* next */ +}; +static rtems_shell_cmd_t shell_command_print_clocks = { + "print_clocks", /* name */ + "prints clock as taken from uboot", /* usage */ + "user", /* topic */ + print_clocks, /* command */ + NULL, /* alias */ + &shell_command_print_net /* next */ +}; +static rtems_shell_cmd_t shell_command_print_can_totals = { + "printcan", /* name */ + "prints can stats", /* usage */ + "user", /* topic */ + print_can_totals, /* command */ + NULL, /* alias */ + &shell_command_print_clocks /* next */ +}; + + #endif \ No newline at end of file