change hardware status refresh api

This commit is contained in:
Gatsby Van
2024-02-01 14:53:26 +08:00
parent e81be59bbb
commit 0248c185e4
3 changed files with 8 additions and 12 deletions
+2 -4
View File
@@ -359,10 +359,8 @@ void ScuTimer_IntrHandler(void *context)
xdesc = (struct xil_timer_desc *)(logTmPtr->extra); xdesc = (struct xil_timer_desc *)(logTmPtr->extra);
if (XScuTimer_IsExpired((XScuTimer *)xdesc->instance)) if (XScuTimer_IsExpired((XScuTimer *)xdesc->instance))
{ {
// Update log // Refresh log
const HWSTATE *newHwState; Phy_RefreshHwSate(phyInstPtr);
newHwState = Phy_RefreshHwSate(phyInstPtr);
SysMonitor_UpdateHardwareStatus(newHwState);
XScuTimer_ClearInterruptStatus((XScuTimer *)xdesc->instance); XScuTimer_ClearInterruptStatus((XScuTimer *)xdesc->instance);
} }
else else
+3 -5
View File
@@ -360,10 +360,8 @@ void ScuTimer_IntrHandler(void *context)
xdesc = (struct xil_timer_desc *)(logTmPtr->extra); xdesc = (struct xil_timer_desc *)(logTmPtr->extra);
if (XScuTimer_IsExpired((XScuTimer *)xdesc->instance)) if (XScuTimer_IsExpired((XScuTimer *)xdesc->instance))
{ {
// Update log // Refresh log
const HWSTATE *newHwState; Phy_RefreshHwSate(phyInstPtr);
newHwState = Phy_RefreshHwSate(phyInstPtr);
SysMonitor_UpdateHardwareStatus(newHwState);
XScuTimer_ClearInterruptStatus((XScuTimer *)xdesc->instance); XScuTimer_ClearInterruptStatus((XScuTimer *)xdesc->instance);
} }
else else
@@ -376,7 +374,7 @@ void ScuTimer_IntrHandler(void *context)
/** /**
* @brief Hardware_SwitchFreq * @brief Hardware_SwitchFreq
* *
* @param dev * @param devSysMonitor_UpdateHardwareStatus(newHwState);
* @param freq * @param freq
* *
* @return None. * @return None.
@@ -1133,10 +1133,10 @@ void Phy_RetrieveRecvData(PHY_INST *instPtr, uint8_t *dataBuff)
* @param instPtr a pointer to hopping pattern buffer * @param instPtr a pointer to hopping pattern buffer
* @param patternLen a integer indicate the length of hopping pattern. * @param patternLen a integer indicate the length of hopping pattern.
* *
* @return pointer to new hardware status * @return NONE
* *
******************************************************************************/ ******************************************************************************/
const HWSTATE* Phy_RefreshHwSate(PHY_INST *instPtr) void Phy_RefreshHwSate(PHY_INST *instPtr)
{ {
ASSERT(instPtr != NULL); ASSERT(instPtr != NULL);
uint32_t rawData; uint32_t rawData;
@@ -1242,5 +1242,5 @@ const HWSTATE* Phy_RefreshHwSate(PHY_INST *instPtr)
{ {
instPtr->hwSate.isSpOk = true; instPtr->hwSate.isSpOk = true;
} }
return (&(instPtr->hwSate)); SysMonitor_UpdateHardwareStatus(&(instPtr->hwSate));
} }