![]() |
![]() |
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. More...
#include <stdint.h>#include <stddef.h>#include <ti/common/mmwave_error.h>#include <ti/drivers/canfd/include/hw_mcanss.h>Data Structures | |
| struct | CANFD_MCANLoopbackCfgParams_t |
| Data structure defines the MCAN Loopback parameters. More... | |
| struct | CANFD_MCANBitTimingParams_t |
| Data structure defines the parameters for bit timing calculation. Bit timing related to data phase will be valid only in case where MCAN is put in CANFD mode and will be '0' otherwise. More... | |
| struct | CANFD_MCANTdcConfig_t |
| Data structure defines the MCAN Transmitter Delay Compensation parameters. More... | |
| struct | CANFD_MCANGlobalFiltConfig_t |
| Data structure defines the MCAN Global Filter Configuration parameters. More... | |
| struct | CANFD_MCANMsgRAMCfgParams_t |
| Data structure defines the MCAN Message RAM Configuration Parameters. Message RAM can contain following sections: Standard ID filters, Extended ID filters, TX FIFO(or TX Q), TX Buffers, TX EventFIFO, RX FIFO0, RX FIFO1, RX Buffer. Note: If particular section in the RAM is not used then it's size should be initialized to '0' (Number of buffers in case of Tx/Rx buffer). More... | |
| struct | CANFD_MCANECCConfigParams_t |
| Data structure defines the MCAN ECC configuration parameters. More... | |
| struct | CANFD_MCANErrCntStatus_t |
| Data structure defines the MCAN error logging counters status. More... | |
| struct | CANFD_MCANProtocolStatus_t |
| Data structure defines the MCAN protocol status. More... | |
| struct | CANFD_MCANECCErrForceParams_t |
| Data structure defines the ECC Error forcing. More... | |
| struct | CANFD_MCANECCErrStatus_t |
| Data structure defines the ECC Error Status. More... | |
| struct | CANFD_ErrStatusResp_t |
| Response structure definition for Error and status information. More... | |
| struct | CANFD_MCANInitParams_t |
| Data structure defines the MCAN initialization parameters. More... | |
| struct | CAN_MCANMsgObjCfgParams_t |
| Parameters used to configure the receive and transmit message objects. More... | |
| struct | CAN_MCANRxMsgObjRangeCfgParams_t |
| Parameters used to configure a receive message objects for a range of message identifiers. More... | |
| struct | CANFD_MCANMsgObjectStats_t |
| Data structure defines the software maintained message object statistics. More... | |
| struct | CANFD_OptionTLV_t |
| Options TLV data structure. More... | |
Macros | |
| #define | CANFD_EOK (0) |
| No Error. | |
| #define | CANFD_EINVAL (MMWAVE_ERRNO_CANFD_BASE-1) |
| Error Code: Invalid argument. | |
| #define | CANFD_EINUSE (MMWAVE_ERRNO_CANFD_BASE-2) |
| Error Code: Operation cannot be implemented because a previous operation is still not complete. | |
| #define | CANFD_ENOTIMPL (MMWAVE_ERRNO_CANFD_BASE-3) |
| Error Code: Operation is not implemented. | |
| #define | CANFD_ENOMEM (MMWAVE_ERRNO_CANFD_BASE-4) |
| Error Code: Out of memory. | |
Typedefs | |
| typedef void * | CANFD_Handle |
| CANFD module handle returned by the CANFD_init() API call. | |
| typedef void * | CANFD_MsgObjHandle |
| CANFD message object handle returned by the CANFD_createMsgObject() API call. | |
| typedef enum CANFD_MCANOperationMode_t | CANFD_MCANOperationMode |
| Enumerates the values used to represent the MCAN mode of operation. | |
| typedef enum CANFD_Direction_t | CANFD_Direction |
| This enumeration defines the values used to set the direction of message object. | |
| typedef enum CANFD_MCANXidType_t | CANFD_MCANXidType |
| This enumeration defines the values used to represent the CAN Identifier Type. | |
| typedef enum CANFD_MCANFrameType_t | CANFD_MCANFrameType |
| This enumeration defines the CAN frame type. | |
| typedef enum CANFD_MCANTimeOutSelect_t | CANFD_MCANTimeOutSelect |
| This enumeration defines the MCAN timeout counter configuration. | |
| typedef enum CANFD_MCANECCErrType_t | CANFD_MCANECCErrType |
| This enumeration defines the MCAN ECC Error Types. | |
| typedef enum CANFD_MCANLoopBackMode_t | CANFD_MCANLoopBackMode |
| This enumeration defines the MCAN Loopback mode. | |
| typedef enum CANFD_MCANCommState_t | CANFD_MCANCommState |
| This enumeration defines the MCAN's communication state. | |
| typedef enum CANFD_MCANErrCode_t | CANFD_MCANErrCode |
| This enumeration defines the MCAN's Error Code. | |
| typedef enum CANFD_Reason_t | CANFD_Reason |
| This enumeration describes a list of all the reasons for which the driver will invoke application callback functions. | |
| typedef enum CANFD_Option_t | CANFD_Option |
| This enumeration defines the values used to represent the GET/SET options. More... | |
| typedef struct CANFD_MCANLoopbackCfgParams_t | CANFD_MCANLoopbackCfgParams |
| Data structure defines the MCAN Loopback parameters. | |
| typedef struct CANFD_MCANBitTimingParams_t | CANFD_MCANBitTimingParams |
| Data structure defines the parameters for bit timing calculation. Bit timing related to data phase will be valid only in case where MCAN is put in CANFD mode and will be '0' otherwise. | |
| typedef struct CANFD_MCANTdcConfig_t | CANFD_MCANTdcConfig |
| Data structure defines the MCAN Transmitter Delay Compensation parameters. | |
| typedef struct CANFD_MCANGlobalFiltConfig_t | CANFD_MCANGlobalFiltConfig |
| Data structure defines the MCAN Global Filter Configuration parameters. | |
| typedef struct CANFD_MCANMsgRAMCfgParams_t | CANFD_MCANMsgRAMCfgParams |
| Data structure defines the MCAN Message RAM Configuration Parameters. Message RAM can contain following sections: Standard ID filters, Extended ID filters, TX FIFO(or TX Q), TX Buffers, TX EventFIFO, RX FIFO0, RX FIFO1, RX Buffer. Note: If particular section in the RAM is not used then it's size should be initialized to '0' (Number of buffers in case of Tx/Rx buffer). | |
| typedef struct CANFD_MCANECCConfigParams_t | CANFD_MCANECCConfigParams |
| Data structure defines the MCAN ECC configuration parameters. | |
| typedef struct CANFD_MCANErrCntStatus_t | CANFD_MCANErrCntStatus |
| Data structure defines the MCAN error logging counters status. | |
| typedef struct CANFD_MCANProtocolStatus_t | CANFD_MCANProtocolStatus |
| Data structure defines the MCAN protocol status. | |
| typedef struct CANFD_MCANECCErrForceParams_t | CANFD_MCANECCErrForceParams |
| Data structure defines the ECC Error forcing. | |
| typedef struct CANFD_MCANECCErrStatus_t | CANFD_MCANECCErrStatus |
| Data structure defines the ECC Error Status. | |
| typedef struct CANFD_ErrStatusResp_t | CANFD_ErrStatusResp |
| Response structure definition for Error and status information. | |
| typedef void(* | CANFD_DataAppCallBack) (CANFD_MsgObjHandle handle, CANFD_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... | |
| typedef void(* | CANFD_ErrStatusAppCallBack) (CANFD_Handle handle, CANFD_Reason reason, CANFD_ErrStatusResp *errStatusResp) |
| Application specified callback function which is invoked by the CANFD driver on error or status change. More... | |
| typedef struct CANFD_MCANInitParams_t | CANFD_MCANInitParams |
| Data structure defines the MCAN initialization parameters. | |
| typedef struct CAN_MCANMsgObjCfgParams_t | CANFD_MCANMsgObjCfgParams |
| Parameters used to configure the receive and transmit message objects. | |
| typedef struct CAN_MCANRxMsgObjRangeCfgParams_t | CANFD_MCANRxMsgObjRangeCfgParams |
| Parameters used to configure a receive message objects for a range of message identifiers. | |
| typedef struct CANFD_MCANMsgObjectStats_t | CANFD_MCANMsgObjectStats |
| Data structure defines the software maintained message object statistics. | |
| typedef struct CANFD_OptionTLV_t | CANFD_OptionTLV |
| Options TLV data structure. More... | |
Enumerations |
Functions | |
| CANFD_Handle | CANFD_init (uint8_t instanceId, const CANFD_MCANInitParams *configParams, int32_t *errCode) |
| int32_t | CANFD_deinit (CANFD_Handle handle, int32_t *errCode) |
| int32_t | CANFD_configBitTime (CANFD_Handle handle, const CANFD_MCANBitTimingParams *bitTimeParams, int32_t *errCode) |
| CANFD_MsgObjHandle | CANFD_createMsgObject (CANFD_Handle handle, const CANFD_MCANMsgObjCfgParams *msgObjectParams, int32_t *errCode) |
| CANFD_MsgObjHandle | CANFD_createRxRangeMsgObject (CANFD_Handle handle, const CANFD_MCANRxMsgObjRangeCfgParams *msgObjectParams, int32_t *errCode) |
| int32_t | CANFD_deleteMsgObject (CANFD_MsgObjHandle handle, int32_t *errCode) |
| int32_t | CANFD_transmitData (CANFD_MsgObjHandle handle, uint32_t id, CANFD_MCANFrameType frameType, uint32_t dataLength, const uint8_t *data, int32_t *errCode) |
| int32_t | CANFD_transmitDataCancel (CANFD_MsgObjHandle handle, int32_t *errCode) |
| int32_t | CANFD_getData (CANFD_MsgObjHandle handle, uint32_t *id, CANFD_MCANFrameType *ptrFrameType, CANFD_MCANXidType *idType, uint32_t *ptrDataLength, uint8_t *data, int32_t *errCode) |
| int32_t | CANFD_getOptions (CANFD_Handle handle, const CANFD_OptionTLV *ptrOptInfo, int32_t *errCode) |
| int32_t | CANFD_setOptions (CANFD_Handle handle, const CANFD_OptionTLV *ptrOptInfo, int32_t *errCode) |
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.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.