Make the status of T/C1 visible from the outside, in order to
make the on-demand ADC channel selection possible, and also
to allow selecting the sleep modes in the main loop.
* value of T/C 1, it is shifted by PWM_STEP_SHIFT as described in pwm.c
*/
#define PWM_MAX 0x780
+extern volatile unsigned char channels_running;
+#define PWM_IS_ON(n) (channels_running & (1 << (n)))
+#define TIMER1_IS_ON() (channels_running)
void init_pwm();
void susp_pwm();
void pwm_off(unsigned char n);
#error PWM_TOP too high
#endif
+volatile unsigned char channels_running;
+
static uint16_t pwm[N_PWMLEDS];
static volatile unsigned char step;
-static unsigned char channels_running, pll_enabled;
+static unsigned char pll_enabled;
static void enable_pll()
{