ESP8266_new_pwm icon indicating copy to clipboard operation
ESP8266_new_pwm copied to clipboard

Fix conversion when COMPAT_MODE is set

Open perpernorbi opened this issue 7 years ago • 0 comments

The conversion was just backwards. In COMPAT_MODE, period value of 1000 corresponds to 1kHz, while, without COMPAT_MODE, 5000 corresponds to the same period. So when SDK_PWM_PERIOD_COMPAT_MODE is set, period should be multiplied by 5. For the same reason, duty needs to be divided by 5.

perpernorbi avatar Aug 23 '18 04:08 perpernorbi