Browse Source

Merge BEEPER_PIN (PR#2564)

Richard Wackerbarth 10 years ago
parent
commit
e309fb4bcb

+ 1
- 1
Marlin/Conditionals.h View File

@@ -512,7 +512,7 @@
512 512
     #define WRITE_FAN(v) WRITE(FAN_PIN, v)
513 513
   #endif
514 514
 
515
-  #define HAS_BUZZER ((defined(BEEPER) && BEEPER >= 0) || defined(LCD_USE_I2C_BUZZER))
515
+  #define HAS_BUZZER (PIN_EXISTS(BEEPER) || defined(LCD_USE_I2C_BUZZER))
516 516
 
517 517
   #if defined(NUM_SERVOS) && NUM_SERVOS > 0
518 518
     #ifndef X_ENDSTOP_SERVO_NR

+ 4
- 0
Marlin/SanityCheck.h View File

@@ -362,4 +362,8 @@
362 362
     #error "Z_LATE_ENABLE can't be used with COREXZ."
363 363
   #endif
364 364
 
365
+  #ifdef BEEPER
366
+    #error BEEPER has been replaced with BEEPER_PIN. Please update your pins definitions.
367
+  #endif
368
+
365 369
 #endif //SANITYCHECK_H

+ 7
- 7
Marlin/buzzer.cpp View File

@@ -7,22 +7,22 @@
7 7
     if (freq > 0) {
8 8
       #if ENABLED(LCD_USE_I2C_BUZZER)
9 9
         lcd_buzz(duration, freq);
10
-      #elif defined(BEEPER) && BEEPER >= 0 // on-board buzzers have no further condition
11
-        SET_OUTPUT(BEEPER);
10
+      #elif PIN_EXISTS(BEEPER) // on-board buzzers have no further condition
11
+        SET_OUTPUT(BEEPER_PIN);
12 12
         #ifdef SPEAKER // a speaker needs a AC ore a pulsed DC
13
-          //tone(BEEPER, freq, duration); // needs a PWMable pin
13
+          //tone(BEEPER_PIN, freq, duration); // needs a PWMable pin
14 14
           unsigned int delay = 1000000 / freq / 2;
15 15
           int i = duration * freq / 1000;
16 16
           while (i--) {
17
-            WRITE(BEEPER,HIGH);
17
+            WRITE(BEEPER_PIN, HIGH);
18 18
             delayMicroseconds(delay);
19
-            WRITE(BEEPER,LOW);
19
+            WRITE(BEEPER_PIN, LOW);
20 20
             delayMicroseconds(delay);
21 21
            }
22 22
         #else // buzzer has its own resonator - needs a DC
23
-          WRITE(BEEPER, HIGH);
23
+          WRITE(BEEPER_PIN, HIGH);
24 24
           delay(duration);
25
-          WRITE(BEEPER, LOW);
25
+          WRITE(BEEPER_PIN, LOW);
26 26
         #endif
27 27
       #else
28 28
         delay(duration);

+ 3
- 3
Marlin/pins_3DRAG.h View File

@@ -30,8 +30,8 @@
30 30
 #define HEATER_BED_PIN     9    // BED
31 31
 
32 32
 #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
33
-  #undef BEEPER
34
-  #define BEEPER -1
33
+  #undef BEEPER_PIN
34
+  #define BEEPER_PIN -1
35 35
 
36 36
   #undef LCD_PINS_RS
37 37
   #undef LCD_PINS_ENABLE
@@ -56,6 +56,6 @@
56 56
 
57 57
 #else
58 58
 
59
-  #define BEEPER 33
59
+  #define BEEPER_PIN 33
60 60
 
61 61
 #endif // ULTRA_LCD && NEWPANEL

+ 16
- 15
Marlin/pins_AZTEEG_X3.h View File

@@ -8,23 +8,24 @@
8 8
 
9 9
 #if ENABLED(VIKI2) || ENABLED(miniVIKI)
10 10
 
11
- #define BEEPER 33
11
+  #define BEEPER_PIN        33
12
+
12 13
  // Pins for DOGM SPI LCD Support
13
- #define DOGLCD_A0  31 
14
- #define DOGLCD_CS  32 
15
- #define LCD_SCREEN_ROT_180
16
- 
17
- //The encoder and click button 
18
- #define BTN_EN1 22 
19
- #define BTN_EN2 7
20
- #define BTN_ENC 12  //the click switch
21
- 
22
- #define SDSS 53
23
- #define SDCARDDETECT -1 // Pin 49 if using display sd interface   
24
- 
14
+  #define DOGLCD_A0         31
15
+  #define DOGLCD_CS         32
16
+  #define LCD_SCREEN_ROT_180
17
+
18
+ //The encoder and click button
19
+  #define BTN_EN1           22
20
+  #define BTN_EN2            7
21
+  #define BTN_ENC           12  //the click switch
22
+
23
+  #define SDSS              53
24
+  #define SDCARDDETECT      -1  // Pin 49 if using display sd interface
25
+
25 26
   #if ENABLED(TEMP_STAT_LEDS)
26
-   #define STAT_LED_RED 64
27
-   #define STAT_LED_BLUE 63
27
+    #define STAT_LED_RED    64
28
+    #define STAT_LED_BLUE   63
28 29
   #endif
29 30
 
30 31
 #elif ENABLED(TEMP_STAT_LEDS)

+ 2
- 2
Marlin/pins_AZTEEG_X3_PRO.h View File

@@ -6,7 +6,7 @@
6 6
 
7 7
 #undef FAN_PIN
8 8
 #define FAN_PIN             6 //Part Cooling System
9
-#define BEEPER             33
9
+#define BEEPER_PIN         33
10 10
 #define CONTROLLERFAN_PIN   4 //Pin used for the fan to cool motherboard (-1 to disable)
11 11
 //Fans/Water Pump to cool the hotend cool side.
12 12
 #define EXTRUDER_0_AUTO_FAN_PIN   5
@@ -97,7 +97,7 @@
97 97
 //LCD Pins//
98 98
 
99 99
  #if ENABLED(VIKI2) || ENABLED(miniVIKI)
100
-  #define BEEPER           33
100
+  #define BEEPER_PIN       33
101 101
  // Pins for DOGM SPI LCD Support
102 102
   #define DOGLCD_A0        44
103 103
   #define DOGLCD_CS        45

+ 12
- 12
Marlin/pins_ELEFU_3.h View File

@@ -13,14 +13,14 @@
13 13
 #define X_MAX_PIN          34
14 14
 
15 15
 #define Y_STEP_PIN         11
16
-#define Y_DIR_PIN          9
16
+#define Y_DIR_PIN           9
17 17
 #define Y_ENABLE_PIN       12
18 18
 #define Y_MIN_PIN          33
19 19
 #define Y_MAX_PIN          32
20 20
 
21
-#define Z_STEP_PIN         7
22
-#define Z_DIR_PIN          6
23
-#define Z_ENABLE_PIN       8
21
+#define Z_STEP_PIN          7
22
+#define Z_DIR_PIN           6
23
+#define Z_ENABLE_PIN        8
24 24
 #define Z_MIN_PIN          31
25 25
 #define Z_MAX_PIN          30
26 26
 
@@ -48,12 +48,12 @@
48 48
 #define HEATER_1_PIN       46 //12V PWM2
49 49
 #define HEATER_2_PIN       17 //12V PWM3
50 50
 #define HEATER_BED_PIN     44 //DOUBLE 12V PWM
51
-#define TEMP_0_PIN         3  //ANALOG NUMBERING
52
-#define TEMP_1_PIN         2  //ANALOG NUMBERING
53
-#define TEMP_2_PIN         1  //ANALOG NUMBERING
54
-#define TEMP_BED_PIN       0  //ANALOG NUMBERING
51
+#define TEMP_0_PIN          3 //ANALOG NUMBERING
52
+#define TEMP_1_PIN          2 //ANALOG NUMBERING
53
+#define TEMP_2_PIN          1 //ANALOG NUMBERING
54
+#define TEMP_BED_PIN        0 //ANALOG NUMBERING
55 55
 
56
-#define BEEPER             36
56
+#define BEEPER_PIN         36
57 57
 
58 58
 #define KILL_PIN           -1
59 59
 
@@ -70,9 +70,9 @@
70 70
   #define BTN_EN2          39
71 71
   #define BTN_ENC          15  //the click
72 72
 
73
-  #define BLEN_C           2
74
-  #define BLEN_B           1
75
-  #define BLEN_A           0
73
+  #define BLEN_C            2
74
+  #define BLEN_B            1
75
+  #define BLEN_A            0
76 76
 
77 77
 #endif // RA_CONTROL_PANEL
78 78
 

+ 1
- 1
Marlin/pins_GEN7_CUSTOM.h View File

@@ -56,7 +56,7 @@
56 56
 //#define TX_ENABLE_PIN       12
57 57
 //#define RX_ENABLE_PIN       13
58 58
 
59
-#define BEEPER -1
59
+#define BEEPER_PIN -1
60 60
 #define SDCARDDETECT -1
61 61
 #define SUICIDE_PIN -1    //has to be defined; otherwise Power_off doesn't work
62 62
 

+ 1
- 1
Marlin/pins_MEGACONTROLLER.h View File

@@ -89,7 +89,7 @@
89 89
 #endif
90 90
 
91 91
 #ifdef MINIPANEL
92
-    #define BEEPER 46
92
+    #define BEEPER_PIN 46
93 93
     // Pins for DOGM SPI LCD Support
94 94
     #define DOGLCD_A0  47
95 95
     #define DOGLCD_CS  45

+ 1
- 1
Marlin/pins_MEGATRONICS.h View File

@@ -58,7 +58,7 @@
58 58
 #define HEATER_BED_PIN     10   // BED
59 59
 #define TEMP_BED_PIN       14   // ANALOG NUMBERING
60 60
 
61
-#define BEEPER             33   // AUX-4
61
+#define BEEPER_PIN         33   // AUX-4
62 62
 
63 63
 #if defined(ULTRA_LCD) && defined(NEWPANEL)
64 64
 

+ 1
- 1
Marlin/pins_MEGATRONICS_2.h View File

@@ -74,7 +74,7 @@
74 74
   #define TEMP_BED_PIN 14 // ANALOG NUMBERING
75 75
 #endif
76 76
 
77
-#define BEEPER 64
77
+#define BEEPER_PIN 64
78 78
 
79 79
 
80 80
 #define LCD_PINS_RS 14

+ 1
- 1
Marlin/pins_MEGATRONICS_3.h View File

@@ -76,7 +76,7 @@
76 76
 #define TEMP_2_PIN   (TEMP_SENSOR_2 == -1 ?   9 : 12) // ANALOG NUMBERING
77 77
 #define TEMP_BED_PIN (TEMP_SENSOR_BED == -1 ? 8 : 14) // ANALOG NUMBERING
78 78
 
79
-#define BEEPER 61
79
+#define BEEPER_PIN 61
80 80
 
81 81
 #define LCD_PINS_RS 32
82 82
 #define LCD_PINS_ENABLE 31

+ 66
- 64
Marlin/pins_MINIRAMBO.h View File

@@ -3,10 +3,10 @@
3 3
  */
4 4
 
5 5
 #ifndef __AVR_ATmega2560__
6
-#error Oops!  Make sure you have 'Arduino Mega 2560 or Rambo' selected from the 'Tools -> Boards' menu.
6
+  #error Oops!  Make sure you have 'Arduino Mega 2560 or Rambo' selected from the 'Tools -> Boards' menu.
7 7
 #endif
8 8
 
9
-#define LARGE_FLASH true
9
+#define LARGE_FLASH         true
10 10
 
11 11
 
12 12
 #undef X_MS1_PIN
@@ -20,92 +20,94 @@
20 20
 #undef E1_MS1_PIN
21 21
 #undef E1_MS2_PIN
22 22
  
23
-#define X_STEP_PIN 37
24
-#define X_DIR_PIN 48
25
-#define X_MIN_PIN 12
26
-#define X_MAX_PIN 30
27
-#define X_ENABLE_PIN 29
28
-#define X_MS1_PIN 40
29
-#define X_MS2_PIN 41
30
-
31
-#define Y_STEP_PIN 36
32
-#define Y_DIR_PIN 49
33
-#define Y_MIN_PIN 11
34
-#define Y_MAX_PIN 24
35
-#define Y_ENABLE_PIN 28
36
-#define Y_MS1_PIN 69
37
-#define Y_MS2_PIN 39
38
-
39
-#define Z_STEP_PIN 35
40
-#define Z_DIR_PIN 47
41
-#define Z_MIN_PIN 10
42
-#define Z_MAX_PIN 23
43
-#define Z_ENABLE_PIN 27
44
-#define Z_MS1_PIN 68
45
-#define Z_MS2_PIN 67
46
-
47
-#define HEATER_BED_PIN 4
48
-#define TEMP_BED_PIN 2
49
-
50
-#define HEATER_0_PIN 3
51
-#define TEMP_0_PIN 0
52
-
53
-#define HEATER_1_PIN 7
54
-#define TEMP_1_PIN 1
23
+#define X_STEP_PIN          37
24
+#define X_DIR_PIN           48
25
+#define X_MIN_PIN           12
26
+#define X_MAX_PIN           30
27
+#define X_ENABLE_PIN        29
28
+#define X_MS1_PIN           40
29
+#define X_MS2_PIN           41
30
+
31
+#define Y_STEP_PIN          36
32
+#define Y_DIR_PIN           49
33
+#define Y_MIN_PIN           11
34
+#define Y_MAX_PIN           24
35
+#define Y_ENABLE_PIN        28
36
+#define Y_MS1_PIN           69
37
+#define Y_MS2_PIN           39
38
+
39
+#define Z_STEP_PIN          35
40
+#define Z_DIR_PIN           47
41
+#define Z_MIN_PIN           10
42
+#define Z_MAX_PIN           23
43
+#define Z_ENABLE_PIN        27
44
+#define Z_MS1_PIN           68
45
+#define Z_MS2_PIN           67
46
+
47
+#define HEATER_BED_PIN       4
48
+#define TEMP_BED_PIN         2
49
+
50
+#define HEATER_0_PIN         3
51
+#define TEMP_0_PIN           0
52
+
53
+#define HEATER_1_PIN         7
54
+#define TEMP_1_PIN           1
55 55
 
56 56
 #if ENABLED(BARICUDA)
57
-  #define HEATER_2_PIN 6
57
+  #define HEATER_2_PIN       6
58 58
 #else
59
-  #define HEATER_2_PIN -1
59
+  #define HEATER_2_PIN      -1
60 60
 #endif
61 61
 
62
-#define TEMP_2_PIN -1
62
+#define TEMP_2_PIN          -1
63 63
 
64 64
 #define E0_STEP_PIN         34
65 65
 #define E0_DIR_PIN          43
66 66
 #define E0_ENABLE_PIN       26
67
-#define E0_MS1_PIN 65
68
-#define E0_MS2_PIN 66
67
+#define E0_MS1_PIN          65
68
+#define E0_MS2_PIN          66
69 69
 
70 70
 #define E1_STEP_PIN         -1
71 71
 #define E1_DIR_PIN          -1
72 72
 #define E1_ENABLE_PIN       -1
73
-#define E1_MS1_PIN -1
74
-#define E1_MS2_PIN -1
73
+#define E1_MS1_PIN          -1
74
+#define E1_MS2_PIN          -1
75 75
 
76 76
 #define MOTOR_CURRENT_PWM_XY_PIN 46
77
-#define MOTOR_CURRENT_PWM_Z_PIN 45
78
-#define MOTOR_CURRENT_PWM_E_PIN 44
77
+#define MOTOR_CURRENT_PWM_Z_PIN  45
78
+#define MOTOR_CURRENT_PWM_E_PIN  44
79 79
 //Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range
80 80
 #define MOTOR_CURRENT_PWM_RANGE 2000
81 81
 #define DEFAULT_PWM_MOTOR_CURRENT  {1300, 1300, 1250}
82
-#define SDPOWER            -1
83
-#define SDSS               53
84
-#define LED_PIN            13
85
-#define FAN_PIN            8
86
-#define FAN_1_PIN 6
87
-#define PS_ON_PIN          -1
88
-#define KILL_PIN           -1 //80 with Smart Controller LCD
89
-#define SUICIDE_PIN        -1  //PIN that has to be turned on right after start, to keep power flowing.
82
+#define SDPOWER             -1
83
+#define SDSS                53
84
+#define LED_PIN             13
85
+#define FAN_PIN              8
86
+#define FAN_1_PIN            6
87
+#define PS_ON_PIN           -1
88
+#define KILL_PIN            -1  // 80 with Smart Controller LCD
89
+#define SUICIDE_PIN         -1  // PIN that has to be turned on right after start, to keep power flowing.
90 90
 
91 91
 #if ENABLED(ULTRA_LCD)
92
-  #define KILL_PIN 32
92
+
93
+  #define KILL_PIN          32
94
+
93 95
   #if ENABLED(NEWPANEL)
94
-   //arduino pin which triggers an piezzo beeper
95
-    #define BEEPER 84      // Beeper on AUX-4
96
-    #define LCD_PINS_RS 82
96
+
97
+    #define BEEPER_PIN      84  // Beeper on AUX-4
98
+    #define LCD_PINS_RS     82
97 99
     #define LCD_PINS_ENABLE 18
98
-    #define LCD_PINS_D4 19
99
-    #define LCD_PINS_D5 70
100
-    #define LCD_PINS_D6 85
101
-    #define LCD_PINS_D7 71
100
+    #define LCD_PINS_D4     19
101
+    #define LCD_PINS_D5     70
102
+    #define LCD_PINS_D6     85
103
+    #define LCD_PINS_D7     71
102 104
 
103 105
     //buttons are directly attached using AUX-2
104
-    #define BTN_EN1 14
105
-    #define BTN_EN2 72
106
-    #define BTN_ENC 9  //the click
106
+    #define BTN_EN1         14
107
+    #define BTN_EN2         72
108
+    #define BTN_ENC          9  // the click
107 109
 
108
-    #define SDCARDDETECT 15
110
+    #define SDCARDDETECT    15
109 111
 
110
-  #endif
112
+  #endif //NEWPANEL
111 113
 #endif //ULTRA_LCD

+ 1
- 2
Marlin/pins_MINITRONICS.h View File

@@ -59,8 +59,7 @@
59 59
 #define HEATER_BED_PIN 3 // BED
60 60
 #define TEMP_BED_PIN 6 // ANALOG NUMBERING
61 61
 
62
-#define BEEPER -1
63
-
62
+#define BEEPER_PIN -1
64 63
 
65 64
 #define LCD_PINS_RS -1
66 65
 #define LCD_PINS_ENABLE -1

+ 2
- 2
Marlin/pins_PRINTRBOARD.h View File

@@ -79,7 +79,7 @@
79 79
 
80 80
 #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
81 81
   //we have no buzzer installed
82
-  #define BEEPER -1
82
+  #define BEEPER_PIN -1
83 83
   //LCD Pins
84 84
   #if ENABLED(LCD_I2C_PANELOLU2)
85 85
     #define BTN_EN1 27  //RX1 - fastio.h pin mapping 27
@@ -92,7 +92,7 @@
92 92
 #endif // ULTRA_LCD && NEWPANEL
93 93
 
94 94
 #if ENABLED(VIKI2) || ENABLED(miniVIKI)
95
- #define BEEPER 32 //FastIO
95
+ #define BEEPER_PIN 32 //FastIO
96 96
  // Pins for DOGM SPI LCD Support
97 97
  #define DOGLCD_A0  42 //Non-FastIO
98 98
  #define DOGLCD_CS  43 //Non-FastIO

+ 10
- 6
Marlin/pins_RAMBO.h View File

@@ -110,10 +110,13 @@
110 110
 #define SUICIDE_PIN        -1  //PIN that has to be turned on right after start, to keep power flowing.
111 111
 
112 112
 #if ENABLED(ULTRA_LCD)
113
+
113 114
   #define KILL_PIN 80
115
+
114 116
   #if ENABLED(NEWPANEL)
115
-   //arduino pin which triggers an piezzo beeper
116
-    #define BEEPER 79      // Beeper on AUX-4
117
+
118
+    #define BEEPER_PIN 79      // Beeper on AUX-4
119
+
117 120
     #define LCD_PINS_RS 70
118 121
     #define LCD_PINS_ENABLE 71
119 122
     #define LCD_PINS_D4 72
@@ -133,10 +136,11 @@
133 136
     #define SDCARDDETECT 81    // Ramps does not use this port
134 137
 
135 138
   #else //!NEWPANEL - old style panel with shift register
136
-    //arduino pin witch triggers an piezzo beeper
137
-    #define BEEPER 33    No Beeper added
139
+
140
+    #define BEEPER_PIN 33    // No Beeper added
141
+
138 142
     //buttons are attached to a shift register
139
-    // Not wired this yet
143
+    // Not wired yet
140 144
     // #define SHIFT_CLK 38
141 145
     // #define SHIFT_LD 42
142 146
     // #define SHIFT_OUT 40
@@ -165,7 +169,7 @@
165 169
 #endif // ULTRA_LCD
166 170
 
167 171
 #if ENABLED(VIKI2) || ENABLED(miniVIKI)
168
- #define BEEPER 44
172
+ #define BEEPER_PIN 44
169 173
  // Pins for DOGM SPI LCD Support
170 174
  #define DOGLCD_A0  70 
171 175
  #define DOGLCD_CS  71 

+ 8
- 7
Marlin/pins_RAMPS_13.h View File

@@ -159,7 +159,7 @@
159 159
     #endif
160 160
 
161 161
     #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
162
-      #define BEEPER 37
162
+      #define BEEPER_PIN 37
163 163
 
164 164
       #define BTN_EN1 31
165 165
       #define BTN_EN2 33
@@ -186,12 +186,12 @@
186 186
       #define SDCARDDETECT 49
187 187
       #define LCD_SDSS 53
188 188
       #define KILL_PIN 41
189
-      #define BEEPER 23
189
+      #define BEEPER_PIN 23
190 190
       #define DOGLCD_CS 29
191 191
       #define DOGLCD_A0 27
192 192
       #define LCD_PIN_BL 33
193 193
     #elif defined(MINIPANEL)
194
-       #define BEEPER 42
194
+       #define BEEPER_PIN 42
195 195
        // Pins for DOGM SPI LCD Support
196 196
        #define DOGLCD_A0  44
197 197
        #define DOGLCD_CS  66
@@ -211,9 +211,10 @@
211 211
        #define BTN_ENC 59  //the click switch
212 212
        //not connected to a pin
213 213
        #define SDCARDDETECT 49
214
+
214 215
     #else
215
-      // arduino pin which triggers an piezzo beeper
216
-      #define BEEPER 33  // Beeper on AUX-4
216
+
217
+      #define BEEPER_PIN 33  // Beeper on AUX-4
217 218
 
218 219
       // buttons are directly attached using AUX-2
219 220
       #if ENABLED(REPRAPWORLD_KEYPAD)
@@ -241,8 +242,8 @@
241 242
 
242 243
     #endif
243 244
   #else // !NEWPANEL (Old-style panel with shift register)
244
-    // Arduino pin to trigger a piezzo beeper
245
-    #define BEEPER 33   // No Beeper added
245
+
246
+    #define BEEPER_PIN 33   // No Beeper added
246 247
 
247 248
     // Buttons are attached to a shift register
248 249
     // Not wired yet

+ 4
- 4
Marlin/pins_RIGIDBOARD.h View File

@@ -22,8 +22,8 @@
22 22
 
23 23
 #if ENABLED(RIGIDBOT_PANEL)
24 24
 
25
-  #undef BEEPER
26
-  #define BEEPER -1
25
+  #undef BEEPER_PIN
26
+  #define BEEPER_PIN -1
27 27
 
28 28
   #undef SDCARDDETECT
29 29
   #define SDCARDDETECT 22
@@ -48,8 +48,8 @@
48 48
 
49 49
 #elif defined(REPRAP_DISCOUNT_SMART_CONTROLLER)
50 50
 
51
-  #undef BEEPER
52
-  #define BEEPER -1
51
+  #undef BEEPER_PIN
52
+  #define BEEPER_PIN -1
53 53
 
54 54
   #undef  SDCARDDETECT
55 55
   #define SDCARDDETECT 22

+ 1
- 1
Marlin/pins_RUMBA.h View File

@@ -102,7 +102,7 @@
102 102
 #define SDPOWER            -1
103 103
 #define SDSS               53
104 104
 #define SDCARDDETECT       49
105
-#define BEEPER             44
105
+#define BEEPER_PIN         44
106 106
 #define LCD_PINS_RS        19
107 107
 #define LCD_PINS_ENABLE    42
108 108
 #define LCD_PINS_D4        18

+ 3
- 3
Marlin/pins_SANGUINOLOLU_11.h View File

@@ -95,7 +95,7 @@
95 95
 #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
96 96
 
97 97
   // No buzzer installed
98
-  #define BEEPER -1
98
+  #define BEEPER_PIN -1
99 99
 
100 100
   // LCD Pins
101 101
   #if ENABLED(DOGLCD)
@@ -106,7 +106,7 @@
106 106
         #define LCD_PINS_RS     30 //CS chip select /SS chip slave select
107 107
         #define LCD_PINS_ENABLE 29 //SID (MOSI)
108 108
         #define LCD_PINS_D4     17 //SCK (CLK) clock
109
-        #define BEEPER          27 // Pin 27 is take by LED_Pin, but Melzi LED do nothing with Marlin and I take this pin for BEEPER.... See here > [github.com] , If you want use this pin with Gcode M42 instead BEEPER
109
+        #define BEEPER_PIN      27 // Pin 27 is taken by LED_PIN, but Melzi LED does nothing with Marlin so this can be used for BEEPER_PIN. You can use this pin with M42 instead of BEEPER_PIN.
110 110
       #else         // Sanguinololu 1.3
111 111
         #define LCD_PINS_RS      4 
112 112
         #define LCD_PINS_ENABLE 17 
@@ -160,7 +160,7 @@
160 160
 
161 161
 #elif ENABLED(MAKRPANEL)
162 162
 
163
-  #define BEEPER                29
163
+  #define BEEPER_PIN            29
164 164
 
165 165
   // Pins for DOGM SPI LCD Support
166 166
   #define DOGLCD_A0             30

+ 1
- 1
Marlin/pins_SAV_MKI.h View File

@@ -85,7 +85,7 @@
85 85
 #define ALARM_PIN          -1
86 86
 #define SDCARDDETECT       -1
87 87
 
88
-#define BEEPER             -1
88
+#define BEEPER_PIN         -1
89 89
 #define LCD_PINS_RS        -1
90 90
 #define LCD_PINS_ENABLE    -1
91 91
 #define LCD_PINS_D4        -1

+ 10
- 9
Marlin/pins_TEENSYLU.h View File

@@ -68,16 +68,17 @@
68 68
 #endif
69 69
 
70 70
 #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
71
-  //we have no buzzer installed
72
-  #define BEEPER -1
73
-  //LCD Pins
71
+
72
+  #define BEEPER_PIN       -1
73
+
74 74
   #if ENABLED(LCD_I2C_PANELOLU2)
75
-    #define BTN_EN1 27  //RX1 - fastio.h pin mapping 27
76
-    #define BTN_EN2 26  //TX1 - fastio.h pin mapping 26
77
-    #define BTN_ENC 43 //A3 - fastio.h pin mapping 43
78
-    #define SDSS   40 //use SD card on Panelolu2 (Teensyduino pin mapping)
75
+    #define BTN_EN1        27  //RX1 - fastio.h pin mapping 27
76
+    #define BTN_EN2        26  //TX1 - fastio.h pin mapping 26
77
+    #define BTN_ENC        43  //A3 - fastio.h pin mapping 43
78
+    #define SDSS           40  //use SD card on Panelolu2 (Teensyduino pin mapping)
79 79
   #endif // LCD_I2C_PANELOLU2
80
-  //not connected to a pin
81
-  #define SDCARDDETECT -1    
80
+
81
+  #define SDCARDDETECT     -1
82
+
82 83
 #endif // ULTRA_LCD && NEWPANEL
83 84
 

+ 1
- 2
Marlin/pins_ULTIMAIN_2.h View File

@@ -58,8 +58,7 @@
58 58
 #define MOTOR_CURRENT_PWM_RANGE 2000
59 59
 #define DEFAULT_PWM_MOTOR_CURRENT  {1300, 1300, 1250}
60 60
 
61
-//arduino pin witch triggers an piezzo beeper
62
-#define BEEPER 18
61
+#define BEEPER_PIN 18
63 62
 
64 63
 #define LCD_PINS_RS 20
65 64
 #define LCD_PINS_ENABLE 15

+ 3
- 6
Marlin/pins_ULTIMAKER.h View File

@@ -57,9 +57,9 @@
57 57
 
58 58
 #if ENABLED(ULTRA_LCD)
59 59
 
60
+  #define BEEPER_PIN 18
61
+
60 62
   #if ENABLED(NEWPANEL)
61
-  //arduino pin witch triggers an piezzo beeper
62
-    #define BEEPER 18
63 63
 
64 64
     #define LCD_PINS_RS 20
65 65
     #define LCD_PINS_ENABLE 17
@@ -71,15 +71,12 @@
71 71
     //buttons are directly attached
72 72
     #define BTN_EN1 40
73 73
     #define BTN_EN2 42
74
-    #define BTN_ENC 19  //the click
74
+    #define BTN_ENC 19
75 75
 
76 76
     #define SDCARDDETECT 38
77 77
 
78 78
   #else //!NEWPANEL - Old style panel with shift register
79 79
 
80
-    //arduino pin witch triggers an piezzo beeper
81
-    #define BEEPER 18
82
-
83 80
     //buttons are attached to a shift register
84 81
     #define SHIFT_CLK 38
85 82
     #define SHIFT_LD 42

+ 1
- 1
Marlin/ultralcd.cpp View File

@@ -1325,7 +1325,7 @@ void lcd_quick_feedback() {
1325 1325
       #define LCD_FEEDBACK_FREQUENCY_DURATION_MS (1000/6)
1326 1326
     #endif    
1327 1327
     lcd.buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
1328
-  #elif defined(BEEPER) && BEEPER >= 0
1328
+  #elif PIN_EXISTS(BEEPER)
1329 1329
     #ifndef LCD_FEEDBACK_FREQUENCY_HZ
1330 1330
       #define LCD_FEEDBACK_FREQUENCY_HZ 5000
1331 1331
     #endif

Loading…
Cancel
Save