diff --git a/timer.h b/timer.h index 204a1d5..32eed90 100755 --- a/timer.h +++ b/timer.h @@ -195,6 +195,10 @@ struct PwmChannel { static inline void set_frequency(uint16_t f) { OCR1A = f; } + static inline void set_frequency_pulse(uint16_t f) { + OCR1A = f; + OCR1B = f - (f >> 2); + } }; struct NoPwmChannel {