XXX_Open
Description
This function marks the given CAN device as used, e.g. it locks the device. The return value is the identifier of the device and must be used for further actions with this device.
Prototype
CPU_
INT16SINT
16SXXX_
OpenO
pen(CPU_
INT16SINT
16S drv,
CPU_
INT32U INT
32U devName,
CPU_
INT16U INT
16U mode);
Parameter | Meaning |
---|---|
drv | bus node name which must be used by the interrupt routine to access the can bus layer. |
devName | device name which indicates the device within the controller |
mode | not used |
Return Value
...
Device identifier for success or -1 if an error occurs.
...
Example: On a MPC565 processor TouCAN A, B, C are used and also 3 external SJA1000 CAN modules. Then 6 CAN nodes are available, but driver devices from TouCAN range 0-2 and driver devices from SJA1000 do also range from 0-2. To get unique device identification the bus node name is used. (see also chapter 5.1 Configure the CAN bus)
End