Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
Pulse width modulation output functions

Provides pulse width modulation output functions. More...

Variables

DriverPWM EspPWM
 Global instance of PWM driver object. More...
 
 DriverPWM::DriverPWM ()
 PWM class.
 
void DriverPWM::initialize ()
 Initialise PWM driver. More...
 
void DriverPWM::analogWrite (uint8_t pin, int duty)
 Set PWM output. More...
 
void DriverPWM::noAnalogWrite (uint8_t pin)
 Disable PWM on GPIO. More...
 

Detailed Description

Provides pulse width modulation output functions.

Function Documentation

void DriverPWM::analogWrite ( uint8_t  pin,
int  duty 
)

Set PWM output.

Parameters
pinGPIO to set
dutyPWM duty
Todo:
Describe how duty affects output
void DriverPWM::initialize ( )

Initialise PWM driver.

Note
Call this function once before using other PWM driver functions
void DriverPWM::noAnalogWrite ( uint8_t  pin)

Disable PWM on GPIO.

Parameters
pinGPIO on which to disable PWM

Variable Documentation

DriverPWM EspPWM

Global instance of PWM driver object.

Note
Use EspPWM.function to access PWM driver functions
Example:
1 EspPWM.analogWrite(5, 50);