Browse Source

Merge BEEPER_PIN (PR#2564)

Richard Wackerbarth 10 years ago
parent
commit
e309fb4bcb

+ 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

+ 4
- 0
Marlin/SanityCheck.h View File

362
     #error "Z_LATE_ENABLE can't be used with COREXZ."
362
     #error "Z_LATE_ENABLE can't be used with COREXZ."
363
   #endif
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
 #endif //SANITYCHECK_H
369
 #endif //SANITYCHECK_H

+ 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

+ 16
- 15
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_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
   #if ENABLED(TEMP_STAT_LEDS)
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
   #endif
29
   #endif
29
 
30
 
30
 #elif ENABLED(TEMP_STAT_LEDS)
31
 #elif ENABLED(TEMP_STAT_LEDS)

+ 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

+ 12
- 12
Marlin/pins_ELEFU_3.h View File

13
 #define X_MAX_PIN          34
13
 #define X_MAX_PIN          34
14
 
14
 
15
 #define Y_STEP_PIN         11
15
 #define Y_STEP_PIN         11
16
-#define Y_DIR_PIN          9
16
+#define Y_DIR_PIN           9
17
 #define Y_ENABLE_PIN       12
17
 #define Y_ENABLE_PIN       12
18
 #define Y_MIN_PIN          33
18
 #define Y_MIN_PIN          33
19
 #define Y_MAX_PIN          32
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
 #define Z_MIN_PIN          31
24
 #define Z_MIN_PIN          31
25
 #define Z_MAX_PIN          30
25
 #define Z_MAX_PIN          30
26
 
26
 
48
 #define HEATER_1_PIN       46 //12V PWM2
48
 #define HEATER_1_PIN       46 //12V PWM2
49
 #define HEATER_2_PIN       17 //12V PWM3
49
 #define HEATER_2_PIN       17 //12V PWM3
50
 #define HEATER_BED_PIN     44 //DOUBLE 12V PWM
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
 #define KILL_PIN           -1
58
 #define KILL_PIN           -1
59
 
59
 
70
   #define BTN_EN2          39
70
   #define BTN_EN2          39
71
   #define BTN_ENC          15  //the click
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
 #endif // RA_CONTROL_PANEL
77
 #endif // RA_CONTROL_PANEL
78
 
78
 

+ 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

+ 66
- 64
Marlin/pins_MINIRAMBO.h View File

3
  */
3
  */
4
 
4
 
5
 #ifndef __AVR_ATmega2560__
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
 #endif
7
 #endif
8
 
8
 
9
-#define LARGE_FLASH true
9
+#define LARGE_FLASH         true
10
 
10
 
11
 
11
 
12
 #undef X_MS1_PIN
12
 #undef X_MS1_PIN
20
 #undef E1_MS1_PIN
20
 #undef E1_MS1_PIN
21
 #undef E1_MS2_PIN
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
 #if ENABLED(BARICUDA)
56
 #if ENABLED(BARICUDA)
57
-  #define HEATER_2_PIN 6
57
+  #define HEATER_2_PIN       6
58
 #else
58
 #else
59
-  #define HEATER_2_PIN -1
59
+  #define HEATER_2_PIN      -1
60
 #endif
60
 #endif
61
 
61
 
62
-#define TEMP_2_PIN -1
62
+#define TEMP_2_PIN          -1
63
 
63
 
64
 #define E0_STEP_PIN         34
64
 #define E0_STEP_PIN         34
65
 #define E0_DIR_PIN          43
65
 #define E0_DIR_PIN          43
66
 #define E0_ENABLE_PIN       26
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
 #define E1_STEP_PIN         -1
70
 #define E1_STEP_PIN         -1
71
 #define E1_DIR_PIN          -1
71
 #define E1_DIR_PIN          -1
72
 #define E1_ENABLE_PIN       -1
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
 #define MOTOR_CURRENT_PWM_XY_PIN 46
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
 //Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range
79
 //Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range
80
 #define MOTOR_CURRENT_PWM_RANGE 2000
80
 #define MOTOR_CURRENT_PWM_RANGE 2000
81
 #define DEFAULT_PWM_MOTOR_CURRENT  {1300, 1300, 1250}
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
 #if ENABLED(ULTRA_LCD)
91
 #if ENABLED(ULTRA_LCD)
92
-  #define KILL_PIN 32
92
+
93
+  #define KILL_PIN          32
94
+
93
   #if ENABLED(NEWPANEL)
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
     #define LCD_PINS_ENABLE 18
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
     //buttons are directly attached using AUX-2
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
 #endif //ULTRA_LCD
113
 #endif //ULTRA_LCD

+ 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

+ 10
- 6
Marlin/pins_RAMBO.h View File

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

+ 10
- 9
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
+
72
+  #define BEEPER_PIN       -1
73
+
74
   #if ENABLED(LCD_I2C_PANELOLU2)
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
   #endif // LCD_I2C_PANELOLU2
79
   #endif // LCD_I2C_PANELOLU2
80
-  //not connected to a pin
81
-  #define SDCARDDETECT -1    
80
+
81
+  #define SDCARDDETECT     -1
82
+
82
 #endif // ULTRA_LCD && NEWPANEL
83
 #endif // ULTRA_LCD && NEWPANEL
83
 
84
 

+ 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