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