X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/0c60e90bdf1a75402f9cc86eb300c5619dd895bc..ddc40c70cfce8c93b228bc28a3144da45acd6708:/rtems/gw/cangw/helpers.h diff --git a/rtems/gw/cangw/helpers.h b/rtems/gw/cangw/helpers.h index 0c3a0d0..daed658 100644 --- a/rtems/gw/cangw/helpers.h +++ b/rtems/gw/cangw/helpers.h @@ -1,20 +1,80 @@ -#include -#include "system.h" -#include "app_def.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -int start_can(int argc, char** argv); -int end_can(int argc, char** argv); -int print_regs(int argc, char** argv); -int print_can_totals(int argc, char** argv); \ No newline at end of file +#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