2#include "config/comms_config.h"
3#include "app_PBV_interface.h"
4#include "app_PBV_config.h"
57void PBV_Change_from_Sixteen_to_Eight(uint16_t * sixteenPtr, uint8_t * eightPtr, uint16_t length)
59 for (uint16_t i = 0, j = 0; i < (length * 2); i = i + 2, j++)
61 eightPtr[i] = (uint8_t) (sixteenPtr[j] >> 8);
62 eightPtr[i + 1] = (uint8_t) (sixteenPtr[j] & 0x00FF);
76void PBV_Change_from_Eight_to_Sixteen(uint8_t * eightPtr, uint16_t * sixteenPtr, uint16_t length)
78 uint8_t length_odd = (uint8_t) (length & 0x01);
84 length_t = (length & 0xFFFE);
88 for (i = 0, j = 0; i < length_t; i = i + 2, j++)
90 sixteenPtr[j] = ((uint16_t) (eightPtr[i] << 8)) + eightPtr[i + 1];
93 sixteenPtr[++j] = ((uint16_t) (eightPtr[length-1] << 8));
static PBV_Datatype_RX_t * App_PBV_To_System_Ptr
void app_PBV_Task_10ms()
task to be executed every 10ms
void app_PBV_Task_100us()
Task to be executed every 100 us.
const APP_PBV_INTF_API_t APP_PBV_FUNCS
< Includes
static PBV_Datatype_TX_t * App_System_To_PBV_Ptr
static PBV_Datatype_TX_t * App_System_To_PBV_ASCII_Ptr
void app_Send_To_PBV(PBV_Datatype_TX_t *ptr)
static void app_PBV_Task(void)
@ PBV_MESSAGE_READY_TO_RECEIVE
Message Reception triggered.
@ PBV_STATE_RECEIVING
Message beinf received.
@ 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.
structure of API function pointers.
PBV_Intf_Link_Data_TX_t linkDataTX
PBV_Intf_Transmit_Ascii_to_GUI_t txGuiAscii
PBV_Intf_Link_Data_RX_t linkDataRX
PBV_Intf_Transmit_to_GUI_t txGui
PBV_Intf_Receive_from_GUI_t rxGui
PBV_MESSAGE_TX_STATE_t PBV_Message_State
State of the TX object.
PBV_MESSAGE_RX_STATE_t PBV_Message_State
State of the received message.