diff --git a/ports/esp32/machine_pwm.c b/ports/esp32/machine_pwm.c index a51b7eb490a2c..3eb1d42b649c9 100755 --- a/ports/esp32/machine_pwm.c +++ b/ports/esp32/machine_pwm.c @@ -52,7 +52,7 @@ to view __FUNCTION__, __LINE__, __FILE__ in exception // 10-bit user interface resolution compatible with esp8266 PWM.duty() #define UI_RES_10_BIT (10) // Maximum duty value on 10-bit resolution -#define UI10_DUTY ((1UL << UI_RES_10_BIT) - 1) +#define UI10_DUTY ((1U << UI_RES_10_BIT) - 1) // 16-bit user interface resolution used in PWM.duty_u16() #define UI_RES_16_BIT (16)