Versions Compared

Key

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

...

This structure holds the runtime data for the CAN bus management.

Members

typedef struct {

...


    CANBUS_PARA *Cfg;

...


    CPU_

...

INT16S   Dev;

...


    CPU_

...

INT16U   RxTimeout;

...


    CPU_

...

INT16U   TxTimeout;

...


    CANFRM       BufTx[CANBUS_TX_QSIZE];

...


    CPU_

...

INT16U   BufTxRd;

...


    CPU_

...

INT16U   BufTxWr;

...


    CANFRM       BufRx[CANBUS_RX_QSIZE];

...


    CPU_

...

INT16U   BufRxRd;

...


    CPU_

...

INT16U   BufRxWr;

...


#if CANBUS_STAT_EN > 0

...


    CPU_

...

INT16U   RxOkay;

...


    CPU_

...

INT16U   TxOkay;

...


    CPU_

...

INT16U   RxLost;

...


    CPU_

...

INT16U   TxLost;

...


#endif

...


} CANBUS_DATA;

Member

Meaning

Cfg

The pointer to the read-only CAN bus configuration

Dev

This member holds the device ID, which is returned by the Open() function of the linked low level device driver.

RxTimeout

The timeout, which is used during the CanBusRead()

TxTimeout

The timeout, which is used during the CanBusWrite()

BufTx[]

The internal transmit queue which is used between CanBusWrite() and CanBusTxHandler() when the CAN bus is busy.

BufTxRd

The internal transmit queue read pointer.

BufTxWr

The internal transmit queue write pointer.

BufRx[]

The internal receive queue which is used between CanBusRxHandler() and CanBusRead().

BufRxRd

The internal receive queue read pointer.

BufRxWr

The internal receive queue write pointer.

RxOkay

This member holds the counter, which will be incremented every received CAN frame.

This counter is incremented, when the CanBusRead() function successfully gives the CAN frame to the application layer.

TxOkay

The counter, which will be incremented every transmitted CAN frame.

This counter is incremented, when the CAN transmit complete interrupt indicates, that the CAN frame is sent to the bus.

RxLost

This member holds the counter, which will be incremented for every received CAN frame which can not transferred to the application, due to a full receive queue.

TxLost

This member holds the counter, which will be incremented for every transmission CAN frame, which can not transferred to the transmit interrupt handler due to a full transmission queue

...