diff --git a/df_datalink_sp/src/networking/phy_layer/phy_layer.c b/df_datalink_sp/src/networking/phy_layer/phy_layer.c index 76c1adb..fdab17a 100644 --- a/df_datalink_sp/src/networking/phy_layer/phy_layer.c +++ b/df_datalink_sp/src/networking/phy_layer/phy_layer.c @@ -1110,11 +1110,10 @@ void Phy_RetrieveRecvData(PHY_INST *instPtr, uint8_t *dataBuff) * @param instPtr a pointer to hopping pattern buffer * @param patternLen a integer indicate the length of hopping pattern. * - * @return SUCCESS - * FAILURE pattern length exceeds maximum length. + * @return pointer to new hardware status * ******************************************************************************/ -void Phy_UpdateHwSate(PHY_INST *instPtr) +const HWSTATE* Phy_RefreshHwSate(PHY_INST *instPtr) { ASSERT(instPtr != NULL); uint32_t rawData; @@ -1214,4 +1213,5 @@ void Phy_UpdateHwSate(PHY_INST *instPtr) { instPtr->hwSate.isSpOk = true; } + return (&(instPtr->hwSate)); } diff --git a/df_datalink_sp/src/networking/phy_layer/phy_layer.h b/df_datalink_sp/src/networking/phy_layer/phy_layer.h index cc3614b..f575aac 100644 --- a/df_datalink_sp/src/networking/phy_layer/phy_layer.h +++ b/df_datalink_sp/src/networking/phy_layer/phy_layer.h @@ -240,7 +240,7 @@ int32_t Phy_InstInit(PHY_INST **instPtr, PHY_CONFIG *phyConfig); void Phy_Destroy(PHY_INST *instPtr); void Phy_UpdateState(PHY_INST *instPtr); -void Phy_UpdateHwSate(PHY_INST *instPtr); +const HWSTATE* Phy_RefreshHwSate(PHY_INST *instPtr); void Phy_Start(PHY_INST *instPtr); void Phy_Halt(PHY_INST *instPtr);