Canconfigport() - ADLINK Technology NuCOM PCI-7841 User Manual

Dual-port isolated can interface card
Table of Contents

Advertisement

Parameters
Return Value
Remarks
See Also
Usage

CanConfigPort()

Purpose
Prototype
Parameters
Return Value
Remarks
See Also
Usage
#include "pci7841.h
PORT_STRUCT port_struct;
int handle = CanOpenDriver(0, 0);//Open port 0 of
card 0
port_struct.mode = 0;//CAN2.0A (11-bit CAN id)
port_struct.accCode = 0;//This setting of
acceptance code and
port_struct.accMask = 0x7FF; //mask enable all
MAC_IDs input
port_struct.baudrate = 0;//125K bps
CanConfigPort(handle, &port_struct);
22
handle : handle retrieve from CanOpen-
Driver()
Port : index of port
Return 0 if successful
-1 if error occurs
Call this function to close a port.
CanOpenDriver()
See usage of CanOpenDriver().
Configure properties of a port
C/C++
int
CanConfigPort(int
PORT_STRUCT *ptrStruct)
handle : handle retrieve from CanOpen-
Driver()
PtrStruct : a pointer of PORT_STRUCT
type
Return 0 is successful
-1 if error occurs
Configure a port that had been opened.
The properties of a CAN port such as baud
rate, acceptance code, acceptance mask,
operate mode. After configuration is over,
the port is ready to send and receive data.
PORT_STRUCT structure define
C/C++
handle,
Function Reference

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the NuCOM PCI-7841 and is the answer not in the manual?

This manual is also suitable for:

Nucom cpci-7841Nucom pm-7841

Table of Contents