libPCBUSB  Version 0.8, Build 689 of September 20, 2017
macOS Library for PCAN-USB Interfaces
 All Data Structures Files Functions Variables Typedefs Defines
PCBUSB.h
Go to the documentation of this file.
00001 /* -- $HeadURL: svn://192.168.2.40/MacCAN/PCANUSB/Library/trunk/drv/pcan_api.h $ --
00002  *
00003  *  project   :  CAN - Controller Area Network
00004  *
00005  *  purpose   :  PCAN Application Programming Interface
00006  *
00007  *  copyright :  (C) 2012-2017 by UV Software, Berlin
00008  *
00009  *  compiler  :  Apple LLVM version 8.1.0 (clang-802.0.42)
00010  *
00011  *  export    :  TPCANStatus CAN_Initialize(TPCANHandle Channel, TPCANBaudrate Btr0Btr1, TPCANType HwType, DWORD IOPort, WORD Interrupt);
00012  *               TPCANStatus CAN_Uninitialize(TPCANHandle Channel);
00013  *               TPCANStatus CAN_Reset(TPCANHandle Channel);
00014  *               TPCANStatus CAN_GetStatus(TPCANHandle Channel);
00015  *               TPCANStatus CAN_Read(TPCANHandle Channel, TPCANMsg* MessageBuffer, TPCANTimestamp* TimestampBuffer);
00016  *               TPCANStatus CAN_Write(TPCANHandle Channel, TPCANMsg* MessageBuffer);
00017  *               TPCANStatus CAN_FilterMessages(TPCANHandle Channel, DWORD FromID, DWORD ToID, TPCANMode Mode);
00018  *               TPCANStatus CAN_GetValue(TPCANHandle Channel, TPCANParameter Parameter, void* Buffer, DWORD BufferLength);
00019  *               TPCANStatus CAN_SetValue(TPCANHandle Channel, TPCANParameter Parameter, void* Buffer, DWORD BufferLength);
00020  *               TPCANStatus CAN_GetErrorText(TPCANStatus Error, WORD Language, LPSTR Buffer);
00021  *               *** CAN FD capable devices ***
00022  *               TPCANStatus CAN_InitializeFD(TPCANHandle Channel, TPCANBitrateFD BitrateFD);
00023  *               TPCANStatus CAN_ReadFD(TPCANHandle Channel, TPCANMsgFD* MessageBuffer, TPCANTimestampFD* TimestampBuffer);
00024  *               TPCANStatus CAN_WriteFD(TPCANHandle Channel, TPCANMsgFD* MessageBuffer);
00025  *
00026  *  includes  :  (none)
00027  *
00028  *  author    :  Uwe Vogt, UV Software
00029  *
00030  *  e-mail    :  uwe.vogt@uv-software.de
00031  *
00032  *
00033  *  -----------  description  --------------------------------------------
00034  *
00035  *  PCAN API  -  PEAK CAN Application Programming Interface
00036  *
00037  *  This Application Programming Interface (API) is a nearly compatible
00038  *  implementation of the PEAK PCANBasic DLL on macOS (Darwin Kernel 16.x.x).
00039  *
00040  *  Supported CAN Interfaces:
00041  *  - PCAN-USB
00042  *  - PCAN-USB FD
00043  *  Up to 8 devices are supported.
00044  *
00045  *  Version of PCAN API:
00046  *  - Based on PEAKęs version of 06/21/2017
00047  */
00048 
00049 #ifndef PCAN_API_H_INCLUDED
00050 #define PCAN_API_H_INCLUDED
00051 
00052 #ifdef __cplusplus
00053 extern "C" {
00054 #   define _DEF_ARG =0
00055 #else
00056 #   define _DEF_ARG
00057 #endif
00058 
00059 /*  -----------  includes  -----------------------------------------------
00060  */
00061 
00062 
00063 /*  -----------  defines  ------------------------------------------------
00064  */
00065 
00066 #ifndef BYTE
00067 #define BYTE    unsigned char
00068 #endif
00069 #ifndef WORD
00070 #define WORD    unsigned short
00071 #endif
00072 #ifndef DWORD
00073 #define DWORD   unsigned long
00074 #endif
00075 #ifndef QWORD
00076 #define QWORD   unsigned long long
00077 #endif
00078 #ifndef UINT64
00079 #define UINT64  QWORD
00080 #endif
00081 #ifndef LPSTR
00082 #define LPSTR   char*
00083 #endif
00084 
00085 /* Defined and supported PCAN channels
00086  */
00087 #define PCAN_NONEBUS             0x00U //!< Undefined/default value for a PCAN bus
00088 
00089 #define PCAN_USBBUS1             0x51U  //!< PCAN-USB interface, channel 1
00090 #define PCAN_USBBUS2             0x52U  //!< PCAN-USB interface, channel 2
00091 #define PCAN_USBBUS3             0x53U  //!< PCAN-USB interface, channel 3
00092 #define PCAN_USBBUS4             0x54U  //!< PCAN-USB interface, channel 4
00093 #define PCAN_USBBUS5             0x55U  //!< PCAN-USB interface, channel 5
00094 #define PCAN_USBBUS6             0x56U  //!< PCAN-USB interface, channel 6
00095 #define PCAN_USBBUS7             0x57U  //!< PCAN-USB interface, channel 7
00096 #define PCAN_USBBUS8             0x58U  //!< PCAN-USB interface, channel 8
00097 
00098 /* PCAN error and status codes
00099  */
00100 #define PCAN_ERROR_OK            0x00000U  //!< No error
00101 #define PCAN_ERROR_XMTFULL       0x00001U  //!< Transmit buffer in CAN controller is full
00102 #define PCAN_ERROR_OVERRUN       0x00002U  //!< CAN controller was read too late
00103 #define PCAN_ERROR_BUSLIGHT      0x00004U  //!< Bus error: an error counter reached the 'light' limit
00104 #define PCAN_ERROR_BUSHEAVY      0x00008U  //!< Bus error: an error counter reached the 'heavy' limit
00105 #define PCAN_ERROR_BUSWARNING    PCAN_ERROR_BUSHEAVY //!< Bus error: an error counter reached the 'warning' limit
00106 #define PCAN_ERROR_BUSPASSIVE    0x40000U  //!< Bus error: the CAN controller is error passive
00107 #define PCAN_ERROR_BUSOFF        0x00010U  //!< Bus error: the CAN controller is in bus-off state
00108 #define PCAN_ERROR_ANYBUSERR     (PCAN_ERROR_BUSWARNING | PCAN_ERROR_BUSLIGHT | PCAN_ERROR_BUSHEAVY | PCAN_ERROR_BUSOFF | PCAN_ERROR_BUSPASSIVE) //!< Mask for all bus errors
00109 #define PCAN_ERROR_QRCVEMPTY     0x00020U  //!< Receive queue is empty
00110 #define PCAN_ERROR_QOVERRUN      0x00040U  //!< Receive queue was read too late
00111 #define PCAN_ERROR_QXMTFULL      0x00080U  //!< Transmit queue is full
00112 #define PCAN_ERROR_REGTEST       0x00100U  //!< Test of the CAN controller hardware registers failed (no hardware found)
00113 #define PCAN_ERROR_NODRIVER      0x00200U  //!< Driver not loaded
00114 #define PCAN_ERROR_HWINUSE       0x00400U  //!< Hardware already in use by a Net
00115 #define PCAN_ERROR_NETINUSE      0x00800U  //!< A Client is already connected to the Net
00116 #define PCAN_ERROR_ILLHW         0x01400U  //!< Hardware handle is invalid
00117 #define PCAN_ERROR_ILLNET        0x01800U  //!< Net handle is invalid
00118 #define PCAN_ERROR_ILLCLIENT     0x01C00U  //!< Client handle is invalid
00119 #define PCAN_ERROR_ILLHANDLE     (PCAN_ERROR_ILLHW | PCAN_ERROR_ILLNET | PCAN_ERROR_ILLCLIENT)  //!< Mask for all handle errors
00120 #define PCAN_ERROR_RESOURCE      0x02000U  //!< Resource (FIFO, Client, timeout) cannot be created
00121 #define PCAN_ERROR_ILLPARAMTYPE  0x04000U  //!< Invalid parameter
00122 #define PCAN_ERROR_ILLPARAMVAL   0x08000U  //!< Invalid parameter value
00123 #define PCAN_ERROR_UNKNOWN       0x10000U  //!< Unknown error
00124 #define PCAN_ERROR_ILLDATA       0x20000U  //!< Invalid data, function, or action
00125 #define PCAN_ERROR_CAUTION       0x2000000U  //!< An operation was successfully carried out, however, irregularities were registered
00126 #define PCAN_ERROR_INITIALIZE    0x4000000U  //!< Channel is not initialized [Value was changed from 0x40000 to 0x4000000]
00127 #define PCAN_ERROR_ILLOPERATION  0x8000000U  //!< Invalid operation [Value was changed from 0x80000 to 0x8000000]
00128 
00129 /* PCAN devices
00130  */
00131 #define PCAN_NONE                0x00U  //!< Undefined, unknown or not selected PCAN device value
00132 #define PCAN_PEAKCAN             0x01U  //!< PCAN Non-Plug&Play devices. NOT USED WITHIN PCAN-Basic API
00133 #define PCAN_ISA                 0x02U  //!< PCAN-ISA, PCAN-PC/104, and PCAN-PC/104-Plus
00134 #define PCAN_DNG                 0x03U  //!< PCAN-Dongle
00135 #define PCAN_PCI                 0x04U  //!< PCAN-PCI, PCAN-cPCI, PCAN-miniPCI, and PCAN-PCI Express
00136 #define PCAN_USB                 0x05U  //!< PCAN-USB and PCAN-USB Pro
00137 #define PCAN_PCC                 0x06U  //!< PCAN-PC Card
00138 #define PCAN_VIRTUAL             0x07U  //!< PCAN Virtual hardware. NOT USED WITHIN PCAN-Basic API
00139 #define PCAN_LAN                 0x08U  //!< PCAN Gateway devices
00140 
00141 /* PCAN parameters
00142  */
00143 #define PCAN_DEVICE_NUMBER       0x01U  //!< PCAN-USB device number parameter
00144 #define PCAN_5VOLTS_POWER        0x02U  //!< PCAN-PC Card 5-Volt power parameter
00145 #define PCAN_RECEIVE_EVENT       0x03U  //!< PCAN receive event handler parameter
00146 #define PCAN_MESSAGE_FILTER      0x04U  //!< PCAN message filter parameter
00147 #define PCAN_API_VERSION         0x05U  //!< PCAN-Basic API version parameter
00148 #define PCAN_CHANNEL_VERSION     0x06U  //!< PCAN device channel version parameter
00149 #define PCAN_BUSOFF_AUTORESET    0x07U  //!< PCAN Reset-On-Busoff parameter
00150 #define PCAN_LISTEN_ONLY         0x08U  //!< PCAN Listen-Only parameter
00151 #define PCAN_LOG_LOCATION        0x09U  //!< Directory path for log files
00152 #define PCAN_LOG_STATUS          0x0AU  //!< Debug-Log activation status
00153 #define PCAN_LOG_CONFIGURE       0x0BU  //!< Configuration of the debugged information (LOG_FUNCTION_***)
00154 #define PCAN_LOG_TEXT            0x0CU  //!< Custom insertion of text into the log file
00155 #define PCAN_CHANNEL_CONDITION   0x0DU  //!< Availability status of a PCAN-Channel
00156 #define PCAN_HARDWARE_NAME       0x0EU  //!< PCAN hardware name parameter
00157 #define PCAN_RECEIVE_STATUS      0x0FU  //!< Message reception status of a PCAN-Channel
00158 #define PCAN_CONTROLLER_NUMBER   0x10U  //!< CAN-Controller number of a PCAN-Channel
00159 #define PCAN_TRACE_LOCATION      0x11U  //!< Directory path for PCAN trace files
00160 #define PCAN_TRACE_STATUS        0x12U  //!< CAN tracing activation status
00161 #define PCAN_TRACE_SIZE          0x13U  //!< Configuration of the maximum file size of a CAN trace
00162 #define PCAN_TRACE_CONFIGURE     0x14U  //!< Configuration of the trace file storing mode (TRACE_FILE_***)
00163 #define PCAN_CHANNEL_IDENTIFYING 0x15U  //!< Physical identification of a USB based PCAN-Channel by blinking its associated LED
00164 #define PCAN_CHANNEL_FEATURES    0x16U  //!< Capabilities of a PCAN device (FEATURE_***)
00165 #define PCAN_BITRATE_ADAPTING    0x17U  //!< Using of an existing bit rate (PCAN-View connected to a channel)
00166 #define PCAN_BITRATE_INFO        0x18U  //!< Configured bit rate as Btr0Btr1 value
00167 #define PCAN_BITRATE_INFO_FD     0x19U  //!< Configured bit rate as TPCANBitrateFD string
00168 #define PCAN_BUSSPEED_NOMINAL    0x1AU  //!< Configured nominal CAN Bus speed as Bits per seconds
00169 #define PCAN_BUSSPEED_DATA       0x1BU  //!< Configured CAN data speed as Bits per seconds
00170 #define PCAN_IP_ADDRESS          0x1CU  //!< Remote address of a LAN channel as string in IPv4 format
00171 #define PCAN_LAN_SERVICE_STATUS  0x1DU  //!< Status of the Virtual PCAN-Gateway Service
00172 #define PCAN_ALLOW_STATUS_FRAMES 0x1EU  //!< Status messages reception status within a PCAN-Channel
00173 #define PCAN_ALLOW_RTR_FRAMES    0x1FU  //!< RTR messages reception status within a PCAN-Channel
00174 #define PCAN_ALLOW_ERROR_FRAMES  0x20U  //!< Error messages reception status within a PCAN-Channel
00175 #define PCAN_INTERFRAME_DELAY    0x21U  //!< Delay, in microseconds, between sending frames
00176 #define PCAN_ACCEPTANCE_FILTER_11BIT 0x22U  //!< Filter over code and mask patterns for 11-Bit messages
00177 #define PCAN_ACCEPTANCE_FILTER_29BIT 0x23U  //!< Filter over code and mask patterns for 29-Bit messages
00178 #define PCAN_EXT_BTR0BTR1        0x80U  //!< UVS: bit-timing register
00179 #define PCAN_EXT_TX_COUNTER      0x81U  //!< UVS: number of transmitted frames
00180 #define PCAN_EXT_RX_COUNTER      0x82U  //!< UVS: number of received frames
00181 #define PCAN_EXT_ERR_COUNTER     0x83U  //!< UVS: number of error frames
00182 #define PCAN_EXT_RX_QUE_OVERRUN  0x84U  //!< UVS: receive queue overrun counter
00183 #define PCAN_EXT_HARDWARE_VERSION 0x85U //!< UVS: version number of the interface firmware
00184 #define PCAN_EXT_SOFTWARE_VERSION 0x86U //!< UVS: version number of the driver respectively library
00185 #define PCAN_EXT_RECEIVE_CALLBACK 0x87U //!< UVS: callback function called on the reception of an URB
00186 #define PCAN_EXT_LOG_USB         0x8FU  //!< UVS: Log USB communication (URB buffer <==> CAN messages)
00187 
00188 /* PCAN parameter values
00189  */
00190 #define PCAN_PARAMETER_OFF       0x00U  //!< The PCAN parameter is not set (inactive)
00191 #define PCAN_PARAMETER_ON        0x01U  //!< The PCAN parameter is set (active)
00192 #define PCAN_FILTER_CLOSE        0x00U  //!< The PCAN filter is closed. No messages will be received
00193 #define PCAN_FILTER_OPEN         0x01U  //!< The PCAN filter is fully opened. All messages will be received
00194 #define PCAN_FILTER_CUSTOM       0x02U  //!< The PCAN filter is custom configured. Only registered messages will be received
00195 #define PCAN_CHANNEL_UNAVAILABLE 0x00U  //!< The PCAN-Channel handle is illegal, or its associated hardware is not available
00196 #define PCAN_CHANNEL_AVAILABLE   0x01U  //!< The PCAN-Channel handle is available to be connected (Plug&Play Hardware: it means furthermore that the hardware is plugged-in)
00197 #define PCAN_CHANNEL_OCCUPIED    0x02U  //!< The PCAN-Channel handle is valid, and is already being used
00198 #define PCAN_CHANNEL_PCANVIEW    (PCAN_CHANNEL_AVAILABLE |  PCAN_CHANNEL_OCCUPIED) //!< The PCAN-Channel handle is already being used by a PCAN-View application, but is available to connect
00199 
00200 #define LOG_FUNCTION_DEFAULT     0x00U    //!< Logs system exceptions / errors
00201 #define LOG_FUNCTION_ENTRY       0x01U    //!< Logs the entries to the PCAN-Basic API functions
00202 #define LOG_FUNCTION_PARAMETERS  0x02U    //!< Logs the parameters passed to the PCAN-Basic API functions
00203 #define LOG_FUNCTION_LEAVE       0x04U    //!< Logs the exits from the PCAN-Basic API functions
00204 #define LOG_FUNCTION_WRITE       0x08U    //!< Logs the CAN messages passed to the CAN_Write function
00205 #define LOG_FUNCTION_READ        0x10U    //!< Logs the CAN messages received within the CAN_Read function
00206 #define LOG_FUNCTION_ALL         0xFFFFU  //!< Logs all possible information within the PCAN-Basic API functions
00207 
00208 #define TRACE_FILE_SINGLE        0x00U  //!< A single file is written until it size reaches PAN_TRACE_SIZE
00209 #define TRACE_FILE_SEGMENTED     0x01U  //!< Traced data is distributed in several files with size PAN_TRACE_SIZE
00210 #define TRACE_FILE_DATE          0x02U  //!< Includes the date into the name of the trace file
00211 #define TRACE_FILE_TIME          0x04U  //!< Includes the start time into the name of the trace file
00212 #define TRACE_FILE_OVERWRITE     0x80U  //!< Causes the overwriting of available traces (same name)
00213 
00214 #define FEATURE_FD_CAPABLE       0x01U  //!< Device supports flexible data-rate (CAN-FD)
00215 #define FEATURE_DELAY_CAPABLE    0x02U  //!< Device supports a delay between sending frames (FPGA based USB devices)
00216 
00217 #define SERVICE_STATUS_STOPPED   0x01U  //!< The service is not running
00218 #define SERVICE_STATUS_RUNNING   0x04U  //!< The service is running
00219 
00220 /* PCAN message types
00221  */
00222 #define PCAN_MESSAGE_STANDARD    0x00U  //!< The PCAN message is a CAN Standard Frame (11-bit identifier)
00223 #define PCAN_MESSAGE_RTR         0x01U  //!< The PCAN message is a CAN Remote-Transfer-Request Frame
00224 #define PCAN_MESSAGE_EXTENDED    0x02U  //!< The PCAN message is a CAN Extended Frame (29-bit identifier)
00225 #define PCAN_MESSAGE_FD          0x04U  //!< The PCAN message represents a FD frame in terms of CiA Specs
00226 #define PCAN_MESSAGE_BRS         0x08U  //!< The PCAN message represents a FD bit rate switch (CAN data at a higher bit rate)
00227 #define PCAN_MESSAGE_ESI         0x10U  //!< The PCAN message represents a FD error state indicator(CAN FD transmitter was error active)
00228 #define PCAN_MESSAGE_STATUS      0x80U  //!< The PCAN message represents a PCAN status message
00229 
00230 /* Frame Type / Initialization Mode
00231  */
00232 #define PCAN_MODE_STANDARD       PCAN_MESSAGE_STANDARD
00233 #define PCAN_MODE_EXTENDED       PCAN_MESSAGE_EXTENDED
00234 
00235 /* Baud rate codes = BTR0/BTR1 register values for the CAN controller.
00236  * You can define your own Baud rate with the BTROBTR1 register.
00237  * Take a look at www.peak-system.com for their free software "BAUDTOOL"
00238  * to calculate the BTROBTR1 register for every bit rate and sample point.
00239  */
00240 #define PCAN_BAUD_1M             0x0014U  //!<   1 MBit/s
00241 #define PCAN_BAUD_800K           0x0016U  //!< 800 kBit/s
00242 #define PCAN_BAUD_500K           0x001CU  //!< 500 kBit/s
00243 #define PCAN_BAUD_250K           0x011CU  //!< 250 kBit/s
00244 #define PCAN_BAUD_125K           0x031CU  //!< 125 kBit/s
00245 #define PCAN_BAUD_100K           0x432FU  //!< 100 kBit/s
00246 #define PCAN_BAUD_95K            0xC34EU  //!<  95,238 kBit/s
00247 #define PCAN_BAUD_83K            0x852BU  //!<  83,333 kBit/s
00248 #define PCAN_BAUD_50K            0x472FU  //!<  50 kBit/s
00249 #define PCAN_BAUD_47K            0x1414U  //!<  47,619 kBit/s
00250 #define PCAN_BAUD_33K            0x8B2FU  //!<  33,333 kBit/s
00251 #define PCAN_BAUD_20K            0x532FU  //!<  20 kBit/s
00252 #define PCAN_BAUD_10K            0x672FU  //!<  10 kBit/s
00253 #define PCAN_BAUD_5K             0x7F7FU  //!<   5 kBit/s
00254 
00255 /* Represents the configuration for a CAN bit rate
00256  * Note:
00257  *    * Each parameter and its value must be separated with a '='.
00258  *    * Each pair of parameter/value must be separated using ','.
00259  *
00260  * Example:
00261  *    f_clock=80000000,nom_brp=10,nom_tseg1=5,nom_tseg2=2,nom_sjw=1,data_brp=4,data_tseg1=7,data_tseg2=2,data_sjw=1
00262  */
00263 #define PCAN_BR_CLOCK            __T("f_clock")
00264 #define PCAN_BR_CLOCK_MHZ        __T("f_clock_mhz")
00265 #define PCAN_BR_NOM_BRP          __T("nom_brp")
00266 #define PCAN_BR_NOM_TSEG1        __T("nom_tseg1")
00267 #define PCAN_BR_NOM_TSEG2        __T("nom_tseg2")
00268 #define PCAN_BR_NOM_SJW          __T("nom_sjw")
00269 #define PCAN_BR_NOM_SAMPLE       __T("nom_sam")
00270 #define PCAN_BR_DATA_BRP         __T("data_brp")
00271 #define PCAN_BR_DATA_TSEG1       __T("data_tseg1")
00272 #define PCAN_BR_DATA_TSEG2       __T("data_tseg2")
00273 #define PCAN_BR_DATA_SJW         __T("data_sjw")
00274 #define PCAN_BR_DATA_SAMPLE      __T("data_ssp_offset")
00275 
00276 /*  -----------  types  --------------------------------------------------
00277  */
00278 
00279 #define TPCANHandle              WORD  //!< PCAN hardware channel handle (ATTENTION: changed from BYTE to WORD)
00280 #define TPCANStatus              DWORD //!< PCAN status/error code
00281 #define TPCANParameter           BYTE  //!< PCAN parameter to be read or set
00282 #define TPCANDevice              BYTE  //!< PCAN device
00283 #define TPCANMessageType         BYTE  //!< The type of a PCAN message
00284 #define TPCANType                BYTE  //!< The type of PCAN hardware to be initialized
00285 #define TPCANMode                BYTE  //!< PCAN filter mode
00286 #define TPCANBaudrate            WORD  //!< PCAN Baud rate register value
00287 #define TPCANBitrateFD           LPSTR //!< PCAN-FD bit rate string
00288 #define TPCANTimestampFD         UINT64//!< timestamp of a received PCAN FD message
00289 
00292 typedef struct tagTPCANMsg
00293 {
00294     DWORD             ID;      
00295     TPCANMessageType  MSGTYPE; 
00296     BYTE              LEN;     
00297     BYTE              DATA[8]; 
00298 } TPCANMsg;
00299 
00303 typedef struct tagTPCANTimestamp
00304 {
00305     DWORD  millis;             
00306     WORD   millis_overflow;    
00307     WORD   micros;             
00308 } TPCANTimestamp;
00309 
00312 typedef struct tagPCANMsgFD
00313 {
00314     DWORD             ID;      
00315     TPCANMessageType  MSGTYPE; 
00316     BYTE              DLC;     
00317     BYTE              DATA[64];
00318 } TPCANMsgFD;
00319 
00320 
00321 /*  -----------  variables  ----------------------------------------------
00322  */
00323 
00324 
00325 /*  -----------  prototypes  ---------------------------------------------
00326  */
00327 
00338 TPCANStatus CAN_Initialize(
00339         TPCANHandle Channel,
00340         TPCANBaudrate Btr0Btr1,
00341         TPCANType HwType _DEF_ARG,
00342         DWORD IOPort _DEF_ARG,
00343         WORD Interrupt _DEF_ARG);
00344 
00364 TPCANStatus CAN_InitializeFD(
00365         TPCANHandle Channel,
00366         TPCANBitrateFD BitrateFD);
00367 
00376 TPCANStatus CAN_Uninitialize(
00377         TPCANHandle Channel);
00378 
00387 TPCANStatus CAN_Reset(
00388         TPCANHandle Channel);
00389 
00396 TPCANStatus CAN_GetStatus(
00397         TPCANHandle Channel);
00398 
00408 TPCANStatus CAN_Read(
00409         TPCANHandle Channel,
00410         TPCANMsg* MessageBuffer,
00411         TPCANTimestamp* TimestampBuffer);
00412 
00422 TPCANStatus CAN_ReadFD(
00423         TPCANHandle Channel,
00424         TPCANMsgFD* MessageBuffer,
00425         TPCANTimestampFD* TimestampBuffer);
00426 
00434 TPCANStatus CAN_Write(
00435         TPCANHandle Channel,
00436         TPCANMsg* MessageBuffer);
00437 
00445 TPCANStatus CAN_WriteFD(
00446         TPCANHandle Channel,
00447         TPCANMsgFD* MessageBuffer);
00448 
00461 TPCANStatus CAN_FilterMessages(
00462         TPCANHandle Channel,
00463         DWORD FromID,
00464         DWORD ToID,
00465         TPCANMode Mode);
00466 
00479 TPCANStatus CAN_GetValue(
00480         TPCANHandle Channel,
00481         TPCANParameter Parameter,
00482         void* Buffer,
00483         DWORD BufferLength);
00484 
00485 
00498 TPCANStatus CAN_SetValue(
00499         TPCANHandle Channel,
00500         TPCANParameter Parameter,
00501         void* Buffer,
00502         DWORD BufferLength);
00503 
00515 TPCANStatus CAN_GetErrorText(
00516         TPCANStatus Error,
00517         WORD Language,
00518         LPSTR Buffer);
00519 
00520 #ifdef __cplusplus
00521 }
00522 #endif
00523 #endif  /* PCAN_API_H_INCLUDED */
00524 
00525 /*  ----------------------------------------------------------------------
00526  *  Uwe Vogt,  UV Software,  Chausseestrasse 33 A,  10115 Berlin,  Germany
00527  *  Tel.: +49-30-46799872,  Fax: +49-30-46799873,  Mobile: +49-170-3801903
00528  *  E-Mail: uwe.vogt@uv-software.de,  Homepage: http://www.uv-software.de/
00529  */