Skip to content

Commit d7a2ae9

Browse files
committed
fix stm compiler error
1 parent 1512ca5 commit d7a2ae9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ports/stm/common-hal/pwmio/PWMOut.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ STATIC uint32_t timer_get_internal_duty(uint16_t duty, uint32_t period) {
4848
return (duty * period) / ((1 << 16) - 1);
4949
}
5050

51-
STATIC void timer_get_optimal_divisors(uint32_t *period, uint32_t *prescaler,
51+
STATIC bool timer_get_optimal_divisors(uint32_t *period, uint32_t *prescaler,
5252
uint32_t frequency, uint32_t source_freq) {
5353
// Find the largest possible period supported by this frequency
5454
for (int i = 0; i < (1 << 16); i++) {
@@ -58,7 +58,7 @@ STATIC void timer_get_optimal_divisors(uint32_t *period, uint32_t *prescaler,
5858
break;
5959
}
6060
}
61-
// Return successor failure.
61+
// Return success or failure.
6262
return *prescaler != 0;
6363
}
6464

0 commit comments

Comments
 (0)