]> www.fi.muni.cz Git - bike-lights.git/commitdiff
pwm.c: typo fixes
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Thu, 29 Nov 2012 20:07:51 +0000 (21:07 +0100)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Thu, 29 Nov 2012 20:07:51 +0000 (21:07 +0100)
firmware/pwm.c

index da9fe3df679b9feb1faede1ed11205773890a824..b9b42c926cbd49cd449d36a76986bcdbc494b24d 100644 (file)
@@ -14,7 +14,7 @@ void init_pwm()
        step = 0;
 
        for (i = 0; i < N_PWMLEDS; i++)
-               pwm[n] = 0;
+               pwm[i] = 0;
 
        /* Async clock */
        PLLCSR = _BV(PLLE);
@@ -116,8 +116,8 @@ void pwm_timer()
                step = 0;
 
        for (i = 0; i < N_PWMLEDS; i++)
-               if (pwm[n])
-                       pwm_update_hw(n);
+               if (pwm[i])
+                       pwm_update_hw(i);
 }
 
 #if 0