Skip to content

Commit 731148e

Browse files
committed
Back to 10ms period
As suggested in review comments, let's keep default 10ms period
1 parent c9350f8 commit 731148e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/tests/mbed/pwm/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ float value = 0.75;
1919
int main() {
2020
#if defined(TARGET_FF_ARDUINO)
2121
PwmOut pwm(D9);
22-
int period_us = 40000; // allows to test various periods
22+
int period_ms = 10;
2323

24-
pwm.period_us(period_us);
24+
pwm.period_ms(period_ms);
2525
pwm.write(value);
2626

2727
float result = floor(pwm.read() * 100 + 0.5) / 100; // round it to 0.xx
28-
printf("PWM period = %dus with duty cycle: %d%%\n", period_us, (int) (result * 100));
28+
printf("PWM period = %dms with duty cycle: %d%%\n", period_ms, (int) (result * 100));
2929

3030
notify_completion(result == value ? true : false);
3131
#elif defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC11U24) || defined(TARGET_LPC4088) || defined(TARGET_LPC2460)

0 commit comments

Comments
 (0)