--- a/examples/SillySlave/main.c Tue Feb 23 08:09:57 2010 +0100
+++ b/examples/SillySlave/main.c Tue Feb 23 08:12:19 2010 +0100
@@ -43,6 +43,13 @@
}
#endif
+#if defined(WIN32) && !defined(__CYGWIN__)
+void pause(void)
+{
+ system("PAUSE");
+}
+#endif
+
/**
* Please edit main.h defines before compiling
--- a/examples/SillySlave/main.h Tue Feb 23 08:09:57 2010 +0100
+++ b/examples/SillySlave/main.h Tue Feb 23 08:12:19 2010 +0100
@@ -37,10 +37,7 @@
#if defined(WIN32) && !defined(__CYGWIN__)
#include <windows.h>
#include "getopt.h"
-void pause(void)
-{
- system("PAUSE");
-}
+void pause(void);
#else
#include <unistd.h>
#include <stdio.h>
@@ -55,11 +52,10 @@
* Please tune the following defines to suit your needs:
*/
#define NODE_MASTER 0x1
-#define NODE_SLAVE 0x12
-#define DRIVER_LIBRARY "libcanfestival_can_kvaser.so"
-#define BAUDRATE 250000
+#define NODE_SLAVE 0x40
+#define DRIVER_LIBRARY "can_ixxat_win32.dll"
+#define BAUDRATE 125
#define BUS 0
#endif /* _MAIN_H */
-
--- a/examples/SillySlave/slave.c Tue Feb 23 08:09:57 2010 +0100
+++ b/examples/SillySlave/slave.c Tue Feb 23 08:12:19 2010 +0100
@@ -57,7 +57,7 @@
s_BOARD board;
sprintf(busName, "%u", bus);
- sprintf(baudRate, "%u", baudrate);
+ sprintf(baudRate, "%uK", baudrate);
board.busname = busName;
board.baudrate = baudRate;
@@ -73,6 +73,8 @@
SillySlave_Data.storeODSubIndex = SillySlave_storeODSubIndex;
SillySlave_Data.post_emcy = SillySlave_post_emcy;
+ TimerInit();
+
if(!canOpen(&board, &SillySlave_Data))
{
printf("\n\aInitCANdevice() CAN bus %s opening error, baudrate=%s\n",board.busname, board.baudrate);
@@ -82,7 +84,7 @@
printf("\nInitCANdevice(), canOpen() OK, starting timer loop...\n");
- /* Start timer thread */
+ /* Start timer thread */
StartTimerLoop(&InitNode);
/* wait Ctrl-C */