stepRocker Open Source TMCL  1.00
 All Data Structures Files Functions Variables Typedefs Enumerations Macros
Data Structures | Functions
Can.h File Reference

CAN. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  TCanFrame
 

Functions

void InitCan (UCHAR Baudrate, USHORT ReceiveID, USHORT SecondaryID)
 Initialization of the CAN interface. More...
 
int CanSendMessage (TCanFrame *Msg)
 
int CanGetMessage (TCanFrame *Msg)
 

Detailed Description

CAN.

Author
Trinamic Motion Control GmbH & Co KG
Version
2.20

This file provides functions for intializing and using the CAN interface.

Function Documentation

int CanGetMessage ( TCanFrame Msg)
Parameters
*MsgPointer to TCanFrame structure to take the message
Returns
TRUE: Message successfully read
FALSE: No message read (buffer empty).

Try to read a message from the receive buffer if it is not empty.

Here is the caller graph for this function:

int CanSendMessage ( TCanFrame Msg)
Parameters
*MsgPointer to CAN message (type TCanFrame) to be sent
Returns
TRUE if message could be written
FALSE if buffer full.

Try to send a CAN message by writing it to mailbox 15.

Here is the caller graph for this function:

void InitCan ( UCHAR  Bitrate,
USHORT  ReceiveID1,
USHORT  ReceiveID2 
)

Initialization of the CAN interface.

Parameters
BaudrateCAN-Bitrate 1 2 3 4 5 6 7 8 10 20 50 100 125 250 500 1000kBit/s
ReceiveIDOnly CAN messages with this ID (standard or extended frames) will be accepted.
SecondaryIDIf this is !=0 then also messgaes with this ID (standard or extended frames) will be accepted.

Here is the caller graph for this function: