aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/ports/NRF51/NRF51822/hal_pwm_lld.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/os/hal/ports/NRF51/NRF51822/hal_pwm_lld.c b/os/hal/ports/NRF51/NRF51822/hal_pwm_lld.c
index 6952fcb..76bc572 100644
--- a/os/hal/ports/NRF51/NRF51822/hal_pwm_lld.c
+++ b/os/hal/ports/NRF51/NRF51822/hal_pwm_lld.c
@@ -78,7 +78,8 @@ static void pwm_lld_serve_interrupt(PWMDriver *pwmp) {
}
// Deal with PWM channels
- for (uint8_t n = 0 ; n < pwmp->channels ; n++) {
+ uint8_t n;
+ for (n = 0 ; n < pwmp->channels ; n++) {
if (pwmp->timer->EVENTS_COMPARE[n]) {
pwmp->timer->EVENTS_COMPARE[n] = 0;
if (pwmp->config->channels[n].callback != NULL) {