Sfoglia il codice sorgente

Merge branch 'bugfix/add_missing_ledc_set_pin_declaration' into 'master'

Bugfix (LEDC): Add missing ledc_set_pin declaration

Closes IDFGH-2546

See merge request espressif/esp-idf!7344
Michael (XIAO Xufeng) 6 anni fa
parent
commit
fa4eba2e34
1 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. 13 0
      components/driver/include/driver/ledc.h

+ 13 - 0
components/driver/include/driver/ledc.h

@@ -74,6 +74,19 @@ esp_err_t ledc_timer_config(const ledc_timer_config_t* timer_conf);
  */
 esp_err_t ledc_update_duty(ledc_mode_t speed_mode, ledc_channel_t channel);
 
+/**
+ * @brief Set LEDC output gpio.
+ *
+ * @param  gpio_num The LEDC output gpio
+ * @param  speed_mode Select the LEDC channel group with specified speed mode. Note that not all targets support high speed mode.
+ * @param  ledc_channel LEDC channel (0-7), select from ledc_channel_t
+ *
+ * @return
+ *     - ESP_OK Success
+ *     - ESP_ERR_INVALID_ARG Parameter error
+ */
+esp_err_t ledc_set_pin(int gpio_num, ledc_mode_t speed_mode, ledc_channel_t ledc_channel);
+
 /**
  * @brief LEDC stop.
  *        Disable LEDC output, and set idle level