Browse Source

Rename BEEPER to BEEPER_PIN

For consistency with other pins, allowing use of `PIN_EXISTS` macro.
Scott Lahteine 8 years ago
parent
commit
94a796c8cc

+ 1
- 1
Marlin/Conditionals.h View File

512
     #define WRITE_FAN(v) WRITE(FAN_PIN, v)
512
     #define WRITE_FAN(v) WRITE(FAN_PIN, v)
513
   #endif
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
   #if defined(NUM_SERVOS) && NUM_SERVOS > 0
517
   #if defined(NUM_SERVOS) && NUM_SERVOS > 0
518
     #ifndef X_ENDSTOP_SERVO_NR
518
     #ifndef X_ENDSTOP_SERVO_NR

+ 7
- 7
Marlin/buzzer.cpp View File

7
     if (freq > 0) {
7
     if (freq > 0) {
8
       #if ENABLED(LCD_USE_I2C_BUZZER)
8
       #if ENABLED(LCD_USE_I2C_BUZZER)
9
         lcd_buzz(duration, freq);
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
         #ifdef SPEAKER // a speaker needs a AC ore a pulsed DC
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
           unsigned int delay = 1000000 / freq / 2;
14
           unsigned int delay = 1000000 / freq / 2;
15
           int i = duration * freq / 1000;
15
           int i = duration * freq / 1000;
16
           while (i--) {
16
           while (i--) {
17
-            WRITE(BEEPER,HIGH);
17
+            WRITE(BEEPER_PIN, HIGH);
18
             delayMicroseconds(delay);
18
             delayMicroseconds(delay);
19
-            WRITE(BEEPER,LOW);
19
+            WRITE(BEEPER_PIN, LOW);
20
             delayMicroseconds(delay);
20
             delayMicroseconds(delay);
21
            }
21
            }
22
         #else // buzzer has its own resonator - needs a DC
22
         #else // buzzer has its own resonator - needs a DC
23
-          WRITE(BEEPER, HIGH);
23
+          WRITE(BEEPER_PIN, HIGH);
24
           delay(duration);
24
           delay(duration);
25
-          WRITE(BEEPER, LOW);
25
+          WRITE(BEEPER_PIN, LOW);
26
         #endif
26
         #endif
27
       #else
27
       #else
28
         delay(duration);
28
         delay(duration);

+ 3
- 3
Marlin/pins_3DRAG.h View File

30
 #define HEATER_BED_PIN     9    // BED
30
 #define HEATER_BED_PIN     9    // BED
31
 
31
 
32
 #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
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
   #undef LCD_PINS_RS
36
   #undef LCD_PINS_RS
37
   #undef LCD_PINS_ENABLE
37
   #undef LCD_PINS_ENABLE
56
 
56
 
57
 #else
57
 #else
58
 
58
 
59
-  #define BEEPER 33
59
+  #define BEEPER_PIN 33
60
 
60
 
61
 #endif // ULTRA_LCD && NEWPANEL
61
 #endif // ULTRA_LCD && NEWPANEL

+ 2
- 1
Marlin/pins_AZTEEG_X3.h View File

8
 
8
 
9
 #if ENABLED(VIKI2) || ENABLED(miniVIKI)
9
 #if ENABLED(VIKI2) || ENABLED(miniVIKI)
10
 
10
 
11
- #define BEEPER 33
11
+ #define BEEPER_PIN 33
12
+
12
  // Pins for DOGM SPI LCD Support
13
  // Pins for DOGM SPI LCD Support
13
  #define DOGLCD_A0  31 
14
  #define DOGLCD_A0  31 
14
  #define DOGLCD_CS  32 
15
  #define DOGLCD_CS  32 

+ 2
- 2
Marlin/pins_AZTEEG_X3_PRO.h View File

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

+ 1
- 1
Marlin/pins_ELEFU_3.h View File

53
 #define TEMP_2_PIN         1  //ANALOG NUMBERING
53
 #define TEMP_2_PIN         1  //ANALOG NUMBERING
54
 #define TEMP_BED_PIN       0  //ANALOG NUMBERING
54
 #define TEMP_BED_PIN       0  //ANALOG NUMBERING
55
 
55
 
56
-#define BEEPER             36
56
+#define BEEPER_PIN         36
57
 
57
 
58
 #define KILL_PIN           -1
58
 #define KILL_PIN           -1
59
 
59
 

+ 1
- 1
Marlin/pins_GEN7_CUSTOM.h View File

56
 //#define TX_ENABLE_PIN       12
56
 //#define TX_ENABLE_PIN       12
57
 //#define RX_ENABLE_PIN       13
57
 //#define RX_ENABLE_PIN       13
58
 
58
 
59
-#define BEEPER -1
59
+#define BEEPER_PIN -1
60
 #define SDCARDDETECT -1
60
 #define SDCARDDETECT -1
61
 #define SUICIDE_PIN -1    //has to be defined; otherwise Power_off doesn't work
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
 #endif
89
 #endif
90
 
90
 
91
 #ifdef MINIPANEL
91
 #ifdef MINIPANEL
92
-    #define BEEPER 46
92
+    #define BEEPER_PIN 46
93
     // Pins for DOGM SPI LCD Support
93
     // Pins for DOGM SPI LCD Support
94
     #define DOGLCD_A0  47
94
     #define DOGLCD_A0  47
95
     #define DOGLCD_CS  45
95
     #define DOGLCD_CS  45

+ 1
- 1
Marlin/pins_MEGATRONICS.h View File

58
 #define HEATER_BED_PIN     10   // BED
58
 #define HEATER_BED_PIN     10   // BED
59
 #define TEMP_BED_PIN       14   // ANALOG NUMBERING
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
 #if defined(ULTRA_LCD) && defined(NEWPANEL)
63
 #if defined(ULTRA_LCD) && defined(NEWPANEL)
64
 
64
 

+ 1
- 1
Marlin/pins_MEGATRONICS_2.h View File

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

+ 1
- 1
Marlin/pins_MEGATRONICS_3.h View File

76
 #define TEMP_2_PIN   (TEMP_SENSOR_2 == -1 ?   9 : 12) // ANALOG NUMBERING
76
 #define TEMP_2_PIN   (TEMP_SENSOR_2 == -1 ?   9 : 12) // ANALOG NUMBERING
77
 #define TEMP_BED_PIN (TEMP_SENSOR_BED == -1 ? 8 : 14) // ANALOG NUMBERING
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
 #define LCD_PINS_RS 32
81
 #define LCD_PINS_RS 32
82
 #define LCD_PINS_ENABLE 31
82
 #define LCD_PINS_ENABLE 31

+ 2
- 2
Marlin/pins_MINIRAMBO.h View File

91
 #if ENABLED(ULTRA_LCD)
91
 #if ENABLED(ULTRA_LCD)
92
   #define KILL_PIN 32
92
   #define KILL_PIN 32
93
   #if ENABLED(NEWPANEL)
93
   #if ENABLED(NEWPANEL)
94
-   //arduino pin which triggers an piezzo beeper
95
-    #define BEEPER 84      // Beeper on AUX-4
94
+
95
+    #define BEEPER_PIN 84      // Beeper on AUX-4
96
     #define LCD_PINS_RS 82
96
     #define LCD_PINS_RS 82
97
     #define LCD_PINS_ENABLE 18
97
     #define LCD_PINS_ENABLE 18
98
     #define LCD_PINS_D4 19
98
     #define LCD_PINS_D4 19

+ 1
- 2
Marlin/pins_MINITRONICS.h View File

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

+ 2
- 2
Marlin/pins_PRINTRBOARD.h View File

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

+ 7
- 5
Marlin/pins_RAMBO.h View File

112
 #if ENABLED(ULTRA_LCD)
112
 #if ENABLED(ULTRA_LCD)
113
   #define KILL_PIN 80
113
   #define KILL_PIN 80
114
   #if ENABLED(NEWPANEL)
114
   #if ENABLED(NEWPANEL)
115
-   //arduino pin which triggers an piezzo beeper
116
-    #define BEEPER 79      // Beeper on AUX-4
115
+
116
+    #define BEEPER_PIN 79      // Beeper on AUX-4
117
+
117
     #define LCD_PINS_RS 70
118
     #define LCD_PINS_RS 70
118
     #define LCD_PINS_ENABLE 71
119
     #define LCD_PINS_ENABLE 71
119
     #define LCD_PINS_D4 72
120
     #define LCD_PINS_D4 72
133
     #define SDCARDDETECT 81    // Ramps does not use this port
134
     #define SDCARDDETECT 81    // Ramps does not use this port
134
 
135
 
135
   #else //!NEWPANEL - old style panel with shift register
136
   #else //!NEWPANEL - old style panel with shift register
136
-    //arduino pin witch triggers an piezzo beeper
137
-    #define BEEPER 33    No Beeper added
137
+
138
+    #define BEEPER_PIN 33    // No Beeper added
139
+
138
     //buttons are attached to a shift register
140
     //buttons are attached to a shift register
139
     // Not wired this yet
141
     // Not wired this yet
140
     // #define SHIFT_CLK 38
142
     // #define SHIFT_CLK 38
165
 #endif // ULTRA_LCD
167
 #endif // ULTRA_LCD
166
 
168
 
167
 #if ENABLED(VIKI2) || ENABLED(miniVIKI)
169
 #if ENABLED(VIKI2) || ENABLED(miniVIKI)
168
- #define BEEPER 44
170
+ #define BEEPER_PIN 44
169
  // Pins for DOGM SPI LCD Support
171
  // Pins for DOGM SPI LCD Support
170
  #define DOGLCD_A0  70 
172
  #define DOGLCD_A0  70 
171
  #define DOGLCD_CS  71 
173
  #define DOGLCD_CS  71 

+ 8
- 7
Marlin/pins_RAMPS_13.h View File

159
     #endif
159
     #endif
160
 
160
 
161
     #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
161
     #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
162
-      #define BEEPER 37
162
+      #define BEEPER_PIN 37
163
 
163
 
164
       #define BTN_EN1 31
164
       #define BTN_EN1 31
165
       #define BTN_EN2 33
165
       #define BTN_EN2 33
186
       #define SDCARDDETECT 49
186
       #define SDCARDDETECT 49
187
       #define LCD_SDSS 53
187
       #define LCD_SDSS 53
188
       #define KILL_PIN 41
188
       #define KILL_PIN 41
189
-      #define BEEPER 23
189
+      #define BEEPER_PIN 23
190
       #define DOGLCD_CS 29
190
       #define DOGLCD_CS 29
191
       #define DOGLCD_A0 27
191
       #define DOGLCD_A0 27
192
       #define LCD_PIN_BL 33
192
       #define LCD_PIN_BL 33
193
     #elif defined(MINIPANEL)
193
     #elif defined(MINIPANEL)
194
-       #define BEEPER 42
194
+       #define BEEPER_PIN 42
195
        // Pins for DOGM SPI LCD Support
195
        // Pins for DOGM SPI LCD Support
196
        #define DOGLCD_A0  44
196
        #define DOGLCD_A0  44
197
        #define DOGLCD_CS  66
197
        #define DOGLCD_CS  66
211
        #define BTN_ENC 59  //the click switch
211
        #define BTN_ENC 59  //the click switch
212
        //not connected to a pin
212
        //not connected to a pin
213
        #define SDCARDDETECT 49
213
        #define SDCARDDETECT 49
214
+
214
     #else
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
       // buttons are directly attached using AUX-2
219
       // buttons are directly attached using AUX-2
219
       #if ENABLED(REPRAPWORLD_KEYPAD)
220
       #if ENABLED(REPRAPWORLD_KEYPAD)
241
 
242
 
242
     #endif
243
     #endif
243
   #else // !NEWPANEL (Old-style panel with shift register)
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
     // Buttons are attached to a shift register
248
     // Buttons are attached to a shift register
248
     // Not wired yet
249
     // Not wired yet

+ 4
- 4
Marlin/pins_RIGIDBOARD.h View File

22
 
22
 
23
 #if ENABLED(RIGIDBOT_PANEL)
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
   #undef SDCARDDETECT
28
   #undef SDCARDDETECT
29
   #define SDCARDDETECT 22
29
   #define SDCARDDETECT 22
48
 
48
 
49
 #elif defined(REPRAP_DISCOUNT_SMART_CONTROLLER)
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
   #undef  SDCARDDETECT
54
   #undef  SDCARDDETECT
55
   #define SDCARDDETECT 22
55
   #define SDCARDDETECT 22

+ 1
- 1
Marlin/pins_RUMBA.h View File

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

+ 3
- 3
Marlin/pins_SANGUINOLOLU_11.h View File

95
 #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
95
 #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
96
 
96
 
97
   // No buzzer installed
97
   // No buzzer installed
98
-  #define BEEPER -1
98
+  #define BEEPER_PIN -1
99
 
99
 
100
   // LCD Pins
100
   // LCD Pins
101
   #if ENABLED(DOGLCD)
101
   #if ENABLED(DOGLCD)
106
         #define LCD_PINS_RS     30 //CS chip select /SS chip slave select
106
         #define LCD_PINS_RS     30 //CS chip select /SS chip slave select
107
         #define LCD_PINS_ENABLE 29 //SID (MOSI)
107
         #define LCD_PINS_ENABLE 29 //SID (MOSI)
108
         #define LCD_PINS_D4     17 //SCK (CLK) clock
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
       #else         // Sanguinololu 1.3
110
       #else         // Sanguinololu 1.3
111
         #define LCD_PINS_RS      4 
111
         #define LCD_PINS_RS      4 
112
         #define LCD_PINS_ENABLE 17 
112
         #define LCD_PINS_ENABLE 17 
160
 
160
 
161
 #elif ENABLED(MAKRPANEL)
161
 #elif ENABLED(MAKRPANEL)
162
 
162
 
163
-  #define BEEPER                29
163
+  #define BEEPER_PIN            29
164
 
164
 
165
   // Pins for DOGM SPI LCD Support
165
   // Pins for DOGM SPI LCD Support
166
   #define DOGLCD_A0             30
166
   #define DOGLCD_A0             30

+ 1
- 1
Marlin/pins_SAV_MKI.h View File

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

+ 3
- 2
Marlin/pins_TEENSYLU.h View File

68
 #endif
68
 #endif
69
 
69
 
70
 #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
70
 #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
71
-  //we have no buzzer installed
72
-  #define BEEPER -1
73
   //LCD Pins
71
   //LCD Pins
72
+
73
+  #define BEEPER_PIN -1
74
+
74
   #if ENABLED(LCD_I2C_PANELOLU2)
75
   #if ENABLED(LCD_I2C_PANELOLU2)
75
     #define BTN_EN1 27  //RX1 - fastio.h pin mapping 27
76
     #define BTN_EN1 27  //RX1 - fastio.h pin mapping 27
76
     #define BTN_EN2 26  //TX1 - fastio.h pin mapping 26
77
     #define BTN_EN2 26  //TX1 - fastio.h pin mapping 26

+ 1
- 2
Marlin/pins_ULTIMAIN_2.h View File

58
 #define MOTOR_CURRENT_PWM_RANGE 2000
58
 #define MOTOR_CURRENT_PWM_RANGE 2000
59
 #define DEFAULT_PWM_MOTOR_CURRENT  {1300, 1300, 1250}
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
 #define LCD_PINS_RS 20
63
 #define LCD_PINS_RS 20
65
 #define LCD_PINS_ENABLE 15
64
 #define LCD_PINS_ENABLE 15

+ 3
- 6
Marlin/pins_ULTIMAKER.h View File

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

+ 1
- 1
Marlin/ultralcd.cpp View File

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

Loading…
Cancel
Save