forked from gatsby/df_datalink
code simplify
This commit is contained in:
@@ -380,18 +380,16 @@ int32_t SystemBus_HandleCmd(SYSBUS *instPtr)
|
||||
{
|
||||
// high power config
|
||||
Phy_AntConfigMode(phyRef, PHY_ANT_MODE_HIGH_POWER);
|
||||
Linklayer_Start(linkInstPtr);
|
||||
|
||||
}
|
||||
else if(data[WD_EN_CMD] == EN_CMD_ON_LOW_POWER)
|
||||
{
|
||||
// low power config
|
||||
Phy_AntConfigMode(phyRef, PHY_ANT_MODE_LOW_POWER);
|
||||
Linklayer_Start(linkInstPtr);
|
||||
}
|
||||
else
|
||||
{
|
||||
// silence config
|
||||
// FIXME: confirm
|
||||
// TODO: better approach?
|
||||
Linklayer_Halt(linkInstPtr);
|
||||
Phy_AntConfigMode(phyRef, PHY_ANT_MODE_SILENT);
|
||||
@@ -403,9 +401,10 @@ int32_t SystemBus_HandleCmd(SYSBUS *instPtr)
|
||||
DBG_ERROR("Physical set pull time failed, with error code: %" PRId32 ".\n", Status);
|
||||
}
|
||||
Phy_SetupNextSlot(phyRef, PHY_TOR_RX, L1_10KBPS_10MS_FRAME, NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
_nop_(); // for debug
|
||||
Linklayer_Start(linkInstPtr);
|
||||
Status = SUCCESS;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user