mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-11-01 20:20:20 +08:00
bugfix(pwm): fix pwm channel num type error
Fixes https://github.com/espressif/ESP8266_RTOS_SDK/issues/588
This commit is contained in:
@ -30,8 +30,8 @@
|
||||
#define PWM_2_OUT_IO_NUM 14
|
||||
#define PWM_3_OUT_IO_NUM 15
|
||||
|
||||
// PWM period 500us(2Khz), same as depth
|
||||
#define PWM_PERIOD (500)
|
||||
// PWM period 1000us(1Khz), same as depth
|
||||
#define PWM_PERIOD (1000)
|
||||
|
||||
static const char *TAG = "pwm_example";
|
||||
|
||||
@ -45,7 +45,7 @@ const uint32_t pin_num[4] = {
|
||||
|
||||
// duties table, real_duty = duties[x]/PERIOD
|
||||
uint32_t duties[4] = {
|
||||
250, 250, 250, 250,
|
||||
500, 500, 500, 500,
|
||||
};
|
||||
|
||||
// phase table, delay = (phase[x]/360)*PERIOD
|
||||
|
||||
Reference in New Issue
Block a user