Browse Source

Merge pull request #4554 from thinkyhead/rc_anhardt_rep-max6675

Repair SPI-pins, some other pins
Scott Lahteine 9 years ago
parent
commit
0a1a2fea30

+ 6
- 0
.travis.yml View File

93
   - opt_enable PIDTEMPBED
93
   - opt_enable PIDTEMPBED
94
   - build_marlin
94
   - build_marlin
95
   #
95
   #
96
+  # Test MAX6675
97
+  #
98
+  - restore_configs
99
+  - opt_set TEMP_SENSOR_0 -2
100
+  - build_marlin
101
+  #
96
   # Test a "Fix Mounted" Probe along with Safe Homing
102
   # Test a "Fix Mounted" Probe along with Safe Homing
97
   #
103
   #
98
   - restore_configs
104
   - restore_configs

+ 46
- 4
Marlin/pins.h View File

214
 #ifndef FAN2_PIN
214
 #ifndef FAN2_PIN
215
   #define FAN2_PIN -1
215
   #define FAN2_PIN -1
216
 #endif
216
 #endif
217
+#ifndef CONTROLLERFAN_PIN
218
+  #define CONTROLLERFAN_PIN  -1
219
+#endif
217
 
220
 
218
 #ifndef HEATER_0_PIN
221
 #ifndef HEATER_0_PIN
219
   #define HEATER_0_PIN -1
222
   #define HEATER_0_PIN -1
456
 
459
 
457
 #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
460
 #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
458
 
461
 
462
+/**
463
+ * Define SPI Pins: SCK, MISO, MOSI, SS
464
+ */
465
+#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
466
+  #define AVR_SCK_PIN  13
467
+  #define AVR_MISO_PIN 12
468
+  #define AVR_MOSI_PIN 11
469
+  #define AVR_SS_PIN   10
470
+#elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
471
+  #define AVR_SCK_PIN  7
472
+  #define AVR_MISO_PIN 6
473
+  #define AVR_MOSI_PIN 5
474
+  #define AVR_SS_PIN   4
475
+#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
476
+  #define AVR_SCK_PIN  52
477
+  #define AVR_MISO_PIN 50
478
+  #define AVR_MOSI_PIN 51
479
+  #define AVR_SS_PIN   53
480
+#elif defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
481
+  #if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS)
482
+    // Teensy pin assignments
483
+    #define AVR_SCK_PIN  21
484
+    #define AVR_MISO_PIN 23
485
+    #define AVR_MOSI_PIN 22
486
+    #define AVR_SS_PIN   20
487
+  #else
488
+    // Traditional pin assignments
489
+    #define AVR_SCK_PIN  9
490
+    #define AVR_MISO_PIN 11
491
+    #define AVR_MOSI_PIN 10
492
+    #define AVR_SS_PIN   8
493
+  #endif
494
+#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
495
+  #define AVR_SCK_PIN  10
496
+  #define AVR_MISO_PIN 12
497
+  #define AVR_MOSI_PIN 11
498
+  #define AVR_SS_PIN   16
499
+#endif
500
+
459
 #ifndef SCK_PIN
501
 #ifndef SCK_PIN
460
-  #define SCK_PIN  SCK
502
+  #define SCK_PIN  AVR_SCK_PIN
461
 #endif
503
 #endif
462
 #ifndef MISO_PIN
504
 #ifndef MISO_PIN
463
-  #define MISO_PIN MISO
505
+  #define MISO_PIN AVR_MISO_PIN
464
 #endif
506
 #endif
465
 #ifndef MOSI_PIN
507
 #ifndef MOSI_PIN
466
-  #define MOSI_PIN MOSI
508
+  #define MOSI_PIN AVR_MOSI_PIN
467
 #endif
509
 #endif
468
 #ifndef SS_PIN
510
 #ifndef SS_PIN
469
-  #define SS_PIN   SS
511
+  #define SS_PIN   AVR_SS_PIN
470
 #endif
512
 #endif
471
 
513
 
472
 #endif //__PINS_H
514
 #endif //__PINS_H

+ 5
- 11
Marlin/pins_BQ_ZUM_MEGA_3D.h View File

30
 
30
 
31
 #define BOARD_NAME "ZUM Mega 3D"
31
 #define BOARD_NAME "ZUM Mega 3D"
32
 
32
 
33
+#define RAMPS_D8_PIN  10
34
+#define RAMPS_D9_PIN  12
35
+#define RAMPS_D10_PIN  9
36
+#define MOSFET_D_PIN   7
37
+
33
 #include "pins_RAMPS_13.h"
38
 #include "pins_RAMPS_13.h"
34
 
39
 
35
 #undef X_MAX_PIN
40
 #undef X_MAX_PIN
38
 #undef Z_ENABLE_PIN
43
 #undef Z_ENABLE_PIN
39
 #define Z_ENABLE_PIN      77 // 62
44
 #define Z_ENABLE_PIN      77 // 62
40
 
45
 
41
-#undef FAN_PIN
42
-#define FAN_PIN           12 //  4
43
-
44
-#undef HEATER_0_PIN
45
-#define HEATER_0_PIN       9 // 10
46
-
47
-#undef HEATER_1_PIN
48
-#define HEATER_1_PIN      10 //  9
49
-
50
 #undef TEMP_1_PIN
46
 #undef TEMP_1_PIN
51
 #define TEMP_1_PIN        14 // 15
47
 #define TEMP_1_PIN        14 // 15
52
 
48
 
56
 #define DIGIPOTSS_PIN     22
52
 #define DIGIPOTSS_PIN     22
57
 #define DIGIPOT_CHANNELS  { 4, 5, 3, 0, 1 }
53
 #define DIGIPOT_CHANNELS  { 4, 5, 3, 0, 1 }
58
 
54
 
59
-#define FAN1_PIN          7
60
-
61
 #undef PS_ON_PIN             // 12
55
 #undef PS_ON_PIN             // 12
62
 #define PS_ON_PIN         81 // External Power Supply
56
 #define PS_ON_PIN         81 // External Power Supply
63
 
57
 

+ 1
- 1
Marlin/pins_BRAINWAVE_PRO.h View File

33
 
33
 
34
 #include "fastio.h"
34
 #include "fastio.h"
35
 
35
 
36
-#ifndef AT90USBxx_TEENSYPP_ASSIGNMENTS  // use Teensyduino Teensy++2.0 pin assignments instead of Marlin alphabetical.
36
+#if DISABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS) // use Teensyduino Teensy++2.0 pin assignments instead of Marlin alphabetical.
37
   #error "Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config"
37
   #error "Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config"
38
 #endif
38
 #endif
39
 
39
 

+ 0
- 1
Marlin/pins_RAMPS.h View File

159
 #elif ENABLED(IS_RAMPS_EFF)                    // Hotend, Fan, Fan
159
 #elif ENABLED(IS_RAMPS_EFF)                    // Hotend, Fan, Fan
160
   #define FAN_PIN        RAMPS_D9_PIN
160
   #define FAN_PIN        RAMPS_D9_PIN
161
   #define FAN1_PIN       RAMPS_D8_PIN
161
   #define FAN1_PIN       RAMPS_D8_PIN
162
-  #define CONTROLLERFAN_PIN  -1
163
 #elif ENABLED(IS_RAMPS_SF)                     // Spindle, Fan
162
 #elif ENABLED(IS_RAMPS_SF)                     // Spindle, Fan
164
   #define FAN_PIN        RAMPS_D8_PIN
163
   #define FAN_PIN        RAMPS_D8_PIN
165
 #else                                          // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
164
 #else                                          // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")

+ 1
- 1
Marlin/pins_TEENSY2.h View File

69
   #error "Oops!  Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu."
69
   #error "Oops!  Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu."
70
 #endif
70
 #endif
71
 
71
 
72
-#ifndef AT90USBxx_TEENSYPP_ASSIGNMENTS  // use Teensyduino Teensy++2.0 pin assignments instead of Marlin alphabetical.
72
+#if DISABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS) // use Teensyduino Teensy++2.0 pin assignments instead of Marlin alphabetical.
73
   #error "Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config"
73
   #error "Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config"
74
   // (or build from command line)
74
   // (or build from command line)
75
 #endif
75
 #endif

+ 0
- 0
buildroot/bin/opt_disable_adv View File


+ 1
- 1
buildroot/bin/restore_configs View File

2
 
2
 
3
 cp Marlin/Configuration.h.backup      Marlin/Configuration.h
3
 cp Marlin/Configuration.h.backup      Marlin/Configuration.h
4
 cp Marlin/Configuration_adv.h.backup  Marlin/Configuration_adv.h
4
 cp Marlin/Configuration_adv.h.backup  Marlin/Configuration_adv.h
5
-cp Marlin/pins_RAMPS_14.h.backup      Marlin/pins_RAMPS_14.h
5
+cp Marlin/pins_RAMPS.h.backup         Marlin/pins_RAMPS.h
6
 
6
 
7
 if [ -f Marlin/_Bootscreen.h ]; then
7
 if [ -f Marlin/_Bootscreen.h ]; then
8
   rm Marlin/_Bootscreen.h
8
   rm Marlin/_Bootscreen.h

Loading…
Cancel
Save