Skip to content

File espos_pwm.h

FileList > espos_sensors > include > espos_pwm.h

Go to the source code of this file

  • #include <stdbool.h>
  • #include <stdint.h>
  • #include "esp_err.h"

Classes

Type Name
struct espos_pwm_cfg_t

Public Functions

Type Name
esp_err_t espos_pwm_close (int channel)
float espos_pwm_get (int channel)
The duty last set.
esp_err_t espos_pwm_open (const espos_pwm_cfg_t * cfg, int * out_channel)
Claim an LEDC channel for the pin.
esp_err_t espos_pwm_set (int channel, float duty)
Duty 0..1, clamped.

Public Functions Documentation

function espos_pwm_close

esp_err_t espos_pwm_close (
    int channel
) 

function espos_pwm_get

The duty last set.

float espos_pwm_get (
    int channel
) 


function espos_pwm_open

Claim an LEDC channel for the pin.

esp_err_t espos_pwm_open (
    const espos_pwm_cfg_t * cfg,
    int * out_channel
) 

Channels are a finite chip resource (6 or 8 depending on the SoC); ESP_ERR_NO_MEM when they are gone.


function espos_pwm_set

Duty 0..1, clamped.

esp_err_t espos_pwm_set (
    int channel,
    float duty
) 



The documentation for this class was generated from the following file espos_sensors/include/espos_pwm.h