From 3613b4a4b75369697169fd0f019434b0f1f892ba Mon Sep 17 00:00:00 2001 From: Gatsby Van Date: Thu, 25 Jan 2024 10:47:38 +0800 Subject: [PATCH] fix indentation --- df_datalink_ge/src/main.c | 174 +++++++++++++++++++------------------- 1 file changed, 87 insertions(+), 87 deletions(-) diff --git a/df_datalink_ge/src/main.c b/df_datalink_ge/src/main.c index 72d4d90..da0b49c 100644 --- a/df_datalink_ge/src/main.c +++ b/df_datalink_ge/src/main.c @@ -407,101 +407,101 @@ int main(void) } // Init time controller - Status = TimeCtrl_Init(&tmcInstPtr, &tmcConfig); - if (Status == SUCCESS) - { - DBG_PRINT("TmcCtrl Init SUCCESS! \n"); - } - else - { - DBG_PRINT("TmcCtrl Init FAILED! \n"); - return Status; - } + Status = TimeCtrl_Init(&tmcInstPtr, &tmcConfig); + if (Status == SUCCESS) + { + DBG_PRINT("TmcCtrl Init SUCCESS! \n"); + } + else + { + DBG_PRINT("TmcCtrl Init FAILED! \n"); + return Status; + } - /* Physical Layer Initialize */ - Status = Phy_InstInit(&phyInstPtr, &phyConfig); - if (Status == SUCCESS) - { - DBG_PRINT("Physical layer Init SUCCESS! \n"); - } - else - { - DBG_PRINT("Physical layer FAILED! \n"); - return Status; - } + /* Physical Layer Initialize */ + Status = Phy_InstInit(&phyInstPtr, &phyConfig); + if (Status == SUCCESS) + { + DBG_PRINT("Physical layer Init SUCCESS! \n"); + } + else + { + DBG_PRINT("Physical layer FAILED! \n"); + return Status; + } - /* Link Layer Initialize */ - linkConfig.phyInstPtr = phyInstPtr; - linkConfig.tmcInstPtr = tmcInstPtr; - Status = Linklayer_Init(&linkInstPtr, &linkConfig); - if (Status == SUCCESS) - { - DBG_PRINT("LinkLayer Init SUCCESS! \n"); - } - else - { - DBG_PRINT("Linklayer Init FAILED! \n"); - return Status; - } + /* Link Layer Initialize */ + linkConfig.phyInstPtr = phyInstPtr; + linkConfig.tmcInstPtr = tmcInstPtr; + Status = Linklayer_Init(&linkInstPtr, &linkConfig); + if (Status == SUCCESS) + { + DBG_PRINT("LinkLayer Init SUCCESS! \n"); + } + else + { + DBG_PRINT("Linklayer Init FAILED! \n"); + return Status; + } -// /* System Bus Initialize */ -// Status = SystemBus_Init(&sysbusDescPtr, &sysbusConfig); -// if (Status != SUCCESS) -// { -// DBG_ERROR("Systembus init FAILED, with error code: %d\n", Status); -// return Status; -// } + // /* System Bus Initialize */ + // Status = SystemBus_Init(&sysbusDescPtr, &sysbusConfig); + // if (Status != SUCCESS) + // { + // DBG_ERROR("Systembus init FAILED, with error code: %d\n", Status); + // return Status; + // } - /* System Monitor log timer Initialize */ - Status = timer_init(&logTmPtr, &scutimer_init_param); - if (Status != SUCCESS) - { - DBG_ERROR("SCU Timer init FAILED, with error code: %d\n", Status); - return Status; - } + /* System Monitor log timer Initialize */ + Status = timer_init(&logTmPtr, &scutimer_init_param); + if (Status != SUCCESS) + { + DBG_ERROR("SCU Timer init FAILED, with error code: %d\n", Status); + return Status; + } - /* interrupts Initialize */ - Status = SetupInterruptSystem(intcDescPtr); - if (Status == SUCCESS) - { - DBG_INFO("Interrupt system setup SUCCESS!\n"); - } - else - { - DBG_ERROR("Interrupt system setup FAILED, ErrorCode: %d.\n", Status); - return Status; - } + /* interrupts Initialize */ + Status = SetupInterruptSystem(intcDescPtr); + if (Status == SUCCESS) + { + DBG_INFO("Interrupt system setup SUCCESS!\n"); + } + else + { + DBG_ERROR("Interrupt system setup FAILED, ErrorCode: %d.\n", Status); + return Status; + } - // Start System Monitor logging. - timer_start(logTmPtr); + // Start System Monitor logging. + timer_start(logTmPtr); - DBG_PRINT("Physical started...\n"); - Phy_Start(phyInstPtr); + DBG_PRINT("Physical started...\n"); + Phy_Start(phyInstPtr); - Linklayer_Start(linkInstPtr); + Linklayer_Start(linkInstPtr); - while (true); + while (true); - // while (true) - // { - // // System bus handler - // if (SystemBus_IsReqPendding(sysbusDescPtr)) - // { - // Status = SystemBus_HandleCmd(sysbusDescPtr); - // if (Status != SUCCESS) - // { - // DBG_ERROR("SystemBus_HandleCmd exit with ErrorCode: %d.\n", Status); - // } - // } - // if (SystemBus_IsRsqPendding(sysbusDescPtr) && (!SystemBus_IsTxBusy(sysbusDescPtr))) - // { - // // FIXME: Required by 12 (CASC) - // udelay(200); - // Status = SystemBus_MakeResp(sysbusDescPtr); - // if (Status != SUCCESS) - // { - // DBG_ERROR("SystemBus_HandleCmd exit with ErrorCode: %d.\n", Status); - // } - // } - // } + // while (true) + // { + // // System bus handler + // if (SystemBus_IsReqPendding(sysbusDescPtr)) + // { + // Status = SystemBus_HandleCmd(sysbusDescPtr); + // if (Status != SUCCESS) + // { + // DBG_ERROR("SystemBus_HandleCmd exit with ErrorCode: %d.\n", Status); + // } + // } + // if (SystemBus_IsRsqPendding(sysbusDescPtr) && (!SystemBus_IsTxBusy(sysbusDescPtr))) + // { + // // FIXME: Required by 12 (CASC) + // udelay(200); + // Status = SystemBus_MakeResp(sysbusDescPtr); + // if (Status != SUCCESS) + // { + // DBG_ERROR("SystemBus_HandleCmd exit with ErrorCode: %d.\n", Status); + // } + // } + // } } // main