STM32F4 Standard Peripheral bibliotheek  1.0
ST Microelectronics bibliotheek documentatie voor de STM32F4 Standard Peripheral Library
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
CAN Frames Transmission functions

CAN Frames Transmission functions. More...

Functions

uint8_t CAN_Transmit (CAN_TypeDef *CANx, CanTxMsg *TxMessage)
 Initiates and transmits a CAN frame message. More...
 
uint8_t CAN_TransmitStatus (CAN_TypeDef *CANx, uint8_t TransmitMailbox)
 Checks the transmission status of a CAN Frame. More...
 
void CAN_CancelTransmit (CAN_TypeDef *CANx, uint8_t Mailbox)
 Cancels a transmit request. More...
 

Detailed Description

CAN Frames Transmission functions.

 ===============================================================================
                      CAN Frames Transmission functions
 ===============================================================================  
  This section provides functions allowing to 
   - Initiate and transmit a CAN frame message (if there is an empty mailbox).
   - Check the transmission status of a CAN Frame
   - Cancel a transmit request

Function Documentation

void CAN_CancelTransmit ( CAN_TypeDef *  CANx,
uint8_t  Mailbox 
)

Cancels a transmit request.

Parameters
CANx,:where x can be 1 or 2 to select the CAN peripheral.
Mailbox,:Mailbox number.
Return values
None
uint8_t CAN_Transmit ( CAN_TypeDef *  CANx,
CanTxMsg TxMessage 
)

Initiates and transmits a CAN frame message.

Parameters
CANx,:where x can be 1 or 2 to to select the CAN peripheral.
TxMessage,:pointer to a structure which contains CAN Id, CAN DLC and CAN data.
Return values
Thenumber of the mailbox that is used for transmission or CAN_TxStatus_NoMailBox if there is no empty mailbox.
uint8_t CAN_TransmitStatus ( CAN_TypeDef *  CANx,
uint8_t  TransmitMailbox 
)

Checks the transmission status of a CAN Frame.

Parameters
CANx,:where x can be 1 or 2 to select the CAN peripheral.
TransmitMailbox,:the number of the mailbox that is used for transmission.
Return values
CAN_TxStatus_Okif the CAN driver transmits the message, CAN_TxStatus_Failed in an other case.