include/can_driver.h
changeset 145 e747d2e26af0
parent 24 a9543d2ccd56
child 301 f4b64aa848e1
equal deleted inserted replaced
144:3ebf16150b2e 145:e747d2e26af0
    25 
    25 
    26 struct struct_s_BOARD;
    26 struct struct_s_BOARD;
    27 
    27 
    28 typedef struct struct_s_BOARD s_BOARD;
    28 typedef struct struct_s_BOARD s_BOARD;
    29 
    29 
       
    30 #include "applicfg.h"
    30 #include "can.h"
    31 #include "can.h"
    31 
       
    32 UNS8 canReceive(CAN_HANDLE fd0, Message *m);
       
    33 UNS8 canSend(CAN_HANDLE fd0, Message *m);
       
    34 CAN_HANDLE canOpen(s_BOARD *board);
       
    35 int canClose(CAN_HANDLE fd0);
       
    36 void canReceiveLoop(CAN_HANDLE fd0);
       
    37 
       
    38 #include "data.h"
       
    39 
    32 
    40 struct struct_s_BOARD {
    33 struct struct_s_BOARD {
    41   char * busname;
    34   char * busname;
    42   int baudrate;
    35   char * baudrate;
    43   CO_Data * d;
       
    44 };
    36 };
    45 
    37 
       
    38 #ifndef DLL_CALL
       
    39 #define DLL_CALL(funcname) funcname##_driver
    46 #endif
    40 #endif
       
    41 
       
    42 #ifndef FCT_PTR_INIT
       
    43 #define FCT_PTR_INIT
       
    44 #endif
       
    45 
       
    46 
       
    47 UNS8 DLL_CALL(canReceive)(CAN_HANDLE, Message *)FCT_PTR_INIT;
       
    48 UNS8 DLL_CALL(canSend)(CAN_HANDLE, Message *)FCT_PTR_INIT;
       
    49 CAN_HANDLE DLL_CALL(canOpen)(s_BOARD *)FCT_PTR_INIT;
       
    50 int DLL_CALL(canClose)(CAN_HANDLE)FCT_PTR_INIT;
       
    51 
       
    52 #endif