fix indentation

This commit is contained in:
Gatsby Van
2024-01-25 10:47:38 +08:00
parent 38359c72b6
commit 3613b4a4b7
+87 -87
View File
@@ -407,101 +407,101 @@ int main(void)
} }
// Init time controller // Init time controller
Status = TimeCtrl_Init(&tmcInstPtr, &tmcConfig); Status = TimeCtrl_Init(&tmcInstPtr, &tmcConfig);
if (Status == SUCCESS) if (Status == SUCCESS)
{ {
DBG_PRINT("TmcCtrl Init SUCCESS! \n"); DBG_PRINT("TmcCtrl Init SUCCESS! \n");
} }
else else
{ {
DBG_PRINT("TmcCtrl Init FAILED! \n"); DBG_PRINT("TmcCtrl Init FAILED! \n");
return Status; return Status;
} }
/* Physical Layer Initialize */ /* Physical Layer Initialize */
Status = Phy_InstInit(&phyInstPtr, &phyConfig); Status = Phy_InstInit(&phyInstPtr, &phyConfig);
if (Status == SUCCESS) if (Status == SUCCESS)
{ {
DBG_PRINT("Physical layer Init SUCCESS! \n"); DBG_PRINT("Physical layer Init SUCCESS! \n");
} }
else else
{ {
DBG_PRINT("Physical layer FAILED! \n"); DBG_PRINT("Physical layer FAILED! \n");
return Status; return Status;
} }
/* Link Layer Initialize */ /* Link Layer Initialize */
linkConfig.phyInstPtr = phyInstPtr; linkConfig.phyInstPtr = phyInstPtr;
linkConfig.tmcInstPtr = tmcInstPtr; linkConfig.tmcInstPtr = tmcInstPtr;
Status = Linklayer_Init(&linkInstPtr, &linkConfig); Status = Linklayer_Init(&linkInstPtr, &linkConfig);
if (Status == SUCCESS) if (Status == SUCCESS)
{ {
DBG_PRINT("LinkLayer Init SUCCESS! \n"); DBG_PRINT("LinkLayer Init SUCCESS! \n");
} }
else else
{ {
DBG_PRINT("Linklayer Init FAILED! \n"); DBG_PRINT("Linklayer Init FAILED! \n");
return Status; return Status;
} }
// /* System Bus Initialize */ // /* System Bus Initialize */
// Status = SystemBus_Init(&sysbusDescPtr, &sysbusConfig); // Status = SystemBus_Init(&sysbusDescPtr, &sysbusConfig);
// if (Status != SUCCESS) // if (Status != SUCCESS)
// { // {
// DBG_ERROR("Systembus init FAILED, with error code: %d\n", Status); // DBG_ERROR("Systembus init FAILED, with error code: %d\n", Status);
// return Status; // return Status;
// } // }
/* System Monitor log timer Initialize */ /* System Monitor log timer Initialize */
Status = timer_init(&logTmPtr, &scutimer_init_param); Status = timer_init(&logTmPtr, &scutimer_init_param);
if (Status != SUCCESS) if (Status != SUCCESS)
{ {
DBG_ERROR("SCU Timer init FAILED, with error code: %d\n", Status); DBG_ERROR("SCU Timer init FAILED, with error code: %d\n", Status);
return Status; return Status;
} }
/* interrupts Initialize */ /* interrupts Initialize */
Status = SetupInterruptSystem(intcDescPtr); Status = SetupInterruptSystem(intcDescPtr);
if (Status == SUCCESS) if (Status == SUCCESS)
{ {
DBG_INFO("Interrupt system setup SUCCESS!\n"); DBG_INFO("Interrupt system setup SUCCESS!\n");
} }
else else
{ {
DBG_ERROR("Interrupt system setup FAILED, ErrorCode: %d.\n", Status); DBG_ERROR("Interrupt system setup FAILED, ErrorCode: %d.\n", Status);
return Status; return Status;
} }
// Start System Monitor logging. // Start System Monitor logging.
timer_start(logTmPtr); timer_start(logTmPtr);
DBG_PRINT("Physical started...\n"); DBG_PRINT("Physical started...\n");
Phy_Start(phyInstPtr); Phy_Start(phyInstPtr);
Linklayer_Start(linkInstPtr); Linklayer_Start(linkInstPtr);
while (true); while (true);
// while (true) // while (true)
// { // {
// // System bus handler // // System bus handler
// if (SystemBus_IsReqPendding(sysbusDescPtr)) // if (SystemBus_IsReqPendding(sysbusDescPtr))
// { // {
// Status = SystemBus_HandleCmd(sysbusDescPtr); // Status = SystemBus_HandleCmd(sysbusDescPtr);
// if (Status != SUCCESS) // if (Status != SUCCESS)
// { // {
// DBG_ERROR("SystemBus_HandleCmd exit with ErrorCode: %d.\n", Status); // DBG_ERROR("SystemBus_HandleCmd exit with ErrorCode: %d.\n", Status);
// } // }
// } // }
// if (SystemBus_IsRsqPendding(sysbusDescPtr) && (!SystemBus_IsTxBusy(sysbusDescPtr))) // if (SystemBus_IsRsqPendding(sysbusDescPtr) && (!SystemBus_IsTxBusy(sysbusDescPtr)))
// { // {
// // FIXME: Required by 12 (CASC) // // FIXME: Required by 12 (CASC)
// udelay(200); // udelay(200);
// Status = SystemBus_MakeResp(sysbusDescPtr); // Status = SystemBus_MakeResp(sysbusDescPtr);
// if (Status != SUCCESS) // if (Status != SUCCESS)
// { // {
// DBG_ERROR("SystemBus_HandleCmd exit with ErrorCode: %d.\n", Status); // DBG_ERROR("SystemBus_HandleCmd exit with ErrorCode: %d.\n", Status);
// } // }
// } // }
// } // }
} // main } // main