The section has a list of all the exported API which the applications need to invoke in order to use the CANFD driver.
More...
|
| 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) |
| |
The section has a list of all the exported API which the applications need to invoke in order to use the CANFD driver.
Description
Function configures the bit time parameters for the CANFD module.
- Parameters
-
| [in] | handle | Handle to the CANFD Driver |
| [in] | bitTimeParams | Bit time configuration parameters |
| [out] | errCode | Error code populated on error |
- Return values
-
Description
Function configures the receive or transmit message object. It also enables Tx completion and Tx cancelation interrupts . The callback function will be invoked on data transmit complete for transmit message objects OR upon receiving data for receive message objects. The application MUST then call CANFD_getData() API to process the received data.
- Parameters
-
| [in] | handle | Handle to the CANFD Driver |
| [in] | msgObjectParams | Message Object configuration parameters |
| [out] | errCode | Error code populated on error |
- Return values
-
| Success | - Handle to the message object. |
| Error | - NULL |
Description
Function configures the receive or transmit message object. It also enables Tx completion and Tx cancelation interrupts. The callback function will be invoked on data transmit complete for transmit message objects OR upon receiving data for receive message objects. The application MUST then call CANFD_getData() API to process the received data.
- Parameters
-
| [in] | handle | Handle to the CANFD Driver |
| [in] | msgObjectParams | Message Object configuration parameters |
| [out] | errCode | Error code populated on error |
- Return values
-
| Success | - Handle to the message object. |
| Error | - NULL |
Description
Function configures a receive message objects for a range of message identifiers. It also enables Rx interrupts. The callback function will be invoked upon receiving data for receive message objects. The application MUST then call CANFD_getData() API to process the received data.
- Parameters
-
| [in] | handle | Handle to the CANFD Driver |
| [in] | msgObjectParams | Message Object configuration parameters |
| [out] | errCode | Error code populated on error |
- Return values
-
| Success | - Handle to the message object. |
| Error | - NULL |
Description
Function configures a receive message objects for a range of message Identifiersmessage object. It also enables Rx interrupts. The callback function will be invoked upon receiving data for receive message objects. The application MUST then call CANFD_getData() API to process the received data.
- Parameters
-
| [in] | handle | Handle to the CANFD Driver |
| [in] | msgObjectParams | Message Object configuration parameters |
| [out] | errCode | Error code populated on error |
- Return values
-
| Success | - Handle to the message object. |
| Error | - NULL |
| int32_t CANFD_deinit |
( |
CANFD_Handle |
handle, |
|
|
int32_t * |
errCode |
|
) |
| |
Description
Function closes the CANFD driver instance and cleanups all the memory allocated by the CANFD driver.
- Parameters
-
| [in] | handle | Handle to the CANFD Driver |
| [out] | errCode | Error code populated on error |
- Return values
-
Description
Function deletes a message object.
- Parameters
-
| [in] | handle | Handle to the message object |
| [out] | errCode | Error code populated on error |
- Return values
-
Description
Function is used by the application to get the CAN message from message RAM using a receive message object. NOTE: This API must ONLY be called from the callback context.
- Parameters
-
| [in] | handle | Handle to the message object |
| [out] | id | Message Identifier |
| [out] | ptrFrameType | Frame type - Classic or FD |
| [out] | idType | Meassage Id type - 11 bit standard or 29 bit extended |
| [out] | ptrDataLength | Data Length of the received frame. Valid values: 1 to 64 bytes. |
| [out] | data | Received data. |
| [out] | errCode | Error code populated on error |
- Return values
-
Description
Function is used by the application to get the error and status information from the driver.
- Parameters
-
| [in] | handle | Handle to the CANFD Driver |
| [out] | ptrOptInfo | Option info in TLV format which is populated with the requested information |
| [out] | errCode | Error code populated on error |
- Return values
-
Description
Function is used by the application to get the error and status information from the driver.
- Parameters
-
| [in] | handle | Handle to the CAN Driver |
| [out] | ptrOptInfo | Option info in TLV format which is populated with the requested information |
| [out] | errCode | Error code populated on error |
- Return values
-
Description
Function initializes the CANFD driver instance with the specified hardware attributes. It resets and configures the MCAN module, sets up the Message RAM and ECC Aggregator. It configures the CANFD driver with the control parameters.
- Parameters
-
| [in] | instanceId | CANFD Instance Id. Note: Currently only 1 instance of CANFD is supported. Valid value is 0. |
| [in] | configParams | CANFD module configuration parameters |
| [out] | errCode | Error code populated on error |
- Return values
-
| Success | - Handle to the CANFD Driver |
| Error | - NULL |
Description
Function is used by the application to configure the driver options.
- Parameters
-
| [in] | handle | Handle to the CANFD Driver |
| [in] | ptrOptInfo | Option info in TLV format which is used to configure the driver |
| [out] | errCode | Error code populated on error |
- Return values
-
Description
Function used by the application to transmit data.
- Parameters
-
| [in] | handle | Handle to the message object |
| [in] | id | Message Identifier |
| [in] | frameType | Frame type - Classic or FD |
| [in] | dataLength | Data Length to be transmitted. Valid values: 1 to 64 bytes. |
| [in] | data | Data to be transmitted |
| [out] | errCode | Error code populated on error |
- Return values
-
Description
Function used by the application to cancel a pending data transmit.
- Parameters
-
| [in] | handle | Handle to the message object |
| [out] | errCode | Error code populated on error |
- Return values
-