28 #ifndef _SMING_CORE_HARDWARE_PWM_H_ 29 #define _SMING_CORE_HARDWARE_PWM_H_ 31 #include "ESP8266EX.h" 32 #include "WiringFrameworkDependencies.h" 42 #define PWM_BAD_CHANNEL 0xff 136 uint8 channels[PWM_CHANNEL_NUM_MAX];
bool setDutyChan(uint8 chan, uint32 duty, bool update=true)
Set PWM duty cycle for a channel.
uint32 getDutyChan(uint8 chan)
Get PWM duty cycle.
uint32 getDuty(uint8 pin)
Get PWM duty cycle.
Definition: HardwarePWM.h:98
bool analogWrite(uint8 pin, uint32 duty)
Set PWM duty cycle.
Definition: HardwarePWM.h:61
Hardware pulse width modulation.
Definition: HardwarePWM.h:45
uint32 getMaxDuty()
Get the maximum duty cycle value.
Definition: HardwarePWM.h:125
HardwarePWM(uint8 *pins, uint8 no_of_pins)
Instantiate hardware PWM object.
bool setDuty(uint8 pin, uint32 duty, bool update=true)
Set PWM duty cycle.
Definition: HardwarePWM.h:82
uint32 getPeriod(void)
Get PWM period.
uint8 getChannel(uint8 pin)
Get channel number for a pin.
void setPeriod(uint32 period)
Set PWM period.
void update()
This function is used to actually update the PWM.