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"
Go to the source code of this file.
Enumerations | |
enum | CAN1_TX_FIFO_CHANNELS { CAN1_TXQ = 0 } |
This enumeration defines the can Transmit FIFO Configured in MCC Melody CAN user interface. More... | |
enum | CAN1_RX_FIFO_CHANNELS { CAN1_FIFO_1 = 1 } |
This enumeration defines the can receive FIFO. More... | |
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. | |