drivers/can_multi_peeakwin32/cancfg.h
changeset 710 e7a45c77d6ec
parent 695 0271f08ba819
equal deleted inserted replaced
709:4a8b50dcc4c0 710:e7a45c77d6ec
       
     1 /*
       
     2 This file is part of CanFestival, a library implementing CanOpen Stack. 
       
     3 
       
     4 Copyright (C): Jaroslav Fojtik
       
     5 
       
     6 See COPYING file for copyrights details.
       
     7 
       
     8 This library is free software; you can redistribute it and/or
       
     9 modify it under the terms of the GNU Lesser General Public
       
    10 License as published by the Free Software Foundation; either
       
    11 version 2.1 of the License, or (at your option) any later version.
       
    12 
       
    13 This library is distributed in the hope that it will be useful,
       
    14 but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    16 Lesser General Public License for more details.
       
    17 
       
    18 You should have received a copy of the GNU Lesser General Public
       
    19 License along with this library; if not, write to the Free Software
       
    20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
       
    21 */
       
    22 
       
    23 #ifndef __CANCFG_H__
       
    24 #define __CANCFG_H__
       
    25 
       
    26 
       
    27 #if defined(__CYGWIN__)
       
    28 #include <windef.h>
       
    29 #else
       
    30 #include <windows.h>
       
    31 #endif
       
    32 
       
    33 // Following part of the file is copied by configure script
       
    34 // from choosen PcanLight header file
       
    35 //-------------------------------------------------------------------------------
       
    36 //-------------------------------------------------------------------------------
       
    37 //-------------------------------------------------------------------------------
       
    38 
       
    39 #ifdef PCAN2_HEADER_
       
    40  #include "pcan_2usb.h"
       
    41  #define CAN_Init(wBTR0BTR1,Type) CAN2_Init(wBTR0BTR1,Type)
       
    42  #define CAN_Close()		  CAN2_Close()
       
    43  #define CAN_Status()		  CAN2_Status()
       
    44  #define CAN_Write(PCANMsg)	  CAN2_Write(PCANMsg)
       
    45  #define CAN_Read(PCANMsg)	  CAN2_Read(PCANMsg)  
       
    46  #define CAN_VersionInfo(lpszTextBuff) CAN2_VersionInfo(lpszTextBuff)
       
    47  #define CAN_ResetClient()       CAN2_ResetClient() 
       
    48  #define CAN_MsgFilter(FromID,ToID,Type) CAN2_MsgFilter(FromID,ToID,Type)
       
    49  #define CAN_ReadEx(pMsgBuff,pRcvTime) CAN2_ReadEx(pMsgBuff,pRcvTime)
       
    50  #define CAN_SetRcvEvent(hEvent) CAN2_SetRcvEvent(hEvent)
       
    51 #else
       
    52  #include "pcan_usb.h"
       
    53 #endif
       
    54 
       
    55 
       
    56 #endif