M480 BSP V3.05.006
The Board Support Package for M480 Series
Data Structures | Macros | Functions
can.h File Reference

M480 Series CAN Driver Header File. More...

Go to the source code of this file.

Data Structures

struct  STR_CANMSG_T
 
struct  STR_CANMASK_T
 

Macros

#define CAN_NORMAL_MODE
 
#define CAN_BASIC_MODE
 
#define CAN_STD_ID
 
#define CAN_EXT_ID
 
#define CAN_REMOTE_FRAME
 
#define CAN_DATA_FRAME
 
#define CAN_MASK_MSG_DIR
 
#define CAN_MASK_EXT_ID_BIT
 
#define CAN_STD_ID_MASK(mask_bit)
 Specifies the standard identifier mask used for acceptance filtering. More...
 
#define CAN_EXT_ID_MASK(mask_bit)
 Specifies the extended identifier mask used for acceptance filtering. More...
 
#define CAN_GET_INT_STATUS(can)
 Get interrupt status. More...
 
#define CAN_GET_INT_PENDING_STATUS(can)
 Get specified interrupt pending status. More...
 
#define CAN_DISABLE_WAKEUP(can)
 Disable wake-up function. More...
 
#define CAN_ENABLE_WAKEUP(can)
 Enable wake-up function. More...
 
#define CAN_GET_NEW_DATA_IN_BIT(can, u32MsgNum)
 Get specified Message Object new data into bit value. More...
 

Functions

uint32_t CAN_SetBaudRate (CAN_T *tCAN, uint32_t u32BaudRate)
 Set bus baud-rate. More...
 
uint32_t CAN_Open (CAN_T *tCAN, uint32_t u32BaudRate, uint32_t u32Mode)
 Set CAN operation mode and target baud-rate. More...
 
void CAN_Close (CAN_T *tCAN)
 The function is used to disable all CAN interrupt. More...
 
void CAN_CLR_INT_PENDING_BIT (CAN_T *tCAN, uint8_t u32MsgNum)
 Clear interrupt pending bit. More...
 
void CAN_EnableInt (CAN_T *tCAN, uint32_t u32Mask)
 Enable CAN interrupt. More...
 
void CAN_DisableInt (CAN_T *tCAN, uint32_t u32Mask)
 Disable CAN interrupt. More...
 
int32_t CAN_Transmit (CAN_T *tCAN, uint32_t u32MsgNum, STR_CANMSG_T *pCanMsg)
 Send CAN message. More...
 
int32_t CAN_Receive (CAN_T *tCAN, uint32_t u32MsgNum, STR_CANMSG_T *pCanMsg)
 Gets the message, if received. More...
 
int32_t CAN_SetMultiRxMsg (CAN_T *tCAN, uint32_t u32MsgNum, uint32_t u32MsgCount, uint32_t u32IDType, uint32_t u32ID)
 The function is used to configure several receive message objects. More...
 
int32_t CAN_SetRxMsg (CAN_T *tCAN, uint32_t u32MsgNum, uint32_t u32IDType, uint32_t u32ID)
 The function is used to configure a receive message object. More...
 
int32_t CAN_SetRxMsgAndMsk (CAN_T *tCAN, uint32_t u32MsgNum, uint32_t u32IDType, uint32_t u32ID, uint32_t u32IDMask)
 The function is used to configure a receive message object. More...
 
int32_t CAN_SetTxMsg (CAN_T *tCAN, uint32_t u32MsgNum, STR_CANMSG_T *pCanMsg)
 The function is used to configure a transmit object. More...
 
int32_t CAN_TriggerTxMsg (CAN_T *tCAN, uint32_t u32MsgNum)
 Set transmit request bit. More...
 
int32_t CAN_BasicSendMsg (CAN_T *tCAN, STR_CANMSG_T *pCanMsg)
 Send CAN message in BASIC mode of test mode. More...
 
int32_t CAN_BasicReceiveMsg (CAN_T *tCAN, STR_CANMSG_T *pCanMsg)
 Get a message information in BASIC mode. More...
 
void CAN_EnterInitMode (CAN_T *tCAN, uint8_t u8Mask)
 Enter initialization mode. More...
 
void CAN_EnterTestMode (CAN_T *tCAN, uint8_t u8TestMask)
 Switch the CAN into test mode. More...
 
void CAN_LeaveTestMode (CAN_T *tCAN)
 Leave the test mode. More...
 
uint32_t CAN_GetCANBitRate (CAN_T *tCAN)
 Get current bit rate. More...
 
uint32_t CAN_IsNewDataReceived (CAN_T *tCAN, uint8_t u8MsgObj)
 Get the waiting status of a received message. More...
 
void CAN_LeaveInitMode (CAN_T *tCAN)
 Leave initialization mode. More...
 
int32_t CAN_SetRxMsgObjAndMsk (CAN_T *tCAN, uint8_t u8MsgObj, uint8_t u8idType, uint32_t u32id, uint32_t u32idmask, uint8_t u8singleOrFifoLast)
 Set Rx message object, include ID mask. More...
 
int32_t CAN_SetRxMsgObj (CAN_T *tCAN, uint8_t u8MsgObj, uint8_t u8idType, uint32_t u32id, uint8_t u8singleOrFifoLast)
 Set Rx message object. More...
 
void CAN_WaitMsg (CAN_T *tCAN)
 Wait message into message buffer in basic mode. More...
 
int32_t CAN_ReadMsgObj (CAN_T *tCAN, uint8_t u8MsgObj, uint8_t u8Release, STR_CANMSG_T *pCanMsg)
 Gets the message. More...
 

Detailed Description

M480 Series CAN Driver Header File.

Version
V2.00

SPDX-License-Identifier: Apache-2.0

Definition in file can.h.