5 //The PWM has no loop function. It runs entirely out of the ISR.
11 //s/w "BCM"(<== "Binary Code Modulation") timer setup
12 TCCR0A
|= _BV(WGM00
)|_BV(WGM01
);
13 TCCR0B
|= _BV(CS01
)|_BV(CS00
)|_BV(WGM02
);
22 //Called every 256 cpu clks (i.e should not get overly long)
32 Q
|= !!(pwm_val
[0] & pwm_cycle
);
33 Q
|= (pwm_val
[1] & pwm_cycle
)?2:0;
34 Q
|= (pwm_val
[2] & pwm_cycle
)?4:0;
35 Q
|= (pwm_val
[3] & pwm_cycle
)?8:0;
36 /*Q |= (pwm_val[4] & pwm_cycle)?16:0;
37 Q |= (pwm_val[5] & pwm_cycle)?32:0;
38 Q |= (pwm_val[6] & pwm_cycle)?64:0;
39 Q |= (pwm_val[7] & pwm_cycle)?128:0;
45 uint8_t pwm_cycle
= 1;
48 #else//HAS_PWM_SUPPORT
52 #endif//HAS_PWM_SUPPORT