bugfix: reveal physical flag directly.
This commit is contained in:
@@ -86,7 +86,7 @@ static int32_t Phy_SetSendData(PHY_INST* instPtr, L1_FRAME_TYPE frameType, uint8
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
inline bool Phy_IsFrameDetected(PHY_INST* instPtr) {
|
inline bool Phy_IsFrameDetected(PHY_INST* instPtr) {
|
||||||
ASSERT(instPtr != NULL);
|
ASSERT(instPtr != NULL);
|
||||||
if(instPtr->TOR.last == PHY_TOR_RX && instPtr->isAcq && instPtr->isFrameSync) {
|
if(instPtr->isAcq && instPtr->isFrameSync) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -107,8 +107,7 @@ inline bool Phy_IsFrameDetected(PHY_INST* instPtr) {
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
inline bool Phy_IsFrameReceived(PHY_INST* instPtr) {
|
inline bool Phy_IsFrameReceived(PHY_INST* instPtr) {
|
||||||
ASSERT(instPtr != NULL);
|
ASSERT(instPtr != NULL);
|
||||||
if(instPtr->TOR.last == PHY_TOR_RX && instPtr->isAcq
|
if(instPtr->isAcq && instPtr->isFrameSync && instPtr->isDecode) {
|
||||||
&& instPtr->isFrameSync && instPtr->isDecode) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -129,13 +128,7 @@ inline bool Phy_IsFrameReceived(PHY_INST* instPtr) {
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
inline bool Phy_IsFrameValid(PHY_INST* instPtr) {
|
inline bool Phy_IsFrameValid(PHY_INST* instPtr) {
|
||||||
ASSERT(instPtr != NULL);
|
ASSERT(instPtr != NULL);
|
||||||
if (instPtr->TOR.last == PHY_TOR_RX && instPtr->isAcq && instPtr->isFrameSync
|
return instPtr->isValid;
|
||||||
&& instPtr->isDecode && instPtr->isValid) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
@@ -238,11 +231,6 @@ uint32_t Phy_GetFrameLen(L1_FRAME_TYPE frameType) {
|
|||||||
void Phy_UpdateState(PHY_INST* instPtr) {
|
void Phy_UpdateState(PHY_INST* instPtr) {
|
||||||
ASSERT(instPtr != NULL);
|
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. */
|
/* Update Frame Sate. */
|
||||||
uint32_t txrxSate = PhyRead(instPtr, TXRX_STATE);
|
uint32_t txrxSate = PhyRead(instPtr, TXRX_STATE);
|
||||||
instPtr->isAcq = ((txrxSate & TXRX_STATE_ACQ_MASK) == TXRX_STATE_ACQ_SUCCESS) ? true : false;
|
instPtr->isAcq = ((txrxSate & TXRX_STATE_ACQ_MASK) == TXRX_STATE_ACQ_SUCCESS) ? true : false;
|
||||||
@@ -254,7 +242,12 @@ void Phy_UpdateState(PHY_INST* instPtr) {
|
|||||||
else {
|
else {
|
||||||
instPtr->isValid = false;
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user