Bar Logo Dual Active Bridge Development Board (Part-No. )
 
Content
     
Loading...
Searching...
No Matches

This abstracts the MCC driver api. More...

+ Collaboration diagram for CAN Communication:

Functions

void PBV_CAN_Init (PBV_Datatype_TX_t *boardToPBV, PBV_Datatype_TX_t *boardToPBVAscii, PBV_Datatype_RX_t *pbvToBoard)
 Initializes CAN objects with PBV objects ( only CAN IDs for now)
 
uint8_t PBV_CAN_Receive_from_GUI ()
 Checks the queue and if a message is received then links the data pointer to can object.
 
uint8_t PBV_CAN_Transmit_Ascii_to_GUI ()
 transmits the Ascii msg to PBV
 
uint8_t PBV_CAN_Transmit_to_GUI ()
 Transmits the numerical msg to PBV.
 
void PBV_CAN_Reinit (PBV_Datatype_TX_t *ptr)
 Reinitializes the can object with new can id.
 
void PBV_CAN_Link_Data_TX (PBV_Datatype_TX_t *ptr)
 Links the data from TX PBV datatype to CAN TX object.
 
int PBV_CAN_Link_Data_RX (PBV_Datatype_RX_t *ptr)
 links the received data to the application data structure
 

Variables

CAN_MSG_OBJ_t pbvCanObjectTx
 CAN object for Numeric TX. Initialized by PBV_CAN_Init()
 
CAN_MSG_OBJ_t pbvCanObjectRx
 CAN object for numeric RX. Does not have to be initialized.
 
CAN_MSG_OBJ_t pbvCanObjectAscii
 CAN object for ascii TX. Initialized by PBV_CAN_Init()
 

Detailed Description

This layer abstracts the MCC driver api to have the same interface as the UART.

Function Documentation

◆ PBV_CAN_Init()

void PBV_CAN_Init ( PBV_Datatype_TX_t boardToPBV,
PBV_Datatype_TX_t boardToPBVAscii,
PBV_Datatype_RX_t pbvToBoard 
)
Parameters
PBV_Datatype_TX_t* ptr to numerical data
PBV_Datatype_TX_t* ptr to ascii data
PBV_Datatype_TX_t* ptr to rx numerical data. here as a place holder, only needed for completeness
Returns
void

Initialize the CAN communication.

Definition at line 44 of file PBV_CAN.c.

◆ PBV_CAN_Link_Data_RX()

int PBV_CAN_Link_Data_RX ( PBV_Datatype_RX_t ptr)
Parameters
PBV_Datatype_RX_t*
Returns
void

This links the received data (uint8_t *) to the application data structure data (uint8_t *)

Definition at line 252 of file PBV_CAN.c.

◆ PBV_CAN_Link_Data_TX()

void PBV_CAN_Link_Data_TX ( PBV_Datatype_TX_t ptr)
Parameters
PBV_Datatype_RX_t*
Returns
This function links the data (uint_8 *) from the passing struct to the CAN object data (uint_8 *)

This function links the data (uint_8 *) from the passing struct to the CAN object data (uint_8 *)

Definition at line 238 of file PBV_CAN.c.

◆ PBV_CAN_Receive_from_GUI()

uint8_t PBV_CAN_Receive_from_GUI ( )
Returns
int (0 on successful, 1 on unsuccessful)

Checks the queue and if a message is received then links the data pointer to can object

Definition at line 67 of file PBV_CAN.c.

+ Here is the call graph for this function:

◆ PBV_CAN_Reinit()

void PBV_CAN_Reinit ( PBV_Datatype_TX_t ptr)
Parameters
PBV_Datatype_RX_t*
Returns
void

This function is needed in CAN TX to reinitialize the CAN TX object with new parameters.

Definition at line 112 of file PBV_CAN.c.

◆ PBV_CAN_Transmit_Ascii_to_GUI()

uint8_t PBV_CAN_Transmit_Ascii_to_GUI ( )
Returns
0 on successful transmission.

Transmits the Ascii msg to PBV

Definition at line 83 of file PBV_CAN.c.

+ Here is the call graph for this function:

◆ PBV_CAN_Transmit_to_GUI()

uint8_t PBV_CAN_Transmit_to_GUI ( )
Returns
int

This function sends the message on CAN1 Transmit Queue. TODO: make this portable to other transmit queues.

Definition at line 97 of file PBV_CAN.c.

+ Here is the call graph for this function:

Variable Documentation

◆ pbvCanObjectAscii

CAN_MSG_OBJ_t pbvCanObjectAscii

Definition at line 33 of file PBV_CAN.c.

◆ pbvCanObjectRx

CAN_MSG_OBJ_t pbvCanObjectRx

Definition at line 27 of file PBV_CAN.c.

◆ pbvCanObjectTx

CAN_MSG_OBJ_t pbvCanObjectTx

Definition at line 21 of file PBV_CAN.c.