• Home • Files • Structures         • Download

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 CP_CHANNEL_1). A physical CAN interface is opened via the function CpCoreDriverInit(). The function will setup a pointer to the structure _TsCpPort for further operations. The elements of the structure _TsCpPort depend on the used target system and are defined in the header file cp_arch.h (which defines data types and structures for different architectures).

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.


 

© MicroControl GmbH & Co. KG

CANpie - V2.00