chore: enhance code coherence

* distinct link layer parameter for GE and node application
* disable remote test for node application
* auto start link layer for node application
This commit is contained in:
Gatsby Van
2024-12-25 15:52:26 +08:00
parent c66c3fe18e
commit 89ecdc476f
4 changed files with 17 additions and 41 deletions
+5 -23
View File
@@ -84,6 +84,7 @@ struct callback_desc scutm_callback_desc =
.ctx = NULL
};
#ifdef _GE_APP_
L2_CONFIG linkConfig = {
.myType = L2_NODE_HEAD,
.clustId = 1U,
@@ -95,18 +96,9 @@ L2_CONFIG linkConfig = {
.pushUpHandle = LinklayerPush2Up,
.popUpHandle = LinklayerPopFromUp
};
// L2_CONFIG linkConfig = {
// .myType = L2_NODE_MEMBER,
// .clustId = 1U,
// .myId = 2U,
// .headId = 1U,
// .netScale = 2U,
// .phyInstPtr = NULL, // physical layer reference
// .tmcInstPtr = NULL,
// .pushUpHandle = LinklayerPush2Up,
// .popUpHandle = LinklayerPopFromUp
// };
#else
#error No application type is specified.
#endif
static PHY_CONFIG phyConfig =
{
@@ -284,7 +276,7 @@ static int32_t SetupInterruptSystem(struct irq_ctrl_desc *descPtr)
irq_enable(descPtr, PERIODIC_5MS_INTR_ID);
irq_enable(descPtr, MPC_RX_INTR_ID);
irq_enable(descPtr, MPC_TX_INTR_ID);
// irq_enable(descPtr, SCUTIMER_INTR_ID);
irq_enable(descPtr, SCUTIMER_INTR_ID);
// Enable Exceptions
Status = irq_global_enable(descPtr);
@@ -546,15 +538,5 @@ int main(void)
DBG_ERROR("Mpc_HandleCmd exit with ErrorCode: %" PRId32 ".\n", Status);
}
}
if (Mpc_IsSvcDownPending(mpcDescPtr))
{
RING_BUFFER *msg = NULL;
Mpc_PopSvcFrame(mpcDescPtr, (void**)&msg);
Mpc_PushSvcFrame(mpcDescPtr, (void*)msg);
if (Status != SUCCESS)
{
DBG_ERROR("Mpc_HandleCmd exit with ErrorCode: %" PRId32 ".\n", Status);
}
}
}
} // main