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 6984aa5..dd7b51f 100644 --- a/df_datalink_sp/src/networking/phy_layer/phy_layer.c +++ b/df_datalink_sp/src/networking/phy_layer/phy_layer.c @@ -855,6 +855,21 @@ uint32_t Phy_GetTimeComp(L1_FRAME_TYPE frameType) } } +/*****************************************************************************/ +/** + * @brief Get the last scan beam number after autoscan. + * + * @param instPtr a pointer to physical instance + * + * @return beam number + * + ******************************************************************************/ +uint8_t Phy_LastScanBeamNo(PHY_INST *instPtr) +{ + ASSERT(instPtr != NULL); + return (uint8_t)PhyRead(instPtr, BEAM_SELECT_INDEX); +} + /*****************************************************************************/ /** * @brief Get frequency estimation of last valid frame. 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 ebe7329..57e3231 100644 --- a/df_datalink_sp/src/networking/phy_layer/phy_layer.h +++ b/df_datalink_sp/src/networking/phy_layer/phy_layer.h @@ -277,6 +277,7 @@ int32_t Phy_SetBeamNo(PHY_INST *instPtr, int32_t beamNo); int32_t Phy_SetBeamAngle(PHY_INST *phyInstPtr, double offAx, double rndAx); int32_t Phy_SetTimeWord(PHY_INST *instPtr, const TIME_WORD *tmWord, PHY_TIME_WORD_TYPE tmType); +uint8_t Phy_LastScanBeamNo(PHY_INST *instPtr); double Phy_GetFreqEst(PHY_INST *instPtr); double Phy_GetCoarseFreqEst(PHY_INST *instPtr); double Phy_GetFineFreqEst(PHY_INST *instPtr);