CHANGED: - canReceive and canSend return now 1 on error and 0 on success
authorChristian Taedcke <Christian.Taedcke@ica-traffic.de>
Fri, 19 Feb 2010 08:20:21 +0100
changeset 647 8203ce2b9752
parent 646 4177b05ab835
child 648 dd0a627142c6
CHANGED: - canReceive and canSend return now 1 on error and 0 on success
drivers/can_ixxat_win32/ixxat.cpp
--- a/drivers/can_ixxat_win32/ixxat.cpp	Thu Sep 09 15:28:48 2010 +0200
+++ b/drivers/can_ixxat_win32/ixxat.cpp	Fri Feb 19 08:20:21 2010 +0100
@@ -130,7 +130,8 @@
       res = VCI_TransmitObj(m_BoardHdl, m_TxQueHdl, m->cob_id, m->len, const_cast<unsigned char*>(m->data));
    else
       res = VCI_RequestObj(m_BoardHdl, m_TxQueHdl, m->cob_id, m->len);
-   return (res == false); // false -> OK 
+
+   return (res == VCI_OK);
    }
 
 
@@ -297,13 +298,13 @@
 extern "C"
    UNS8 __stdcall canReceive_driver(CAN_HANDLE inst, Message *m)
    {
-   return (UNS8)reinterpret_cast<IXXAT*>(inst)->receive(m);
+     return reinterpret_cast<IXXAT*>(inst)->receive(m) ? 0 : 1;
    }
                             
 extern "C"
    UNS8 __stdcall canSend_driver(CAN_HANDLE inst, Message const *m)
    {
-   return (UNS8)reinterpret_cast<IXXAT*>(inst)->send(m);
+     return reinterpret_cast<IXXAT*>(inst)->send(m) ? 0 : 1;
    }
 
 extern "C"