Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section describes the configuration definitions related to the CAN interface. The presented source code lines represents an example configuration and must be adapted to the project requirements.


Code Block
languagecpp
CANBUS_PARA AppCanCfg = {
    FALSE,
    (CPU_INT32U)250000,
    (CPU_INT32U)0,
    0,
    <xxx>CANInit,
    <xxx>CANOpen,
    <xxx>CANIoCtl,
    <xxx>CANRead,
    <xxx>CANWrite,
    {
        IO_<xxx>_CAN_SET_BAUDRATE,
        IO_<xxx>_CAN_START,
        IO_<xxx>_CAN_STOP,
        IO_<xxx>_CAN_RX_STANDARD,
        IO_<xxx>_CAN_RX_EXTENDED,
        IO_<xxx>_CAN_TX_READY,
        IO_<xxx>_CAN_GET_NODE_STATUS
    }
};


This table defines the link to the CAN device driver, which shall be used for the CANopen CAN bus interface. Within the example above, the <xxx> represents the CAN controller identifier of the device driver (e.g. LPC24XX, STM32F10X, etc..)