X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/0c60e90bdf1a75402f9cc86eb300c5619dd895bc..b29b333865c98b5e48073731980fa6c3cc58f1eb:/rtems/gw/cangw/init.c diff --git a/rtems/gw/cangw/init.c b/rtems/gw/cangw/init.c index c7209d1..63e00ea 100644 --- a/rtems/gw/cangw/init.c +++ b/rtems/gw/cangw/init.c @@ -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" ); - - - 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); - - rtems_shell_add_cmd("printcan", "app", - "prints error rate from CANs", - print_can_totals); - - - //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" ); + + + 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); + + rtems_shell_add_cmd("printcan", "app", + "prints error rate from CANs", + print_can_totals); + + rtems_shell_add_cmd("startNET", "app", + "tries to start network adapter", + start_net); + + rtems_shell_add_cmd("showNET", "app", + "prints some diagnostic info from network adapter/driver", + show_net); + + status = rtems_task_delete( RTEMS_SELF ); + + exit( 0 ); }