]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - rtems/gw/cangw/helpers.h
Changed all (I think) files using CRLF to use LF.
[can-benchmark.git] / rtems / gw / cangw / helpers.h
index 0c3a0d012f8a463fa1b1509743bf52f151dbbfba..daed658436f41f6b62d11d22db0a388635ec34d7 100644 (file)
@@ -1,20 +1,80 @@
-#include <system_def.h>\r
-#include "system.h"\r
-#include "app_def.h"\r
-#include <unistd.h>\r
-#include <fcntl.h>\r
-#include <stdio.h>\r
-#include <errno.h>\r
-#include <stdlib.h>\r
-#include <rtems/error.h>\r
-#include <rtems/monitor.h>\r
-#include <rtems/shell.h>\r
-\r
-#include <bsp/mscan.h>\r
-#include <bsp/mscan-base.h>\r
-\r
-\r
-int start_can(int argc, char** argv);\r
-int end_can(int argc, char** argv);\r
-int print_regs(int argc, char** argv);\r
-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