|  | Dual Active Bridge Development Board (Part-No. ) |
Content |  |  |  |  |  |

Loading...
Searching...
No Matches
Files | Data Structures | Macros | Functions | Variables
CAN FD Driver
MPLABX MCC Melody Code Generator

CAN FD Driver using dsPIC MCUs. More...

Collaboration diagram for CAN FD Driver:

## Files
file | can1.h
| This is the generated driver header file for the CAN1 driver using CCL.
file | can_features.h
| This is the generated module feature header file for CAN driver using CCL. This file provides module feature list available on the selected device. The macros defined in this file provides the flexibility to easily migrate the user application to other device which might have varied feature list.
file | can_types.h
| This is the generated driver types header file for the CAN driver using CCL.
file | can1.c
| This is the generated driver source file for CAN1 driver using CCL.

## Data Structures
struct | CAN_INTERFACE
| Structure containing the function pointers of CAN driver. More...
struct | CAN_MSG_FIELD
| This data structure used to configure the message fields. Some of the fields formatType and brs data should match with the CAN FD configuration in Melody MCC user interface. More...
struct | CAN_MSG_OBJ
| This data structure used to configure the CAN FD message object. More...
struct | CAN1
| This defines the object required for the maintenance of the receive FIFO message object. More...

## Macros
#define | CAN_FD1_Initialize CAN1_Initialize
| This macro defines the Custom Name for CAN1_Initialize API.
#define | CAN_FD1_Deinitialize CAN1_Deinitialize
| This macro defines the Custom Name for CAN1_Deinitialize API.
#define | CAN_FD1_OperationModeSet CAN1_OperationModeSet
| This macro defines the Custom Name for CAN1_OperationModeSet API.
#define | CAN_FD1_OperationModeGet CAN1_OperationModeGet
| This macro defines the Custom Name for CAN1_OperationModeGet API.
#define | CAN_FD1_Receive CAN1_Receive
| This macro defines the Custom Name for CAN1_Receive API.
#define | CAN_FD1_ReceiveMessageGet CAN1_ReceiveMessageGet
| This macro defines the Custom Name for CAN1_ReceiveMessageGet API.
#define | CAN_FD1_RX_FIFO_StatusGet CAN1_RX_FIFO_StatusGet
| This macro defines the Custom Name for CAN1_RX_FIFO_StatusGet API.
#define | CAN_FD1_Transmit CAN1_Transmit
| This macro defines the Custom Name for CAN1_Transmit API.
#define | CAN_FD1_TransmitFIFOStatusGet CAN1_TransmitFIFOStatusGet
| This macro defines the Custom Name for CAN1_TransmitFIFOStatusGet API.
#define | CAN_FD1_IsBusOff CAN1_IsBusOff
| This macro defines the Custom Name for CAN1_IsBusOff API.
#define | CAN_FD1_IsTxErrorPassive CAN1_IsTxErrorPassive
| This macro defines the Custom Name for CAN1_IsTxErrorPassive API.
#define | CAN_FD1_IsTxErrorWarning CAN1_IsTxErrorWarning
| This macro defines the Custom Name for CAN1_IsTxErrorWarning API.
#define | CAN_FD1_IsTxErrorActive CAN1_IsTxErrorActive
| This macro defines the Custom Name for CAN1_IsTxErrorActive API.
#define | CAN_FD1_IsRxErrorPassive CAN1_IsRxErrorPassive
| This macro defines the Custom Name for CAN1_IsRxErrorPassive API.
#define | CAN_FD1_IsRxErrorWarning CAN1_IsRxErrorWarning
| This macro defines the Custom Name for CAN1_IsRxErrorWarning API.
#define | CAN_FD1_IsRxErrorActive CAN1_IsRxErrorActive
| This macro defines the Custom Name for CAN1_IsRxErrorActive API.
#define | CAN_FD1_Sleep CAN1_Sleep
| This macro defines the Custom Name for CAN1_Sleep API.
#define | CAN_FD1_ReceivedMessageCountGet CAN1_ReceivedMessageCountGet
| This macro defines the Custom Name for CAN1_ReceivedMessageCountGet API.
#define | CAN_FD1_Tasks CAN1_Tasks
| This macro defines the Custom Name for CAN1_Tasks API.
#define | CAN_FD1_InvalidMessageCallbackRegister CAN1_InvalidMessageCallbackRegister
| This macro defines the Custom Name for CAN1_InvalidMessageCallbackRegister API.
#define | CAN_FD1_BusWakeUpActivityCallbackRegister CAN1_BusWakeUpActivityCallbackRegister
| This macro defines the Custom Name for CAN1_BusWakeUpActivityCallbackRegister API.
#define | CAN_FD1_BusErrorCallbackRegister CAN1_BusErrorCallbackRegister
| This macro defines the Custom Name for CAN1_BusErrorCallbackRegister API.
#define | CAN_FD1_ModeChangeCallbackRegister CAN1_ModeChangeCallbackRegister
| This macro defines the Custom Name for CAN1_ModeChangeCallbackRegister API.
#define | CAN_FD1_SystemErrorCallbackRegister CAN1_SystemErrorCallbackRegister
| This macro defines the Custom Name for CAN1_SystemErrorCallbackRegister API.
#define | CAN_FD1_TxAttemptCallbackRegister CAN1_TxAttemptCallbackRegister
| This macro defines the Custom Name for CAN1_TxAttemptCallbackRegister API.
#define | CAN_FD1_RxBufferOverFlowCallbackRegister CAN1_RxBufferOverFlowCallbackRegister
| This macro defines the Custom Name for CAN1_RxBufferOverFlowCallbackRegister API.
#define | CAN1_TX_TXQ CAN1_TXQ
| CAN1 Transmit FIFO TXQ Custom Name.
#define | CAN1_RX_FIFO1 CAN1_FIFO_1
| CAN1 Receive FIFO 1 Custom Name.
#define | CAN1_RX_FIFO2 CAN1_FIFO_2
| CAN1 Receive FIFO 2 Custom Name.
#define | CAN_FD_MESSAGE_FORMAT_FEATURE_AVAILABLE 1
| This macro defines the CAN FD Message format data update request functionality.
#define | CAN_FIFO_BASED_TRANSMIT_PRIORITY_FEATURE_AVAILABLE 1
| This macro defines the CAN FIFO based transmit priority data update request functionality.
#define | CAN_DMA_INTERFACE_FEATURE_AVAILABLE 0
| This macro defines the CAN 2.0 DMA interface data update request functionality.

## Functions
void | CAN1_Initialize (void)
| Initializes CAN1 module.
void | CAN1_Deinitialize (void)
| Deinitializes CAN1 to POR values.
enum CAN_OP_MODE_STATUS | CAN1_OperationModeSet (const enum CAN_OP_MODES requestMode)
| Sets the CAN1 operation mode.
enum CAN_OP_MODES | CAN1_OperationModeGet (void)
| Get the CAN1 operation mode.
bool | CAN1_Receive (struct CAN_MSG_OBJ *rxCanMsg)
| Reads the received single message object.
bool | CAN1_ReceiveMessageGet (const enum CAN1_RX_FIFO_CHANNELS fifoChannel, struct CAN_MSG_OBJ *rxCanMsg)
| Reads the received single message object from the CAN1 receive FIFO.
enum CAN_TX_MSG_REQUEST_STATUS | CAN1_Transmit (const enum CAN1_TX_FIFO_CHANNELS fifoChannel, struct CAN_MSG_OBJ *txCanMsg)
| Writes the CAN message object to specified transmit FIFO channel.
enum CAN_TX_FIFO_STATUS | CAN1_TransmitFIFOStatusGet (const enum CAN1_TX_FIFO_CHANNELS fifoChannel)
| Returns the CAN1 transmitter FIFO status.
bool | CAN1_IsBusOff (void)
| Returns the bus off status.
bool | CAN1_IsTxErrorPassive (void)
| Returns the transmit error passive state.
bool | CAN1_IsTxErrorWarning (void)
| Returns the transmit error warning state. If Transmitter error counter is above 95 to below 128, then transmitter error warning state is set.
bool | CAN1_IsTxErrorActive (void)
| Returns the transmit error active state.
bool | CAN1_IsRxErrorPassive (void)
| Returns the receive error passive state.
bool | CAN1_IsRxErrorWarning (void)
| Returns the receive error warning state. If Receiver error counter is above 95 to below 128, then receiver error warning state is set.
bool | CAN1_IsRxErrorActive (void)
| Returns the receive error active state.
void | CAN1_Sleep (void)
| Sets the CAN node in sleep mode.
uint8_t | CAN1_ReceivedMessageCountGet (void)
| Returns the number of CAN messages received in all the FIFO.
uint8_t | CAN1_RX_FIFO_StatusGet (const enum CAN1_RX_FIFO_CHANNELS fifoNum)
| This returns the CAN1 receive FIFO status.
void | CAN1_Tasks (void)
| This routine is used to implement the tasks for polled implementations.
void | CAN1_InvalidMessageCallbackRegister (void(*handler)(void))
| This function can be used to override default callback and to define custom callback for CAN1_InvalidMessageCallback.
void | CAN1_InvalidMessageCallback (void)
| This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using CAN1_InvalidMessageCallbackRegister.
void | CAN1_BusWakeUpActivityCallbackRegister (void(*handler)(void))
| This function can be used to override default callback and to define custom callback for CAN1_BusWakeUpActivityCallback.
void | CAN1_BusWakeUpActivityCallback (void)
| This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using CAN1_BusWakeUpActivityCallbackRegister.
void | CAN1_BusErrorCallbackRegister (void(*handler)(void))
| This function can be used to override default callback and to define custom callback for CAN1_BusErrorCallback.
void | CAN1_BusErrorCallback (void)
| This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using CAN1_BusErrorCallbackRegister.
void | CAN1_ModeChangeCallbackRegister (void(*handler)(void))
| This function can be used to override default callback and to define custom callback for CAN1_ModeChangeCallback.
void | CAN1_ModeChangeCallback (void)
| This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using CAN1_ModeChangeCallbackRegister.
void | CAN1_SystemErrorCallbackRegister (void(*handler)(void))
| This function can be used to override default callback and to define custom callback for CAN1_SystemErrorCallback.
void | CAN1_SystemErrorCallback (void)
| This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using CAN1_SystemErrorCallbackRegister.
void | CAN1_TxAttemptCallbackRegister (void(*handler)(void))
| This function can be used to override default callback and to define custom callback for CAN1_TxAttemptCallback.
void | CAN1_TxAttemptCallback (void)
| This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using CAN1_TxAttemptCallbackRegister.
void | CAN1_RxBufferOverFlowCallbackRegister (void(*handler)(void))
| This function can be used to override default callback and to define custom callback for CAN1_RxBufferOverFlowCallback.
void | CAN1_RxBufferOverFlowCallback (void)
| This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using CAN1_RxBufferOverFlowCallbackRegister.
static uint8_t | CAN1_DlcToDataBytesGet (const enum CAN_DLC dlc)
| This function get the DLC enum based decimal value.
static void | CAN1_FIFO_InfoGet (const uint8_t fifoNum, volatile struct CAN1_FIFO_INFO *fifoInfo)
| This function get the FIFO user address, message depth and payload size information.
static void | CAN1_RX_FIFO_ResetInfo (void)
| This function reset the CAN1 receive message head count.
static uint8_t | CAN1_RxFifoSearch (uint8_t fifoNum)
| This function Search the CAN1 receive FIFO channel index.
static void | CAN1_RX_FIFO_OverflowStatusFlagClear (const enum CAN1_RX_FIFO_CHANNELS fifoNum)
| This function is used to clear the CAN1 receive FIFO overflow status bit.
static void | CAN1_RX_FIFO_IncrementMsgPtr (const uint8_t fifoNum)
| This function Update the receive FIFO message increment tail position.
static uint16_t | CAN1_RX_FIFO_MessageIndexGet (const enum CAN1_RX_FIFO_CHANNELS fifoNum)
| This function get the Receiver FIFO message index value.
static void | CAN1_TX_FIFO_MessageSendRequest (const enum CAN1_TX_FIFO_CHANNELS fifoChannel)
| This function enables The FIFO transmit message send request bit.
static void | CAN1_MessageReadFromFifo (uint16_t *rxFifoObj, struct CAN_MSG_OBJ *rxCanMsg)
| This function read the message object from receive FIFO and update to the user message object pointer.
static void | CAN1_MessageWriteToFifo (uint16_t *txFifoObj, struct CAN_MSG_OBJ *txCanMsg)
| This function Read the message object from user input and update to the CAN1 TX FIFO.
static void | CAN1_TX_FIFO_Configuration (void)
| This function configure the CAN1 transmit FIFO settings.
static void | CAN1_RX_FIFO_Configuration (void)
| This function configure the CAN1 receive FIFO settings.
static void | CAN1_RX_FIFO_FilterMaskConfiguration (void)
| This function configure the CAN1 filter and mask settings.
static void | CAN1_BitRateConfiguration (void)
| This function configure the CAN1 bit rate settings.
static void | CAN1_ErrorNotificationEnable (void)
| This function enables the CAN1 error notification interrupt.

## Variables
const struct CAN_INTERFACE | CAN_FD1
| Structure object of type CAN_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. CAN can be changed by the user in the CAN FD user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.

## Detailed Description

## Macro Definition Documentation

## ◆ CAN1_RX_FIFO1

#define CAN1_RX_FIFO1 CAN1_FIFO_1

Defines the custom name of CAN1_FIFO_1 used for Receive functionality

Definition at line 202 of file can1.h.

## ◆ CAN1_RX_FIFO2

#define CAN1_RX_FIFO2 CAN1_FIFO_2

Defines the custom name of CAN1_FIFO_2 used for Receive functionality

Definition at line 207 of file can1.h.

## ◆ CAN1_TX_TXQ

#define CAN1_TX_TXQ CAN1_TXQ

Defines the custom name of CAN1_TXQ used for Transmit functionality

Definition at line 196 of file can1.h.

## ◆ CAN_DMA_INTERFACE_FEATURE_AVAILABLE

#define CAN_DMA_INTERFACE_FEATURE_AVAILABLE 0

Macros defined for features not supported in the device

Definition at line 103 of file can_features.h.

## ◆ CAN_FD1_BusErrorCallbackRegister

#define CAN_FD1_BusErrorCallbackRegister CAN1_BusErrorCallbackRegister

Definition at line 169 of file can1.h.

## ◆ CAN_FD1_BusWakeUpActivityCallbackRegister

#define CAN_FD1_BusWakeUpActivityCallbackRegister CAN1_BusWakeUpActivityCallbackRegister

Definition at line 164 of file can1.h.

## ◆ CAN_FD1_Deinitialize

#define CAN_FD1_Deinitialize CAN1_Deinitialize

Definition at line 69 of file can1.h.

## ◆ CAN_FD1_Initialize

#define CAN_FD1_Initialize CAN1_Initialize

Definition at line 64 of file can1.h.

## ◆ CAN_FD1_InvalidMessageCallbackRegister

#define CAN_FD1_InvalidMessageCallbackRegister CAN1_InvalidMessageCallbackRegister

Definition at line 159 of file can1.h.

## ◆ CAN_FD1_IsBusOff

#define CAN_FD1_IsBusOff CAN1_IsBusOff

Definition at line 109 of file can1.h.

## ◆ CAN_FD1_IsRxErrorActive

#define CAN_FD1_IsRxErrorActive CAN1_IsRxErrorActive

Definition at line 139 of file can1.h.

## ◆ CAN_FD1_IsRxErrorPassive

#define CAN_FD1_IsRxErrorPassive CAN1_IsRxErrorPassive

Definition at line 129 of file can1.h.

## ◆ CAN_FD1_IsRxErrorWarning

#define CAN_FD1_IsRxErrorWarning CAN1_IsRxErrorWarning

Definition at line 134 of file can1.h.

## ◆ CAN_FD1_IsTxErrorActive

#define CAN_FD1_IsTxErrorActive CAN1_IsTxErrorActive

Definition at line 124 of file can1.h.

## ◆ CAN_FD1_IsTxErrorPassive

#define CAN_FD1_IsTxErrorPassive CAN1_IsTxErrorPassive

Definition at line 114 of file can1.h.

## ◆ CAN_FD1_IsTxErrorWarning

#define CAN_FD1_IsTxErrorWarning CAN1_IsTxErrorWarning

Definition at line 119 of file can1.h.

## ◆ CAN_FD1_ModeChangeCallbackRegister

#define CAN_FD1_ModeChangeCallbackRegister CAN1_ModeChangeCallbackRegister

Definition at line 174 of file can1.h.

## ◆ CAN_FD1_OperationModeGet

#define CAN_FD1_OperationModeGet CAN1_OperationModeGet

Definition at line 79 of file can1.h.

## ◆ CAN_FD1_OperationModeSet

#define CAN_FD1_OperationModeSet CAN1_OperationModeSet

Definition at line 74 of file can1.h.

## ◆ CAN_FD1_Receive

#define CAN_FD1_Receive CAN1_Receive

Definition at line 84 of file can1.h.

## ◆ CAN_FD1_ReceivedMessageCountGet

#define CAN_FD1_ReceivedMessageCountGet CAN1_ReceivedMessageCountGet

Definition at line 149 of file can1.h.

## ◆ CAN_FD1_ReceiveMessageGet

#define CAN_FD1_ReceiveMessageGet CAN1_ReceiveMessageGet

Definition at line 89 of file can1.h.

## ◆ CAN_FD1_RX_FIFO_StatusGet

#define CAN_FD1_RX_FIFO_StatusGet CAN1_RX_FIFO_StatusGet

Definition at line 94 of file can1.h.

## ◆ CAN_FD1_RxBufferOverFlowCallbackRegister

#define CAN_FD1_RxBufferOverFlowCallbackRegister CAN1_RxBufferOverFlowCallbackRegister

Definition at line 189 of file can1.h.

## ◆ CAN_FD1_Sleep

#define CAN_FD1_Sleep CAN1_Sleep

Definition at line 144 of file can1.h.

## ◆ CAN_FD1_SystemErrorCallbackRegister

#define CAN_FD1_SystemErrorCallbackRegister CAN1_SystemErrorCallbackRegister

Definition at line 179 of file can1.h.

## ◆ CAN_FD1_Tasks

#define CAN_FD1_Tasks CAN1_Tasks

Definition at line 154 of file can1.h.

## ◆ CAN_FD1_Transmit

#define CAN_FD1_Transmit CAN1_Transmit

Definition at line 99 of file can1.h.

## ◆ CAN_FD1_TransmitFIFOStatusGet

#define CAN_FD1_TransmitFIFOStatusGet CAN1_TransmitFIFOStatusGet

Definition at line 104 of file can1.h.

## ◆ CAN_FD1_TxAttemptCallbackRegister

#define CAN_FD1_TxAttemptCallbackRegister CAN1_TxAttemptCallbackRegister

Definition at line 184 of file can1.h.

## ◆ CAN_FD_MESSAGE_FORMAT_FEATURE_AVAILABLE

#define CAN_FD_MESSAGE_FORMAT_FEATURE_AVAILABLE 1

IMPORTANT******** This file defines the CAN module feature C-macros available on the selected device. The macros defined in this file provides the flexibility to easily migrate the user application to other device which might have varied feature list.

The file has to be manually included in main.c, if the user intends to migrate the application to another device which might have varied feature list.

              The content in this file is strictly "read only" and should

not be altered. Failing to do so, the migration is not guaranteed.************* Macros defined for features supported in the device

APIs Supported:
CAN_TX_MSG_REQUEST_STATUS CANx_Transmit(const CANx_TX_FIFO_CHANNELS fifoChannel, CAN_MSG_OBJ *txCanMsg); bool CANx_Receive(CAN_MSG_OBJ *rxCanMsg); x denotes instance of CAN in CANx. Refer to device specific datasheet to check number of CAN module instance. Refer driver header file for detailed description of the APIs.

Definition at line 80 of file can_features.h.

## ◆ CAN_FIFO_BASED_TRANSMIT_PRIORITY_FEATURE_AVAILABLE

#define CAN_FIFO_BASED_TRANSMIT_PRIORITY_FEATURE_AVAILABLE 1

APIs Supported:
CAN_TX_MSG_REQUEST_STATUS CANx_Transmit(const CANx_TX_FIFO_CHANNELS fifoChannel, CAN_MSG_OBJ *txCanMsg); CAN_TX_FIFO_STATUS CANx_TransmitFIFOStatusGet(const CANx_TX_FIFO_CHANNELS fifoChannel);

x denotes instance of CAN in CANx. Refer to device specific datasheet to check number of CAN module instance. Refer driver header file for detailed description of the APIs.

Definition at line 94 of file can_features.h.

## Function Documentation

## ◆ CAN1_BitRateConfiguration()

static void CAN1_BitRateConfiguration | ( | void |  | ) |
| static

Configure the CAN1 bit rate settings

Definition at line 547 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_BusErrorCallback()

void CAN1_BusErrorCallback | ( | void |  | ) |

Parameters

  none |

Returns
  none

Here is the caller graph for this function:

## ◆ CAN1_BusErrorCallbackRegister()

void CAN1_BusErrorCallbackRegister | ( | void(*)(void) | handler | ) |

Parameters

  [in] | handler | - Address of the callback routine

Returns
  none

Definition at line 1011 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_BusWakeUpActivityCallback()

void CAN1_BusWakeUpActivityCallback | ( | void |  | ) |

Parameters

  none |

Returns
  none

Here is the caller graph for this function:

## ◆ CAN1_BusWakeUpActivityCallbackRegister()

void CAN1_BusWakeUpActivityCallbackRegister | ( | void(*)(void) | handler | ) |

Parameters

  [in] | handler | - Address of the callback routine

Returns
  none

Definition at line 998 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_Deinitialize()

void CAN1_Deinitialize | ( | void |  | ) |

Parameters

  none |

Returns
  none

Definition at line 624 of file can1.c.

Here is the call graph for this function:

## ◆ CAN1_DlcToDataBytesGet()

static uint8_t CAN1_DlcToDataBytesGet | ( | const enum CAN_DLC | dlc | ) |
| static

Get the DLC enum based decimal value

Definition at line 166 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_ErrorNotificationEnable()

static void CAN1_ErrorNotificationEnable | ( | void |  | ) |
| static

Enable the CAN1 Error Notification interrupt

Definition at line 568 of file can1.c.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ CAN1_FIFO_InfoGet()

static void CAN1_FIFO_InfoGet | ( | const uint8_t | fifoNum,
|  | volatile struct CAN1_FIFO_INFO * | fifoInfo
| ) |  |
| static

Get the FIFO user address, message depth and payload size information

Definition at line 179 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_Initialize()

void CAN1_Initialize | ( | void |  | ) |

Parameters

  none |

Returns
  none

Definition at line 581 of file can1.c.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ CAN1_InvalidMessageCallback()

void CAN1_InvalidMessageCallback | ( | void |  | ) |

Parameters

  none |

Returns
  none

Here is the caller graph for this function:

## ◆ CAN1_InvalidMessageCallbackRegister()

void CAN1_InvalidMessageCallbackRegister | ( | void(*)(void) | handler | ) |

Parameters

  [in] | handler | - Address of the callback routine

Returns
  none

Definition at line 985 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_IsBusOff()

bool CAN1_IsBusOff | ( | void |  | ) |

Precondition
  CAN1_Initialize() function should be called before calling this function.

Parameters

  none |

Returns
  true - CAN node in Bus Off state
  false - CAN node not in Bus Off state

Definition at line 926 of file can1.c.

## ◆ CAN1_IsRxErrorActive()

bool CAN1_IsRxErrorActive | ( | void |  | ) |

Precondition
  CAN1_Initialize() function should be called before calling this function.

Parameters

  none |

Returns
  true - CAN node Error active state
  false - CAN node not Error active state

Definition at line 941 of file can1.c.

## ◆ CAN1_IsRxErrorPassive()

bool CAN1_IsRxErrorPassive | ( | void |  | ) |

Precondition
  CAN1_Initialize() function should be called before calling this function.

Parameters

  none |

Returns
  true - CAN node Error Passive state
  false - CAN node not Error Passive state

Definition at line 931 of file can1.c.

## ◆ CAN1_IsRxErrorWarning()

bool CAN1_IsRxErrorWarning | ( | void |  | ) |

Precondition
  CAN1_Initialize() function should be called before calling this function.

Parameters

  none |

Returns
  true - CAN node Error warning state
  false - CAN node not Error warning state

Definition at line 936 of file can1.c.

## ◆ CAN1_IsTxErrorActive()

bool CAN1_IsTxErrorActive | ( | void |  | ) |

Precondition
  CAN1_Initialize() function should be called before calling this function.

Parameters

  none |

Returns
  true - CAN node Error active state
  false - CAN node not Error active state

Definition at line 962 of file can1.c.

## ◆ CAN1_IsTxErrorPassive()

bool CAN1_IsTxErrorPassive | ( | void |  | ) |

Precondition
  CAN1_Initialize() function should be called before calling this function.

Parameters

  none |

Returns
  true - CAN node Error Passive state
  false - CAN node not Error Passive state

Definition at line 952 of file can1.c.

## ◆ CAN1_IsTxErrorWarning()

bool CAN1_IsTxErrorWarning | ( | void |  | ) |

Precondition
  CAN1_Initialize() function should be called before calling this function.

Parameters

  none |

Returns
  true - CAN node Error warning state
  false - CAN node not Error warning state

Definition at line 957 of file can1.c.

## ◆ CAN1_MessageReadFromFifo()

static void CAN1_MessageReadFromFifo | ( | uint16_t * | rxFifoObj,
|  | struct CAN_MSG_OBJ * | rxCanMsg
| ) |  |
| static

Read the message object from receive FIFO and update to the user message object pointer.

Definition at line 347 of file can1.c.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ CAN1_MessageWriteToFifo()

static void CAN1_MessageWriteToFifo | ( | uint16_t * | txFifoObj,
|  | struct CAN_MSG_OBJ * | txCanMsg
| ) |  |
| static

Read the message object from user input and update to the CAN1 TX FIFO

Definition at line 413 of file can1.c.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ CAN1_ModeChangeCallback()

void CAN1_ModeChangeCallback | ( | void |  | ) |

Parameters

  none |

Returns
  none

Here is the caller graph for this function:

## ◆ CAN1_ModeChangeCallbackRegister()

void CAN1_ModeChangeCallbackRegister | ( | void(*)(void) | handler | ) |

Parameters

  [in] | handler | - Address of the callback routine

Returns
  none

Definition at line 1024 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_OperationModeGet()

enum CAN_OP_MODES CAN1_OperationModeGet | ( | void |  | ) |

Precondition
  CAN1_Initialize() function should be called before calling this function.

Parameters

  none |

Returns
  Return the present CAN1 operation mode

Definition at line 698 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_OperationModeSet()

enum CAN_OP_MODE_STATUS CAN1_OperationModeSet | ( | const enum CAN_OP_MODES | requestMode | ) |

Precondition
  CAN1_Initialize() function should be called before calling this function.

Parameters

  [in] | requestMode | - CAN1 operation modes

Returns
  CAN1 Operation mode request to set.

Definition at line 671 of file can1.c.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ CAN1_Receive()

bool CAN1_Receive | ( | struct CAN_MSG_OBJ * | rxCanMsg | ) |

Precondition
  CAN1_Initialize() function should be called before calling this function. The CAN1_ReceivedMessageCountGet() function should be checked to see if any CAN message is received.

Parameters

  [out] | rxCanMsg | - pointer to the message object

Returns
  true - CAN message read success
  false - CAN message read fail

Definition at line 703 of file can1.c.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ CAN1_ReceivedMessageCountGet()

uint8_t CAN1_ReceivedMessageCountGet | ( | void |  | ) |

Precondition
  CAN1_Initialize() function should be called before calling this function.

Parameters

  none |

Returns
  Number of messages received.

Definition at line 854 of file can1.c.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ CAN1_ReceiveMessageGet()

bool CAN1_ReceiveMessageGet | ( | const enum CAN1_RX_FIFO_CHANNELS | fifoChannel,
|  | struct CAN_MSG_OBJ * | rxCanMsg
| ) |  |

Precondition
  CAN1_Initialize() function should be called before calling this function. The CAN1_ReceivedMessageCountGet() function should be checked to see if the receiver is not empty before calling this function.

Parameters

  [out] | rxCanMsg | - pointer to the message object

Returns
  true - CAN message read success
  false - CAN message read fail

Definition at line 749 of file can1.c.

Here is the call graph for this function:

## ◆ CAN1_RX_FIFO_Configuration()

static void CAN1_RX_FIFO_Configuration | ( | void |  | ) |
| static

Configure the CAN1 receive FIFO settings

Definition at line 494 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_RX_FIFO_FilterMaskConfiguration()

static void CAN1_RX_FIFO_FilterMaskConfiguration | ( | void |  | ) |
| static

Configure the CAN1 filter and mask settings

Definition at line 511 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_RX_FIFO_IncrementMsgPtr()

static void CAN1_RX_FIFO_IncrementMsgPtr | ( | const uint8_t | fifoNum | ) |
| static

Update the receive FIFO message increment tail position

Definition at line 277 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_RX_FIFO_MessageIndexGet()

static uint16_t CAN1_RX_FIFO_MessageIndexGet | ( | const enum CAN1_RX_FIFO_CHANNELS | fifoNum | ) |
| static

Get the Receiver FIFO message index value

Definition at line 299 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_RX_FIFO_OverflowStatusFlagClear()

static void CAN1_RX_FIFO_OverflowStatusFlagClear | ( | const enum CAN1_RX_FIFO_CHANNELS | fifoNum | ) |
| static

Clear the CAN1 receive FIFO overflow status bit

Definition at line 255 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_RX_FIFO_ResetInfo()

static void CAN1_RX_FIFO_ResetInfo | ( | void |  | ) |
| static

Reset the CAN1 receive message head count

Definition at line 214 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_RX_FIFO_StatusGet()

uint8_t CAN1_RX_FIFO_StatusGet | ( | const enum CAN1_RX_FIFO_CHANNELS | fifoNum | ) |

Precondition
  CAN1_Initialize() function should be called before calling this function

Parameters

  [in] | fifoNum | - FIFO channel of which status is required

Returns
  Combined status of the FIFO

Note
  Use CAN_RX_FIFO_STATUS to mask individual status.

Definition at line 904 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_RxBufferOverFlowCallback()

void CAN1_RxBufferOverFlowCallback | ( | void |  | ) |

Parameters

  none |

Returns
  none

Here is the caller graph for this function:

## ◆ CAN1_RxBufferOverFlowCallbackRegister()

void CAN1_RxBufferOverFlowCallbackRegister | ( | void(*)(void) | handler | ) |

Parameters

  [in] | handler | - Address of the callback routine

Returns
  none

Definition at line 1063 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_RxFifoSearch()

static uint8_t CAN1_RxFifoSearch | ( | uint8_t | fifoNum | ) |
| static

Search the CAN1 receive FIFO channel index

Definition at line 229 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_Sleep()

void CAN1_Sleep | ( | void |  | ) |

Precondition
  CAN1_Initialize() function should be called before calling this function.

Parameters

  none |

Returns
  none

Definition at line 973 of file can1.c.

Here is the call graph for this function:

## ◆ CAN1_SystemErrorCallback()

void CAN1_SystemErrorCallback | ( | void |  | ) |

Parameters

  none |

Returns
  none

Here is the caller graph for this function:

## ◆ CAN1_SystemErrorCallbackRegister()

void CAN1_SystemErrorCallbackRegister | ( | void(*)(void) | handler | ) |

Parameters

  [in] | handler | - Address of the callback routine

Returns
  none

Definition at line 1037 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_Tasks()

void CAN1_Tasks | ( | void |  | ) |

Precondition
  CAN1_Initialize() function should have been called before calling this function.

Parameters

  none |

Returns
  none

Definition at line 1092 of file can1.c.

## ◆ CAN1_Transmit()

enum CAN_TX_MSG_REQUEST_STATUS CAN1_Transmit | ( | const enum CAN1_TX_FIFO_CHANNELS | fifoChannel,
|  | struct CAN_MSG_OBJ * | txCanMsg
| ) |  |

Precondition
  CAN1_Initialize() function should be called before calling this function. CAN1_TransmitFIFOStatusGet function should be called to check buffer availability in the Transmit FIFO.

Parameters

  [in] | fifoChannel | - FIFO channel where the message object to be written
  [in] | txCanMsg | - pointer to the message object

Returns
  Returns the transmit status of type CAN_TX_MSG_REQUEST_STATUS

Definition at line 788 of file can1.c.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ CAN1_TransmitFIFOStatusGet()

enum CAN_TX_FIFO_STATUS CAN1_TransmitFIFOStatusGet | ( | const enum CAN1_TX_FIFO_CHANNELS | fifoChannel | ) |

Precondition
  CAN1_Initialize() function should be called before calling this function.

Parameters

  [in] | fifoChannel | - CAN1 TX priority FIFO selection

Returns
  Returns the transmit status of type CAN_TX_FIFO_STATUS

Definition at line 836 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_TX_FIFO_Configuration()

static void CAN1_TX_FIFO_Configuration | ( | void |  | ) |
| static

Configure the CAN1 transmit FIFO settings

Definition at line 480 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_TX_FIFO_MessageSendRequest()

static void CAN1_TX_FIFO_MessageSendRequest | ( | const enum CAN1_TX_FIFO_CHANNELS | fifoChannel | ) |
| static

Enable the transmit FIFO message send request bit

Definition at line 326 of file can1.c.

Here is the caller graph for this function:

## ◆ CAN1_TxAttemptCallback()

void CAN1_TxAttemptCallback | ( | void |  | ) |

Parameters

  none |

Returns
  none

Here is the caller graph for this function:

## ◆ CAN1_TxAttemptCallbackRegister()

void CAN1_TxAttemptCallbackRegister | ( | void(*)(void) | handler | ) |

Parameters

  [in] | handler | - Address of the callback routine

Returns
  none

Definition at line 1050 of file can1.c.

Here is the caller graph for this function:

## Variable Documentation

## ◆ CAN_FD1

const struct CAN_INTERFACE CAN_FD1
| extern

Definition at line 83 of file can1.c.