From 2720c9c38c8260b0ef66a7d02115185591b92cdd Mon Sep 17 00:00:00 2001 From: HUST_lxq Date: Tue, 4 Apr 2023 20:51:43 +0800 Subject: [PATCH] [bsp] Fix the mismatch between the print type and the variable type in print function. --- bsp/CME_M7/drivers/app_phy.c | 2 +- bsp/Infineon/libraries/HAL_Drivers/drv_adc.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bsp/CME_M7/drivers/app_phy.c b/bsp/CME_M7/drivers/app_phy.c index 5fb210d2ea..b330ce1ecf 100644 --- a/bsp/CME_M7/drivers/app_phy.c +++ b/bsp/CME_M7/drivers/app_phy.c @@ -107,7 +107,7 @@ BOOL phy_Init() { speed = 1000; } - printf("PHY runs in %dM speed %s duplex\n", + printf("PHY runs in %uM speed %s duplex\n", speed, (phy_GetDuplex() == PHY_DUPLEX_HALF) ? "half" : "full"); } diff --git a/bsp/Infineon/libraries/HAL_Drivers/drv_adc.c b/bsp/Infineon/libraries/HAL_Drivers/drv_adc.c index ff593b5c7c..cc41856f0e 100644 --- a/bsp/Infineon/libraries/HAL_Drivers/drv_adc.c +++ b/bsp/Infineon/libraries/HAL_Drivers/drv_adc.c @@ -57,7 +57,7 @@ static rt_err_t ifx_adc_enabled(struct rt_adc_device *device, rt_uint32_t channe if (result != RT_EOK) { - LOG_E("ADC initialization failed. Error: %ld\n", (long unsigned int)result); + LOG_E("ADC initialization failed. Error: %llu\n", (long unsigned int)result); return -RT_ENOSYS; } @@ -67,7 +67,7 @@ static rt_err_t ifx_adc_enabled(struct rt_adc_device *device, rt_uint32_t channe if (result != RT_EOK) { - LOG_E("ADC single ended channel initialization failed. Error: %ld\n", (long unsigned int)result); + LOG_E("ADC single ended channel initialization failed. Error: %llu\n", (long unsigned int)result); return -RT_ENOSYS; } @@ -76,7 +76,7 @@ static rt_err_t ifx_adc_enabled(struct rt_adc_device *device, rt_uint32_t channe if (result != RT_EOK) { - printf("ADC configuration update failed. Error: %ld\n", (long unsigned int)result); + printf("ADC configuration update failed. Error: %llu\n", (long unsigned int)result); return -RT_ENOSYS; } } -- GitLab