CAN programming interface environment
Version 3.10
Loading...
Searching...
No Matches
Physical CAN interface

A target system may have more than one physical CAN interface. The physical CAN interfaces are numbered from 0 .. N-1 (N: total number of physical CAN interfaces on the target system). The header file canpie.h provides an enumeration for the physical CAN interface (the first CAN interface is eCP_CHANNEL_1). A physical CAN interface is opened via the function CpCoreDriverInit(). The function will setup a pointer to the structure CpPort_ts for further operations. The elements of the structure CpPort_ts depend on the used target system and are defined in the header file cp_platform.h.

For an embedded application with only one physical CAN interface the parameter to the CAN port can be omitted. This reduces the code size and also increases execution speed. This option is configured via the symbol CP_SMALL_CODE during the compilation process.