]> rtime.felk.cvut.cz Git - CanFestival-3.git/blobdiff - include/can_driver.h
Re-write doxygen tags in headers files to generate User API documentation
[CanFestival-3.git] / include / can_driver.h
index d6a23df8b5af569aa6b420ebb26602b8d6184090..16c5098b527cdedcdb68531a8c0e1486a5d9f359 100644 (file)
@@ -30,10 +30,16 @@ typedef struct struct_s_BOARD s_BOARD;
 #include "applicfg.h"
 #include "can.h"
 
+/** 
+ * @brief The CAN board configuration 
+ * @ingroup can
+ * @{
+ */
 struct struct_s_BOARD {
   char * busname;
   char * baudrate;
 };
+/** @} */
 
 #ifndef DLL_CALL
 #define DLL_CALL(funcname) funcname##_driver
@@ -48,32 +54,33 @@ UNS8 DLL_CALL(canReceive)(CAN_HANDLE, Message *)FCT_PTR_INIT;
 UNS8 DLL_CALL(canSend)(CAN_HANDLE, Message *)FCT_PTR_INIT;
 CAN_HANDLE DLL_CALL(canOpen)(s_BOARD *)FCT_PTR_INIT;
 int DLL_CALL(canClose)(CAN_HANDLE)FCT_PTR_INIT;
+UNS8 DLL_CALL(canChangeBaudRate)(CAN_HANDLE, char *)FCT_PTR_INIT;
 
 #if defined DEBUG_MSG_CONSOLE_ON || defined NEED_PRINT_MESSAGE
 #include "def.h"
 
-#define _P(fc) case fc: printf(#fc" ");break;
+#define _P(fc) case fc: MSG(#fc" ");break;
 
 static inline void print_message(Message *m)
 {
     int i;
     UNS8 fc;
-    printf("id:%02x ", m->cob_id & 0x7F);
+    MSG("id:%02x ", m->cob_id & 0x7F);
     fc = m->cob_id >> 7;
     switch(fc)
     {
         case SYNC: 
             if(m->cob_id == 0x080)
-                printf("SYNC ");
+                MSG("SYNC ");
             else
-                printf("EMCY ");
+                MSG("EMCY ");
         break;
 #ifdef CO_ENABLE_LSS
         case LSS:
                if(m->cob_id == 0x7E5)
-                printf("MLSS ");
+                MSG("MLSS ");
             else
-                printf("SLSS ");
+                MSG("SLSS ");
         break;
 #endif
         _P(TIME_STAMP)
@@ -113,11 +120,11 @@ static inline void print_message(Message *m)
             _P(ABORT_TRANSFER_REQUEST)
         }
     }
-    printf(" rtr:%d", m->rtr);
-    printf(" len:%d", m->len);
+    MSG(" rtr:%d", m->rtr);
+    MSG(" len:%d", m->len);
     for (i = 0 ; i < m->len ; i++)
-        printf(" %02x", m->data[i]);
-    printf("\n");
+        MSG(" %02x", m->data[i]);
+    MSG("\n");
 }
 
 #endif