bugfix: correct mpc info update.

This commit is contained in:
Gatsby Van
2023-12-27 17:17:10 +08:00
parent 932b4561d5
commit fbe41ce9a6
+8 -8
View File
@@ -222,11 +222,6 @@ void MPC_IntrHandler(void *CallBackRef)
******************************************************************************/ ******************************************************************************/
void PhysicalIntr_Handler(void *callBackRef) void PhysicalIntr_Handler(void *callBackRef)
{ {
uint32_t GpioConfig = XGpio_DiscreteRead(&configGpio, 2);
if (L2_isDataAvail(linkInstPtr) == true)
{
GpioConfig ^= 0x00000001;
}
Phy_UpdateState(phyInstPtr); Phy_UpdateState(phyInstPtr);
if (phyInstPtr->TOR.curr == PHY_TOR_TX) if (phyInstPtr->TOR.curr == PHY_TOR_TX)
{ {
@@ -292,7 +287,6 @@ void PhysicalIntr_Handler(void *callBackRef)
break; break;
} }
} }
XGpio_DiscreteWrite(&configGpio, 2, GpioConfig);
} }
/****************************************************************************/ /****************************************************************************/
@@ -307,7 +301,6 @@ void PhysicalIntr_Handler(void *callBackRef)
void PeriodicPull_Handler(void *callBackRef) void PeriodicPull_Handler(void *callBackRef)
{ {
int32_t Status; int32_t Status;
Status = Linklayer_Proc(linkInstPtr); Status = Linklayer_Proc(linkInstPtr);
if (Status != SUCCESS) if (Status != SUCCESS)
{ {
@@ -337,7 +330,14 @@ void PeriodicPull_Handler(void *callBackRef)
mpcRecord->frame7CntLast = mpcRecord->frame7Recv; mpcRecord->frame7CntLast = mpcRecord->frame7Recv;
mpcRecord->frame8CntLast = mpcRecord->frame8Recv; mpcRecord->frame8CntLast = mpcRecord->frame8Recv;
} }
} // PhyIntr_Handler
uint32_t GpioConfig = XGpio_DiscreteRead(&configGpio, 2);
if (L2_isDataAvail(linkInstPtr) == true)
{
GpioConfig ^= 0x00000001;
}
XGpio_DiscreteWrite(&configGpio, 2, GpioConfig);
} // PeriodicPull_Handler
/*****************************************************************************/ /*****************************************************************************/
/** /**