Scott Lahteine 6 роки тому
джерело
коміт
32512332df
33 змінених файлів з 577 додано та 575 видалено
  1. 19
    19
      Marlin/src/HAL/HAL_AVR/ServoTimers.h
  2. 2
    2
      Marlin/src/HAL/HAL_AVR/fastio_AVR.h
  3. 17
    16
      Marlin/src/HAL/HAL_DUE/fastio_Due.h
  4. 17
    17
      Marlin/src/HAL/HAL_DUE/servotimers.h
  5. 4
    4
      Marlin/src/HAL/HAL_LPC1768/HAL_LPC1768_LCD_defines.h
  6. 1
    2
      Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.cpp
  7. 2
    2
      Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.h
  8. 30
    24
      Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp
  9. 30
    24
      Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.h
  10. 17
    17
      Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp
  11. 10
    8
      Marlin/src/HAL/HAL_LPC1768/fastio.h
  12. 31
    32
      Marlin/src/HAL/HAL_LPC1768/include/Wire.h
  13. 130
    139
      Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.c
  14. 2
    2
      Marlin/src/HAL/HAL_LPC1768/main.cpp
  15. 2
    2
      Marlin/src/HAL/HAL_LPC1768/pinsDebug_LPC1768.h
  16. 17
    18
      Marlin/src/HAL/HAL_LPC1768/servo_private.h
  17. 9
    9
      Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.cpp
  18. 17
    17
      Marlin/src/HAL/HAL_STM32F1/spi_pins.h
  19. 20
    20
      Marlin/src/HAL/HAL_STM32F1/watchdog_Stm32f1.cpp
  20. 21
    21
      Marlin/src/HAL/HAL_STM32F1/watchdog_Stm32f1.h
  21. 1
    1
      Marlin/src/HAL/HAL_TEENSY35_36/fastio_Teensy.h
  22. 41
    41
      Marlin/src/HAL/servo.h
  23. 17
    17
      Marlin/src/HAL/servo_private.h
  24. 8
    8
      Marlin/src/feature/Max7219_Debug_LEDs.cpp
  25. 3
    2
      Marlin/src/feature/dac/dac_mcp4728.cpp
  26. 19
    19
      Marlin/src/feature/dac/stepper_dac.cpp
  27. 19
    19
      Marlin/src/feature/dac/stepper_dac.h
  28. 16
    17
      Marlin/src/gcode/feature/leds/M150.cpp
  29. 17
    17
      Marlin/src/libs/vector_3.cpp
  30. 17
    17
      Marlin/src/libs/vector_3.h
  31. 1
    2
      Marlin/src/module/planner_bezier.cpp
  32. 19
    19
      Marlin/src/module/stepper_indirection.h
  33. 1
    1
      Marlin/src/pins/pins_ANET_10.h

+ 19
- 19
Marlin/src/HAL/HAL_AVR/ServoTimers.h Переглянути файл

@@ -20,24 +20,24 @@
20 20
  *
21 21
  */
22 22
 
23
-/*
24
-  ServoTimers.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
25
-  Copyright (c) 2009 Michael Margolis.  All right reserved.
26
-
27
-  This library is free software; you can redistribute it and/or
28
-  modify it under the terms of the GNU Lesser General Public
29
-  License as published by the Free Software Foundation; either
30
-  version 2.1 of the License, or (at your option) any later version.
31
-
32
-  This library is distributed in the hope that it will be useful,
33
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
34
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35
-  Lesser General Public License for more details.
36
-
37
-  You should have received a copy of the GNU Lesser General Public
38
-  License along with this library; if not, write to the Free Software
39
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
40
-*/
23
+/**
24
+ * ServoTimers.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
25
+ * Copyright (c) 2009 Michael Margolis.  All right reserved.
26
+ *
27
+ * This library is free software; you can redistribute it and/or
28
+ * modify it under the terms of the GNU Lesser General Public
29
+ * License as published by the Free Software Foundation; either
30
+ * version 2.1 of the License, or (at your option) any later version.
31
+ *
32
+ * This library is distributed in the hope that it will be useful,
33
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
34
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35
+ * Lesser General Public License for more details.
36
+ *
37
+ * You should have received a copy of the GNU Lesser General Public
38
+ * License along with this library; if not, write to the Free Software
39
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
40
+ */
41 41
 
42 42
 #ifndef _SERVOTIMERS_H_
43 43
 #define _SERVOTIMERS_H_
@@ -55,7 +55,7 @@
55 55
  * --------------------
56 56
  */
57 57
 
58
-#define TRIM_DURATION       2    // compensation ticks to trim adjust for digitalWrite delays
58
+#define TRIM_DURATION       2   // compensation ticks to trim adjust for digitalWrite delays
59 59
 #define PRESCALER           8   // timer prescaler
60 60
 
61 61
 // Say which 16 bit timers can be used and in what order

+ 2
- 2
Marlin/src/HAL/HAL_AVR/fastio_AVR.h Переглянути файл

@@ -21,9 +21,9 @@
21 21
  */
22 22
 
23 23
 /**
24
- * Fast I/O Routines
24
+ * Fast I/O Routines for AVR
25 25
  * Use direct port manipulation to save scads of processor time.
26
- * Contributed by Triffid_Hunter. Modified by Kliment and the Marlin team.
26
+ * Contributed by Triffid_Hunter and modified by Kliment, thinkyhead, Bob-the-Kuhn, et.al.
27 27
  */
28 28
 
29 29
 #ifndef _FASTIO_ARDUINO_H_

+ 17
- 16
Marlin/src/HAL/HAL_DUE/fastio_Due.h Переглянути файл

@@ -21,9 +21,10 @@
21 21
  */
22 22
 
23 23
 /**
24
-  This code contributed by Triffid_Hunter and modified by Kliment
25
-  why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
26
-*/
24
+ * Fast I/O Routines for SAM3X8E
25
+ * Use direct port manipulation to save scads of processor time.
26
+ * Contributed by Triffid_Hunter and modified by Kliment, thinkyhead, Bob-the-Kuhn, et.al.
27
+ */
27 28
 
28 29
 /**
29 30
  * Description: Fast IO functions for Arduino Due and compatible (SAM3X8E)
@@ -35,17 +36,20 @@
35 36
 #define _FASTIO_DUE_H
36 37
 
37 38
 /**
38
-  utility functions
39
-*/
39
+ * Utility functions
40
+ */
40 41
 
41 42
 #ifndef MASK
42 43
   #define MASK(PIN)  (1 << PIN)
43 44
 #endif
44 45
 
45 46
 /**
46
-  magic I/O routines
47
-  now you can simply SET_OUTPUT(STEP); WRITE(STEP, 1); WRITE(STEP, 0);
48
-*/
47
+ * Magic I/O routines
48
+ *
49
+ * Now you can simply SET_OUTPUT(STEP); WRITE(STEP, HIGH); WRITE(STEP, LOW);
50
+ *
51
+ * Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
52
+ */
49 53
 
50 54
 /// Read a pin
51 55
 #define _READ(IO) ((bool)(DIO ## IO ## _WPORT -> PIO_PDSR & (MASK(DIO ## IO ## _PIN))))
@@ -80,8 +84,6 @@
80 84
 /// check if pin is an timer
81 85
 #define _GET_TIMER(IO)
82 86
 
83
-//  why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
84
-
85 87
 /// Read a pin wrapper
86 88
 #define READ(IO)  _READ(IO)
87 89
 
@@ -111,10 +113,9 @@
111 113
 #define OUT_WRITE(IO, v) { SET_OUTPUT(IO); WRITE(IO, v); }
112 114
 
113 115
 /**
114
-  ports and functions
115
-
116
-  added as necessary or if I feel like it- not a comprehensive list!
117
-*/
116
+ * Ports and functions
117
+ * Added as necessary or if I feel like it- not a comprehensive list!
118
+ */
118 119
 
119 120
 // UART
120 121
 #define RXD        DIO0
@@ -125,8 +126,8 @@
125 126
 #define SDA        DIO20
126 127
 
127 128
 /**
128
-pins
129
-*/
129
+ * pins
130
+ */
130 131
 
131 132
 #define DIO0_PIN 8
132 133
 #define DIO0_WPORT PIOA

+ 17
- 17
Marlin/src/HAL/HAL_DUE/servotimers.h Переглянути файл

@@ -1,20 +1,20 @@
1
-/*
2
-  Copyright (c) 2013 Arduino LLC. All right reserved.
3
-
4
-  This library is free software; you can redistribute it and/or
5
-  modify it under the terms of the GNU Lesser General Public
6
-  License as published by the Free Software Foundation; either
7
-  version 2.1 of the License, or (at your option) any later version.
8
-
9
-  This library is distributed in the hope that it will be useful,
10
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
-  Lesser General Public License for more details.
13
-
14
-  You should have received a copy of the GNU Lesser General Public
15
-  License along with this library; if not, write to the Free Software
16
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
-*/
1
+/**
2
+ * Copyright (c) 2013 Arduino LLC. All right reserved.
3
+ *
4
+ * This library is free software; you can redistribute it and/or
5
+ * modify it under the terms of the GNU Lesser General Public
6
+ * License as published by the Free Software Foundation; either
7
+ * version 2.1 of the License, or (at your option) any later version.
8
+ *
9
+ * This library is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
+ * Lesser General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Lesser General Public
15
+ * License along with this library; if not, write to the Free Software
16
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
+ */
18 18
 
19 19
 /**
20 20
  * Defines for 16 bit timers used with  Servo library

+ 4
- 4
Marlin/src/HAL/HAL_LPC1768/HAL_LPC1768_LCD_defines.h Переглянути файл

@@ -21,13 +21,13 @@
21 21
  */
22 22
 
23 23
 /**
24
-* LPC1768 LCD specific defines
25
-*/
24
+ * LPC1768 LCD-specific defines
25
+ */
26 26
 
27
-#if defined(TARGET_LPC1768)
27
+#ifdef TARGET_LPC1768
28 28
 
29 29
   // pointers to low level routines - must always supply these
30
-//  #define U8G_HAL_LINKS
30
+  //#define U8G_HAL_LINKS
31 31
   #define HAL_LCD_pin_routines "HAL_LPC1768/HAL_LCD_pin_routines.h"
32 32
   #define HAL_LCD_I2C_routines  "HAL_LPC1768/HAL_LCD_I2C_routines.h"
33 33
   #define HAL_LCD_delay "HAL_LPC1768/HAL_LCD_delay.h"

+ 1
- 2
Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.cpp Переглянути файл

@@ -24,7 +24,7 @@
24 24
  * The class Servo uses the PWM class to implement its functions
25 25
  *
26 26
  * All PWMs use the same repetition rate - 20mS because that's the normal servo rate
27
-*/
27
+ */
28 28
 
29 29
 /**
30 30
  * This is a hybrid system.
@@ -60,7 +60,6 @@
60 60
  * See the end of this file for details on the hardware/firmware interaction
61 61
  */
62 62
 
63
-
64 63
 #ifdef TARGET_LPC1768
65 64
 #include <lpc17xx_pinsel.h>
66 65
 #include "LPC1768_PWM.h"

+ 2
- 2
Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.h Переглянути файл

@@ -24,7 +24,7 @@
24 24
  * The class Servo uses the PWM class to implement its functions
25 25
  *
26 26
  * All PWMs use the same repetition rate - 20mS because that's the normal servo rate
27
-*/
27
+ */
28 28
 
29 29
 /**
30 30
  * This is a hybrid system.
@@ -60,7 +60,7 @@
60 60
  * See the end of this file for details on the hardware/firmware interaction
61 61
  */
62 62
 
63
- #include "fastio.h"
63
+#include "fastio.h"
64 64
 
65 65
 #define LPC_PWM1_MR0 19999  // base repetition rate minus one count - 20mS
66 66
 #define LPC_PWM1_PR 24      // prescaler value - prescaler divide by 24 + 1  -  1 MHz output

+ 30
- 24
Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp Переглянути файл

@@ -1,33 +1,34 @@
1 1
 /*
2
-SoftwareSerial.cpp (formerly NewSoftSerial.cpp) -
3
-Multi-instance software serial library for Arduino/Wiring
4
-   (http://ladyada.net)
5
-   multi-instance support, porting to 8MHz processors,
6
-   various optimizations, PROGMEM delay tables, inverse logic and
7
-   direct port writing by Mikal Hart (http://www.arduiniana.org)
8
-
9
-This library is free software; you can redistribute it and/or
10
-modify it under the terms of the GNU Lesser General Public
11
-License as published by the Free Software Foundation; either
12
-version 2.1 of the License, or (at your option) any later version.
13
-
14
-This library is distributed in the hope that it will be useful,
15
-but WITHOUT ANY WARRANTY; without even the implied warranty of
16
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17
-Lesser General Public License for more details.
18
-
19
-You should have received a copy of the GNU Lesser General Public
20
-License along with this library; if not, write to the Free Software
21
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22
-
23
-The latest version of this library can always be found at
24
-http://arduiniana.org.
25
-*/
2
+ * SoftwareSerial.cpp (formerly NewSoftSerial.cpp)
3
+ *
4
+ * Multi-instance software serial library for Arduino/Wiring
5
+ * -- Interrupt-driven receive and other improvements by ladyada
6
+ *    (http://ladyada.net)
7
+ * -- Tuning, circular buffer, derivation from class Print/Stream,
8
+ *    multi-instance support, porting to 8MHz processors,
9
+ *    various optimizations, PROGMEM delay tables, inverse logic and
10
+ *    direct port writing by Mikal Hart (http://www.arduiniana.org)
11
+ * -- Pin change interrupt macros by Paul Stoffregen (http://www.pjrc.com)
12
+ * -- 20MHz processor support by Garrett Mace (http://www.macetech.com)
13
+ * -- ATmega1280/2560 support by Brett Hagman (http://www.roguerobotics.com/)
14
+ *
15
+ * This library is free software; you can redistribute it and/or
16
+ * modify it under the terms of the GNU Lesser General Public
17
+ * License as published by the Free Software Foundation; either
18
+ * version 2.1 of the License, or (at your option) any later version.
19
+ *
20
+ * This library is distributed in the hope that it will be useful,
21
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23
+ * Lesser General Public License for more details.
24
+ *
25
+ * You should have received a copy of the GNU Lesser General Public
26
+ * License along with this library; if not, write to the Free Software
27
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
28
+ *
29
+ * The latest version of this library can always be found at
30
+ * http://arduiniana.org.
31
+ */
26 32
 
27 33
 #ifdef TARGET_LPC1768
28 34
 

+ 30
- 24
Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.h Переглянути файл

@@ -1,33 +1,34 @@
1 1
 /*
2
-SoftwareSerial.h (formerly NewSoftSerial.h) -
3
-Multi-instance software serial library for Arduino/Wiring
4
-   (http://ladyada.net)
5
-   multi-instance support, porting to 8MHz processors,
6
-   various optimizations, PROGMEM delay tables, inverse logic and
7
-   direct port writing by Mikal Hart (http://www.arduiniana.org)
8
-
9
-This library is free software; you can redistribute it and/or
10
-modify it under the terms of the GNU Lesser General Public
11
-License as published by the Free Software Foundation; either
12
-version 2.1 of the License, or (at your option) any later version.
13
-
14
-This library is distributed in the hope that it will be useful,
15
-but WITHOUT ANY WARRANTY; without even the implied warranty of
16
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17
-Lesser General Public License for more details.
18
-
19
-You should have received a copy of the GNU Lesser General Public
20
-License along with this library; if not, write to the Free Software
21
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22
-
23
-The latest version of this library can always be found at
24
-http://arduiniana.org.
25
-*/
2
+ * SoftwareSerial.h (formerly NewSoftSerial.h)
3
+ *
4
+ * Multi-instance software serial library for Arduino/Wiring
5
+ * -- Interrupt-driven receive and other improvements by ladyada
6
+ *    (http://ladyada.net)
7
+ * -- Tuning, circular buffer, derivation from class Print/Stream,
8
+ *    multi-instance support, porting to 8MHz processors,
9
+ *    various optimizations, PROGMEM delay tables, inverse logic and
10
+ *    direct port writing by Mikal Hart (http://www.arduiniana.org)
11
+ * -- Pin change interrupt macros by Paul Stoffregen (http://www.pjrc.com)
12
+ * -- 20MHz processor support by Garrett Mace (http://www.macetech.com)
13
+ * -- ATmega1280/2560 support by Brett Hagman (http://www.roguerobotics.com/)
14
+ *
15
+ * This library is free software; you can redistribute it and/or
16
+ * modify it under the terms of the GNU Lesser General Public
17
+ * License as published by the Free Software Foundation; either
18
+ * version 2.1 of the License, or (at your option) any later version.
19
+ *
20
+ * This library is distributed in the hope that it will be useful,
21
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23
+ * Lesser General Public License for more details.
24
+ *
25
+ * You should have received a copy of the GNU Lesser General Public
26
+ * License along with this library; if not, write to the Free Software
27
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
28
+ *
29
+ * The latest version of this library can always be found at
30
+ * http://arduiniana.org.
31
+ */
26 32
 
27 33
 #ifndef SOFTWARESERIAL_H
28 34
 #define SOFTWARESERIAL_H

+ 17
- 17
Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp Переглянути файл

@@ -1,20 +1,20 @@
1
-/*
2
-  Copyright (c) 2011-2012 Arduino.  All right reserved.
3
-
4
-  This library is free software; you can redistribute it and/or
5
-  modify it under the terms of the GNU Lesser General Public
6
-  License as published by the Free Software Foundation; either
7
-  version 2.1 of the License, or (at your option) any later version.
8
-
9
-  This library is distributed in the hope that it will be useful,
10
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
-  See the GNU Lesser General Public License for more details.
13
-
14
-  You should have received a copy of the GNU Lesser General Public
15
-  License along with this library; if not, write to the Free Software
16
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
-*/
1
+/**
2
+ * Copyright (c) 2011-2012 Arduino.  All right reserved.
3
+ *
4
+ * This library is free software; you can redistribute it and/or
5
+ * modify it under the terms of the GNU Lesser General Public
6
+ * License as published by the Free Software Foundation; either
7
+ * version 2.1 of the License, or (at your option) any later version.
8
+ *
9
+ * This library is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
+ * See the GNU Lesser General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Lesser General Public
15
+ * License along with this library; if not, write to the Free Software
16
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
+ */
18 18
 
19 19
 #ifdef TARGET_LPC1768
20 20
 

+ 10
- 8
Marlin/src/HAL/HAL_LPC1768/fastio.h Переглянути файл

@@ -21,9 +21,10 @@
21 21
  */
22 22
 
23 23
 /**
24
-  This code contributed by Triffid_Hunter and modified by Kliment
25
-  why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
26
-*/
24
+ * Fast I/O Routines for LPC1768/9
25
+ * Use direct port manipulation to save scads of processor time.
26
+ * Contributed by Triffid_Hunter and modified by Kliment, thinkyhead, Bob-the-Kuhn, et.al.
27
+ */
27 28
 
28 29
 /**
29 30
  * Description: Fast IO functions LPC1768
@@ -57,9 +58,12 @@ bool useable_hardware_PWM(uint8_t pin);
57 58
 #define WRITE_PIN(IO, v)        ((v) ? WRITE_PIN_SET(IO) : WRITE_PIN_CLR(IO))
58 59
 
59 60
 /**
60
-  magic I/O routines
61
-  now you can simply SET_OUTPUT(STEP); WRITE(STEP, 1); WRITE(STEP, 0);
62
-*/
61
+ * Magic I/O routines
62
+ *
63
+ * Now you can simply SET_OUTPUT(STEP); WRITE(STEP, HIGH); WRITE(STEP, LOW);
64
+ *
65
+ * Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
66
+ */
63 67
 
64 68
 /// Read a pin
65 69
 #define _READ(IO) READ_PIN(IO)
@@ -89,8 +93,6 @@ bool useable_hardware_PWM(uint8_t pin);
89 93
 /// check if pin is an timer
90 94
 #define _GET_TIMER(IO)
91 95
 
92
-//  why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
93
-
94 96
 /// Read a pin wrapper
95 97
 #define READ(IO)  _READ(IO)
96 98
 

+ 31
- 32
Marlin/src/HAL/HAL_LPC1768/include/Wire.h Переглянути файл

@@ -1,23 +1,23 @@
1 1
 /*
2
-  TwoWire.h - TWI/I2C library for Arduino & Wiring
3
-  Copyright (c) 2006 Nicholas Zambetti.  All right reserved.
4
-
5
-  This library is free software; you can redistribute it and/or
6
-  modify it under the terms of the GNU Lesser General Public
7
-  License as published by the Free Software Foundation; either
8
-  version 2.1 of the License, or (at your option) any later version.
9
-
10
-  This library is distributed in the hope that it will be useful,
11
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
-  Lesser General Public License for more details.
14
-
15
-  You should have received a copy of the GNU Lesser General Public
16
-  License along with this library; if not, write to the Free Software
17
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
-
19
-  Modified 2012 by Todd Krein (todd@krein.org) to implement repeated starts
20
-*/
2
+ * TwoWire.h - TWI/I2C library for Arduino & Wiring
3
+ * Copyright (c) 2006 Nicholas Zambetti.  All right reserved.
4
+ *
5
+ * This library is free software; you can redistribute it and/or
6
+ * modify it under the terms of the GNU Lesser General Public
7
+ * License as published by the Free Software Foundation; either
8
+ * version 2.1 of the License, or (at your option) any later version.
9
+ *
10
+ * This library is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
+ * Lesser General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Lesser General Public
16
+ * License along with this library; if not, write to the Free Software
17
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
+ *
19
+ * Modified 2012 by Todd Krein (todd@krein.org) to implement repeated starts
20
+ */
21 21
 
22 22
 // Modified for use with the mcp4451 digipot routine
23 23
 
@@ -28,31 +28,30 @@
28 28
 
29 29
 #include <inttypes.h>
30 30
 
31
-class TwoWire
32
-{
33
-
31
+class TwoWire {
34 32
   public:
35
-//    TwoWire();
33
+    //TwoWire();
36 34
     void begin();
37 35
     void beginTransmission(uint8_t);
38 36
     uint8_t endTransmission(void);
39 37
     size_t write(uint8_t);
40 38
 };
41 39
 
42
-//extern TwoWire Wire;//
40
+//extern TwoWire Wire;
43 41
 
44 42
 TwoWire Wire;
45 43
 
46
-  ////////////////////////////////////////////////////////////////////////////////////////
47
-  extern "C" uint8_t digipot_mcp4451_start(uint8_t sla);
48
-  extern "C" void digipot_mcp4451_init(void);
49
-  extern "C" uint8_t digipot_mcp4451_send_byte(uint8_t data);
44
+////////////////////////////////////////////////////////////////////////////////////////
45
+
46
+extern "C" uint8_t digipot_mcp4451_start(uint8_t sla);
47
+extern "C" void digipot_mcp4451_init(void);
48
+extern "C" uint8_t digipot_mcp4451_send_byte(uint8_t data);
50 49
 
51 50
 
52
-  void TwoWire::beginTransmission(uint8_t sla) { digipot_mcp4451_start(sla);}
53
-  void TwoWire::begin(void) {digipot_mcp4451_init();}
54
-  size_t TwoWire::write(uint8_t data) {return digipot_mcp4451_send_byte(data);}
55
-  uint8_t TwoWire::endTransmission(void) {return 1;}
51
+void TwoWire::beginTransmission(uint8_t sla) { digipot_mcp4451_start(sla);}
52
+void TwoWire::begin(void) {digipot_mcp4451_init();}
53
+size_t TwoWire::write(uint8_t data) {return digipot_mcp4451_send_byte(data);}
54
+uint8_t TwoWire::endTransmission(void) {return 1;}
56 55
 
57 56
 #endif
58 57
 #endif  // TARGET_LPC1768

+ 130
- 139
Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.c Переглянути файл

@@ -1,171 +1,162 @@
1 1
 /**
2
-  * Marlin 3D Printer Firmware
3
-  * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
-  *
5
-  * Based on Sprinter and grbl.
6
-  * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
-  *
8
-  * This program is free software: you can redistribute it and/or modify
9
-  * it under the terms of the GNU General Public License as published by
10
-  * the Free Software Foundation, either version 3 of the License, or
11
-  * (at your option) any later version.
12
-  *
13
-  * This program is distributed in the hope that it will be useful,
14
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
-  * GNU General Public License for more details.
17
-  *
18
-  * You should have received a copy of the GNU General Public License
19
-  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
-  *
21
-*/
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22 22
 
23 23
 // adapted from  I2C/master/master.c example
24 24
 //   https://www-users.cs.york.ac.uk/~pcc/MCP/HAPR-Course-web/CMSIS/examples/html/master_8c_source.html
25 25
 
26
-
27
-
28 26
 #ifdef TARGET_LPC1768
29 27
 
30
-  #ifdef __cplusplus
31
-    extern "C" {
32
-  #endif
28
+#ifdef __cplusplus
29
+  extern "C" {
30
+#endif
31
+
32
+#include <lpc17xx_i2c.h>
33
+#include <lpc17xx_pinsel.h>
34
+#include <lpc17xx_libcfg_default.h>
33 35
 
34
-  #include <lpc17xx_i2c.h>
35
-  #include <lpc17xx_pinsel.h>
36
-  #include <lpc17xx_libcfg_default.h>
36
+//////////////////////////////////////////////////////////////////////////////////////
37 37
 
38
-  //////////////////////////////////////////////////////////////////////////////////////
38
+// These two routines are exact copies of the lpc17xx_i2c.c routines.  Couldn't link to
39
+// to the lpc17xx_i2c.c routines so had to copy them into this file & rename them.
39 40
 
40
-  // These two routines are exact copies of the lpc17xx_i2c.c routines.  Couldn't link to
41
-  // to the lpc17xx_i2c.c routines so had to copy them into this file & rename them.
41
+static uint32_t _I2C_Start (LPC_I2C_TypeDef *I2Cx) {
42
+  // Reset STA, STO, SI
43
+  I2Cx->I2CONCLR = I2C_I2CONCLR_SIC|I2C_I2CONCLR_STOC|I2C_I2CONCLR_STAC;
42 44
 
43
-  static uint32_t _I2C_Start (LPC_I2C_TypeDef *I2Cx)
44
-  {
45
-    // Reset STA, STO, SI
46
-    I2Cx->I2CONCLR = I2C_I2CONCLR_SIC|I2C_I2CONCLR_STOC|I2C_I2CONCLR_STAC;
45
+  // Enter to Master Transmitter mode
46
+  I2Cx->I2CONSET = I2C_I2CONSET_STA;
47 47
 
48
-    // Enter to Master Transmitter mode
49
-    I2Cx->I2CONSET = I2C_I2CONSET_STA;
48
+  // Wait for complete
49
+  while (!(I2Cx->I2CONSET & I2C_I2CONSET_SI));
50
+  I2Cx->I2CONCLR = I2C_I2CONCLR_STAC;
51
+  return (I2Cx->I2STAT & I2C_STAT_CODE_BITMASK);
52
+}
50 53
 
51
-    // Wait for complete
52
-    while (!(I2Cx->I2CONSET & I2C_I2CONSET_SI));
54
+static void _I2C_Stop (LPC_I2C_TypeDef *I2Cx) {
55
+  /* Make sure start bit is not active */
56
+  if (I2Cx->I2CONSET & I2C_I2CONSET_STA)
53 57
     I2Cx->I2CONCLR = I2C_I2CONCLR_STAC;
54
-    return (I2Cx->I2STAT & I2C_STAT_CODE_BITMASK);
55
-  }
56 58
 
57
-  static void _I2C_Stop (LPC_I2C_TypeDef *I2Cx)
58
-  {
59
+  I2Cx->I2CONSET = I2C_I2CONSET_STO|I2C_I2CONSET_AA;
60
+  I2Cx->I2CONCLR = I2C_I2CONCLR_SIC;
61
+}
59 62
 
60
-    /* Make sure start bit is not active */
61
-    if (I2Cx->I2CONSET & I2C_I2CONSET_STA)
62
-    {
63
-      I2Cx->I2CONCLR = I2C_I2CONCLR_STAC;
64
-    }
65 63
 
66
-    I2Cx->I2CONSET = I2C_I2CONSET_STO|I2C_I2CONSET_AA;
64
+//////////////////////////////////////////////////////////////////////////////////////
67 65
 
68
-    I2Cx->I2CONCLR = I2C_I2CONCLR_SIC;
69
-  }
70 66
 
67
+#define USEDI2CDEV_M  1  // use I2C1 controller
71 68
 
72
-  //////////////////////////////////////////////////////////////////////////////////////
69
+#if (USEDI2CDEV_M == 0)
70
+  #define I2CDEV_M LPC_I2C0
71
+#elif (USEDI2CDEV_M == 1)
72
+  #define I2CDEV_M LPC_I2C1
73
+#elif (USEDI2CDEV_M == 2)
74
+  #define I2CDEV_M LPC_I2C2
75
+#else
76
+  #error "Master I2C device not defined!"
77
+#endif
73 78
 
74 79
 
75
-  #define USEDI2CDEV_M  1  // use I2C1 controller
80
+PINSEL_CFG_Type PinCfg;
81
+I2C_M_SETUP_Type transferMCfg;
76 82
 
77
-  #if (USEDI2CDEV_M == 0)
78
-    #define I2CDEV_M LPC_I2C0
79
-  #elif (USEDI2CDEV_M == 1)
80
-    #define I2CDEV_M LPC_I2C1
81
-  #elif (USEDI2CDEV_M == 2)
82
-    #define I2CDEV_M LPC_I2C2
83
-  #else
84
-    #error "Master I2C device not defined!"
85
-  #endif
83
+#define I2C_status (LPC_I2C1->I2STAT & I2C_STAT_CODE_BITMASK)
86 84
 
87 85
 
88
-  PINSEL_CFG_Type PinCfg;
89
-  I2C_M_SETUP_Type transferMCfg;
90
-
91
-  #define I2C_status (LPC_I2C1->I2STAT & I2C_STAT_CODE_BITMASK)
92
-
93
-
94
-  uint8_t digipot_mcp4451_start(uint8_t sla) {  // send slave address and write bit
95
-    // Sometimes TX data ACK or NAK status is returned.  That mean the start state didn't
96
-    // happen which means only the value of the slave address was send.  Keep looping until
97
-    // the slave address and write bit are actually sent.
98
-    do{
99
-      _I2C_Stop(I2CDEV_M); // output stop state on I2C bus
100
-      _I2C_Start(I2CDEV_M); // output start state on I2C bus
101
-      while ((I2C_status != I2C_I2STAT_M_TX_START)
102
-          && (I2C_status != I2C_I2STAT_M_TX_RESTART)
103
-          && (I2C_status != I2C_I2STAT_M_TX_DAT_ACK)
104
-          && (I2C_status != I2C_I2STAT_M_TX_DAT_NACK));  //wait for start to be asserted
105
-
106
-      LPC_I2C1->I2CONCLR = I2C_I2CONCLR_STAC; // clear start state before tansmitting slave address
107
-      LPC_I2C1->I2DAT = (sla <<1) & I2C_I2DAT_BITMASK; // transmit slave address & write bit
108
-      LPC_I2C1->I2CONSET = I2C_I2CONSET_AA;
109
-      LPC_I2C1->I2CONCLR = I2C_I2CONCLR_SIC;
110
-      while ((I2C_status != I2C_I2STAT_M_TX_SLAW_ACK)
111
-          && (I2C_status != I2C_I2STAT_M_TX_SLAW_NACK)
112
-          && (I2C_status != I2C_I2STAT_M_TX_DAT_ACK)
113
-          && (I2C_status != I2C_I2STAT_M_TX_DAT_NACK));  //wait for slaw to finish
114
-    }while ( (I2C_status == I2C_I2STAT_M_TX_DAT_ACK) ||  (I2C_status == I2C_I2STAT_M_TX_DAT_NACK));
115
-    return 1;
116
-  }
86
+uint8_t digipot_mcp4451_start(uint8_t sla) {  // send slave address and write bit
87
+  // Sometimes TX data ACK or NAK status is returned.  That mean the start state didn't
88
+  // happen which means only the value of the slave address was send.  Keep looping until
89
+  // the slave address and write bit are actually sent.
90
+  do{
91
+    _I2C_Stop(I2CDEV_M); // output stop state on I2C bus
92
+    _I2C_Start(I2CDEV_M); // output start state on I2C bus
93
+    while ((I2C_status != I2C_I2STAT_M_TX_START)
94
+        && (I2C_status != I2C_I2STAT_M_TX_RESTART)
95
+        && (I2C_status != I2C_I2STAT_M_TX_DAT_ACK)
96
+        && (I2C_status != I2C_I2STAT_M_TX_DAT_NACK));  //wait for start to be asserted
117 97
 
98
+    LPC_I2C1->I2CONCLR = I2C_I2CONCLR_STAC; // clear start state before tansmitting slave address
99
+    LPC_I2C1->I2DAT = (sla <<1) & I2C_I2DAT_BITMASK; // transmit slave address & write bit
100
+    LPC_I2C1->I2CONSET = I2C_I2CONSET_AA;
101
+    LPC_I2C1->I2CONCLR = I2C_I2CONCLR_SIC;
102
+    while ((I2C_status != I2C_I2STAT_M_TX_SLAW_ACK)
103
+        && (I2C_status != I2C_I2STAT_M_TX_SLAW_NACK)
104
+        && (I2C_status != I2C_I2STAT_M_TX_DAT_ACK)
105
+        && (I2C_status != I2C_I2STAT_M_TX_DAT_NACK));  //wait for slaw to finish
106
+  }while ( (I2C_status == I2C_I2STAT_M_TX_DAT_ACK) ||  (I2C_status == I2C_I2STAT_M_TX_DAT_NACK));
107
+  return 1;
108
+}
109
+
110
+
111
+void digipot_mcp4451_init(void) {
112
+
113
+  /**
114
+   * Init I2C pin connect
115
+   */
116
+  PinCfg.OpenDrain = 0;
117
+  PinCfg.Pinmode = 0;
118
+  #if ((USEDI2CDEV_M == 0))
119
+    PinCfg.Funcnum = 1;
120
+    PinCfg.Pinnum = 27;
121
+    PinCfg.Portnum = 0;
122
+    PINSEL_ConfigPin(&PinCfg); // SDA0 / D57  AUX-1
123
+    PinCfg.Pinnum = 28;
124
+    PINSEL_ConfigPin(&PinCfg); // SCL0 / D58  AUX-1
125
+  #endif
126
+  #if ((USEDI2CDEV_M == 1))
127
+    PinCfg.Funcnum = 3;
128
+    PinCfg.Pinnum = 0;
129
+    PinCfg.Portnum = 0;
130
+    PINSEL_ConfigPin(&PinCfg);  // SDA1 / D20 SCA
131
+    PinCfg.Pinnum = 1;
132
+    PINSEL_ConfigPin(&PinCfg);  // SCL1 / D21 SCL
133
+  #endif
134
+  #if ((USEDI2CDEV_M == 2))
135
+    PinCfg.Funcnum = 2;
136
+    PinCfg.Pinnum = 10;
137
+    PinCfg.Portnum = 0;
138
+    PINSEL_ConfigPin(&PinCfg); // SDA2 / D38  X_ENABLE_PIN
139
+    PinCfg.Pinnum = 11;
140
+    PINSEL_ConfigPin(&PinCfg); // SCL2 / D55  X_DIR_PIN
141
+  #endif
142
+  // Initialize I2C peripheral
143
+  I2C_Init(I2CDEV_M, 400000);  // hardwired to 400KHz bit rate, 100KHz is the other option
118 144
 
119
-  void digipot_mcp4451_init(void) {
120
-
121
-    /*
122
-      * Init I2C pin connect
123
-    */
124
-    PinCfg.OpenDrain = 0;
125
-    PinCfg.Pinmode = 0;
126
-    #if ((USEDI2CDEV_M == 0))
127
-      PinCfg.Funcnum = 1;
128
-      PinCfg.Pinnum = 27;
129
-      PinCfg.Portnum = 0;
130
-      PINSEL_ConfigPin(&PinCfg); // SDA0 / D57  AUX-1
131
-      PinCfg.Pinnum = 28;
132
-      PINSEL_ConfigPin(&PinCfg); // SCL0 / D58  AUX-1
133
-    #endif
134
-    #if ((USEDI2CDEV_M == 1))
135
-      PinCfg.Funcnum = 3;
136
-      PinCfg.Pinnum = 0;
137
-      PinCfg.Portnum = 0;
138
-      PINSEL_ConfigPin(&PinCfg);  // SDA1 / D20 SCA
139
-      PinCfg.Pinnum = 1;
140
-      PINSEL_ConfigPin(&PinCfg);  // SCL1 / D21 SCL
141
-    #endif
142
-    #if ((USEDI2CDEV_M == 2))
143
-      PinCfg.Funcnum = 2;
144
-      PinCfg.Pinnum = 10;
145
-      PinCfg.Portnum = 0;
146
-      PINSEL_ConfigPin(&PinCfg); // SDA2 / D38  X_ENABLE_PIN
147
-      PinCfg.Pinnum = 11;
148
-      PINSEL_ConfigPin(&PinCfg); // SCL2 / D55  X_DIR_PIN
149
-    #endif
150
-    // Initialize I2C peripheral
151
-    I2C_Init(I2CDEV_M, 400000);  // hardwired to 400KHz bit rate, 100KHz is the other option
152
-
153
-    /* Enable Master I2C operation */
154
-    I2C_Cmd(I2CDEV_M, I2C_MASTER_MODE, ENABLE);
155
-  }
145
+  /* Enable Master I2C operation */
146
+  I2C_Cmd(I2CDEV_M, I2C_MASTER_MODE, ENABLE);
147
+}
156 148
 
157 149
 
158
-  uint8_t digipot_mcp4451_send_byte(uint8_t data) {
150
+uint8_t digipot_mcp4451_send_byte(uint8_t data) {
151
+  LPC_I2C1->I2DAT = data & I2C_I2DAT_BITMASK; // transmit data
152
+  LPC_I2C1->I2CONSET = I2C_I2CONSET_AA;
153
+  LPC_I2C1->I2CONCLR = I2C_I2CONCLR_SIC;
154
+  while ((I2C_status != I2C_I2STAT_M_TX_DAT_ACK) && (I2C_status != I2C_I2STAT_M_TX_DAT_NACK));  // wait for xmit to finish
155
+  return 1;
156
+}
159 157
 
160
-    LPC_I2C1->I2DAT = data & I2C_I2DAT_BITMASK; // transmit data
161
-    LPC_I2C1->I2CONSET = I2C_I2CONSET_AA;
162
-    LPC_I2C1->I2CONCLR = I2C_I2CONCLR_SIC;
163
-    while ((I2C_status != I2C_I2STAT_M_TX_DAT_ACK) && (I2C_status != I2C_I2STAT_M_TX_DAT_NACK));  // wait for xmit to finish
164
-    return 1;
158
+#ifdef __cplusplus
165 159
   }
166
-
167
-
168
-  #ifdef __cplusplus
169
-    }
170
-  #endif
171 160
 #endif
161
+
162
+#endif // TARGET_LPC1768

+ 2
- 2
Marlin/src/HAL/HAL_LPC1768/main.cpp Переглянути файл

@@ -79,8 +79,8 @@ int main(void) {
79 79
   USB_Init();                               // USB Initialization
80 80
   USB_Connect(TRUE);                        // USB Connect
81 81
 
82
-  volatile uint32_t usb_timeout = millis() + 2000;
83
-  while (!USB_Configuration && millis() < usb_timeout) {
82
+  const uint32_t usb_timeout = millis() + 2000;
83
+  while (!USB_Configuration && PENDING(millis(), usb_timeout)) {
84 84
     delay(50);
85 85
 
86 86
     #if PIN_EXISTS(LED)

+ 2
- 2
Marlin/src/HAL/HAL_LPC1768/pinsDebug_LPC1768.h Переглянути файл

@@ -22,10 +22,10 @@
22 22
 
23 23
 /**
24 24
  * Support routines for LPC1768
25
-*/
25
+ */
26 26
 
27 27
 /**
28
- * translation of routines & variables used by pinsDebug.h
28
+ * Translation of routines & variables used by pinsDebug.h
29 29
  */
30 30
 
31 31
 #define pwm_details(pin) pin = pin    // do nothing  // print PWM details

+ 17
- 18
Marlin/src/HAL/HAL_LPC1768/servo_private.h Переглянути файл

@@ -21,23 +21,23 @@
21 21
  */
22 22
 
23 23
 /**
24
-  servo.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
25
-  Copyright (c) 2009 Michael Margolis.  All right reserved.
26
-
27
-  This library is free software; you can redistribute it and/or
28
-  modify it under the terms of the GNU Lesser General Public
29
-  License as published by the Free Software Foundation; either
30
-  version 2.1 of the License, or (at your option) any later version.
31
-
32
-  This library is distributed in the hope that it will be useful,
33
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
34
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35
-  Lesser General Public License for more details.
36
-
37
-  You should have received a copy of the GNU Lesser General Public
38
-  License along with this library; if not, write to the Free Software
39
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
40
-*/
24
+ * servo.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
25
+ * Copyright (c) 2009 Michael Margolis.  All right reserved.
26
+ *
27
+ * This library is free software; you can redistribute it and/or
28
+ * modify it under the terms of the GNU Lesser General Public
29
+ * License as published by the Free Software Foundation; either
30
+ * version 2.1 of the License, or (at your option) any later version.
31
+ *
32
+ * This library is distributed in the hope that it will be useful,
33
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
34
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35
+ * Lesser General Public License for more details.
36
+ *
37
+ * You should have received a copy of the GNU Lesser General Public
38
+ * License along with this library; if not, write to the Free Software
39
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
40
+ */
41 41
 
42 42
 /**
43 43
  * Based on "servo.h - Interrupt driven Servo library for Arduino using 16 bit timers -
@@ -47,7 +47,6 @@
47 47
  *
48 48
  */
49 49
 
50
-
51 50
 #ifndef SERVO_PRIVATE_H
52 51
 #define SERVO_PRIVATE_H
53 52
 

+ 9
- 9
Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.cpp Переглянути файл

@@ -59,15 +59,15 @@
59 59
 // --------------------------------------------------------------------------
60 60
 /* VGPV
61 61
 const tTimerConfig TimerConfig [NUM_HARDWARE_TIMERS] = {
62
-{ TC0, 0, TC0_IRQn, 0},  // 0 - [servo timer5]
63
-{ TC0, 1, TC1_IRQn, 0},  // 1
64
-{ TC0, 2, TC2_IRQn, 0},  // 2
65
-{ TC1, 0, TC3_IRQn, 2},  // 3 - stepper
66
-{ TC1, 1, TC4_IRQn, 15}, // 4 - temperature
67
-{ TC1, 2, TC5_IRQn, 0},  // 5 - [servo timer3]
68
-{ TC2, 0, TC6_IRQn, 0},  // 6
69
-{ TC2, 1, TC7_IRQn, 0},  // 7
70
-{ TC2, 2, TC8_IRQn, 0},  // 8
62
+  { TC0, 0, TC0_IRQn, 0},  // 0 - [servo timer5]
63
+  { TC0, 1, TC1_IRQn, 0},  // 1
64
+  { TC0, 2, TC2_IRQn, 0},  // 2
65
+  { TC1, 0, TC3_IRQn, 2},  // 3 - stepper
66
+  { TC1, 1, TC4_IRQn, 15}, // 4 - temperature
67
+  { TC1, 2, TC5_IRQn, 0},  // 5 - [servo timer3]
68
+  { TC2, 0, TC6_IRQn, 0},  // 6
69
+  { TC2, 1, TC7_IRQn, 0},  // 7
70
+  { TC2, 2, TC8_IRQn, 0},  // 8
71 71
 };
72 72
 */
73 73
 // --------------------------------------------------------------------------

+ 17
- 17
Marlin/src/HAL/HAL_STM32F1/spi_pins.h Переглянути файл

@@ -1,21 +1,21 @@
1 1
 /**
2
-* Marlin 3D Printer Firmware
3
-* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
-*
5
-* This program is free software: you can redistribute it and/or modify
6
-* it under the terms of the GNU General Public License as published by
7
-* the Free Software Foundation, either version 3 of the License, or
8
-* (at your option) any later version.
9
-*
10
-* This program is distributed in the hope that it will be useful,
11
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
-* GNU General Public License for more details.
14
-*
15
-* You should have received a copy of the GNU General Public License
16
-* along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
-*
18
-*/
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
+ *
18
+ */
19 19
 
20 20
 /**
21 21
  * HAL for stm32duino.com based on Libmaple and compatible (STM32F1)

+ 20
- 20
Marlin/src/HAL/HAL_STM32F1/watchdog_Stm32f1.cpp Переглянути файл

@@ -1,24 +1,24 @@
1 1
 /**
2
-* Marlin 3D Printer Firmware
3
-* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
-*
5
-* Based on Sprinter and grbl.
6
-* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
-*
8
-* This program is free software: you can redistribute it and/or modify
9
-* it under the terms of the GNU General Public License as published by
10
-* the Free Software Foundation, either version 3 of the License, or
11
-* (at your option) any later version.
12
-*
13
-* This program is distributed in the hope that it will be useful,
14
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
-* GNU General Public License for more details.
17
-*
18
-* You should have received a copy of the GNU General Public License
19
-* along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
-*
21
-*/
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22 22
 
23 23
 /**
24 24
  * HAL for stm32duino.com based on Libmaple and compatible (STM32F1)

+ 21
- 21
Marlin/src/HAL/HAL_STM32F1/watchdog_Stm32f1.h Переглянути файл

@@ -1,24 +1,24 @@
1 1
 /**
2
-* Marlin 3D Printer Firmware
3
-* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
-*
5
-* Based on Sprinter and grbl.
6
-* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
-*
8
-* This program is free software: you can redistribute it and/or modify
9
-* it under the terms of the GNU General Public License as published by
10
-* the Free Software Foundation, either version 3 of the License, or
11
-* (at your option) any later version.
12
-*
13
-* This program is distributed in the hope that it will be useful,
14
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
-* GNU General Public License for more details.
17
-*
18
-* You should have received a copy of the GNU General Public License
19
-* along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
-*
21
-*/
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22 22
 
23 23
 /**
24 24
  * HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
@@ -26,12 +26,12 @@
26 26
 
27 27
 #ifndef WATCHDOG_STM32F1_H
28 28
 #define WATCHDOG_STM32F1_H
29
+
29 30
 #include <libmaple/iwdg.h>
30 31
 
31 32
 #include "../../../src/inc/MarlinConfig.h"
32 33
 #define STM32F1_WD_RELOAD 625
33 34
 
34
-
35 35
 // Arduino STM32F1 core now has watchdog support
36 36
 
37 37
 // Initialize watchdog with a 4 second countdown time

+ 1
- 1
Marlin/src/HAL/HAL_TEENSY35_36/fastio_Teensy.h Переглянути файл

@@ -23,7 +23,7 @@
23 23
 /**
24 24
  * Fast I/O Routines for Teensy 3.5 and Teensy 3.6
25 25
  * Use direct port manipulation to save scads of processor time.
26
- * Contributed by Triffid_Hunter. Modified by Kliment and the Marlin team.
26
+ * Contributed by Triffid_Hunter and modified by Kliment, thinkyhead, Bob-the-Kuhn, et.al.
27 27
  */
28 28
 
29 29
 #ifndef _FASTIO_TEENSY_H

+ 41
- 41
Marlin/src/HAL/servo.h Переглянути файл

@@ -21,49 +21,49 @@
21 21
  */
22 22
 
23 23
 /**
24
-  servo.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
25
-  Copyright (c) 2009 Michael Margolis.  All right reserved.
26
-
27
-  This library is free software; you can redistribute it and/or
28
-  modify it under the terms of the GNU Lesser General Public
29
-  License as published by the Free Software Foundation; either
30
-  version 2.1 of the License, or (at your option) any later version.
31
-
32
-  This library is distributed in the hope that it will be useful,
33
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
34
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35
-  Lesser General Public License for more details.
36
-
37
-  You should have received a copy of the GNU Lesser General Public
38
-  License along with this library; if not, write to the Free Software
39
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
40
-*/
24
+ * servo.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
25
+ * Copyright (c) 2009 Michael Margolis.  All right reserved.
26
+ *
27
+ * This library is free software; you can redistribute it and/or
28
+ * modify it under the terms of the GNU Lesser General Public
29
+ * License as published by the Free Software Foundation; either
30
+ * version 2.1 of the License, or (at your option) any later version.
31
+ *
32
+ * This library is distributed in the hope that it will be useful,
33
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
34
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35
+ * Lesser General Public License for more details.
36
+ *
37
+ * You should have received a copy of the GNU Lesser General Public
38
+ * License along with this library; if not, write to the Free Software
39
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
40
+ */
41 41
 
42 42
 /**
43
-
44
-  A servo is activated by creating an instance of the Servo class passing the desired pin to the attach() method.
45
-  The servos are pulsed in the background using the value most recently written using the write() method
46
-
47
-  Note that analogWrite of PWM on pins associated with the timer are disabled when the first servo is attached.
48
-  Timers are seized as needed in groups of 12 servos - 24 servos use two timers, 48 servos will use four.
49
-  The sequence used to seize timers is defined in timers.h
50
-
51
-  The methods are:
52
-
53
-   Servo - Class for manipulating servo motors connected to Arduino pins.
54
-
55
-   attach(pin )  - Attaches a servo motor to an i/o pin.
56
-   attach(pin, min, max  ) - Attaches to a pin setting min and max values in microseconds
57
-   default min is 544, max is 2400
58
-
59
-   write()     - Sets the servo angle in degrees.  (invalid angle that is valid as pulse in microseconds is treated as microseconds)
60
-   writeMicroseconds() - Sets the servo pulse width in microseconds
61
-   read()      - Gets the last written servo pulse width as an angle between 0 and 180.
62
-   readMicroseconds() - Gets the last written servo pulse width in microseconds. (was read_us() in first release)
63
-   attached()  - Returns true if there is a servo attached.
64
-   detach()    - Stops an attached servos from pulsing its i/o pin.
65
-   move(angle) - Sequence of attach(0), write(angle),
66
-                   With DEACTIVATE_SERVOS_AFTER_MOVE wait SERVO_DELAY and detach.
43
+ *
44
+ * A servo is activated by creating an instance of the Servo class passing the desired pin to the attach() method.
45
+ * The servos are pulsed in the background using the value most recently written using the write() method
46
+ *
47
+ * Note that analogWrite of PWM on pins associated with the timer are disabled when the first servo is attached.
48
+ * Timers are seized as needed in groups of 12 servos - 24 servos use two timers, 48 servos will use four.
49
+ * The sequence used to seize timers is defined in timers.h
50
+ *
51
+ * The methods are:
52
+ *
53
+ *  Servo - Class for manipulating servo motors connected to Arduino pins.
54
+ *
55
+ *  attach(pin )  - Attaches a servo motor to an i/o pin.
56
+ *  attach(pin, min, max  ) - Attaches to a pin setting min and max values in microseconds
57
+ *  default min is 544, max is 2400
58
+ *
59
+ *  write()     - Sets the servo angle in degrees.  (invalid angle that is valid as pulse in microseconds is treated as microseconds)
60
+ *  writeMicroseconds() - Sets the servo pulse width in microseconds
61
+ *  read()      - Gets the last written servo pulse width as an angle between 0 and 180.
62
+ *  readMicroseconds() - Gets the last written servo pulse width in microseconds. (was read_us() in first release)
63
+ *  attached()  - Returns true if there is a servo attached.
64
+ *  detach()    - Stops an attached servos from pulsing its i/o pin.
65
+ *  move(angle) - Sequence of attach(0), write(angle),
66
+ *                   With DEACTIVATE_SERVOS_AFTER_MOVE wait SERVO_DELAY and detach.
67 67
  */
68 68
 
69 69
 #ifndef SERVO_H

+ 17
- 17
Marlin/src/HAL/servo_private.h Переглянути файл

@@ -21,23 +21,23 @@
21 21
  */
22 22
 
23 23
 /**
24
-  servo_private.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
25
-  Copyright (c) 2009 Michael Margolis.  All right reserved.
26
-
27
-  This library is free software; you can redistribute it and/or
28
-  modify it under the terms of the GNU Lesser General Public
29
-  License as published by the Free Software Foundation; either
30
-  version 2.1 of the License, or (at your option) any later version.
31
-
32
-  This library is distributed in the hope that it will be useful,
33
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
34
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35
-  Lesser General Public License for more details.
36
-
37
-  You should have received a copy of the GNU Lesser General Public
38
-  License along with this library; if not, write to the Free Software
39
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
40
-*/
24
+ * servo_private.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
25
+ * Copyright (c) 2009 Michael Margolis.  All right reserved.
26
+ *
27
+ * This library is free software; you can redistribute it and/or
28
+ * modify it under the terms of the GNU Lesser General Public
29
+ * License as published by the Free Software Foundation; either
30
+ * version 2.1 of the License, or (at your option) any later version.
31
+ *
32
+ * This library is distributed in the hope that it will be useful,
33
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
34
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35
+ * Lesser General Public License for more details.
36
+ *
37
+ * You should have received a copy of the GNU Lesser General Public
38
+ * License along with this library; if not, write to the Free Software
39
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
40
+ */
41 41
 
42 42
 #ifndef SERVO_PRIVATE_H
43 43
 #define SERVO_PRIVATE_H

+ 8
- 8
Marlin/src/feature/Max7219_Debug_LEDs.cpp Переглянути файл

@@ -263,14 +263,14 @@ void Max7219_init() {
263 263
 }
264 264
 
265 265
 /**
266
-* These are sample debug features to demonstrate the usage of the 8x8 LED Matrix for debug purposes.
267
-* There is very little CPU burden added to the system by displaying information within the idle()
268
-* task.
269
-*
270
-* But with that said, if your debugging can be facilitated by making calls into the library from
271
-* other places in the code, feel free to do it.  The CPU burden for a few calls to toggle an LED
272
-* or clear a row is not very significant.
273
-*/
266
+ * These are sample debug features to demonstrate the usage of the 8x8 LED Matrix for debug purposes.
267
+ * There is very little CPU burden added to the system by displaying information within the idle()
268
+ * task.
269
+ *
270
+ * But with that said, if your debugging can be facilitated by making calls into the library from
271
+ * other places in the code, feel free to do it.  The CPU burden for a few calls to toggle an LED
272
+ * or clear a row is not very significant.
273
+ */
274 274
 void Max7219_idle_tasks() {
275 275
 #if MAX7219_DEBUG_STEPPER_HEAD || MAX7219_DEBUG_STEPPER_TAIL || MAX7219_DEBUG_STEPPER_QUEUE
276 276
   CRITICAL_SECTION_START

+ 3
- 2
Marlin/src/feature/dac/dac_mcp4728.cpp Переглянути файл

@@ -100,17 +100,18 @@ uint8_t mcp4728_setGain_all(uint8_t value) {
100 100
  */
101 101
 uint16_t mcp4728_getValue(uint8_t channel) { return mcp4728_values[channel]; }
102 102
 
103
+#if 0
103 104
 /**
104 105
  * Steph: Might be useful in the future
105 106
  * Return Vout
106
- *
107
+ */
107 108
 uint16_t mcp4728_getVout(uint8_t channel) {
108 109
   uint32_t vref = 2048,
109 110
            vOut = (vref * mcp4728_values[channel] * (_DAC_STEPPER_GAIN + 1)) / 4096;
110 111
   if (vOut > defaultVDD) vOut = defaultVDD;
111 112
   return vOut;
112 113
 }
113
-*/
114
+#endif
114 115
 
115 116
 /**
116 117
  * Returns DAC values as a 0-100 percentage of drive strength

+ 19
- 19
Marlin/src/feature/dac/stepper_dac.cpp Переглянути файл

@@ -21,25 +21,25 @@
21 21
  */
22 22
 
23 23
 /**
24
-  stepper_dac.cpp - To set stepper current via DAC
25
-
26
-  Part of Marlin
27
-
28
-  Copyright (c) 2016 MarlinFirmware
29
-
30
-  Marlin is free software: you can redistribute it and/or modify
31
-  it under the terms of the GNU General Public License as published by
32
-  the Free Software Foundation, either version 3 of the License, or
33
-  (at your option) any later version.
34
-
35
-  Marlin is distributed in the hope that it will be useful,
36
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
37
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
38
-  GNU General Public License for more details.
39
-
40
-  You should have received a copy of the GNU General Public License
41
-  along with Marlin.  If not, see <http://www.gnu.org/licenses/>.
42
-*/
24
+ * stepper_dac.cpp - To set stepper current via DAC
25
+ *
26
+ * Part of Marlin
27
+ *
28
+ * Copyright (c) 2016 MarlinFirmware
29
+ *
30
+ * Marlin is free software: you can redistribute it and/or modify
31
+ * it under the terms of the GNU General Public License as published by
32
+ * the Free Software Foundation, either version 3 of the License, or
33
+ * (at your option) any later version.
34
+ *
35
+ * Marlin is distributed in the hope that it will be useful,
36
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
37
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
38
+ * GNU General Public License for more details.
39
+ *
40
+ * You should have received a copy of the GNU General Public License
41
+ * along with Marlin.  If not, see <http://www.gnu.org/licenses/>.
42
+ */
43 43
 
44 44
 #include "../../inc/MarlinConfig.h"
45 45
 

+ 19
- 19
Marlin/src/feature/dac/stepper_dac.h Переглянути файл

@@ -21,25 +21,25 @@
21 21
  */
22 22
 
23 23
 /**
24
-  stepper_dac.h   - To set stepper current via DAC
25
-
26
-  Part of Marlin
27
-
28
-  Copyright (c) 2016 MarlinFirmware
29
-
30
-  Marlin is free software: you can redistribute it and/or modify
31
-  it under the terms of the GNU General Public License as published by
32
-  the Free Software Foundation, either version 3 of the License, or
33
-  (at your option) any later version.
34
-
35
-  Marlin is distributed in the hope that it will be useful,
36
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
37
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
38
-  GNU General Public License for more details.
39
-
40
-  You should have received a copy of the GNU General Public License
41
-  along with Marlin.  If not, see <http://www.gnu.org/licenses/>.
42
-*/
24
+ * stepper_dac.h   - To set stepper current via DAC
25
+ *
26
+ * Part of Marlin
27
+ *
28
+ * Copyright (c) 2016 MarlinFirmware
29
+ *
30
+ * Marlin is free software: you can redistribute it and/or modify
31
+ * it under the terms of the GNU General Public License as published by
32
+ * the Free Software Foundation, either version 3 of the License, or
33
+ * (at your option) any later version.
34
+ *
35
+ * Marlin is distributed in the hope that it will be useful,
36
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
37
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
38
+ * GNU General Public License for more details.
39
+ *
40
+ * You should have received a copy of the GNU General Public License
41
+ * along with Marlin.  If not, see <http://www.gnu.org/licenses/>.
42
+ */
43 43
 
44 44
 #ifndef STEPPER_DAC_H
45 45
 #define STEPPER_DAC_H

+ 16
- 17
Marlin/src/gcode/feature/leds/M150.cpp Переглянути файл

@@ -28,23 +28,22 @@
28 28
 #include "../../../feature/leds/leds.h"
29 29
 
30 30
 /**
31
-* M150: Set Status LED Color - Use R-U-B-W for R-G-B-W
32
-*       and Brightness       - Use P (for NEOPIXEL only)
33
-*
34
-* Always sets all 3 or 4 components. If a component is left out, set to 0.
35
-*                                    If brightness is left out, no value changed
36
-*
37
-* Examples:
38
-*
39
-*   M150 R255       ; Turn LED red
40
-*   M150 R255 U127  ; Turn LED orange (PWM only)
41
-*   M150            ; Turn LED off
42
-*   M150 R U B      ; Turn LED white
43
-*   M150 W          ; Turn LED white using a white LED
44
-*   M150 P127       ; Set LED 50% brightness
45
-*   M150 P          ; Set LED full brightness
46
-*/
47
-
31
+ * M150: Set Status LED Color - Use R-U-B-W for R-G-B-W
32
+ *       and Brightness       - Use P (for NEOPIXEL only)
33
+ *
34
+ * Always sets all 3 or 4 components. If a component is left out, set to 0.
35
+ *                                    If brightness is left out, no value changed
36
+ *
37
+ * Examples:
38
+ *
39
+ *   M150 R255       ; Turn LED red
40
+ *   M150 R255 U127  ; Turn LED orange (PWM only)
41
+ *   M150            ; Turn LED off
42
+ *   M150 R U B      ; Turn LED white
43
+ *   M150 W          ; Turn LED white using a white LED
44
+ *   M150 P127       ; Set LED 50% brightness
45
+ *   M150 P          ; Set LED full brightness
46
+ */
48 47
 void GcodeSuite::M150() {
49 48
   set_led_color(
50 49
     parser.seen('R') ? (parser.has_value() ? parser.value_byte() : 255) : 0,

+ 17
- 17
Marlin/src/libs/vector_3.cpp Переглянути файл

@@ -21,23 +21,23 @@
21 21
  */
22 22
 
23 23
 /**
24
-  vector_3.cpp - Vector library for bed leveling
25
-  Copyright (c) 2012 Lars Brubaker.  All right reserved.
26
-
27
-  This library is free software; you can redistribute it and/or
28
-  modify it under the terms of the GNU Lesser General Public
29
-  License as published by the Free Software Foundation; either
30
-  version 2.1 of the License, or (at your option) any later version.
31
-
32
-  This library is distributed in the hope that it will be useful,
33
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
34
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35
-  Lesser General Public License for more details.
36
-
37
-  You should have received a copy of the GNU Lesser General Public
38
-  License along with this library; if not, write to the Free Software
39
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
40
-*/
24
+ * vector_3.cpp - Vector library for bed leveling
25
+ * Copyright (c) 2012 Lars Brubaker.  All right reserved.
26
+ *
27
+ * This library is free software; you can redistribute it and/or
28
+ * modify it under the terms of the GNU Lesser General Public
29
+ * License as published by the Free Software Foundation; either
30
+ * version 2.1 of the License, or (at your option) any later version.
31
+ *
32
+ * This library is distributed in the hope that it will be useful,
33
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
34
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35
+ * Lesser General Public License for more details.
36
+ *
37
+ * You should have received a copy of the GNU Lesser General Public
38
+ * License along with this library; if not, write to the Free Software
39
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
40
+ */
41 41
 
42 42
 #include "../inc/MarlinConfig.h"
43 43
 

+ 17
- 17
Marlin/src/libs/vector_3.h Переглянути файл

@@ -21,23 +21,23 @@
21 21
  */
22 22
 
23 23
 /**
24
-  vector_3.cpp - Vector library for bed leveling
25
-  Copyright (c) 2012 Lars Brubaker.  All right reserved.
26
-
27
-  This library is free software; you can redistribute it and/or
28
-  modify it under the terms of the GNU Lesser General Public
29
-  License as published by the Free Software Foundation; either
30
-  version 2.1 of the License, or (at your option) any later version.
31
-
32
-  This library is distributed in the hope that it will be useful,
33
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
34
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35
-  Lesser General Public License for more details.
36
-
37
-  You should have received a copy of the GNU Lesser General Public
38
-  License along with this library; if not, write to the Free Software
39
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
40
-*/
24
+ * vector_3.cpp - Vector library for bed leveling
25
+ * Copyright (c) 2012 Lars Brubaker.  All right reserved.
26
+ *
27
+ * This library is free software; you can redistribute it and/or
28
+ * modify it under the terms of the GNU Lesser General Public
29
+ * License as published by the Free Software Foundation; either
30
+ * version 2.1 of the License, or (at your option) any later version.
31
+ *
32
+ * This library is distributed in the hope that it will be useful,
33
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
34
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35
+ * Lesser General Public License for more details.
36
+ *
37
+ * You should have received a copy of the GNU Lesser General Public
38
+ * License along with this library; if not, write to the Free Software
39
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
40
+ */
41 41
 
42 42
 #ifndef VECTOR_3_H
43 43
 #define VECTOR_3_H

+ 1
- 2
Marlin/src/module/planner_bezier.cpp Переглянути файл

@@ -44,8 +44,7 @@
44 44
 #define MAX_STEP 0.1
45 45
 #define SIGMA 0.1
46 46
 
47
-/* Compute the linear interpolation between to real numbers.
48
-*/
47
+// Compute the linear interpolation between two real numbers.
49 48
 inline static float interp(float a, float b, float t) { return (1.0 - t) * a + t * b; }
50 49
 
51 50
 /**

+ 19
- 19
Marlin/src/module/stepper_indirection.h Переглянути файл

@@ -21,25 +21,25 @@
21 21
  */
22 22
 
23 23
 /**
24
-  stepper_indirection.h - stepper motor driver indirection macros
25
-  to allow some stepper functions to be done via SPI/I2c instead of direct pin manipulation
26
-  Part of Marlin
27
-
28
-  Copyright (c) 2015 Dominik Wenger
29
-
30
-  Marlin is free software: you can redistribute it and/or modify
31
-  it under the terms of the GNU General Public License as published by
32
-  the Free Software Foundation, either version 3 of the License, or
33
-  (at your option) any later version.
34
-
35
-  Marlin is distributed in the hope that it will be useful,
36
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
37
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
38
-  GNU General Public License for more details.
39
-
40
-  You should have received a copy of the GNU General Public License
41
-  along with Marlin.  If not, see <http://www.gnu.org/licenses/>.
42
-*/
24
+ * stepper_indirection.h - stepper motor driver indirection macros
25
+ * to allow some stepper functions to be done via SPI/I2c instead of direct pin manipulation
26
+ * Part of Marlin
27
+ *
28
+ * Copyright (c) 2015 Dominik Wenger
29
+ *
30
+ * Marlin is free software: you can redistribute it and/or modify
31
+ * it under the terms of the GNU General Public License as published by
32
+ * the Free Software Foundation, either version 3 of the License, or
33
+ * at your option) any later version.
34
+ *
35
+ * Marlin is distributed in the hope that it will be useful,
36
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
37
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
38
+ * GNU General Public License for more details.
39
+ *
40
+ * You should have received a copy of the GNU General Public License
41
+ * along with Marlin.  If not, see <http://www.gnu.org/licenses/>.
42
+ */
43 43
 
44 44
 #ifndef STEPPER_INDIRECTION_H
45 45
 #define STEPPER_INDIRECTION_H

+ 1
- 1
Marlin/src/pins/pins_ANET_10.h Переглянути файл

@@ -86,7 +86,7 @@
86 86
  *   Anet Users / Skynet SW on Facebook - https://www.facebook.com/skynet3ddevelopment/
87 87
  *
88 88
  *   Many thanks to Hans Raaf (@oderwat) for developing the Anet-specific software and supporting the Anet community.
89
-*/
89
+ */
90 90
 
91 91
 #ifndef __AVR_ATmega1284P__
92 92
   #error "Oops!  Make sure you have 'Anet V1.0', 'Anet V1.0 (Optiboot)' or 'Sanguino' selected from the 'Tools -> Boards' menu."

Завантаження…
Відмінити
Зберегти