9#ifndef APP_PBV_INTERFACE_H
10#define APP_PBV_INTERFACE_H
14#include "config/comms_config.h"
66typedef void (*func_p)(uint16_t, uint8_t *);
void App_PBV_Task_100us(void)
Task to be executed every 100 us.
void PBV_Change_from_Sixteen_to_Eight(uint16_t *sixteen_ptr, uint8_t *eight_ptr, uint16_t length)
This function changes 16 bit data to 8 bit data.
void App_PBV_Init(PBV_Datatype_TX_t *system_to_PBV, PBV_Datatype_TX_t *system_To_PBV_Ascii, PBV_Datatype_RX_t *App_PBV_To_System_Ptr)
Initializes the PBV init, by linking the application object pointers from the application to CAN or U...
PBV_MESSAGE_RX_STATE
Power Board Visualizer RX Object Receiving states.
void App_PBV_Task_10ms(void)
task to be executed every 10ms
void App_Send_To_PBV(PBV_Datatype_TX_t *ptr)
This function links the data from application object to the CAN or UART object and This function ch...
int App_Read_Received_From_PBV(PBV_Datatype_RX_t *ptr)
This function links the data received by CAN or UART objects to the application object.
void App_PBV_Re_Init(PBV_Datatype_TX_t *ptr)
Reinitializes the objects if any parameters( ID, length, etc) are to be changed to the CAN or UART ob...
PBV_SIGNAL_ASCII_MODE
< includes
PBV_MESSAGE_TX_STATE
Power Board Visualizer TX Object transmission states.
void App_Receive_From_PBV(PBV_Datatype_RX_t *ptr)
This function changes the state of the application object. this acts as a trigger for the periodic ta...
void PBV_Change_from_Eight_to_Sixteen(uint8_t *eight_ptr, uint16_t *sixteen_ptr, uint16_t length)
This function changes 8 bit data to sixteen bit data.
@ PBV_MESSAGE_READY_TO_RECEIVE
Message Reception triggered.
@ PBV_STATE_RECEIVING
Message beinf received.
@ PBV_MESSAGE_RECEIVED
Message Received.
@ PBV_MESSAGE_RX_ERROR
if some error happens (CRC ?)
@ PBV_ASCII_MODE
Object will transmit Ascii data.
@ PBV_SIGNAL_MODE
Object will transmit/receive signals.
@ PBV_MESSAGE_TRANSMITTED
Message transmitted. successful transmit.
@ PBV_MESSAGE_INIT
Init State. Only Send Messages in this State
@ PBV_MESSAGE_TX_ERROR
if some error happens. unsuccessful transmit
@ PBV_MESSAGE_TRANSMIT_START
Start Transmitting message.
@ PBV_MESSAGE_TRANSMITTING
Transmitting Message.
uint32_t PBV_Protcol_ID
Protocol ID.
uint8_t * Data_Buffer
Pointer to the data to be transmitted.
enum PBV_SIGNAL_ASCII_MODE PBV_Signal_Ascii
Object will transmit Signals or ASCII.
PBV_MESSAGE_TX_STATE_t PBV_Message_State
State of the TX object.
uint16_t Length
Length of transmitted message in Bytes.
uint32_t PBV_Protcol_ID
Protocol ID of the received message.
PBV_MESSAGE_RX_STATE_t PBV_Message_State
State of the received message.
uint8_t * Data_Buffer
Received Data pointer.
uint16_t Length
Length of received message in Bytes.
func_p Callback_Function
Callback function.