This is the header file for the CANFD driver which exposes the data structures and exported API which can be used by the applications to use the CANFD driver.
|
enum | CANFDLLD_MCANElemSize {
CANFDLLD_MCANElemSize_8BYTES = 0U,
CANFDLLD_MCANElemSize_12BYTES = 1U,
CANFDLLD_MCANElemSize_16BYTES = 2U,
CANFDLLD_MCANElemSize_20BYTES = 3U,
CANFDLLD_MCANElemSize_24BYTES = 4U,
CANFDLLD_MCANElemSize_32BYTES = 5U,
CANFDLLD_MCANElemSize_48BYTES = 6U,
CANFDLLD_MCANElemSize_64BYTES = 7U
} |
| This enumeration defines the MCAN FIFO/Buffer element Size. More...
|
|
enum | CANFDLLD_DriverState { CANFDLLD_DriverState_UNINIT,
CANFDLLD_DriverState_STARTED,
CANFDLLD_DriverState_STOPPED,
CANFDLLD_DriverState_SLEEP
} |
| This enumeration defines the values used to represent the CANFD driver state. More...
|
|
enum | CANFDLLD_MCANOperationMode { CANFDLLD_MCANOperationMode_NORMAL = 0U,
CANFDLLD_MCANOperationMode_SW_INIT = 1U
} |
| Enumerates the values used to represent the MCAN mode of operation. More...
|
|
enum | CANFDLLD_Direction { CANFDLLD_Direction_RX,
CANFDLLD_Direction_TX
} |
| This enumeration defines the values used to set the direction of message object. More...
|
|
enum | CANFDLLD_MCANXidType { CANFDLLD_MCANXidType_11_BIT,
CANFDLLD_MCANXidType_29_BIT
} |
| This enumeration defines the values used to represent the CAN Identifier Type. More...
|
|
enum | CANFDLLD_MCANFrameType { CANFDLLD_MCANFrameType_CLASSIC,
CANFDLLD_MCANFrameType_FD
} |
| This enumeration defines the CAN frame type. More...
|
|
enum | CANFDLLD_MCANTimeOutSelect { CANFDLLD_MCANTimeOutSelect_CONT = 0U,
CANFDLLD_MCANTimeOutSelect_TX_EVENT_FIFO = 1U,
CANFDLLD_MCANTimeOutSelect_RX_FIFO0 = 2U,
CANFDLLD_MCANTimeOutSelect_RX_FIFO1 = 3U
} |
| This enumeration defines the MCAN timeout counter configuration. More...
|
|
enum | CANFDLLD_MCANECCErrType { CANFDLLD_MCANECCErrType_SEC = 0U,
CANFDLLD_MCANECCErrType_DED = 1U
} |
| This enumeration defines the MCAN ECC Error Types. More...
|
|
enum | CANFDLLD_MCANLoopBackMode { CANFDLLD_MCANLoopBackMode_INTERNAL = 0U,
CANFDLLD_MCANLoopBackMode_EXTERNAL = 1U
} |
| This enumeration defines the MCAN Loopback mode. More...
|
|
enum | CANFDLLD_MCANCommState { CANFDLLD_MCANCommState_SYNCHRONIZING = 0U,
CANFDLLD_MCANCommState_IDLE = 1U,
CANFDLLD_MCANCommState_RECEIVER = 2U,
CANFDLLD_MCANCommState_TRANSMITTER = 3U
} |
| This enumeration defines the MCAN's communication state. More...
|
|
enum | CANFDLLD_MCANErrCode {
CANFDLLD_MCANErrCode_NO_ERROR = 0U,
CANFDLLD_MCANErrCode_STUFF_ERROR = 1U,
CANFDLLD_MCANErrCode_FORM_ERROR = 2U,
CANFDLLD_MCANErrCode_ACK_ERROR = 3U,
CANFDLLD_MCANErrCode_BIT1_ERROR = 4U,
CANFDLLD_MCANErrCode_BIT0_ERROR = 5U,
CANFDLLD_MCANErrCode_CRC_ERROR = 6U,
CANFDLLD_MCANErrCode_NO_CHANGE = 7U
} |
| This enumeration defines the MCAN's Error Code. More...
|
|
enum | CANFDLLD_Reason {
CANFDLLD_Reason_RX = 0x1,
CANFDLLD_Reason_TX_COMPLETION = 0x2,
CANFDLLD_Reason_TX_CANCELED = 0x3,
CANFDLLD_Reason_ECC_ERROR = 0x4,
CANFDLLD_Reason_BUSOFF = 0x5,
CANFDLLD_Reason_PROTOCOL_ERR_DATA_PHASE = 0x6,
CANFDLLD_Reason_PROTOCOL_ERR_ARB_PHASE = 0x7
} |
| This enumeration describes a list of all the reasons for which the driver will invoke application callback functions. More...
|
|
enum | CANFDLLD_Option {
CANFDLLD_Option_MCAN_ERROR_COUNTER,
CANFDLLD_Option_MCAN_PROTOCOL_STATUS,
CANFDLLD_Option_MCAN_MSG_OBJECT_STATS,
CANFDLLD_Option_MCAN_MODE,
CANFDLLD_Option_MCAN_LOOPBACK,
CANFDLLD_Option_MCAN_POWER_DOWN
} |
| This enumeration defines the values used to represent the GET/SET options. More...
|
|
|
int32_t | CANFD_lld_init (CANFDLLD_Handle hCanfd) |
|
int32_t | CANFD_lld_deInit (CANFDLLD_Handle handle) |
|
int32_t | CANFD_lld_configBitTime (CANFDLLD_Handle handle, const CANFDLLD_MCANBitTimingParams *bitTimeParams) |
|
int32_t | CANFD_lld_createMsgObject (CANFDLLD_Handle handle, CANFDLLD_MessageObject *ptrCanMsgObj) |
|
int32_t | CANFD_lld_createRxRangeMsgObject (CANFDLLD_Handle handle, CANFDLLD_MessageObject *ptrCanMsgObj) |
|
int32_t | CANFD_lld_deleteMsgObject (CANFDLLD_MsgObjHandle handle) |
|
int32_t | CANFD_lld_write (CANFDLLD_MsgObjHandle handle, uint32_t id, CANFDLLD_MCANFrameType frameType, uint32_t dataLength, const uint8_t *data) |
|
int32_t | CANFD_lld_writeCancel (CANFDLLD_MsgObjHandle handle) |
|
int32_t | CANFD_lld_writeDma (CANFDLLD_MsgObjHandle handle, uint32_t id, CANFDLLD_MCANFrameType frameType, uint32_t dataLengthPerMsg, uint32_t numMsgs, void *data) |
|
int32_t | CANFD_lld_writeDmaTriggerNext (CANFDLLD_MsgObjHandle handle) |
|
uint32_t | CANFD_lld_getFilterEventConfig (uint32_t eventNum) |
|
int32_t | CANFD_lld_read (CANFDLLD_MsgObjHandle handle, uint32_t *id, CANFDLLD_MCANFrameType *ptrFrameType, CANFDLLD_MCANXidType *idType, uint32_t *ptrDataLength, uint8_t *data) |
|
int32_t | CANFD_lld_readDmaConfig (CANFDLLD_MsgObjHandle handle, void *data, uint32_t numDmaRxBuf) |
|
int32_t | CANFD_lld_getOptions (CANFDLLD_Handle handle, CANFDLLD_OptionTLV *ptrOptInfo) |
|
int32_t | CANFD_lld_setOptions (CANFDLLD_Handle handle, const CANFDLLD_OptionTLV *ptrOptInfo) |
|
void | CANFD_lld_int0Isr (CANFDLLD_Object *ptrCanFdObj) |
|
void | CANFD_lld_int1Isr (CANFDLLD_Object *ptrCanFdObj) |
|
ATTRIBUTE_WEAK void | CANFD_lld_dataAppCallBack (CANFDLLD_MsgObjHandle handle, CANFDLLD_Reason reason) |
| Application specified callback function which is invoked by the CANFD driver once transmit is complete or data has been received for the specified message object. More...
|
|
ATTRIBUTE_WEAK void | CANFD_lld_errStatusAppCallBack (CANFDLLD_Handle handle, CANFDLLD_Reason reason, CANFDLLD_ErrStatusResp *errStatusResp) |
| Application specified callback function which is invoked by the CANFD driver on error or status change. More...
|
|
int32_t | CANFD_lld_dmaOpen (CANFDLLD_Handle canfdHandle, CANFDLLD_DmaChConfig dmaChCfg) |
| API to open an CANFD DMA channel. More...
|
|
int32_t | CANFD_lld_dmaClose (CANFDLLD_Handle canfdHandle) |
| API to close an CANFD DMA channel. More...
|
|
int32_t | CANFD_lld_createDmaTxMsgObject (CANFDLLD_Object *ptrCanFdObj, CANFDLLD_MessageObject *ptrCanMsgObj) |
| API to configure dma for the Tx message object. Called from the API CANFD_lld_createMsgObject. More...
|
|
int32_t | CANFD_lld_deleteDmaTxMsgObject (CANFDLLD_Object *ptrCanFdObj, CANFDLLD_MessageObject *ptrCanMsgObj) |
| API to delete dma configuration for the Tx message object. Called from the API CANFD_lld_deleteMsgObject. More...
|
|
int32_t | CANFD_lld_configureDmaTx (CANFDLLD_Object *ptrCanFdObj, CANFDLLD_MessageObject *ptrCanMsgObj, uint32_t dataLengthPerMsg, uint32_t numMsgs, const void *data) |
| API to enable dma event transfer for the Tx. Called from the API CANFD_lld_writeDma. More...
|
|
int32_t | CANFD_lld_cancelDmaTx (CANFDLLD_Object *ptrCanFdObj, CANFDLLD_MessageObject *ptrCanMsgObj) |
| API to disbale dma event transfer for the Tx to cancel the transfer. More...
|
|
ATTRIBUTE_WEAK void | CANFD_dmaTxCompletionCallback (CANFDLLD_MessageObject *ptrCanMsgObj, void *data, uint32_t completionType) |
| Callback function for the Tx completion. This is called for each message in the array of msgs provided in CANFD_lld_configureDmaTx. data will point to the current transmitted message. For intermediate message transfer completion the completionType will be set to CANFD_DMA_TX_COMPLETION_INTERMEDIATE for last message transfer completion the completionType will be set to CANFD_DMA_TX_COMPLETION_FINAL. More...
|
|
int32_t | CANFD_lld_createDmaRxMsgObject (CANFDLLD_Object *ptrCanFdObj, CANFDLLD_MessageObject *ptrCanMsgObj) |
| API to configure dma for the Rx message object. Called from the CANFD_lld_createMsgObject. More...
|
|
int32_t | CANFD_lld_deleteDmaRxMsgObject (CANFDLLD_Object *ptrCanFdObj, CANFDLLD_MessageObject *ptrCanMsgObj) |
| API to delete dma configuration for the Rx message object. Called from the CANFD_lld_deleteMsgObject. More...
|
|
int32_t | CANFD_lld_configureDmaRx (CANFDLLD_Object *ptrCanFdObj, CANFDLLD_MessageObject *ptrCanMsgObj, uint32_t dataLengthPerMsg, uint32_t numMsgs, const void *data) |
| API to enable dma event transfer for the Rx. Called from the API CANFD_lld_readDma. More...
|
|
ATTRIBUTE_WEAK void | CANFD_dmaRxCompletionCallback (CANFDLLD_MessageObject *ptrCanMsgObj, void *data, uint32_t completionType) |
| Callback function for the Rx completion. This is called for each message in the array of msgs provided in CANFD_lld_configureDmaRx. data will point to the current received message. For intermediate message transfer completion the completionType will be set to CANFD_DMA_RX_COMPLETION_INTERMEDIATE for last message transfer completion the completionType will be set to CANFD_DMA_RX_COMPLETION_FINAL. More...
|
|