PEController BSP v4
Board Support Package for PEController from Taraz Technologies
 
Loading...
Searching...
No Matches

Functions

device_err_t P2PComms_SingleUpdateRequest_Blocking (p2p_msg_type_t type, uint8_t index, data_union_t value)
 Update a parameter in control.
 
bool P2PComms_IsParameterValid (data_param_info_t *_paramInfo)
 Validates that the parameter is valid.
 
device_err_t P2PComms_GetValue (data_param_info_t *_paramInfo, data_union_t *value)
 Get value of a parameter shared in both cores.
 
device_err_t P2PComms_UpdateValue (data_param_info_t *_paramInfo, data_union_t value)
 Update value of a parameter shared in both cores.
 
device_err_t P2PComms_UpdateFromString (data_param_info_t *_paramInfo, const char *value)
 Update the value of a parameter (shared between both processors) from a string value.
 
device_err_t P2PComms_GetStringValue (data_param_info_t *_paramInfo, char *value, bool addUnit)
 Get the value of a parameter (shared between both processors) in string format.
 
device_err_t P2PComms_UpdateBool (uint8_t index, bool value)
 Update a boolean parameter share in both cores.
 
device_err_t P2PComms_UpdateU8 (uint8_t index, uint8_t value)
 Update a uint8_t parameter share in both cores.
 
device_err_t P2PComms_UpdateU16 (uint8_t index, uint16_t value)
 Update a uint16_t parameter share in both cores.
 
device_err_t P2PComms_UpdateU32 (uint8_t index, uint32_t value)
 Update a uint32_t parameter share in both cores.
 
device_err_t P2PComms_UpdateS8 (uint8_t index, int8_t value)
 Update a int8_t parameter share in both cores.
 
device_err_t P2PComms_UpdateS16 (uint8_t index, int16_t value)
 Update a int16_t parameter share in both cores.
 
device_err_t P2PComms_UpdateS32 (uint8_t index, int32_t value)
 Update a int32_t parameter share in both cores.
 
device_err_t P2PComms_UpdateFloat (uint8_t index, float value)
 Update a single-precision floating parameter share in both cores.
 
device_err_t P2PComms_SetBits (uint8_t index, uint8_t value)
 Set bits in bit accessible registers shared in both cores.
 
device_err_t P2PComms_ClearBits (uint8_t index, uint8_t value)
 Clear bits in bit accessible registers shared in both cores.
 
device_err_t P2PComms_ToggleBits (uint8_t index, uint8_t value)
 Toggle bits in bit accessible registers shared in both cores.
 
void P2PComms_ProcessPendingRequests (void)
 Process the pending request for interprocessor communications.
 
void P2PComms_InitData (void)
 Initialize the buffers and storage for the interprocessor communications.
 
bool P2PComms_IsStateStorageUpdateNeeded (p2p_data_buffs_t *dest, p2p_data_buffs_t *src)
 Check if the flash needs to be updated.
 
void P2PComms_UpdateStorableStates (p2p_data_buffs_t *dest, p2p_data_buffs_t *src)
 Update all store-able states from source to destination.
 
void P2PComms_InitStatesFromStorage (uint32_t *data, bool isDataValid)
 Initialize the states from the flash storage.
 
uint32_t P2PComms_RefreshStates (uint32_t *data, uint32_t *indexPtr)
 This function updates the state storage if needed. Call it periodically.
 
void P2PComms_ConfigStorage (state_storage_client_t *_config)
 Configures the storage client information.
 

Detailed Description

Function Documentation

◆ P2PComms_ClearBits()

device_err_t P2PComms_ClearBits ( uint8_t  index,
uint8_t  value 
)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
indexRegister index.
valueBits to be cleared.
Returns
device_err_t If successful ERR_OK else some other error.

◆ P2PComms_ConfigStorage()

void P2PComms_ConfigStorage ( state_storage_client_t _config)
extern
Parameters
_configPointer to the relevant configuration to be filled.

◆ P2PComms_GetStringValue()

device_err_t P2PComms_GetStringValue ( data_param_info_t _paramInfo,
char *  value,
bool  addUnit 
)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
_paramInfoRelevant parameter information.
valuetext value to be updated.
addUnitIf true append the unit of the parameter at the end of the string result.
Returns
device_err_t If successful ERR_OK else some other error.

◆ P2PComms_GetValue()

device_err_t P2PComms_GetValue ( data_param_info_t _paramInfo,
data_union_t value 
)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
_paramInfoDesired parameter.
valueWrites the acquired value at this pointer location
Returns
device_err_t If successful ERR_OK else some other error.

◆ P2PComms_InitStatesFromStorage()

void P2PComms_InitStatesFromStorage ( uint32_t *  data,
bool  isDataValid 
)
extern
Parameters
dataData pointer.
isDataValidtrue if the flash data is valid.

◆ P2PComms_IsParameterValid()

bool P2PComms_IsParameterValid ( data_param_info_t _paramInfo)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
_paramInfoDesired parameter.
Returns
true if valid else false.

◆ P2PComms_IsStateStorageUpdateNeeded()

bool P2PComms_IsStateStorageUpdateNeeded ( p2p_data_buffs_t dest,
p2p_data_buffs_t src 
)
extern
Parameters
destDestination
srcSource
Returns
true if update required else false.

◆ P2PComms_ProcessPendingRequests()

void P2PComms_ProcessPendingRequests ( void  )
extern
Note
Call this function frequently to make sure that interprocessor communications work flawlessly.
A weak implementation of this function is provided. User can create a custom implementation if needed.

◆ P2PComms_RefreshStates()

uint32_t P2PComms_RefreshStates ( uint32_t *  data,
uint32_t *  indexPtr 
)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
dataData pointer
indexPtrIndex of next data
Returns
Size of data that is updated. (Unit is 4-bytes)

◆ P2PComms_SetBits()

device_err_t P2PComms_SetBits ( uint8_t  index,
uint8_t  value 
)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
indexRegister index.
valueBits to be set.
Returns
device_err_t If successful ERR_OK else some other error.

◆ P2PComms_SingleUpdateRequest_Blocking()

device_err_t P2PComms_SingleUpdateRequest_Blocking ( p2p_msg_type_t  type,
uint8_t  index,
data_union_t  value 
)
extern
Note
This is a blocking call and will return only after request is completed.
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
typeType of message to be delivered.
indexRegister index.
valueData value to be updated.
Returns
device_err_t If successful ERR_OK else some other error.

◆ P2PComms_ToggleBits()

device_err_t P2PComms_ToggleBits ( uint8_t  index,
uint8_t  value 
)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
indexRegister index.
valueBits to be toggled.
Returns
device_err_t If successful ERR_OK else some other error.

◆ P2PComms_UpdateBool()

device_err_t P2PComms_UpdateBool ( uint8_t  index,
bool  value 
)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
indexRegister index.
valueDesired value.
Returns
device_err_t If successful ERR_OK else some other error.

◆ P2PComms_UpdateFloat()

device_err_t P2PComms_UpdateFloat ( uint8_t  index,
float  value 
)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
indexRegister index.
valueDesired value.
Returns
device_err_t If successful ERR_OK else some other error.

◆ P2PComms_UpdateFromString()

device_err_t P2PComms_UpdateFromString ( data_param_info_t _paramInfo,
const char *  value 
)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
_paramInfoRelevant parameter information
valueText value used for updating the parameter
Returns
device_err_t If successful ERR_OK else some other error.

◆ P2PComms_UpdateS16()

device_err_t P2PComms_UpdateS16 ( uint8_t  index,
int16_t  value 
)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
indexRegister index.
valueDesired value.
Returns
device_err_t If successful ERR_OK else some other error.

◆ P2PComms_UpdateS32()

device_err_t P2PComms_UpdateS32 ( uint8_t  index,
int32_t  value 
)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
indexRegister index.
valueDesired value.
Returns
device_err_t If successful ERR_OK else some other error.

◆ P2PComms_UpdateS8()

device_err_t P2PComms_UpdateS8 ( uint8_t  index,
int8_t  value 
)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
indexRegister index.
valueDesired value.
Returns
device_err_t If successful ERR_OK else some other error.

◆ P2PComms_UpdateStorableStates()

void P2PComms_UpdateStorableStates ( p2p_data_buffs_t dest,
p2p_data_buffs_t src 
)
extern
Parameters
destDestination
srcSource

◆ P2PComms_UpdateU16()

device_err_t P2PComms_UpdateU16 ( uint8_t  index,
uint16_t  value 
)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
indexRegister index.
valueDesired value.
Returns
device_err_t If successful ERR_OK else some other error.

◆ P2PComms_UpdateU32()

device_err_t P2PComms_UpdateU32 ( uint8_t  index,
uint32_t  value 
)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
indexRegister index.
valueDesired value.
Returns
device_err_t If successful ERR_OK else some other error.

◆ P2PComms_UpdateU8()

device_err_t P2PComms_UpdateU8 ( uint8_t  index,
uint8_t  value 
)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
indexRegister index.
valueDesired value.
Returns
device_err_t If successful ERR_OK else some other error.

◆ P2PComms_UpdateValue()

device_err_t P2PComms_UpdateValue ( data_param_info_t _paramInfo,
data_union_t  value 
)
extern
Note
A weak implementation of this function is provided. User can create a custom implementation if needed.
Parameters
_paramInfoDesired parameter.
valueValue to be updated.
Returns
device_err_t If successful ERR_OK else some other error.