Browse Source

[bsp] Fix the mismatch between the print type and the variable type in print function.

HUST_lxq 2 years ago
parent
commit
2720c9c38c
2 changed files with 4 additions and 4 deletions
  1. 1 1
      bsp/CME_M7/drivers/app_phy.c
  2. 3 3
      bsp/Infineon/libraries/HAL_Drivers/drv_adc.c

+ 1 - 1
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");
     }
 

+ 3 - 3
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;
         }
     }