Clean up comments and spacing
This commit is contained in:
commit
316469e76a
@ -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 */
|
||||||
|
@ -3805,7 +3805,7 @@ inline void gcode_M81() {
|
|||||||
inline void gcode_M82() { axis_relative_modes[E_AXIS] = false; }
|
inline void gcode_M82() { axis_relative_modes[E_AXIS] = false; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* M82: Set E codes relative while in Absolute Coordinates (G90) mode
|
* M83: Set E codes relative while in Absolute Coordinates (G90) mode
|
||||||
*/
|
*/
|
||||||
inline void gcode_M83() { axis_relative_modes[E_AXIS] = true; }
|
inline void gcode_M83() { axis_relative_modes[E_AXIS] = true; }
|
||||||
|
|
||||||
@ -6153,6 +6153,9 @@ void mesh_plan_buffer_line(float x, float y, float z, const float e, float feed_
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare a single move and get ready for the next one
|
* Prepare a single move and get ready for the next one
|
||||||
|
*
|
||||||
|
* (This may call plan_buffer_line several times to put
|
||||||
|
* smaller moves into the planner for DELTA or SCARA.)
|
||||||
*/
|
*/
|
||||||
void prepare_move() {
|
void prepare_move() {
|
||||||
clamp_to_software_endstops(destination);
|
clamp_to_software_endstops(destination);
|
||||||
|
@ -50,19 +50,16 @@
|
|||||||
|
|
||||||
#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
|
#if NUM_SERVOS > 2
|
||||||
#define SERVO2_PIN -1
|
#define SERVO2_PIN -1
|
||||||
#endif
|
|
||||||
|
|
||||||
#if NUM_SERVOS > 3
|
#if NUM_SERVOS > 3
|
||||||
#define SERVO3_PIN -1
|
#define SERVO3_PIN -1
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#define PS_ON_PIN -1
|
#define PS_ON_PIN -1
|
||||||
#define KILL_PIN -1
|
#define KILL_PIN -1
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user