-#define PWM_MAX 0x1E4 /* This should be different than ADC frequency 125 kHz */
-#define PWM_STEP_SHIFT 2 /* second parameter of pwm_set is shifted by
- * PWM_STEP_SHIFT bits to the right before setting
- * into HW */
-
+/*
+ * The real Timer/Counter 1 frequency should not be too close to the
+ * A/D converter frequency (125 kHz). Note that this is not the Top
+ * 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)