Commit adding basic ethernet capability to the GW application - responding to pings.
[can-benchmark.git] / rtems / gw / cangw / init.c
index c7209d1..63e00ea 100644 (file)
@@ -58,50 +58,51 @@ void bad_rtems_status(rtems_status_code status, int fail_level, const char *text
 }
 
 
-
-
-rtems_task Init(
-  rtems_task_argument ignored
-)
-{
-  rtems_status_code status;
-
-  printf( "\n\nRTEMS v "
-          BUILD_VERSION_STRING(__RTEMS_MAJOR__ ,__RTEMS_MINOR__ ,__RTEMS_REVISION__)
-         "\n");
-  
-  rtems_monitor_init(RTEMS_MONITOR_SUSPEND|RTEMS_MONITOR_GLOBAL);
-  /*rtems_capture_cli_init (0);*/
-  
-  printf( "Starting application " SW_VER_ID " v "
-          BUILD_VERSION_STRING(SW_VER_MAJOR,SW_VER_MINOR,SW_VER_PATCH)
-         "\n" );
 \r
-  
-
-  rtems_shell_init("SHLL",RTEMS_MINIMUM_STACK_SIZE+0x1000,
-              SHELL_TASK_PRIORITY,"/dev/console",1,0, NULL);
 
-  rtems_shell_add_cmd("startGW", "app",
-                "initialize can driver and startGW",
-                start_can);
-  
-  rtems_shell_add_cmd("stopGW", "app",
-                "stops GW",
-                end_can);
-           
-  rtems_shell_add_cmd("printvar", "app",
-                "prints info from vars",
-                print_regs);\r
-                \r
-  rtems_shell_add_cmd("printcan", "app",\r
-                "prints error rate from CANs",\r
-                print_can_totals);
-\r
-                \r
-                //rtems_monitor_wakeup();
-
-  status = rtems_task_delete( RTEMS_SELF );
-  
-  exit( 0 );
+rtems_task Init(rtems_task_argument ignored){
+    rtems_status_code status;
+    
+    printf( "\n\nRTEMS v "
+            BUILD_VERSION_STRING(__RTEMS_MAJOR__ ,__RTEMS_MINOR__ ,__RTEMS_REVISION__)
+        "\n");
+    
+    rtems_monitor_init(RTEMS_MONITOR_SUSPEND|RTEMS_MONITOR_GLOBAL);
+    /*rtems_capture_cli_init (0);*/
+    
+    printf( "Starting application " SW_VER_ID " v "
+            BUILD_VERSION_STRING(SW_VER_MAJOR,SW_VER_MINOR,SW_VER_PATCH)
+        "\n" );
+    \r
+    
+    rtems_shell_init("SHLL", RTEMS_MINIMUM_STACK_SIZE+0x1000,
+                SHELL_TASK_PRIORITY, "/dev/console", 1, 0, NULL);
+    
+    rtems_shell_add_cmd("startGW", "app",
+                    "initialize can driver and startGW",
+                    start_can);
+    
+    rtems_shell_add_cmd("stopGW", "app",
+                    "stops GW",
+                    end_can);
+            
+    rtems_shell_add_cmd("printvar", "app",
+                    "prints info from vars",
+                    print_regs);\r
+                    \r
+    rtems_shell_add_cmd("printcan", "app",\r
+                    "prints error rate from CANs",\r
+                    print_can_totals);
+    \r
+    rtems_shell_add_cmd("startNET", "app",\r
+                    "tries to start network adapter",\r
+                    start_net);\r
+    \r
+    rtems_shell_add_cmd("showNET", "app",\r
+                    "prints some diagnostic info from network adapter/driver",\r
+                    show_net);\r
+    
+    status = rtems_task_delete( RTEMS_SELF );
+    
+    exit( 0 );
 }