CANopen Slave Documentation
Version 6.16.04
|
This file holds constants and structures used within CANpie FD. All functions, structures, defines and constants in CANpie FD have the prefix "Cp". The following table shows the used nomenclature:
CANpie code | Nomenclature |
Core functions | CpCore<Name> |
Message access functions | CpMsg<Name> |
Structures | Cp<Name>_ts |
Definitions | CP_<NAME> |
Enumerations | eCP_<NAME> |
Data Structures | |
struct | CpTime_s |
struct | CpCanMsg_s |
struct | CpHdi_s |
struct | CpStatistic_s |
struct | CpState_s |
#define CP_DATA_SIZE ( 8) |
The symbol CP_DATA_SIZE defines the maximum number of bytes which are transferred inside the data field of a CAN message. For classic CAN frames the maximum number of bytes is 8, for CAN FD frames the maximum number of bytes is 64.
enum CpBitrate_e |
Fixed bit-rates.
The values of the enumeration CpBitrate_e are used as parameter for the function CpCoreBitrate().
enum CpBuffer_e |
enum CpBufferDir_e |
Buffer direction definition.
The enumeration CpBufferDir_e is used to define the direction of a message buffer (transmit or receive). The enumeration values are used by the function CpCoreBufferConfig().
Enumerator | |
---|---|
eCP_BUFFER_DIR_RCV | Message buffer direction is receive |
eCP_BUFFER_DIR_TRM | Message buffer direction is transmit |
enum CpCallback_e |
Callback Return Codes.
These return values are used by the callback functions that can be installed by the function CpCoreIntFunctions().
Example
Enumerator | |
---|---|
eCP_CALLBACK_PROCESSED | Message was processed by callback and should not inserted in the FIFO |
eCP_CALLBACK_PUSH_FIFO | Message was not processed by callback and must be inserted in the FIFO |
enum CpChannel_e |
Channel definition.
The physical CAN interfaces are numbered from 1 .. N (N: total number of physical CAN interfaces on the target system). The enumeration CpChannel_e lists up to 8 physical interfaces. The enumeration value eCP_CHANNEL_NONE denotes an invalid channel value.
enum CpErr_e |
CANpie Error codes.
All functions that may cause an error condition will return an error code. The CANpie error codes are within the value range from 0 to 127. The designer of the core functions might extend the error code table with hardware specific error codes, which must be in the range from 128 to 255.
enum CpErrType_e |
Error type.
These values are used as return value for the function CpCoreCanState().
enum CpMode_e |
Mode of CAN controller.
These values are used as parameter for the function CpCoreCanMode() in order to change the state of the CAN controller.
enum CpRpc_e |
Remote Procedure Call definition.
The enumeration CpRpc_e is used to define different Remote Procedure Calls. The enumeration values are used by the function CpMsgRpcType() to identify a Remote Procedure Call upon reception.
Enumerator | |
---|---|
eCP_RPC_NOOP | RPC for no operation |
eCP_RPC_MODE | RPC for CpCoreCanMode() |
eCP_RPC_BITRATE | RPC for CpCoreBitrate() |
enum CpState_e |
State of CAN controller.
These values are used as return value for the function CpCoreCanState().