Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions src/megaavr/ServoTimers.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,18 @@

#include <avr/io.h>

//#define USE_TIMERB1 // interferes with PWM on pin 3
#define USE_TIMERB2 // interferes with PWM on pin 11
//#define USE_TIMERB0 // interferes with PWM on pin 6

#if !defined(USE_TIMERB1) && !defined(USE_TIMERB2) && !defined(USE_TIMERB0)
# error "No timers allowed for Servo"
/* Please uncomment a timer above and rebuild */
#define USE_TIMERB2 // default timer
#endif

static volatile TCB_t* _timer =
#if defined(USE_TIMERB0)
#if defined(USE_TIMERB0) // interferes with PWM on pin 6
&TCB0;
#endif
#if defined(USE_TIMERB1)
#if defined(USE_TIMERB1) // interferes with PWM on pin 3
&TCB1;
#endif
#if defined(USE_TIMERB2)
#if defined(USE_TIMERB2) // interferes with PWM on pin 11
&TCB2;
#endif

Expand Down