bugfix: reveal physical flag directly.

This commit is contained in:
Gatsby Van
2023-12-22 13:18:38 +08:00
parent 633be421b1
commit 2a17fa9183
+9 -16
View File
@@ -86,7 +86,7 @@ static int32_t Phy_SetSendData(PHY_INST* instPtr, L1_FRAME_TYPE frameType, uint8
******************************************************************************/
inline bool Phy_IsFrameDetected(PHY_INST* instPtr) {
ASSERT(instPtr != NULL);
if(instPtr->TOR.last == PHY_TOR_RX && instPtr->isAcq && instPtr->isFrameSync) {
if(instPtr->isAcq && instPtr->isFrameSync) {
return true;
}
else {
@@ -107,8 +107,7 @@ inline bool Phy_IsFrameDetected(PHY_INST* instPtr) {
******************************************************************************/
inline bool Phy_IsFrameReceived(PHY_INST* instPtr) {
ASSERT(instPtr != NULL);
if(instPtr->TOR.last == PHY_TOR_RX && instPtr->isAcq
&& instPtr->isFrameSync && instPtr->isDecode) {
if(instPtr->isAcq && instPtr->isFrameSync && instPtr->isDecode) {
return true;
}
else {
@@ -129,13 +128,7 @@ inline bool Phy_IsFrameReceived(PHY_INST* instPtr) {
******************************************************************************/
inline bool Phy_IsFrameValid(PHY_INST* instPtr) {
ASSERT(instPtr != NULL);
if (instPtr->TOR.last == PHY_TOR_RX && instPtr->isAcq && instPtr->isFrameSync
&& instPtr->isDecode && instPtr->isValid) {
return true;
}
else {
return false;
}
return instPtr->isValid;
}
/*****************************************************************************/
@@ -238,11 +231,6 @@ uint32_t Phy_GetFrameLen(L1_FRAME_TYPE frameType) {
void Phy_UpdateState(PHY_INST* instPtr) {
ASSERT(instPtr != NULL);
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);
/* Update Frame Sate. */
uint32_t txrxSate = PhyRead(instPtr, TXRX_STATE);
instPtr->isAcq = ((txrxSate & TXRX_STATE_ACQ_MASK) == TXRX_STATE_ACQ_SUCCESS) ? true : false;
@@ -254,7 +242,12 @@ void Phy_UpdateState(PHY_INST* instPtr) {
else {
instPtr->isValid = false;
}
return;
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);
}