Cleanup of comments & spacing

This commit is contained in:
Scott Lahteine 2015-06-27 19:20:32 -07:00 committed by Richard Wackerbarth
parent 9682ed455e
commit 42465ee444
4 changed files with 48 additions and 51 deletions

View File

@ -1,30 +1,30 @@
/* -*- c++ -*- */ /**
* Marlin Firmware
/* *
Reprap firmware based on Sprinter and grbl. * Based on Sprinter and grbl.
Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. * (at your option) any later version.
*
This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. * GNU General Public License for more details.
*
You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ *
* About Marlin
/* *
This firmware is a mashup between Sprinter and grbl. * This firmware is a mashup between Sprinter and grbl.
(https://github.com/kliment/Sprinter) * - https://github.com/kliment/Sprinter
(https://github.com/simen/grbl/tree) * - https://github.com/simen/grbl/tree
*
It has preliminary support for Matthew Roberts advance algorithm * It has preliminary support for Matthew Roberts advance algorithm
http://reprap.org/pipermail/reprap-dev/2011-May/003323.html * - 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 */ /* All the implementation is done in *.cpp files to get better compatibility with avr-gcc without the Arduino IDE */

View File

@ -135,4 +135,4 @@
#define MSG_DELTA_CALIBRATE_CENTER "Калибровать Center" #define MSG_DELTA_CALIBRATE_CENTER "Калибровать Center"
#endif // DELTA_CALIBRATION_MENU #endif // DELTA_CALIBRATION_MENU
#endif // LANGUAGE_RU_H #endif // LANGUAGE_RU_H

View File

@ -50,17 +50,14 @@
#ifdef NUM_SERVOS #ifdef NUM_SERVOS
#define SERVO0_PIN -1 #define SERVO0_PIN -1
#if NUM_SERVOS > 1 #if NUM_SERVOS > 1
#define SERVO1_PIN -1 #define SERVO1_PIN -1
#endif #if NUM_SERVOS > 2
#define SERVO2_PIN -1
#if NUM_SERVOS > 2 #if NUM_SERVOS > 3
#define SERVO2_PIN -1 #define SERVO3_PIN -1
#endif #endif
#endif
#if NUM_SERVOS > 3
#define SERVO3_PIN -1
#endif #endif
#endif #endif

View File

@ -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 #ifndef WIRING // Wiring pre-defines signal handlers so don't define any if compiling for the Wiring platform
// Interrupt handlers for Arduino // Interrupt handlers for Arduino
#if defined(_useTimer1) #ifdef _useTimer1
SIGNAL (TIMER1_COMPA_vect) { handle_interrupts(_timer1, &TCNT1, &OCR1A); } SIGNAL (TIMER1_COMPA_vect) { handle_interrupts(_timer1, &TCNT1, &OCR1A); }
#endif #endif
#if defined(_useTimer3) #ifdef _useTimer3
SIGNAL (TIMER3_COMPA_vect) { handle_interrupts(_timer3, &TCNT3, &OCR3A); } SIGNAL (TIMER3_COMPA_vect) { handle_interrupts(_timer3, &TCNT3, &OCR3A); }
#endif #endif
#if defined(_useTimer4) #ifdef _useTimer4
SIGNAL (TIMER4_COMPA_vect) { handle_interrupts(_timer4, &TCNT4, &OCR4A); } SIGNAL (TIMER4_COMPA_vect) { handle_interrupts(_timer4, &TCNT4, &OCR4A); }
#endif #endif
#if defined(_useTimer5) #ifdef _useTimer5
SIGNAL (TIMER5_COMPA_vect) { handle_interrupts(_timer5, &TCNT5, &OCR5A); } SIGNAL (TIMER5_COMPA_vect) { handle_interrupts(_timer5, &TCNT5, &OCR5A); }
#endif #endif
#else //!WIRING #else //!WIRING
// Interrupt handlers for Wiring // Interrupt handlers for Wiring
#if defined(_useTimer1) #ifdef _useTimer1
void Timer1Service() { handle_interrupts(_timer1, &TCNT1, &OCR1A); } void Timer1Service() { handle_interrupts(_timer1, &TCNT1, &OCR1A); }
#endif #endif
#if defined(_useTimer3) #ifdef _useTimer3
void Timer3Service() { handle_interrupts(_timer3, &TCNT3, &OCR3A); } void Timer3Service() { handle_interrupts(_timer3, &TCNT3, &OCR3A); }
#endif #endif
@ -131,7 +131,7 @@ static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t
static void initISR(timer16_Sequence_t timer) { static void initISR(timer16_Sequence_t timer) {
#if defined(_useTimer1) #ifdef _useTimer1
if (timer == _timer1) { if (timer == _timer1) {
TCCR1A = 0; // normal counting mode TCCR1A = 0; // normal counting mode
TCCR1B = _BV(CS11); // set prescaler of 8 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; TIFR1 |= _BV(OCF1A); // clear any pending interrupts;
TIMSK1 |= _BV(OCIE1A); // enable the output compare interrupt TIMSK1 |= _BV(OCIE1A); // enable the output compare interrupt
#endif #endif
#if defined(WIRING) #ifdef WIRING
timerAttach(TIMER1OUTCOMPAREA_INT, Timer1Service); timerAttach(TIMER1OUTCOMPAREA_INT, Timer1Service);
#endif #endif
} }
#endif #endif
#if defined(_useTimer3) #ifdef _useTimer3
if (timer == _timer3) { if (timer == _timer3) {
TCCR3A = 0; // normal counting mode TCCR3A = 0; // normal counting mode
TCCR3B = _BV(CS31); // set prescaler of 8 TCCR3B = _BV(CS31); // set prescaler of 8
TCNT3 = 0; // clear the timer count TCNT3 = 0; // clear the timer count
#if defined(__AVR_ATmega128__) #ifdef __AVR_ATmega128__
TIFR |= _BV(OCF3A); // clear any pending interrupts; TIFR |= _BV(OCF3A); // clear any pending interrupts;
ETIMSK |= _BV(OCIE3A); // enable the output compare interrupt ETIMSK |= _BV(OCIE3A); // enable the output compare interrupt
#else #else
TIFR3 = _BV(OCF3A); // clear any pending interrupts; TIFR3 = _BV(OCF3A); // clear any pending interrupts;
TIMSK3 = _BV(OCIE3A) ; // enable the output compare interrupt TIMSK3 = _BV(OCIE3A) ; // enable the output compare interrupt
#endif #endif
#if defined(WIRING) #ifdef WIRING
timerAttach(TIMER3OUTCOMPAREA_INT, Timer3Service); // for Wiring platform only timerAttach(TIMER3OUTCOMPAREA_INT, Timer3Service); // for Wiring platform only
#endif #endif
} }
#endif #endif
#if defined(_useTimer4) #ifdef _useTimer4
if (timer == _timer4) { if (timer == _timer4) {
TCCR4A = 0; // normal counting mode TCCR4A = 0; // normal counting mode
TCCR4B = _BV(CS41); // set prescaler of 8 TCCR4B = _BV(CS41); // set prescaler of 8
@ -178,7 +178,7 @@ static void initISR(timer16_Sequence_t timer) {
} }
#endif #endif
#if defined(_useTimer5) #ifdef _useTimer5
if (timer == _timer5) { if (timer == _timer5) {
TCCR5A = 0; // normal counting mode TCCR5A = 0; // normal counting mode
TCCR5B = _BV(CS51); // set prescaler of 8 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) { static void finISR(timer16_Sequence_t timer) {
// Disable use of the given timer // Disable use of the given timer
#if defined(WIRING) #ifdef WIRING
if (timer == _timer1) { if (timer == _timer1) {
#if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__) #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
TIMSK1 TIMSK1