X-Git-Url: http://rtime.felk.cvut.cz/gitweb/CanFestival-3.git/blobdiff_plain/03ba5dc5f5da4b3f447a959ef965972a66e8b1b7..76ae85fea330814037d87238f8d75853992f2c1c:/examples/win32test/main.c diff --git a/examples/win32test/main.c b/examples/win32test/main.c index 6a9c98a..ca342d9 100644 --- a/examples/win32test/main.c +++ b/examples/win32test/main.c @@ -31,12 +31,13 @@ performs SDO reads and prints some slave node information. Usage: - win32test + win32test [can driver dll filename [baud rate]] - where node_id is node ID in decimal format + 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. +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 @@ int main(int argc, char *argv[]) /* 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 @@ int main(int argc, char *argv[]) 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))