Scott Lahteine 7 лет назад
Родитель
Сommit
1c41de16d4
30 измененных файлов: 68 добавлений и 71 удалений
  1. 6
    7
      Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp
  2. 5
    6
      Marlin/src/HAL/HAL_DUE/HAL_spi_Due.cpp
  3. 2
    2
      Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp
  4. 2
    2
      Marlin/src/HAL/HAL_DUE/usb/compiler.h
  5. 8
    8
      Marlin/src/HAL/HAL_DUE/usb/conf_access.h
  6. 1
    1
      Marlin/src/HAL/HAL_DUE/usb/osc.h
  7. 2
    2
      Marlin/src/HAL/HAL_DUE/usb/pll.h
  8. 1
    1
      Marlin/src/HAL/HAL_DUE/usb/sd_mmc_spi_mem.h
  9. 1
    1
      Marlin/src/HAL/HAL_DUE/usb/sysclk.c
  10. 1
    1
      Marlin/src/HAL/HAL_DUE/usb/udc.c
  11. 3
    3
      Marlin/src/HAL/HAL_DUE/usb/udc.h
  12. 3
    3
      Marlin/src/HAL/HAL_DUE/usb/udi_cdc.c
  13. 2
    2
      Marlin/src/HAL/HAL_DUE/usb/udi_composite_desc.c
  14. 2
    2
      Marlin/src/HAL/HAL_DUE/usb/udi_msc.c
  15. 6
    6
      Marlin/src/HAL/HAL_DUE/usb/udi_msc.h
  16. 1
    1
      Marlin/src/HAL/HAL_DUE/usb/uotghs_device_due.c
  17. 4
    4
      Marlin/src/HAL/HAL_DUE/usb/uotghs_otg.h
  18. 3
    3
      Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp
  19. 1
    1
      Marlin/src/HAL/HAL_LPC1768/HAL_timers.h
  20. 1
    1
      Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.cpp
  21. 1
    1
      Marlin/src/HAL/HAL_LPC1768/arduino.cpp
  22. 1
    1
      Marlin/src/HAL/HAL_LPC1768/pinmapping.h
  23. 2
    2
      Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp
  24. 3
    4
      Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp
  25. 1
    1
      Marlin/src/gcode/config/M43.cpp
  26. 1
    1
      Marlin/src/inc/Conditionals_LCD.h
  27. 1
    1
      Marlin/src/lcd/ultralcd_impl_DOGM.h
  28. 1
    1
      Marlin/src/module/configuration_store.cpp
  29. 1
    1
      Marlin/src/pins/pins_CHEAPTRONICv2.h
  30. 1
    1
      Marlin/src/pins/pins_MKS_BASE.h

+ 6
- 7
Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp Просмотреть файл

95
     SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X);
95
     SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X);
96
   }
96
   }
97
 
97
 
98
- 
99
-    //------------------------------------------------------------------------------
98
+  //------------------------------------------------------------------------------
100
   /** SPI receive a byte */
99
   /** SPI receive a byte */
101
   uint8_t spiRec(void) {
100
   uint8_t spiRec(void) {
102
     SPDR = 0xFF;
101
     SPDR = 0xFF;
157
     // is 2 ^^ (clock_div + 1). If nothing is slow enough, we'll use the
156
     // is 2 ^^ (clock_div + 1). If nothing is slow enough, we'll use the
158
     // slowest (128 == 2 ^^ 7, so clock_div = 6).
157
     // slowest (128 == 2 ^^ 7, so clock_div = 6).
159
     uint8_t clockDiv;
158
     uint8_t clockDiv;
160
-    
159
+
161
     // When the clock is known at compiletime, use this if-then-else
160
     // When the clock is known at compiletime, use this if-then-else
162
     // cascade, which the compiler knows how to completely optimize
161
     // cascade, which the compiler knows how to completely optimize
163
     // away. When clock is not known, use a loop instead, which generates
162
     // away. When clock is not known, use a loop instead, which generates
196
 
195
 
197
     SPCR = _BV(SPE) | _BV(MSTR) | ((bitOrder == SPI_LSBFIRST) ? _BV(DORD) : 0) |
196
     SPCR = _BV(SPE) | _BV(MSTR) | ((bitOrder == SPI_LSBFIRST) ? _BV(DORD) : 0) |
198
       (dataMode << CPHA) | ((clockDiv >> 1) << SPR0);
197
       (dataMode << CPHA) | ((clockDiv >> 1) << SPR0);
199
-    SPSR = clockDiv | 0x01;          
198
+    SPSR = clockDiv | 0x01;
200
   }
199
   }
201
 
200
 
202
-  
201
+
203
        //------------------------------------------------------------------------------
202
        //------------------------------------------------------------------------------
204
 #else  // SOFTWARE_SPI
203
 #else  // SOFTWARE_SPI
205
        //------------------------------------------------------------------------------
204
        //------------------------------------------------------------------------------
216
   void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
215
   void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
217
     // nothing to do
216
     // nothing to do
218
     UNUSED(spiBeginTransaction);
217
     UNUSED(spiBeginTransaction);
219
-  }    
218
+  }
220
 
219
 
221
   //------------------------------------------------------------------------------
220
   //------------------------------------------------------------------------------
222
   /** Soft SPI receive byte */
221
   /** Soft SPI receive byte */
280
     spiSend(token);
279
     spiSend(token);
281
     for (uint16_t i = 0; i < 512; i++)
280
     for (uint16_t i = 0; i < 512; i++)
282
       spiSend(buf[i]);
281
       spiSend(buf[i]);
283
-  } 
282
+  }
284
 #endif  // SOFTWARE_SPI
283
 #endif  // SOFTWARE_SPI
285
 
284
 
286
 
285
 

+ 5
- 6
Marlin/src/HAL/HAL_DUE/HAL_spi_Due.cpp Просмотреть файл

574
   /** Begin SPI transaction, set clock, bit order, data mode */
574
   /** Begin SPI transaction, set clock, bit order, data mode */
575
   void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
575
   void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
576
     // TODO: to be implemented
576
     // TODO: to be implemented
577
-    
578
-  }    
579
-  
577
+
578
+  }
579
+
580
   #pragma GCC reset_options
580
   #pragma GCC reset_options
581
 
581
 
582
 #else
582
 #else
777
   /** Begin SPI transaction, set clock, bit order, data mode */
777
   /** Begin SPI transaction, set clock, bit order, data mode */
778
   void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
778
   void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
779
     // TODO: to be implemented
779
     // TODO: to be implemented
780
-    
781
-  }    
782
-  
780
+  }
781
+
783
 #endif // ENABLED(SOFTWARE_SPI)
782
 #endif // ENABLED(SOFTWARE_SPI)
784
 
783
 
785
 #endif // ARDUINO_ARCH_SAM
784
 #endif // ARDUINO_ARCH_SAM

+ 2
- 2
Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp Просмотреть файл

152
       u8g_SetPIOutput_DUE(u8g, U8G_PI_SCK);
152
       u8g_SetPIOutput_DUE(u8g, U8G_PI_SCK);
153
       u8g_SetPILevel_DUE(u8g, U8G_PI_MOSI, 0);
153
       u8g_SetPILevel_DUE(u8g, U8G_PI_MOSI, 0);
154
       u8g_SetPIOutput_DUE(u8g, U8G_PI_MOSI);
154
       u8g_SetPIOutput_DUE(u8g, U8G_PI_MOSI);
155
-      
155
+
156
       SCK_pPio->PIO_CODR = SCK_dwMask;   //SCK low - needed at power up but not after reset
156
       SCK_pPio->PIO_CODR = SCK_dwMask;   //SCK low - needed at power up but not after reset
157
       MOSI_pPio->PIO_CODR = MOSI_dwMask; //MOSI low - needed at power up but not after reset
157
       MOSI_pPio->PIO_CODR = MOSI_dwMask; //MOSI low - needed at power up but not after reset
158
-      
158
+
159
       u8g_Delay(5);
159
       u8g_Delay(5);
160
 
160
 
161
       u8g->pin_list[U8G_PI_A0_STATE] = 0;       /* inital RS state: command mode */
161
       u8g->pin_list[U8G_PI_A0_STATE] = 0;       /* inital RS state: command mode */

+ 2
- 2
Marlin/src/HAL/HAL_DUE/usb/compiler.h Просмотреть файл

250
 
250
 
251
 /* Define OPTIMIZE_HIGH attribute */
251
 /* Define OPTIMIZE_HIGH attribute */
252
 #if defined   ( __CC_ARM   ) /* Keil µVision 4 */
252
 #if defined   ( __CC_ARM   ) /* Keil µVision 4 */
253
-#   define OPTIMIZE_HIGH _Pragma("O3") 
253
+#   define OPTIMIZE_HIGH _Pragma("O3")
254
 #elif defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
254
 #elif defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
255
 #   define OPTIMIZE_HIGH _Pragma("optimize=high")
255
 #   define OPTIMIZE_HIGH _Pragma("optimize=high")
256
 #elif defined (  __GNUC__  ) /* GCC CS3 2009q3-68 */
256
 #elif defined (  __GNUC__  ) /* GCC CS3 2009q3-68 */
889
 #define  LSB2W(u32)     MSB1W(u32)           //!< Least significant byte of 3rd rank of \a u32.
889
 #define  LSB2W(u32)     MSB1W(u32)           //!< Least significant byte of 3rd rank of \a u32.
890
 #define  LSB1W(u32)     MSB2W(u32)           //!< Least significant byte of 2nd rank of \a u32.
890
 #define  LSB1W(u32)     MSB2W(u32)           //!< Least significant byte of 2nd rank of \a u32.
891
 #define  LSB0W(u32)     MSB3W(u32)           //!< Least significant byte of 1st rank of \a u32.
891
 #define  LSB0W(u32)     MSB3W(u32)           //!< Least significant byte of 1st rank of \a u32.
892
-        
892
+
893
 #define  MSW(u64)       (((U32 *)&(u64))[1]) //!< Most significant word of \a u64.
893
 #define  MSW(u64)       (((U32 *)&(u64))[1]) //!< Most significant word of \a u64.
894
 #define  LSW(u64)       (((U32 *)&(u64))[0]) //!< Least significant word of \a u64.
894
 #define  LSW(u64)       (((U32 *)&(u64))[0]) //!< Least significant word of \a u64.
895
 #define  MSH0(u64)      (((U16 *)&(u64))[3]) //!< Most significant half-word of 1st rank of \a u64.
895
 #define  MSH0(u64)      (((U16 *)&(u64))[3]) //!< Most significant half-word of 1st rank of \a u64.

+ 8
- 8
Marlin/src/HAL/HAL_DUE/usb/conf_access.h Просмотреть файл

59
 #else
59
 #else
60
   #define LUN_0              DISABLE
60
   #define LUN_0              DISABLE
61
 #endif
61
 #endif
62
-#define LUN_1                DISABLE   
63
-#define LUN_2                DISABLE   
64
-#define LUN_3                DISABLE   
62
+#define LUN_1                DISABLE
63
+#define LUN_2                DISABLE
64
+#define LUN_3                DISABLE
65
 #define LUN_4                DISABLE
65
 #define LUN_4                DISABLE
66
 #define LUN_5                DISABLE
66
 #define LUN_5                DISABLE
67
 #define LUN_6                DISABLE
67
 #define LUN_6                DISABLE
68
 #define LUN_7                DISABLE
68
 #define LUN_7                DISABLE
69
-#define LUN_USB              DISABLE   
69
+#define LUN_USB              DISABLE
70
 //! @}
70
 //! @}
71
 
71
 
72
 /*! \name LUN 0 Definitions
72
 /*! \name LUN 0 Definitions
93
  * \warning Be careful not to waste time in order not to disturb the functions.
93
  * \warning Be careful not to waste time in order not to disturb the functions.
94
  */
94
  */
95
 //! @{
95
 //! @{
96
-#define memory_start_read_action(nb_sectors)    
97
-#define memory_stop_read_action()               
98
-#define memory_start_write_action(nb_sectors)   
99
-#define memory_stop_write_action()              
96
+#define memory_start_read_action(nb_sectors)
97
+#define memory_stop_read_action()
98
+#define memory_start_write_action(nb_sectors)
99
+#define memory_stop_write_action()
100
 //! @}
100
 //! @}
101
 
101
 
102
 /*! \name Activation of Interface Features
102
 /*! \name Activation of Interface Features

+ 1
- 1
Marlin/src/HAL/HAL_DUE/usb/osc.h Просмотреть файл

246
 	while (!osc_is_ready(id)) {
246
 	while (!osc_is_ready(id)) {
247
 		/* Do nothing */
247
 		/* Do nothing */
248
 	}
248
 	}
249
-} 
249
+}
250
 
250
 
251
 //! @}
251
 //! @}
252
 
252
 

+ 2
- 2
Marlin/src/HAL/HAL_DUE/usb/pll.h Просмотреть файл

273
 	}
273
 	}
274
 
274
 
275
 	return 0;
275
 	return 0;
276
-} 
277
- 
276
+}
277
+
278
 //! @}
278
 //! @}
279
 
279
 
280
 /// @cond 0
280
 /// @cond 0

+ 1
- 1
Marlin/src/HAL/HAL_DUE/usb/sd_mmc_spi_mem.h Просмотреть файл

113
  *
113
  *
114
  * \return \c true if unload/load done success.
114
  * \return \c true if unload/load done success.
115
  */
115
  */
116
-extern bool sd_mmc_spi_unload(bool unload); 
116
+extern bool sd_mmc_spi_unload(bool unload);
117
 
117
 
118
 //!
118
 //!
119
 //! @brief This function returns the write protected status of the memory.
119
 //! @brief This function returns the write protected status of the memory.

+ 1
- 1
Marlin/src/HAL/HAL_DUE/usb/sysclk.c Просмотреть файл

45
  */
45
  */
46
 
46
 
47
 #ifdef ARDUINO_ARCH_SAM
47
 #ifdef ARDUINO_ARCH_SAM
48
- 
48
+
49
 #include "sysclk.h"
49
 #include "sysclk.h"
50
 
50
 
51
 /// @cond 0
51
 /// @cond 0

+ 1
- 1
Marlin/src/HAL/HAL_DUE/usb/udc.c Просмотреть файл

45
  */
45
  */
46
 
46
 
47
 #ifdef ARDUINO_ARCH_SAM
47
 #ifdef ARDUINO_ARCH_SAM
48
- 
48
+
49
 #include "conf_usb.h"
49
 #include "conf_usb.h"
50
 #include "usb_protocol.h"
50
 #include "usb_protocol.h"
51
 #include "udd.h"
51
 #include "udd.h"

+ 3
- 3
Marlin/src/HAL/HAL_DUE/usb/udc.h Просмотреть файл

143
  * USB_DEVICE_ATTACH_AUTO_DISABLE:
143
  * USB_DEVICE_ATTACH_AUTO_DISABLE:
144
  * \code #define USB_DEVICE_ATTACH_AUTO_DISABLE \endcode
144
  * \code #define USB_DEVICE_ATTACH_AUTO_DISABLE \endcode
145
  * User C file contains:
145
  * User C file contains:
146
- * \code  
146
+ * \code
147
 	// Authorize VBUS monitoring
147
 	// Authorize VBUS monitoring
148
 	if (!udc_include_vbus_monitoring()) {
148
 	if (!udc_include_vbus_monitoring()) {
149
 	  // Implement custom VBUS monitoring via GPIO or other
149
 	  // Implement custom VBUS monitoring via GPIO or other
159
  * USB_DEVICE_ATTACH_AUTO_DISABLE:
159
  * USB_DEVICE_ATTACH_AUTO_DISABLE:
160
  * \code #define USB_DEVICE_ATTACH_AUTO_DISABLE \endcode
160
  * \code #define USB_DEVICE_ATTACH_AUTO_DISABLE \endcode
161
  * User C file contains:
161
  * User C file contains:
162
- * \code  
162
+ * \code
163
 	Event VBUS present() // VBUS interrupt or GPIO interrupt or ..
163
 	Event VBUS present() // VBUS interrupt or GPIO interrupt or ..
164
 	{
164
 	{
165
 	  // Authorize battery charging, but wait key press to start USB.
165
 	  // Authorize battery charging, but wait key press to start USB.
446
 	#  define CONF_CLOCK_DFLL_LOOP_MODE               SYSTEM_CLOCK_DFLL_LOOP_MODE_USB_RECOVERY
446
 	#  define CONF_CLOCK_DFLL_LOOP_MODE               SYSTEM_CLOCK_DFLL_LOOP_MODE_USB_RECOVERY
447
 	#  define CONF_CLOCK_DFLL_ON_DEMAND               true
447
 	#  define CONF_CLOCK_DFLL_ON_DEMAND               true
448
 
448
 
449
-	// Set this to true to configure the GCLK when running clocks_init. 
449
+	// Set this to true to configure the GCLK when running clocks_init.
450
 	// If set to false, none of the GCLK generators will be configured in clocks_init().
450
 	// If set to false, none of the GCLK generators will be configured in clocks_init().
451
 	#  define CONF_CLOCK_CONFIGURE_GCLK               true
451
 	#  define CONF_CLOCK_CONFIGURE_GCLK               true
452
 
452
 

+ 3
- 3
Marlin/src/HAL/HAL_DUE/usb/udi_cdc.c Просмотреть файл

977
 	if (!udi_cdc_data_running) {
977
 	if (!udi_cdc_data_running) {
978
 		return 0;
978
 		return 0;
979
 	}
979
 	}
980
-	
980
+
981
 	//Get number of available data
981
 	//Get number of available data
982
 	// Check available data
982
 	// Check available data
983
 	flags = cpu_irq_save(); // to protect udi_cdc_rx_pos & udi_cdc_rx_buf_sel
983
 	flags = cpu_irq_save(); // to protect udi_cdc_rx_pos & udi_cdc_rx_buf_sel
995
 		flags = cpu_irq_save(); // to protect udi_cdc_rx_pos
995
 		flags = cpu_irq_save(); // to protect udi_cdc_rx_pos
996
 		udi_cdc_rx_pos[port] += size;
996
 		udi_cdc_rx_pos[port] += size;
997
 		cpu_irq_restore(flags);
997
 		cpu_irq_restore(flags);
998
-		
998
+
999
 		ptr_buf += size;
999
 		ptr_buf += size;
1000
 		udi_cdc_rx_start(port);
1000
 		udi_cdc_rx_start(port);
1001
 	}
1001
 	}
1036
 			buf_sel_nb = 0;
1036
 			buf_sel_nb = 0;
1037
 		}
1037
 		}
1038
 	}
1038
 	}
1039
-	retval = UDI_CDC_TX_BUFFERS - buf_sel_nb;  
1039
+	retval = UDI_CDC_TX_BUFFERS - buf_sel_nb;
1040
 	cpu_irq_restore(flags);
1040
 	cpu_irq_restore(flags);
1041
 	return retval;
1041
 	return retval;
1042
 }
1042
 }

+ 2
- 2
Marlin/src/HAL/HAL_DUE/usb/udi_composite_desc.c Просмотреть файл

43
 /*
43
 /*
44
  * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
44
  * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
45
  */
45
  */
46
- 
47
-#ifdef ARDUINO_ARCH_SAM 
46
+
47
+#ifdef ARDUINO_ARCH_SAM
48
 
48
 
49
 #include "conf_usb.h"
49
 #include "conf_usb.h"
50
 #include "udd.h"
50
 #include "udd.h"

+ 2
- 2
Marlin/src/HAL/HAL_DUE/usb/udi_msc.c Просмотреть файл

43
 /*
43
 /*
44
  * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
44
  * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
45
  */
45
  */
46
- 
47
-#ifdef ARDUINO_ARCH_SAM 
46
+
47
+#ifdef ARDUINO_ARCH_SAM
48
 
48
 
49
 #include "conf_usb.h"
49
 #include "conf_usb.h"
50
 #include "usb_protocol.h"
50
 #include "usb_protocol.h"

+ 6
- 6
Marlin/src/HAL/HAL_DUE/usb/udi_msc.h Просмотреть файл

174
 /**
174
 /**
175
  * \page udi_msc_quickstart Quick start guide for USB device Mass Storage module (UDI MSC)
175
  * \page udi_msc_quickstart Quick start guide for USB device Mass Storage module (UDI MSC)
176
  *
176
  *
177
- * This is the quick start guide for the \ref udi_msc_group 
178
- * "USB device interface MSC module (UDI MSC)" with step-by-step instructions on 
177
+ * This is the quick start guide for the \ref udi_msc_group
178
+ * "USB device interface MSC module (UDI MSC)" with step-by-step instructions on
179
  * how to configure and use the modules in a selection of use cases.
179
  * how to configure and use the modules in a selection of use cases.
180
  *
180
  *
181
  * The use cases contain several code fragments. The code fragments in the
181
  * The use cases contain several code fragments. The code fragments in the
182
  * steps for setup can be copied into a custom initialization function, while
182
  * steps for setup can be copied into a custom initialization function, while
183
  * the steps for usage can be copied into, e.g., the main application function.
183
  * the steps for usage can be copied into, e.g., the main application function.
184
- * 
184
+ *
185
  * \section udi_msc_basic_use_case Basic use case
185
  * \section udi_msc_basic_use_case Basic use case
186
  * In this basic use case, the "USB MSC (Single Interface Device)" module is used.
186
  * In this basic use case, the "USB MSC (Single Interface Device)" module is used.
187
  * The "USB MSC (Composite Device)" module usage is described in \ref udi_msc_use_cases
187
  * The "USB MSC (Composite Device)" module usage is described in \ref udi_msc_use_cases
246
  *   - \code #define UDI_MSC_ENABLE_EXT() my_callback_msc_enable()
246
  *   - \code #define UDI_MSC_ENABLE_EXT() my_callback_msc_enable()
247
 	extern bool my_callback_msc_enable(void); \endcode
247
 	extern bool my_callback_msc_enable(void); \endcode
248
  *     \note After the device enumeration (detecting and identifying USB devices),
248
  *     \note After the device enumeration (detecting and identifying USB devices),
249
- *     the USB host starts the device configuration. When the USB MSC interface 
249
+ *     the USB host starts the device configuration. When the USB MSC interface
250
  *     from the device is accepted by the host, the USB host enables this interface and the
250
  *     from the device is accepted by the host, the USB host enables this interface and the
251
  *     UDI_MSC_ENABLE_EXT() callback function is called and return true.
251
  *     UDI_MSC_ENABLE_EXT() callback function is called and return true.
252
  *     Thus, when this event is received, the tasks which call
252
  *     Thus, when this event is received, the tasks which call
256
  *     \note When the USB device is unplugged or is reset by the USB host, the USB
256
  *     \note When the USB device is unplugged or is reset by the USB host, the USB
257
  *     interface is disabled and the UDI_MSC_DISABLE_EXT() callback function
257
  *     interface is disabled and the UDI_MSC_DISABLE_EXT() callback function
258
  *     is called. Thus, it is recommended to disable the task which is called udi_msc_process_trans().
258
  *     is called. Thus, it is recommended to disable the task which is called udi_msc_process_trans().
259
- * -# The MSC is automatically linked with memory control access component 
259
+ * -# The MSC is automatically linked with memory control access component
260
  * which provides the memories interfaces. However, the memory data transfers
260
  * which provides the memories interfaces. However, the memory data transfers
261
  * must be done outside USB interrupt routine. This is done in the MSC process
261
  * must be done outside USB interrupt routine. This is done in the MSC process
262
  * ("udi_msc_process_trans()") called by main loop:
262
  * ("udi_msc_process_trans()") called by main loop:
288
  * In this use case, the "USB MSC (Composite Device)" module is used to
288
  * In this use case, the "USB MSC (Composite Device)" module is used to
289
  * create a USB composite device. Thus, this USB module can be associated with
289
  * create a USB composite device. Thus, this USB module can be associated with
290
  * another "Composite Device" module, like "USB HID Mouse (Composite Device)".
290
  * another "Composite Device" module, like "USB HID Mouse (Composite Device)".
291
- * 
291
+ *
292
  * Also, you can refer to application note
292
  * Also, you can refer to application note
293
  * <A href="http://www.atmel.com/dyn/resources/prod_documents/doc8445.pdf">
293
  * <A href="http://www.atmel.com/dyn/resources/prod_documents/doc8445.pdf">
294
  * AVR4902 ASF - USB Composite Device</A>.
294
  * AVR4902 ASF - USB Composite Device</A>.

+ 1
- 1
Marlin/src/HAL/HAL_DUE/usb/uotghs_device_due.c Просмотреть файл

43
 /*
43
 /*
44
  * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
44
  * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
45
  */
45
  */
46
- 
46
+
47
 #ifdef ARDUINO_ARCH_SAM
47
 #ifdef ARDUINO_ARCH_SAM
48
 
48
 
49
 #include "compiler.h"
49
 #include "compiler.h"

+ 4
- 4
Marlin/src/HAL/HAL_DUE/usb/uotghs_otg.h Просмотреть файл

136
 	} while (0)
136
 	} while (0)
137
   //! Enable USB macro
137
   //! Enable USB macro
138
 #define otg_enable()                        (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_USBE))
138
 #define otg_enable()                        (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_USBE))
139
-  //! Disable USB macro                     
139
+  //! Disable USB macro
140
 #define otg_disable()                       (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_USBE))
140
 #define otg_disable()                       (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_USBE))
141
 #define Is_otg_enabled()                    (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_USBE))
141
 #define Is_otg_enabled()                    (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_USBE))
142
 
142
 
143
-  //! Enable OTG pad                        
143
+  //! Enable OTG pad
144
 #define otg_enable_pad()                    (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_OTGPADE))
144
 #define otg_enable_pad()                    (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_OTGPADE))
145
-  //! Disable OTG pad                       
145
+  //! Disable OTG pad
146
 #define otg_disable_pad()                   (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_OTGPADE))
146
 #define otg_disable_pad()                   (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_OTGPADE))
147
 #define Is_otg_pad_enabled()                (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_OTGPADE))
147
 #define Is_otg_pad_enabled()                (Tst_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_OTGPADE))
148
 
148
 
149
-  //! Check Clock Usable               
149
+  //! Check Clock Usable
150
   //! For parts with HS feature, this one corresponding at UTMI clock
150
   //! For parts with HS feature, this one corresponding at UTMI clock
151
 #define Is_otg_clock_usable()               (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_CLKUSABLE))
151
 #define Is_otg_clock_usable()               (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_CLKUSABLE))
152
 
152
 

+ 3
- 3
Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp Просмотреть файл

303
   /** Begin SPI transaction, set clock, bit order, data mode */
303
   /** Begin SPI transaction, set clock, bit order, data mode */
304
   void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
304
   void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
305
     // TODO: to be implemented
305
     // TODO: to be implemented
306
-    
307
-  }    
308
-  
306
+
307
+  }
308
+
309
 #endif // ENABLED(LPC_SOFTWARE_SPI)
309
 #endif // ENABLED(LPC_SOFTWARE_SPI)
310
 
310
 
311
 #endif // TARGET_LPC1768
311
 #endif // TARGET_LPC1768

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/HAL_timers.h Просмотреть файл

66
 #define HAL_STEP_TIMER_ISR  extern "C" void TIMER0_IRQHandler(void)
66
 #define HAL_STEP_TIMER_ISR  extern "C" void TIMER0_IRQHandler(void)
67
 #define HAL_TEMP_TIMER_ISR  extern "C" void TIMER1_IRQHandler(void)
67
 #define HAL_TEMP_TIMER_ISR  extern "C" void TIMER1_IRQHandler(void)
68
 
68
 
69
-// PWM timer 
69
+// PWM timer
70
 #define HAL_PWM_TIMER      LPC_TIM3
70
 #define HAL_PWM_TIMER      LPC_TIM3
71
 #define HAL_PWM_TIMER_ISR  extern "C" void TIMER3_IRQHandler(void)
71
 #define HAL_PWM_TIMER_ISR  extern "C" void TIMER3_IRQHandler(void)
72
 #define HAL_PWM_TIMER_IRQn TIMER3_IRQn
72
 #define HAL_PWM_TIMER_IRQn TIMER3_IRQn

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.cpp Просмотреть файл

506
   if (first_active_entry) next_MR1_val = LPC_PWM1_MR0 + 1;  // empty table so disable MR1 interrupt
506
   if (first_active_entry) next_MR1_val = LPC_PWM1_MR0 + 1;  // empty table so disable MR1 interrupt
507
   HAL_PWM_TIMER->MR1 = MAX(next_MR1_val, HAL_PWM_TIMER->TC + PWM_LPC1768_ISR_SAFETY_FACTOR); // set next
507
   HAL_PWM_TIMER->MR1 = MAX(next_MR1_val, HAL_PWM_TIMER->TC + PWM_LPC1768_ISR_SAFETY_FACTOR); // set next
508
   in_PWM_isr = false;
508
   in_PWM_isr = false;
509
-  
509
+
510
   exit_PWM_ISR:
510
   exit_PWM_ISR:
511
   return;
511
   return;
512
 }
512
 }

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/arduino.cpp Просмотреть файл

136
     digitalWrite(pin, value);
136
     digitalWrite(pin, value);
137
   }
137
   }
138
   else {
138
   else {
139
-    if (LPC1768_PWM_attach_pin(pin, 1, LPC_PWM1->MR0,  0xff))   
139
+    if (LPC1768_PWM_attach_pin(pin, 1, LPC_PWM1->MR0, 0xFF))
140
       LPC1768_PWM_write(pin, map(value, 0, 255, 1, LPC_PWM1->MR0));  // map 1-254 onto PWM range
140
       LPC1768_PWM_write(pin, map(value, 0, 255, 1, LPC_PWM1->MR0));  // map 1-254 onto PWM range
141
     else {                                                                 // out of PWM channels
141
     else {                                                                 // out of PWM channels
142
       if (!out_of_PWM_slots) MYSERIAL.printf(".\nWARNING - OUT OF PWM CHANNELS\n.\n");  //only warn once
142
       if (!out_of_PWM_slots) MYSERIAL.printf(".\nWARNING - OUT OF PWM CHANNELS\n.\n");  //only warn once

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/pinmapping.h Просмотреть файл

253
 #else
253
 #else
254
   #define NUM_ANALOG_INPUTS 6
254
   #define NUM_ANALOG_INPUTS 6
255
 #endif
255
 #endif
256
-  
256
+
257
 // P0.6 thru P0.9 are for the onboard SD card
257
 // P0.6 thru P0.9 are for the onboard SD card
258
 // P0.29 and P0.30 are for the USB port
258
 // P0.29 and P0.30 are for the USB port
259
 #define HAL_SENSITIVE_PINS P0_06, P0_07, P0_08, P0_09, P0_29, P0_30
259
 #define HAL_SENSITIVE_PINS P0_06, P0_07, P0_08, P0_09, P0_29, P0_30

+ 2
- 2
Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp Просмотреть файл

167
 /** Begin SPI transaction, set clock, bit order, data mode */
167
 /** Begin SPI transaction, set clock, bit order, data mode */
168
 void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
168
 void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
169
   spiConfig = SPISettings(spiClock, bitOrder, dataMode);
169
   spiConfig = SPISettings(spiClock, bitOrder, dataMode);
170
-  
170
+
171
   SPI.beginTransaction(spiConfig);
171
   SPI.beginTransaction(spiConfig);
172
-}    
172
+}
173
 
173
 
174
 #endif // SOFTWARE_SPI
174
 #endif // SOFTWARE_SPI
175
 
175
 

+ 3
- 4
Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp Просмотреть файл

105
 void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
105
 void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
106
   spiConfig = SPISettings(spiClock, bitOrder, dataMode);
106
   spiConfig = SPISettings(spiClock, bitOrder, dataMode);
107
 
107
 
108
-  SPI.beginTransaction(spiConfig);    
109
-}    
110
-
108
+  SPI.beginTransaction(spiConfig);
109
+}
111
 
110
 
112
-#endif
111
+#endif // __MK64FX512__ || __MK66FX1M0__

+ 1
- 1
Marlin/src/gcode/config/M43.cpp Просмотреть файл

270
   // Watch until click, M108, or reset
270
   // Watch until click, M108, or reset
271
   if (parser.boolval('W')) {
271
   if (parser.boolval('W')) {
272
     SERIAL_PROTOCOLLNPGM("Watching pins");
272
     SERIAL_PROTOCOLLNPGM("Watching pins");
273
-    
273
+
274
     #ifdef ARDUINO_ARCH_SAM
274
     #ifdef ARDUINO_ARCH_SAM
275
       NOLESS(first_pin, 2);  // don't hijack the UART pins
275
       NOLESS(first_pin, 2);  // don't hijack the UART pins
276
     #endif
276
     #endif

+ 1
- 1
Marlin/src/inc/Conditionals_LCD.h Просмотреть файл

56
   #define ENCODER_FEEDRATE_DEADZONE 2
56
   #define ENCODER_FEEDRATE_DEADZONE 2
57
   #define REVERSE_MENU_DIRECTION
57
   #define REVERSE_MENU_DIRECTION
58
 
58
 
59
-#elif ENABLED(RADDS_DISPLAY) 
59
+#elif ENABLED(RADDS_DISPLAY)
60
   #define ULTIPANEL
60
   #define ULTIPANEL
61
   #define ENCODER_PULSES_PER_STEP 2
61
   #define ENCODER_PULSES_PER_STEP 2
62
 
62
 

+ 1
- 1
Marlin/src/lcd/ultralcd_impl_DOGM.h Просмотреть файл

187
   // Based on the Adafruit ST7565 (http://www.adafruit.com/products/250)
187
   // Based on the Adafruit ST7565 (http://www.adafruit.com/products/250)
188
     //U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0);  // 8 stripes
188
     //U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0);  // 8 stripes
189
     U8GLIB_LM6059_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes
189
     U8GLIB_LM6059_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes
190
-    
190
+
191
 #elif ENABLED(U8GLIB_ST7565_64128N)
191
 #elif ENABLED(U8GLIB_ST7565_64128N)
192
   // The MaKrPanel, Mini Viki, and Viki 2.0, ST7565 controller
192
   // The MaKrPanel, Mini Viki, and Viki 2.0, ST7565 controller
193
     //U8GLIB_64128N_2X_HAL u8g(DOGLCD_CS, DOGLCD_A0);  // using HW-SPI
193
     //U8GLIB_64128N_2X_HAL u8g(DOGLCD_CS, DOGLCD_A0);  // using HW-SPI

+ 1
- 1
Marlin/src/module/configuration_store.cpp Просмотреть файл

2079
       CONFIG_ECHO_START;
2079
       CONFIG_ECHO_START;
2080
       #if ENABLED(SKEW_CORRECTION_FOR_Z)
2080
       #if ENABLED(SKEW_CORRECTION_FOR_Z)
2081
         SERIAL_ECHO("  M852 I");
2081
         SERIAL_ECHO("  M852 I");
2082
-        SERIAL_ECHO_F(LINEAR_UNIT(planner.xy_skew_factor),6);
2082
+        SERIAL_ECHO_F(LINEAR_UNIT(planner.xy_skew_factor), 6);
2083
         SERIAL_ECHOPAIR(" J", LINEAR_UNIT(planner.xz_skew_factor));
2083
         SERIAL_ECHOPAIR(" J", LINEAR_UNIT(planner.xz_skew_factor));
2084
         SERIAL_ECHOLNPAIR(" K", LINEAR_UNIT(planner.yz_skew_factor));
2084
         SERIAL_ECHOLNPAIR(" K", LINEAR_UNIT(planner.yz_skew_factor));
2085
       #else
2085
       #else

+ 1
- 1
Marlin/src/pins/pins_CHEAPTRONICv2.h Просмотреть файл

110
 // Other board specific pins
110
 // Other board specific pins
111
 //
111
 //
112
 #define FIL_RUNOUT_PIN     37   // board input labeled as F-DET
112
 #define FIL_RUNOUT_PIN     37   // board input labeled as F-DET
113
-#define Z_MIN_PROBE_PIN    36   // additional external board input labeled as E-SENS (should be used for Z-probe)  
113
+#define Z_MIN_PROBE_PIN    36   // additional external board input labeled as E-SENS (should be used for Z-probe)
114
 #define LED_PIN            13
114
 #define LED_PIN            13
115
 #define SPINDLE_ENABLE_PIN  4   // additional PWM pin 1 at JP1 connector - should be used for laser control too
115
 #define SPINDLE_ENABLE_PIN  4   // additional PWM pin 1 at JP1 connector - should be used for laser control too
116
 #define EXT_2               5   // additional PWM pin 2 at JP1 connector
116
 #define EXT_2               5   // additional PWM pin 2 at JP1 connector

+ 1
- 1
Marlin/src/pins/pins_MKS_BASE.h Просмотреть файл

40
 // XSTEP,YSTEP ... must be adapted with M92 accordingly (128/16 => multiply by factor 8).
40
 // XSTEP,YSTEP ... must be adapted with M92 accordingly (128/16 => multiply by factor 8).
41
 */
41
 */
42
 #define X_MS1_PIN           5   // Digital 3  / Pin 5   / PE3
42
 #define X_MS1_PIN           5   // Digital 3  / Pin 5   / PE3
43
-#define X_MS2_PIN           6   // Digital 6  / Pin 14  / PH3      
43
+#define X_MS2_PIN           6   // Digital 6  / Pin 14  / PH3
44
 #define Y_MS1_PIN           59  // Analog 5   / Pin 92  / PF5
44
 #define Y_MS1_PIN           59  // Analog 5   / Pin 92  / PF5
45
 #define Y_MS2_PIN           58  // Analog 4   / Pin 93  / PF4
45
 #define Y_MS2_PIN           58  // Analog 4   / Pin 93  / PF4
46
 #define Z_MS1_PIN           22  // Digital 22 / Pin 78  / PA0
46
 #define Z_MS1_PIN           22  // Digital 22 / Pin 78  / PA0

Загрузка…
Отмена
Сохранить