Bar Logo 4kW dsPIC33C PSFB DC-DC DA (Part-No. )
 
Content
     
Loading...
Searching...
No Matches

These implement the PBV state machine of RX and TX, as well as link data that is received by peripherals to application. More...

+ Collaboration diagram for PBV Interface:

Data Structures

struct  PBV_Datatype_TX_t
 
More...
 
struct  PBV_Datatype_RX_t
 
More...
 

Typedefs

typedef void(* func_p) (uint16_t, uint8_t *)
 function pointer typedef for callbacks
 

Enumerations

enum  PBV_SIGNAL_ASCII_MODE { PBV_SIGNAL_MODE = 0 , PBV_ASCII_MODE = 1 }
 < includes More...
 
enum  PBV_MESSAGE_TX_STATE { PBV_MESSAGE_TRANSMITTED = 0 , PBV_MESSAGE_INIT = 1 , PBV_MESSAGE_TRANSMIT_START = 2 , PBV_MESSAGE_TRANSMITTING = 3 , PBV_MESSAGE_TX_ERROR = 4 }
 Power Board Visualizer TX Object transmission states. More...
 
enum  PBV_MESSAGE_RX_STATE { PBV_MESSAGE_RECEIVED = 0 , PBV_MESSAGE_READY_TO_RECEIVE = 1 , PBV_STATE_RECEIVING = 2 , PBV_MESSAGE_RX_ERROR = 3 }
 Power Board Visualizer RX Object Receiving states. More...
 

Functions

void app_Send_To_PBV (PBV_Datatype_TX_t *ptr)
 

 
static void app_PBV_Task (void)
 

 
void app_PBV_Task_10ms ()
 task to be executed every 10ms
 
void app_PBV_Task_100us ()
 Task to be executed every 100 us.
 

Variables

const APP_PBV_INTF_API_t APP_PBV_FUNCS
 < Includes
 
static PBV_Datatype_TX_tApp_System_To_PBV_Ptr
 

 
static PBV_Datatype_RX_tApp_PBV_To_System_Ptr
 

 
static PBV_Datatype_TX_tApp_System_To_PBV_ASCII_Ptr
 

 

Detailed Description

These implement the PBV state machine of RX and TX, as well as link data that is received by peripherals to application.

Typedef Documentation

◆ func_p

typedef void(* func_p) (uint16_t, uint8_t *)
Parameters
length- length of passed eight bit buffer
ptr- pointer to eight bit data

function pointer typedef for callback after receiving data.

Definition at line 65 of file app_PBV_interface.h.

Enumeration Type Documentation

◆ PBV_MESSAGE_RX_STATE

These states are used to keep track of the receiving of messages

Enumerator
PBV_MESSAGE_RECEIVED 

Message Received.

PBV_MESSAGE_READY_TO_RECEIVE 

Message Reception triggered.

PBV_STATE_RECEIVING 

Message beinf received.

PBV_MESSAGE_RX_ERROR 

if some error happens (CRC ?)

Definition at line 48 of file app_PBV_interface.h.

◆ PBV_MESSAGE_TX_STATE

These states are used to keep track of the transmission of message

Enumerator
PBV_MESSAGE_TRANSMITTED 

Message transmitted. successful transmit.

PBV_MESSAGE_INIT 

Init State. Only Send Messages in this State

PBV_MESSAGE_TRANSMIT_START 

Start Transmitting message.

PBV_MESSAGE_TRANSMITTING 

Transmitting Message.

PBV_MESSAGE_TX_ERROR 

if some error happens. unsuccessful transmit

Definition at line 32 of file app_PBV_interface.h.

◆ PBV_SIGNAL_ASCII_MODE

Power Board Visualizer TX type

This type defines if the TX Object is transmitting numbers or ASCII

Enumerator
PBV_SIGNAL_MODE 

Object will transmit/receive signals.

PBV_ASCII_MODE 

Object will transmit Ascii data.

Definition at line 20 of file app_PBV_interface.h.

Function Documentation

◆ app_PBV_Task()

static void app_PBV_Task ( void )
static
Parameters
none
Returns
void

main application task. this looks at the states of the TX and RX pointers, and if the states are changed for RX/TX then executes TX and RX.

Definition at line 203 of file app_PBV_interface.c.

+ Here is the caller graph for this function:

◆ app_PBV_Task_100us()

void app_PBV_Task_100us ( void )
Parameters
<br>
Returns
void

task that is to be executed every 100 us (UART) for executing UART State machine. calling task has to ensure that the system is not overloaded

Definition at line 257 of file app_PBV_interface.c.

+ Here is the call graph for this function:

◆ app_PBV_Task_10ms()

void app_PBV_Task_10ms ( void )
Parameters
none
Returns
void

task that is to be executed every 100 ms (CAN msg) can work on slower task as mcc implements a queuing buffer

Definition at line 240 of file app_PBV_interface.c.

+ Here is the call graph for this function:

◆ app_Send_To_PBV()

void app_Send_To_PBV ( PBV_Datatype_TX_t * ptr)
Parameters
PBV_Datatype_TX_t* - ptr
Returns
void

This function links the data from application object to the CAN or UART object and
This function changes the state of the application object. This acts as a trigger for the periodic task to send data

Definition at line 164 of file app_PBV_interface.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ APP_PBV_FUNCS

const APP_PBV_INTF_API_t APP_PBV_FUNCS
extern

extern const struct of function pointers

this structure has the function pointers that links to the interfaces from CAN or UART. depending upon the selection in config.h

< Includes

Definition at line 23 of file app_PBV_config.c.

◆ App_PBV_To_System_Ptr

PBV_Datatype_RX_t* App_PBV_To_System_Ptr
static

pointer to the PBV_Datatype_RX_t object that will be passed from the application.

Definition at line 35 of file app_PBV_interface.c.

◆ App_System_To_PBV_ASCII_Ptr

PBV_Datatype_TX_t* App_System_To_PBV_ASCII_Ptr
static

pointer to the PBV_Datatype_TX_t object that will be passed from the application.

Definition at line 44 of file app_PBV_interface.c.

◆ App_System_To_PBV_Ptr

PBV_Datatype_TX_t* App_System_To_PBV_Ptr
static

pointer to the PBV_Datatype_TX_t object that will be passed from the application.

Definition at line 24 of file app_PBV_interface.c.