stepRocker Open Source TMCL
1.00
|
CAN. More...
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) |
CAN.
This file provides functions for intializing and using the CAN interface.
int CanGetMessage | ( | TCanFrame * | Msg | ) |
*Msg | Pointer to TCanFrame structure to take the message |
Try to read a message from the receive buffer if it is not empty.
int CanSendMessage | ( | TCanFrame * | Msg | ) |
*Msg | Pointer to CAN message (type TCanFrame) to be sent |
Try to send a CAN message by writing it to mailbox 15.
Initialization of the CAN interface.
Baudrate | CAN-Bitrate 1 2 3 4 5 6 7 8 10 20 50 100 125 250 500 1000kBit/s |
ReceiveID | Only CAN messages with this ID (standard or extended frames) will be accepted. |
SecondaryID | If this is !=0 then also messgaes with this ID (standard or extended frames) will be accepted. |