Browse Source

Merge pull request #3197 from PheiPheiPhei/RCBugFix

Enabling servo usage on boards with PWM current control
pull/1/head
Scott Lahteine 9 years ago
parent
commit
b6ca86b974
  1. 7
      Marlin/servo.h

7
Marlin/servo.h

@ -60,12 +60,17 @@
// Say which 16 bit timers can be used and in what order
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#define _useTimer5
//#define _useTimer1
#define _useTimer3
#define _useTimer4
#ifndef MOTOR_CURRENT_PWM_XY_PIN
//Timer 5 is used for motor current PWM and can't be used for servos.
#define _useTimer5
//typedef enum { _timer5, _timer1, _timer3, _timer4, _Nbr_16timers } timer16_Sequence_t ;
typedef enum { _timer5, _timer3, _timer4, _Nbr_16timers } timer16_Sequence_t ;
#else
typedef enum {_timer3, _timer4, _Nbr_16timers } timer16_Sequence_t ;
#endif
#elif defined(__AVR_ATmega32U4__)
//#define _useTimer1

Loading…
Cancel
Save