MSP432E4 DriverLib API Guide  1.11.00.03
Data Structures | Macros | Enumerations | Functions
can.h File Reference
#include <stdint.h>
#include <stdbool.h>
Include dependency graph for can.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tCANMsgObject
 
struct  tCANBitClkParms
 

Macros

#define MSG_OBJ_TX_INT_ENABLE   0x00000001
 This indicates that transmit interrupts are enabled. More...
 
#define MSG_OBJ_RX_INT_ENABLE   0x00000002
 This indicates that receive interrupts are enabled. More...
 
#define MSG_OBJ_EXTENDED_ID   0x00000004
 This indicates that a message object is using an extended identifier. More...
 
#define MSG_OBJ_USE_ID_FILTER   0x00000008
 
#define MSG_OBJ_NEW_DATA   0x00000080
 This indicates that new data was available in the message object. More...
 
#define MSG_OBJ_DATA_LOST   0x00000100
 
#define MSG_OBJ_USE_DIR_FILTER   (0x00000010 | MSG_OBJ_USE_ID_FILTER)
 
#define MSG_OBJ_USE_EXT_FILTER   (0x00000020 | MSG_OBJ_USE_ID_FILTER)
 
#define MSG_OBJ_REMOTE_FRAME   0x00000040
 This indicates that a message object is a remote frame. More...
 
#define MSG_OBJ_FIFO   0x00000200
 
#define MSG_OBJ_NO_FLAGS   0x00000000
 This indicates that a message object has no flags set. More...
 
#define MSG_OBJ_STATUS_MASK   (MSG_OBJ_NEW_DATA | MSG_OBJ_DATA_LOST)
 
#define CAN_INT_ERROR   0x00000008
 
#define CAN_INT_STATUS   0x00000004
 
#define CAN_INT_MASTER   0x00000002
 
#define CAN_STATUS_BUS_OFF   0x00000080
 CAN controller has entered a Bus Off state. More...
 
#define CAN_STATUS_EWARN   0x00000040
 CAN controller error level has reached warning level. More...
 
#define CAN_STATUS_EPASS   0x00000020
 CAN controller error level has reached error passive level. More...
 
#define CAN_STATUS_RXOK   0x00000010
 A message was received successfully since the last read of this status. More...
 
#define CAN_STATUS_TXOK   0x00000008
 
#define CAN_STATUS_LEC_MSK   0x00000007
 This is the mask for the last error code field. More...
 
#define CAN_STATUS_LEC_NONE   0x00000000
 There was no error. More...
 
#define CAN_STATUS_LEC_STUFF   0x00000001
 A bit stuffing error has occurred. More...
 
#define CAN_STATUS_LEC_FORM   0x00000002
 A formatting error has occurred. More...
 
#define CAN_STATUS_LEC_ACK   0x00000003
 An acknowledge error has occurred. More...
 
#define CAN_STATUS_LEC_BIT1   0x00000004
 The bus remained a bit level of 1 for longer than is allowed. More...
 
#define CAN_STATUS_LEC_BIT0   0x00000005
 The bus remained a bit level of 0 for longer than is allowed. More...
 
#define CAN_STATUS_LEC_CRC   0x00000006
 A CRC error has occurred. More...
 
#define CAN_STATUS_LEC_MASK   0x00000007
 This is the mask for the CAN Last Error Code (LEC). More...
 

Enumerations

enum  tCANIntStsReg { CAN_INT_STS_CAUSE, CAN_INT_STS_OBJECT }
 
enum  tCANStsReg { CAN_STS_CONTROL, CAN_STS_TXREQUEST, CAN_STS_NEWDAT, CAN_STS_MSGVAL }
 
enum  tMsgObjType {
  MSG_OBJ_TYPE_TX, MSG_OBJ_TYPE_TX_REMOTE, MSG_OBJ_TYPE_RX, MSG_OBJ_TYPE_RX_REMOTE,
  MSG_OBJ_TYPE_RXTX_REMOTE
}
 

Functions

void CANBitTimingGet (uint32_t ui32Base, tCANBitClkParms *psClkParms)
 
void CANBitTimingSet (uint32_t ui32Base, tCANBitClkParms *psClkParms)
 
uint32_t CANBitRateSet (uint32_t ui32Base, uint32_t ui32SourceClock, uint32_t ui32BitRate)
 
void CANDisable (uint32_t ui32Base)
 
void CANEnable (uint32_t ui32Base)
 
bool CANErrCntrGet (uint32_t ui32Base, uint32_t *pui32RxCount, uint32_t *pui32TxCount)
 
void CANInit (uint32_t ui32Base)
 
void CANIntClear (uint32_t ui32Base, uint32_t ui32IntClr)
 
void CANIntDisable (uint32_t ui32Base, uint32_t ui32IntFlags)
 
void CANIntEnable (uint32_t ui32Base, uint32_t ui32IntFlags)
 
void CANIntRegister (uint32_t ui32Base, void(*pfnHandler)(void))
 
uint32_t CANIntStatus (uint32_t ui32Base, tCANIntStsReg eIntStsReg)
 
void CANIntUnregister (uint32_t ui32Base)
 
void CANMessageClear (uint32_t ui32Base, uint32_t ui32ObjID)
 
void CANMessageGet (uint32_t ui32Base, uint32_t ui32ObjID, tCANMsgObject *psMsgObject, bool bClrPendingInt)
 
void CANMessageSet (uint32_t ui32Base, uint32_t ui32ObjID, tCANMsgObject *psMsgObject, tMsgObjType eMsgType)
 
bool CANRetryGet (uint32_t ui32Base)
 
void CANRetrySet (uint32_t ui32Base, bool bAutoRetry)
 
uint32_t CANStatusGet (uint32_t ui32Base, tCANStsReg eStatusReg)
 
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale