# HG changeset patch # User leonid # Date 1186591107 -7200 # Node ID 8118f2da63864579c76a3b5164dd703b018ecfa1 # Parent 7b9f36dbfe5fcaf3c21323fb8dc10ca999141a54 *** empty log message *** diff -r 7b9f36dbfe5f -r 8118f2da6386 examples/win32test/main.c --- a/examples/win32test/main.c Wed Aug 08 18:29:55 2007 +0200 +++ b/examples/win32test/main.c Wed Aug 08 18:38:27 2007 +0200 @@ -31,12 +31,13 @@ Usage: - win32test - - where node_id is node ID in decimal format - -You should have CanFestival-3.dll CAN-uVCCM.dll in the search path to run this sample. -Code will work with non-UNICODE CanFestival-3.dll CAN-uVCCM.dll libraries. + win32test [can driver dll filename [baud rate]] + + where node_id is node_id in decimal format + +If driver is not specified, CAN-uVCCM.dll will be used by default. +If baudrate is not specified, 125K will be used by default. +You should have CanFestival-3.dll can driver dll in the search path to run this sample. Sample can work on other platdorms as well. ***************************************************************************/ @@ -106,7 +107,7 @@ /* process command line arguments */ if (argc < 2) { - printf("USAGE: win32test node_id [dll_file_name]\n"); + printf("USAGE: win32test [can driver dll filename [baud rate]]\n"); return 1; } @@ -117,10 +118,13 @@ return 1; } - if (argc > 2) - dll_file_name = argv[2]; - else - dll_file_name = "can_uvccm_win32.dll"; + if (argc > 2) + dll_file_name = argv[2]; + else + dll_file_name = "can_uvccm_win32.dll"; + + if (argc > 3) + MasterBoard.baudrate = argv[3]; // load can driver if (!LoadCanDriver(dll_file_name))