From f2ce6897d2b0a4037411061bfafecf0dd2db81e5 Mon Sep 17 00:00:00 2001 From: Gatsby Van Date: Tue, 26 Dec 2023 11:00:21 +0800 Subject: [PATCH] better print. --- datalink814_ge/src/hardware/headless.c | 36 ++++++++++++-------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/datalink814_ge/src/hardware/headless.c b/datalink814_ge/src/hardware/headless.c index c521ff2..c90c1d0 100644 --- a/datalink814_ge/src/hardware/headless.c +++ b/datalink814_ge/src/hardware/headless.c @@ -75,11 +75,11 @@ int HARDWARE_initialize() // /**********************************************************/ // Status = HW_ad9371DynamicCfgInit(); // if (Status != ADIERR_OK){ -// xil_printf("HW:: AD9371 dynamic configuration initialization failed!\n"); +// printf("HW:: AD9371 dynamic configuration initialization failed!\n"); // return ADIERR_FAILED; // } // -// xil_printf("HW:: AD9371 ready to be reconfigured!\n"); +// printf("HW:: AD9371 ready to be reconfigured!\n"); // // // main loop // while(1); @@ -97,8 +97,6 @@ int HARDWARE_ad9371Config(void) uint8_t obsFramerStatus; uint8_t deframerStatus; - xil_printf("main: Hello\n"); - /**********************************************************/ /*********** Initialize Configuration Interface ***********/ /**********************************************************/ @@ -112,7 +110,7 @@ int HARDWARE_ad9371Config(void) return ADIERR_FAILED; } - xil_printf("HW:: Initialize configuration interface done!\n"); + printf("HW:: Initialize configuration interface done!\n"); /**********************************************************/ /****************** AD9528 Configuration ******************/ @@ -122,14 +120,14 @@ int HARDWARE_ad9371Config(void) return ADIERR_FAILED; } - xil_printf("HW:: AD9528 configuration done!\n"); + printf("HW:: AD9528 configuration done!\n"); Status = HW_9528GetLockStatus(ad9528Init, ®508); if (Status != ADIERR_OK){ return ADIERR_FAILED; } - xil_printf("HW:: AD9528 REG508: 0x%02x \n",reg508); + printf("HW:: AD9528 REG508: 0x%02x\n",reg508); /**********************************************************/ /****************** AD9371 Configuration ******************/ @@ -153,7 +151,7 @@ int HARDWARE_ad9371Config(void) printf("HW:: DeframerStatus = 0x%x\n", deframerStatus); } - xil_printf("HW:: All configuration done!\n"); + printf("HW:: All configuration done!\n"); return ADIERR_OK; } @@ -232,13 +230,13 @@ int HW_setupIntrSystem(u16 DeviceId, XScuGic * GicPtr) */ CfgPtr = XScuGic_LookupConfig(DeviceId); if (!CfgPtr) { - xil_printf("No interrupt config found for %d\n", DeviceId); + printf("No interrupt config found for %d\n", DeviceId); return XST_FAILURE; } Status = XScuGic_CfgInitialize(GicPtr, CfgPtr, CfgPtr->CpuBaseAddress); if (Status != XST_SUCCESS) { - xil_printf("No interrupt config found for %d\n", DeviceId); + printf("No interrupt config found for %d\n", DeviceId); return XST_FAILURE; } @@ -810,7 +808,7 @@ int HW_9371SmallFrequencyChange(mykonosDevice_t *mykDevice, uint64_t freq_Hz) */ if((mykError = MYKONOS_radioOff(mykDevice)) != MYKONOS_ERR_OK) { - xil_printf("Turn radio off failed!\n\r"); + printf("Turn radio off failed!\n\r"); return ADIERR_FAILED; } @@ -820,14 +818,14 @@ int HW_9371SmallFrequencyChange(mykonosDevice_t *mykDevice, uint64_t freq_Hz) if((mykError = MYKONOS_setRfPllFrequency(mykDevice, TX_PLL, freq_Hz)) != MYKONOS_ERR_OK) { - xil_printf("Set TX PLL failed!\n\r"); + printf("Set TX PLL failed!\n\r"); return ADIERR_FAILED; } mykError = MYKONOS_checkPllsLockStatus(mykDevice, &pllLockStatus); if ((pllLockStatus & 0x07) != 0x07) { /*** < Info: Clock, Rx and Tx PLLs not locked > ***/ - xil_printf("Not all PLLs locked, lock status: 0x%02x\n", pllLockStatus); + printf("Not all PLLs locked, lock status: 0x%02x\n", pllLockStatus); } /* @@ -836,7 +834,7 @@ int HW_9371SmallFrequencyChange(mykonosDevice_t *mykDevice, uint64_t freq_Hz) // If((mykError = MYKONOS_resetExtTxLolChannel(mykDevice, TX1_TX2)) // != MYKONOS_ERR_OK) ; //where TX1_TX2 is part of the enum mykonosTxChannels_t // { -// xil_printf("Reset external channel FAILED!"); +// printf("Reset external channel FAILED!"); // } /* @@ -844,7 +842,7 @@ int HW_9371SmallFrequencyChange(mykonosDevice_t *mykDevice, uint64_t freq_Hz) */ if ((mykError = MYKONOS_radioOn(mykDevice)) != MYKONOS_ERR_OK) { - xil_printf("Turn radio on failed!\n\r"); + printf("Turn radio on failed!\n\r"); return ADIERR_FAILED; } @@ -854,7 +852,7 @@ int HW_9371SmallFrequencyChange(mykonosDevice_t *mykDevice, uint64_t freq_Hz) // If((mykError = MYKONOS_MYKONOS_setObsRxPathSource(mykDevice, OBS_INTERNALCALS)) // != MYKONOS_ERR_OK) ; //where TX1_TX2 is part of the enum mykonosTxChannels_t // { -// xil_printf("Reenable tracking calibrations FAILED!"); +// printf("Reenable tracking calibrations FAILED!"); // } return ADIERR_OK; } @@ -877,7 +875,7 @@ int HW_9371LargeFrequencyChange(mykonosDevice_t *mykDevice, uint64_t freq_Hz) */ if((mykError = MYKONOS_radioOff(mykDevice)) != MYKONOS_ERR_OK) { - xil_printf("Turn radio off failed!\n\r"); + printf("Turn radio off failed!\n\r"); return ADIERR_FAILED; } @@ -894,7 +892,7 @@ int HW_9371LargeFrequencyChange(mykonosDevice_t *mykDevice, uint64_t freq_Hz) if ((pllLockStatus & 0x07) != 0x07) { /*** < Info: Clock, Rx and Tx PLLs not locked > ***/ - xil_printf("Not all PLLs locked, lock status: 0x%02x\n", pllLockStatus); + printf("Not all PLLs locked, lock status: 0x%02x\n", pllLockStatus); } /* @@ -957,7 +955,7 @@ int HW_9371LargeFrequencyChange(mykonosDevice_t *mykDevice, uint64_t freq_Hz) */ if ((mykError = MYKONOS_radioOn(mykDevice)) != MYKONOS_ERR_OK) { - xil_printf("Turn radio on failed!\n\r"); + printf("Turn radio on failed!\n\r"); return ADIERR_FAILED; }