X-Git-Url: http://www.average.org/gitweb/?p=sensor-light.git;a=blobdiff_plain;f=msp430%2Fmain.c;h=9146b1836853084eb5540311cdacc71e91e32b04;hp=8df6210c9836f6c8f835315b20666458322d8bfa;hb=16743d944b915379e10e83626ed6507d259cb3db;hpb=8b6981bdc89ef502ce314abc2a349844de283e0f diff --git a/msp430/main.c b/msp430/main.c index 8df6210..9146b18 100644 --- a/msp430/main.c +++ b/msp430/main.c @@ -168,7 +168,10 @@ int main(void) } } else continue; - TA0CCR2 = 1 << Duty_Cycle; + if (Duty_Cycle) + TA0CCR2 = 1 << (Duty_Cycle - 1); + else + TA0CCR2 = 0; } __bis_SR_register(LPM0_bits | GIE); __no_operation();