Browse Source

fix:pwm close未正常复位对应pin

Dozingfiretruck 3 years ago
parent
commit
355522293d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      luatos/components/luat/port/luat_pwm_idf5.c

+ 1 - 1
luatos/components/luat/port/luat_pwm_idf5.c

@@ -68,7 +68,7 @@ int luat_pwm_close(int channel){
         return -1;
         return -1;
     }
     }
     ledc_stop(LEDC_LOW_SPEED_MODE, timer, 0);
     ledc_stop(LEDC_LOW_SPEED_MODE, timer, 0);
-    gpio_reset_pin(0);
+    gpio_reset_pin(channel);
     luat_pwm_idf[timer] = 0;
     luat_pwm_idf[timer] = 0;
     return 0;
     return 0;
 }
 }