X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?p=tinyboard.git;a=blobdiff_plain;f=projects%2Fstep-up%2Fpwm.c;fp=projects%2Fstep-up%2Fpwm.c;h=18a14253552a7c7628f1dc9dde24e1512af83437;hp=f16aaa3175440cd44b84abafb3b477baa5d74e31;hb=3079ccda1c6d82058c801bf8192c616230a2ef93;hpb=8ebf32f3366e09e1123a1317f23545faedd9cc76 diff --git a/projects/step-up/pwm.c b/projects/step-up/pwm.c index f16aaa3..18a1425 100644 --- a/projects/step-up/pwm.c +++ b/projects/step-up/pwm.c @@ -1,5 +1,6 @@ #include #include +#include #include #include @@ -24,6 +25,8 @@ static void inline enable_pll() void init_pwm() { + power_timer1_enable(); + enable_pll(); TCCR1 = _BV(CTC1) | _BV(CS10); // no clock prescaling