Browse Source

snapshot

found a few more nasties
Bob-the-Kuhn 6 years ago
parent
commit
e5b71af8c9

+ 2
- 2
Marlin/src/HAL/HAL_DUE/HAL_pinsDebug_Due.h View File

@@ -72,8 +72,8 @@
72 72
 #define VALID_PIN(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL ? 1 : 0)
73 73
 #define DIGITAL_PIN_TO_ANALOG_PIN(p) int(p - analogInputToDigitalPin(0))
74 74
 #define IS_ANALOG(P) (((P) >= analogInputToDigitalPin(0)) && ((P) <= analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1)))
75
-#define pwm_status(pin) ((g_pinStatus[pin] & 0xF) == PIN_STATUS_PWM) && \
76
-                        ((g_APinDescription[pin].ulPinAttribute & PIN_ATTR_PWM) == PIN_ATTR_PWM)
75
+#define pwm_status(pin) (((g_pinStatus[pin] & 0xF) == PIN_STATUS_PWM) && \
76
+                        ((g_APinDescription[pin].ulPinAttribute & PIN_ATTR_PWM) == PIN_ATTR_PWM))
77 77
 #define MULTI_NAME_PAD 14 // space needed to be pretty if not first name assigned to a pin
78 78
 
79 79
 bool GET_PINMODE(int8_t pin) {  // 1: output, 0: input

+ 6
- 1
Marlin/src/HAL/HAL_DUE/usb/conf_access.h View File

@@ -53,7 +53,12 @@
53 53
 /*! \name Activation of Logical Unit Numbers
54 54
  */
55 55
 //! @{
56
-#define LUN_0                ENABLE    //!< SD/MMC Card over MCI Slot 0.
56
+
57
+#ifdef SDSUPPORT
58
+  #define LUN_0              ENABLE    //!< SD/MMC Card over MCI Slot 0.
59
+#else
60
+  #define LUN_0              DISABLE
61
+#endif
57 62
 #define LUN_1                DISABLE   
58 63
 #define LUN_2                DISABLE   
59 64
 #define LUN_3                DISABLE   

+ 5
- 1
Marlin/src/HAL/HAL_DUE/usb/conf_usb.h View File

@@ -72,7 +72,11 @@
72 72
 
73 73
 //! USB Device string definitions (Optional)
74 74
 #define  USB_DEVICE_MANUFACTURE_NAME      "marlinfw.org"
75
-#define  USB_DEVICE_PRODUCT_NAME          CUSTOM_MACHINE_NAME
75
+#ifdef CUSTOM_MACHINE_NAME
76
+  #define  USB_DEVICE_PRODUCT_NAME        CUSTOM_MACHINE_NAME
77
+#else
78
+  #define  USB_DEVICE_PRODUCT_NAME        "3D Printer"
79
+#endif
76 80
 #define  USB_DEVICE_SERIAL_NAME           "123985739853"
77 81
 
78 82
 /**

+ 1
- 1
Marlin/src/HAL/HAL_DUE/usb/sd_mmc_spi_mem.cpp View File

@@ -2,7 +2,7 @@
2 2
  * Interface from Atmel USB MSD to Marlin SD card
3 3
  */
4 4
 
5
-#ifdef ARDUINO_ARCH_SAM
5
+#if defined(ARDUINO_ARCH_SAM) && defined(SDSUPPORT)
6 6
 
7 7
 #include "../../../inc/MarlinConfig.h"
8 8
 #include "../../../sd/cardreader.h"

+ 2
- 0
Marlin/src/HAL/HAL_DUE/usb/usb_task.c View File

@@ -47,6 +47,7 @@
47 47
 
48 48
 #include "conf_usb.h"
49 49
 #include "udc.h"
50
+#include <Arduino.h>
50 51
 
51 52
 static volatile bool main_b_msc_enable = false;
52 53
 static volatile bool main_b_cdc_enable = false;
@@ -253,6 +254,7 @@ bool usb_task_other_requests(void) {
253 254
   return true;
254 255
 }
255 256
 
257
+
256 258
 void HAL_init(void) {
257 259
   uint16_t *ptr;
258 260
 

Loading…
Cancel
Save