Versions Compared

Key

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

Description of all data structures, definitions and functions in the bus layer:

Prototype

· CANBUS_DATA CAN BUS OBJECT

· CANBUS_PARA BUS CONFIGURATION

Prototype

· CanBusInit() INITIALIZE CAN BUS MANAGEMENT

· CanBusIoCtl() CAN BUS I/O CONTROL

· CanBusRead() RECEIVE CAN FRAME

· CanBusWrite() SEND CAN FRAME

· CanBusEnable() ENABLE CAN BUS

· CanBusDisable() DISABLE CAN BUS

· CanBusTxHandler() CAN TX INTERRUPT HANDLER

· CanBusRxHandler() CAN RX INTERRUPT HANDLER

· CanBusNSHandler() CAN STATUS-CHANGE INTERRUPT HANDLERThis layer implements the buffered CAN message handling for one or more busses. All access to the CAN controller shall be done with this layer.

Bus Layer Architecture

The CAN bus layer is configurable during compile time to minimize memory footprint and optimize performance. The following list shows the configuration parameters and their functionality:

Configuration

Meaning

Range

Default

CANBUS_EN

This parameter enables (1) or disables (0) the CAN bus management, e.g. the usage of μC/CAN.

0 / 1

1

CANBUS_N

This parameter defines the maximal number of managed CAN busses.

1 ... 255

1

 

CANBUS_ARG_CHK_EN

This parameter enables (1) or disables (0) the argument checking of the CAN bus API functions.

0 / 1

1

CANBUS_TX_HANDLER_EN

This parameter enables (1) or disables (0) the usage of function CanBusTxHandler().

0 / 1

1

CANBUS_RX_HANDLER_EN

This parameter enables (1) or disables (0) the usage of function CanBusRxHandler().

0 / 1

1

CANBUS_NS_HANDLER_EN

This parameter enables (1) or disables (0) the usage of function CanBusNsHandler().

0 / 1

1

CANBUS_STAT_EN

This parameter enables (1) or disables (0) the statistic information collection.

0 / 1

0

CANBUS_RX_QSIZE

The size of the receive queues in CAN frames.

1 ... 65535

2

CANBUS_TX_QSIZE

The size of the transmit queues in CAN frames.

1 ... 65535

2

CANBUS_HOOK_NS_EN

Enable node status handler hook function.

0 / 1

0

CANBUS_HOOK_RX_EN

Enable receive handler hook function.

0 / 1

0