fix stm compiler error

This commit is contained in:
Dan Halbert 2021-03-19 11:04:46 -04:00
parent 1512ca520b
commit d7a2ae9df7

View File

@ -48,7 +48,7 @@ STATIC uint32_t timer_get_internal_duty(uint16_t duty, uint32_t period) {
return (duty * period) / ((1 << 16) - 1); return (duty * period) / ((1 << 16) - 1);
} }
STATIC void timer_get_optimal_divisors(uint32_t *period, uint32_t *prescaler, STATIC bool timer_get_optimal_divisors(uint32_t *period, uint32_t *prescaler,
uint32_t frequency, uint32_t source_freq) { uint32_t frequency, uint32_t source_freq) {
// Find the largest possible period supported by this frequency // Find the largest possible period supported by this frequency
for (int i = 0; i < (1 << 16); i++) { for (int i = 0; i < (1 << 16); i++) {
@ -58,7 +58,7 @@ STATIC void timer_get_optimal_divisors(uint32_t *period, uint32_t *prescaler,
break; break;
} }
} }
// Return successor failure. // Return success or failure.
return *prescaler != 0; return *prescaler != 0;
} }