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

Loading...
Searching...
No Matches
Macros | Enumerations | Functions | Variables
can1.h File Reference
MPLABX MCC Melody Code Generator » CAN FD Driver

This is the generated driver header file for the CAN1 driver using CCL. More...

`#include <xc.h>`
`#include <stdbool.h>`
`#include <stdint.h>`
`#include "can_types.h"`
`#include "can_interface.h"`
Include dependency graph for can1.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## 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.

## Enumerations
enum | CAN1_TX_FIFO_CHANNELS { CAN1_TXQ = 0 }
enum | CAN1_RX_FIFO_CHANNELS { CAN1_FIFO_1 = 1 , CAN1_FIFO_2 = 2 }

## 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.

## 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

CAN1 Generated Driver Header File

Definition in file can1.h.

## Enumeration Type Documentation

## ◆ CAN1_RX_FIFO_CHANNELS

enum CAN1_RX_FIFO_CHANNELS

Enumerator
CAN1_FIFO_1 | CAN1 Receive FIFO 1
CAN1_FIFO_2 | CAN1 Receive FIFO 2

Definition at line 225 of file can1.h.

## ◆ CAN1_TX_FIFO_CHANNELS

enum CAN1_TX_FIFO_CHANNELS

Enumerator
CAN1_TXQ | CAN1 Transmit FIFO TXQ

Definition at line 215 of file can1.h.