mirror of https://github.com/arendst/Tasmota.git
Update core_esp8266_wiring_pwm.cpp
This commit is contained in:
parent
5322238d56
commit
526593d9c9
|
@ -21,6 +21,8 @@
|
|||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifdef ESP8266
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "core_esp8266_waveform.h"
|
||||
|
||||
|
@ -37,8 +39,8 @@ extern void __analogWriteRange(uint32_t range) {
|
|||
}
|
||||
|
||||
extern void __analogWriteFreq(uint32_t freq) {
|
||||
if (freq < 100) {
|
||||
analogFreq = 100;
|
||||
if (freq < 40) {
|
||||
analogFreq = 40;
|
||||
} else if (freq > 60000) {
|
||||
analogFreq = 60000;
|
||||
} else {
|
||||
|
@ -77,3 +79,5 @@ extern void analogWriteFreq(uint32_t freq) __attribute__((weak, alias("__analogW
|
|||
extern void analogWriteRange(uint32_t range) __attribute__((weak, alias("__analogWriteRange")));
|
||||
|
||||
};
|
||||
|
||||
#endif // ESP8266
|
||||
|
|
Loading…
Reference in New Issue