Sfoglia il codice sorgente

修改无意义代码

Trisuborn 4 anni fa
parent
commit
63239801d9

+ 0 - 4
bsp/stm32/libraries/HAL_Drivers/drv_pwm.c

@@ -213,8 +213,6 @@ static rt_err_t drv_pwm_get(TIM_HandleTypeDef *htim, struct rt_pwm_configuration
     {
 #if !defined(SOC_SERIES_STM32F0) && !defined(SOC_SERIES_STM32G0)
         tim_clock = HAL_RCC_GetPCLK2Freq() * 2;
-#else
-        tim_clock = HAL_RCC_GetPCLK2Freq();
 #endif
     }
     else
@@ -262,8 +260,6 @@ static rt_err_t drv_pwm_set(TIM_HandleTypeDef *htim, struct rt_pwm_configuration
     {
 #if !defined(SOC_SERIES_STM32F0) && !defined(SOC_SERIES_STM32G0)
         tim_clock = HAL_RCC_GetPCLK2Freq() * 2;
-#else
-        tim_clock = HAL_RCC_GetPCLK2Freq();
 #endif
     }
     else

+ 3 - 3
components/drivers/include/drivers/rt_drv_pwm.h

@@ -21,9 +21,9 @@
 
 struct rt_pwm_configuration
 {
-    rt_uint32_t channel;        /* 0-n */
-    rt_uint32_t period;         /* unit:ns 1ns~4.29s:1Ghz~0.23hz */
-    rt_uint32_t pulse;          /* unit:ns (pulse<=period) */
+    rt_uint32_t channel; /* 0-n */
+    rt_uint32_t period;  /* unit:ns 1ns~4.29s:1Ghz~0.23hz */
+    rt_uint32_t pulse;   /* unit:ns (pulse<=period) */
 
     /*
      * RT_TRUE  : The channel of pwm is complememtary.