This is the generated driver source file for CAN1 driver using CCL. More...
#include <string.h>
#include "../can_types.h"
#include "../can1.h"
#include "../../sources_common/Totempole_Application_Setup.h"
Go to the source code of this file.
Data Structures | |
struct | CAN1_RX_FIFO_MSG |
struct | CAN1_FIFO_INFO |
Functions | |
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. | |
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. | |
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. | |
bool | CAN1_IsBusOff (void) |
Returns the bus off status. | |
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. | |
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. | |
void | CAN1_Sleep (void) |
Sets the CAN node in sleep mode. | |
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. | |
void | _C1Interrupt (void) |
void | CAN1_Tasks (void) |
This routine is used to implement the tasks for polled implementations. | |
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. | |
static uint8_t | can1FifoMsg [CAN1_FIFO_ALLOCATE_RAM_SIZE] |
static void(* | CAN1_InvalidMessageHandler )(void) = NULL |
static void(* | CAN1_BusWakeUpActivityHandler )(void) = NULL |
static void(* | CAN1_BusErrorHandler )(void) = NULL |
static void(* | CAN1_ModeChangeHandler )(void) = NULL |
static void(* | CAN1_SystemErrorHandler )(void) = NULL |
static void(* | CAN1_TxAttemptHandler )(void) = NULL |
static void(* | CAN1_RxBufferOverFlowHandler )(void) = NULL |
static uint8_t | rxMsgData [CAN1_RX_FIFO_MSG_DATA] |
static volatile struct CAN1_RX_FIFO_MSG | rxFIFOMsg [CAN1_NUM_OF_RX_FIFO] |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |