diff --git a/Marlin/Marlin.ino b/Marlin/Marlin.ino index 402edcd8a..fe0093a4a 100644 --- a/Marlin/Marlin.ino +++ b/Marlin/Marlin.ino @@ -1,30 +1,30 @@ -/* -*- c++ -*- */ - -/* - Reprap firmware based on Sprinter and grbl. - Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - */ - -/* - This firmware is a mashup between Sprinter and grbl. - (https://github.com/kliment/Sprinter) - (https://github.com/simen/grbl/tree) - - It has preliminary support for Matthew Roberts advance algorithm - http://reprap.org/pipermail/reprap-dev/2011-May/003323.html +/** + * Marlin Firmware + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * About Marlin + * + * This firmware is a mashup between Sprinter and grbl. + * - https://github.com/kliment/Sprinter + * - https://github.com/simen/grbl/tree + * + * It has preliminary support for Matthew Roberts advance algorithm + * - http://reprap.org/pipermail/reprap-dev/2011-May/003323.html */ /* All the implementation is done in *.cpp files to get better compatibility with avr-gcc without the Arduino IDE */ diff --git a/Marlin/language_ru.h b/Marlin/language_ru.h index 380326ece..f1d5d0ac7 100644 --- a/Marlin/language_ru.h +++ b/Marlin/language_ru.h @@ -135,4 +135,4 @@ #define MSG_DELTA_CALIBRATE_CENTER "Калибровать Center" #endif // DELTA_CALIBRATION_MENU -#endif // LANGUAGE_RU_H \ No newline at end of file +#endif // LANGUAGE_RU_H diff --git a/Marlin/pins_SANGUINOLOLU_11.h b/Marlin/pins_SANGUINOLOLU_11.h index ca41bdd97..e2e36bc2b 100644 --- a/Marlin/pins_SANGUINOLOLU_11.h +++ b/Marlin/pins_SANGUINOLOLU_11.h @@ -50,17 +50,14 @@ #ifdef NUM_SERVOS #define SERVO0_PIN -1 - #if NUM_SERVOS > 1 #define SERVO1_PIN -1 - #endif - - #if NUM_SERVOS > 2 - #define SERVO2_PIN -1 - #endif - - #if NUM_SERVOS > 3 - #define SERVO3_PIN -1 + #if NUM_SERVOS > 2 + #define SERVO2_PIN -1 + #if NUM_SERVOS > 3 + #define SERVO3_PIN -1 + #endif + #endif #endif #endif diff --git a/Marlin/servo.cpp b/Marlin/servo.cpp index 81d73ae87..32e5d8493 100644 --- a/Marlin/servo.cpp +++ b/Marlin/servo.cpp @@ -101,29 +101,29 @@ static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t #ifndef WIRING // Wiring pre-defines signal handlers so don't define any if compiling for the Wiring platform // Interrupt handlers for Arduino - #if defined(_useTimer1) + #ifdef _useTimer1 SIGNAL (TIMER1_COMPA_vect) { handle_interrupts(_timer1, &TCNT1, &OCR1A); } #endif - #if defined(_useTimer3) + #ifdef _useTimer3 SIGNAL (TIMER3_COMPA_vect) { handle_interrupts(_timer3, &TCNT3, &OCR3A); } #endif - #if defined(_useTimer4) + #ifdef _useTimer4 SIGNAL (TIMER4_COMPA_vect) { handle_interrupts(_timer4, &TCNT4, &OCR4A); } #endif - #if defined(_useTimer5) + #ifdef _useTimer5 SIGNAL (TIMER5_COMPA_vect) { handle_interrupts(_timer5, &TCNT5, &OCR5A); } #endif #else //!WIRING // Interrupt handlers for Wiring - #if defined(_useTimer1) + #ifdef _useTimer1 void Timer1Service() { handle_interrupts(_timer1, &TCNT1, &OCR1A); } #endif - #if defined(_useTimer3) + #ifdef _useTimer3 void Timer3Service() { handle_interrupts(_timer3, &TCNT3, &OCR3A); } #endif @@ -131,7 +131,7 @@ static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t static void initISR(timer16_Sequence_t timer) { - #if defined(_useTimer1) + #ifdef _useTimer1 if (timer == _timer1) { TCCR1A = 0; // normal counting mode TCCR1B = _BV(CS11); // set prescaler of 8 @@ -144,31 +144,31 @@ static void initISR(timer16_Sequence_t timer) { TIFR1 |= _BV(OCF1A); // clear any pending interrupts; TIMSK1 |= _BV(OCIE1A); // enable the output compare interrupt #endif - #if defined(WIRING) + #ifdef WIRING timerAttach(TIMER1OUTCOMPAREA_INT, Timer1Service); #endif } #endif - #if defined(_useTimer3) + #ifdef _useTimer3 if (timer == _timer3) { TCCR3A = 0; // normal counting mode TCCR3B = _BV(CS31); // set prescaler of 8 TCNT3 = 0; // clear the timer count - #if defined(__AVR_ATmega128__) + #ifdef __AVR_ATmega128__ TIFR |= _BV(OCF3A); // clear any pending interrupts; ETIMSK |= _BV(OCIE3A); // enable the output compare interrupt #else TIFR3 = _BV(OCF3A); // clear any pending interrupts; TIMSK3 = _BV(OCIE3A) ; // enable the output compare interrupt #endif - #if defined(WIRING) + #ifdef WIRING timerAttach(TIMER3OUTCOMPAREA_INT, Timer3Service); // for Wiring platform only #endif } #endif - #if defined(_useTimer4) + #ifdef _useTimer4 if (timer == _timer4) { TCCR4A = 0; // normal counting mode TCCR4B = _BV(CS41); // set prescaler of 8 @@ -178,7 +178,7 @@ static void initISR(timer16_Sequence_t timer) { } #endif - #if defined(_useTimer5) + #ifdef _useTimer5 if (timer == _timer5) { TCCR5A = 0; // normal counting mode TCCR5B = _BV(CS51); // set prescaler of 8 @@ -191,7 +191,7 @@ static void initISR(timer16_Sequence_t timer) { static void finISR(timer16_Sequence_t timer) { // Disable use of the given timer - #if defined(WIRING) + #ifdef WIRING if (timer == _timer1) { #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__) TIMSK1