drivers/can_ixxat_win32/ixxat.cpp
changeset 683 a3ff0e3e9829
parent 655 ea1ddcc77acf
child 685 b38d2d8e291d
equal deleted inserted replaced
682:dce1e0af6604 683:a3ff0e3e9829
   336         if (sts.sts & STS_REMOTE_QUEUE_OVERRUN)
   336         if (sts.sts & STS_REMOTE_QUEUE_OVERRUN)
   337         {
   337         {
   338           ::OutputDebugString("\nIXXAT canBusWatchdog: Remote queue overrun detected!\n");
   338           ::OutputDebugString("\nIXXAT canBusWatchdog: Remote queue overrun detected!\n");
   339         }
   339         }
   340 
   340 
   341         if (VCI_ResetCan(m_BoardHdl, CAN_NUM) < 0)
   341         res = VCI_ResetCan(m_BoardHdl, CAN_NUM);
   342         {
   342         if (res <= 0)
   343           ::OutputDebugString("\nIXXAT canBusWatchdog: ERROR: Resetting the can module failed!\n");
   343         {
       
   344           char buf[200];
       
   345           ::sprintf(buf, "\nIXXAT canBusWatchdog: ERROR: Resetting the can module failed with code '%d'!\n", res);
       
   346           ::OutputDebugString(buf);
   344         }
   347         }
   345 
   348 
   346         if (VCI_StartCan(m_BoardHdl, CAN_NUM) < 0)
   349         res = VCI_StartCan(m_BoardHdl, CAN_NUM);
   347         {
   350         if (res <= 0)
   348           ::OutputDebugString("\nIXXAT canBusWatchdog: ERROR: Restaring the can module failed!\n");
   351         {
       
   352           char buf[200];
       
   353           ::sprintf(buf, "\nIXXAT canBusWatchdog: ERROR: Restaring the can module failed with code '%d'!\n", res);
       
   354           ::OutputDebugString(buf);
   349         }
   355         }
   350       }
   356       }
   351     }
   357     }
   352 
   358 
   353     if (SetTimer(NULL, m_watchdogTimerId, IXXAT::CAN_BUS_WATCHDOG_INTERVAL_MSEC, IXXAT::canBusWatchdog) == 0)
   359     if (SetTimer(NULL, m_watchdogTimerId, IXXAT::CAN_BUS_WATCHDOG_INTERVAL_MSEC, IXXAT::canBusWatchdog) == 0)