include/can_driver.h
changeset 561 f9be4262c68d
parent 528 0a30e161d63c
child 629 b9274b595650
equal deleted inserted replaced
560:0bb927393dd0 561:f9be4262c68d
     1 /*
     1 /*
     2 This file is part of CanFestival, a library implementing CanOpen Stack. 
     2 This file is part of CanFestival, a library implementing CanOpen Stack.
     3 
     3 
     4 Copyright (C): Edouard TISSERANT and Francis DUPIN
     4 Copyright (C): Edouard TISSERANT and Francis DUPIN
     5 
     5 
     6 See COPYING file for copyrights details.
     6 See COPYING file for copyrights details.
     7 
     7 
    28 typedef struct struct_s_BOARD s_BOARD;
    28 typedef struct struct_s_BOARD s_BOARD;
    29 
    29 
    30 #include "applicfg.h"
    30 #include "applicfg.h"
    31 #include "can.h"
    31 #include "can.h"
    32 
    32 
    33 /** 
    33 /**
    34  * @brief The CAN board configuration 
    34  * @brief The CAN board configuration
    35  * @ingroup can
    35  * @ingroup can
    36  * @{
       
    37  */
    36  */
       
    37 
       
    38 //struct struct_s_BOARD {
       
    39 //  char busname[100]; /**< The bus name on which the CAN board is connected */
       
    40 //  char baudrate[4]; /**< The board baudrate */
       
    41 //};
       
    42 
    38 struct struct_s_BOARD {
    43 struct struct_s_BOARD {
    39   char * busname;
    44   char * busname;  /**< The bus name on which the CAN board is connected */
    40   char * baudrate;
    45   char * baudrate; /**< The board baudrate */
    41 };
    46 };
    42 /** @} */
       
    43 
    47 
    44 #ifndef DLL_CALL
    48 #ifndef DLL_CALL
    45 #define DLL_CALL(funcname) funcname##_driver
    49 #define DLL_CALL(funcname) funcname##_driver
    46 #endif
    50 #endif
    47 
    51 
    67     UNS8 fc;
    71     UNS8 fc;
    68     MSG("id:%02x ", m->cob_id & 0x7F);
    72     MSG("id:%02x ", m->cob_id & 0x7F);
    69     fc = m->cob_id >> 7;
    73     fc = m->cob_id >> 7;
    70     switch(fc)
    74     switch(fc)
    71     {
    75     {
    72         case SYNC: 
    76         case SYNC:
    73             if(m->cob_id == 0x080)
    77             if(m->cob_id == 0x080)
    74                 MSG("SYNC ");
    78                 MSG("SYNC ");
    75             else
    79             else
    76                 MSG("EMCY ");
    80                 MSG("EMCY ");
    77         break;
    81         break;