update record shift mechanism (more reasonable.)

This commit is contained in:
Gatsby Van
2023-12-24 13:08:19 +08:00
parent 54c20aa46e
commit 7157cf668c
+9 -9
View File
@@ -242,12 +242,6 @@ void Phy_UpdateState(PHY_INST* instPtr) {
else { else {
instPtr->isValid = false; instPtr->isValid = false;
} }
Phy_RcdShift(&(instPtr->TOR),PHY_TOR_SUSPEND);
Phy_RcdShift(&(instPtr->frameType),L1_NONE_FRAME);
Phy_RcdShift(&(instPtr->antNo), INIT_ANT_NO);
Phy_RcdShift(&(instPtr->beamNo), INIT_BEAM_NO);
Phy_RcdShift(&(instPtr->beamWd), INIT_ANT_WD);
} }
@@ -586,6 +580,13 @@ int32_t Phy_SetupNextSlot(PHY_INST* instPtr, PHY_TOR_TYPE txrxMode,
} }
} }
PhyWrite(instPtr, SLOT_CMD, SLOT_CMD_KEY); // Phy statr fetching data. PhyWrite(instPtr, SLOT_CMD, SLOT_CMD_KEY); // Phy statr fetching data.
Phy_RcdShift(&(instPtr->TOR),txrxMode);
Phy_RcdShift(&(instPtr->frameType),frameType);
// TODO:
Phy_RcdShift(&(instPtr->antNo), INIT_ANT_NO);
Phy_RcdShift(&(instPtr->beamNo), INIT_BEAM_NO);
Phy_RcdShift(&(instPtr->beamWd), INIT_ANT_WD);
return SUCCESS; return SUCCESS;
} }
@@ -596,8 +597,7 @@ int32_t Phy_SetupNextSlot(PHY_INST* instPtr, PHY_TOR_TYPE txrxMode,
* *
* @param instPtr a pointer to physical instance * @param instPtr a pointer to physical instance
* *
* @return SUCCESS If load the data successfully. * @return frequency estimation
* FAILURE If last receive frame is not valid.
* *
******************************************************************************/ ******************************************************************************/
@@ -626,7 +626,7 @@ double Phy_GetCoarseFreqEst(PHY_INST* instPtr) {
freqEst = acqFreqIdx*(250e3/4); freqEst = acqFreqIdx*(250e3/4);
freqEst += (double)syncFreqIdx*12e6/64/128; freqEst += (double)syncFreqIdx*12e6/64/128;
} }
return freqEst; return freqEst;
} }