Fortec Star Diamond Systems DS-MPE-CAN2L Manual page 32

Pcie minicardi/o expansion module with dual canbus ports
Table of Contents

Advertisement

The APIs are dependent on lib and dll. User has include the below APIs into their project.
dscud.dll
dscud.lib
Project Settings -> Configuration Properties -> Linker -> Input ->
Modify Additional Dependecies : dscud.lib;setupapi.lib;%(AdditionalDependencies)
Opening the CAN device
OpenDevice(&GUID_DEVINTERFACE_FP_GPIO96, FILE_FLAG_OVERLAPPED );
This function should be called only once during initiation. It returns a valid handle if the driver detects the CAN
device.
can_init(int can_ch): This API accepts the CAN interface number as an argument for the initialization. This will
initialize CAN#0 or CAN#1. The value of can_ch should 0 for CAN#0 and 1 for CAN#1.
// Example : To initialize CAN#0 channel, pass the argument value as 0 to can_init function as shown below.
...
can_init (0) ; // Will initialize CAN#0 channel
Similarly, CAN#1 can be initialized by passing '1' as argument to can_init function as shown below
DS-MPE-CAN2L User Manual Rev A.1
www.diamondsystems.com
Page 30

Advertisement

Table of Contents
loading

Table of Contents