Commit f797d3b4 authored by MagoKimbra's avatar MagoKimbra

Merge remote-tracking branch 'refs/remotes/origin/master' into dev

parents 951e0e16 5aa9a277
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
* M110 - Set the current line number * M110 - Set the current line number
* M111 - Set debug flags with S<mask>. See flag bits defined in Marlin.h. * M111 - Set debug flags with S<mask>. See flag bits defined in Marlin.h.
* M112 - Emergency stop * M112 - Emergency stop
* M114 - Output current position to serial port, (V)erbose for user * M114 - Output current position to serial port
* M115 - Capabilities string * M115 - Capabilities string
* M117 - Display a message on the controller screen * M117 - Display a message on the controller screen
* M119 - Output Endstop status to serial port * M119 - Output Endstop status to serial port
......
...@@ -626,9 +626,6 @@ ...@@ -626,9 +626,6 @@
#if ENABLED(RA_CONTROL_PANEL) #if ENABLED(RA_CONTROL_PANEL)
#define SDSS 53 #define SDSS 53
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#define SD_DETECT_PIN 28 #define SD_DETECT_PIN 28
#define BTN_EN1 14 #define BTN_EN1 14
...@@ -788,9 +785,6 @@ ...@@ -788,9 +785,6 @@
#define SDPOWER 48 #define SDPOWER 48
#define SDSS 53 #define SDSS 53
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#define LED_PIN 13 #define LED_PIN 13
#define ORIG_PS_ON_PIN -1 #define ORIG_PS_ON_PIN -1
#define KILL_PIN -1 #define KILL_PIN -1
...@@ -818,13 +812,6 @@ ...@@ -818,13 +812,6 @@
#else #else
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present #define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif #endif
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#endif
#endif // RAMPS_OLD #endif // RAMPS_OLD
/****************************************************************************************/ /****************************************************************************************/
...@@ -887,9 +874,6 @@ ...@@ -887,9 +874,6 @@
#define SDPOWER -1 #define SDPOWER -1
#define SDSS 53 #define SDSS 53
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#define LED_PIN 13 #define LED_PIN 13
#define ORIG_FAN_PIN 9 #define ORIG_FAN_PIN 9
...@@ -1090,9 +1074,6 @@ ...@@ -1090,9 +1074,6 @@
#define SDPOWER -1 #define SDPOWER -1
#define SDSS 53 #define SDSS 53
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#define LED_PIN 13 #define LED_PIN 13
#define ORIG_FAN_PIN 4 #define ORIG_FAN_PIN 4
...@@ -1287,9 +1268,6 @@ ...@@ -1287,9 +1268,6 @@
#define SDPOWER -1 #define SDPOWER -1
#define SDSS 53 #define SDSS 53
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#define LED_PIN 13 #define LED_PIN 13
#define ORIG_FAN_PIN 9 #define ORIG_FAN_PIN 9
...@@ -1484,9 +1462,6 @@ ...@@ -1484,9 +1462,6 @@
#define SDPOWER -1 #define SDPOWER -1
#define SDSS 53 #define SDSS 53
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#define LED_PIN 13 #define LED_PIN 13
#define ORIG_FAN_PIN 8 #define ORIG_FAN_PIN 8
...@@ -1681,9 +1656,6 @@ ...@@ -1681,9 +1656,6 @@
#define SDPOWER -1 #define SDPOWER -1
#define SDSS 53 #define SDSS 53
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#define LED_PIN 13 #define LED_PIN 13
#define ORIG_FAN_PIN 8 #define ORIG_FAN_PIN 8
...@@ -1894,19 +1866,16 @@ ...@@ -1894,19 +1866,16 @@
#define SDPOWER -1 #define SDPOWER -1
#define SDSS 53 #define SDSS 53
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#define LED_PIN 13 #define LED_PIN 13
#define ORIG_FAN_PIN 8 #define ORIG_FAN_PIN 8
#define ORIG_PS_ON_PIN 4 #define ORIG_PS_ON_PIN 4
#define KILL_PIN -1 //80 with Smart Controller LCD #define KILL_PIN -1 // 80 with Smart Controller LCD
#define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing. #define SUICIDE_PIN -1 // PIN that has to be turned on right after start, to keep power flowing.
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
#define KILL_PIN 80 #define KILL_PIN 80
#if ENABLED(NEWPANEL) #if ENABLED(NEWPANEL)
//arduino pin which triggers an piezzo beeper // arduino pin which triggers an piezzo beeper
#define ORIG_BEEPER_PIN 79 // Beeper on AUX-4 #define ORIG_BEEPER_PIN 79 // Beeper on AUX-4
#define LCD_PINS_RS 70 #define LCD_PINS_RS 70
#define LCD_PINS_ENABLE 71 #define LCD_PINS_ENABLE 71
...@@ -2067,9 +2036,6 @@ ...@@ -2067,9 +2036,6 @@
#define SDPOWER -1 #define SDPOWER -1
#define SDSS 53 #define SDSS 53
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#define LED_PIN 13 #define LED_PIN 13
#define ORIG_FAN_PIN 9 #define ORIG_FAN_PIN 9
...@@ -2367,19 +2333,6 @@ ...@@ -2367,19 +2333,6 @@
#endif // SPARK_FULL_GRAPHICS #endif // SPARK_FULL_GRAPHICS
#endif // ULTRA_LCD #endif // ULTRA_LCD
// SPI for Max6675 Thermocouple
// works with radds??? #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
//#define MAX_SCK_PIN 52
//#define MAX_MISO_PIN 50
//#define MAX_MOSI_PIN 51
//#define MAX6675_SS 53
//#else
//#define MAX6675_SS 49
//#endif
#endif //RADDS #endif //RADDS
/****************************************************************************************/ /****************************************************************************************/
...@@ -2499,16 +2452,7 @@ ...@@ -2499,16 +2452,7 @@
#endif //ULTRA_LCD #endif //ULTRA_LCD
// SPI for Max6675 Thermocouple // SPI for Max6675 Thermocouple
#define MAX6675_SS 53
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define MAX_SCK_PIN 52
#define MAX_MISO_PIN 50
#define MAX_MOSI_PIN 51
#define MAX6675_SS 53
#else
#define MAX6675_SS 49
#endif
#endif //RAMPS-FD #endif //RAMPS-FD
/****************************************************************************************/ /****************************************************************************************/
...@@ -3228,16 +3172,7 @@ ...@@ -3228,16 +3172,7 @@
#endif //ULTRA_LCD #endif //ULTRA_LCD
// SPI for Max6675 Thermocouple // SPI for Max6675 Thermocouple
#define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#define MAX6675_SS 66// Do not use pin 53 if there is even the remote possibility of using Display/SD card
#else
#define MAX6675_SS 66// Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
#endif // AZTEEG X3 #endif // AZTEEG X3
/****************************************************************************************/ /****************************************************************************************/
...@@ -3437,25 +3372,17 @@ ...@@ -3437,25 +3372,17 @@
#define LCD_SCREEN_ROT_180 #define LCD_SCREEN_ROT_180
//The encoder and click button //The encoder and click button
#define BTN_EN1 22 #define BTN_EN1 22
#define BTN_EN2 7 #define BTN_EN2 7
#define BTN_ENC 39 //the click switch #define BTN_ENC 39 // the click switch
#define SDSS 53 #define SDSS 53
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#define KILL_PIN 31 #define KILL_PIN 31
#endif #endif
#if DISABLED(SDSUPPORT) #define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#define MAX6675_SS 66// Do not use pin 53 if there is even the remote possibility of using Display/SD card
#else
#define MAX6675_SS 66// Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
#endif // AZTEEG X3 PRO #endif // AZTEEG X3 PRO
/****************************************************************************************/ /****************************************************************************************/
...@@ -4271,15 +4198,7 @@ ...@@ -4271,15 +4198,7 @@
#endif // ULTRA_LCD && NEWPANEL #endif // ULTRA_LCD && NEWPANEL
// SPI for Max6675 Thermocouple // SPI for Max6675 Thermocouple
#if DISABLED(SDSUPPORT) #define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#else
#define MAX6675_SS 66// Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
#endif // 3DRAG #endif // 3DRAG
/****************************************************************************************/ /****************************************************************************************/
...@@ -4394,15 +4313,7 @@ ...@@ -4394,15 +4313,7 @@
#endif // ULTRA_LCD && NEWPANEL #endif // ULTRA_LCD && NEWPANEL
// SPI for Max6675 Thermocouple // SPI for Max6675 Thermocouple
#if DISABLED(SDSUPPORT) #define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#else
#define MAX6675_SS 66// Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
#endif // K8200 #endif // K8200
/****************************************************************************************/ /****************************************************************************************/
...@@ -4479,13 +4390,6 @@ ...@@ -4479,13 +4390,6 @@
#define KILL_PIN -1 #define KILL_PIN -1
#define ALARM_PIN -1 #define ALARM_PIN -1
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 9
#define MISO_PIN 11
#define MOSI_PIN 10
#endif
#endif // TEENSYLU || PRINTRBOARD #endif // TEENSYLU || PRINTRBOARD
/****************************************************************************************/ /****************************************************************************************/
...@@ -4678,13 +4582,6 @@ ...@@ -4678,13 +4582,6 @@
#define KILL_PIN -1 #define KILL_PIN -1
#define ALARM_PIN -1 #define ALARM_PIN -1
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 9
#define MISO_PIN 11
#define MOSI_PIN 10
#endif
#endif // BRAINWAVE #endif // BRAINWAVE
/****************************************************************************************/ /****************************************************************************************/
...@@ -4749,21 +4646,13 @@ ...@@ -4749,21 +4646,13 @@
#define ALARM_PIN -1 #define ALARM_PIN -1
#define SD_DETECT_PIN -1 #define SD_DETECT_PIN -1
#define ORIG_BEEPER_PIN -1
#if DISABLED(SDSUPPORT) #define LCD_PINS_RS -1
// these pins are defined in the SD library if building with SD support #define LCD_PINS_ENABLE -1
#define SCK_PIN 9 #define LCD_PINS_D4 -1
#define MISO_PIN 11 #define LCD_PINS_D5 -1
#define MOSI_PIN 10 #define LCD_PINS_D6 -1
#endif #define LCD_PINS_D7 -1
#define ORIG_BEEPER_PIN -1
#define LCD_PINS_RS -1
#define LCD_PINS_ENABLE -1
#define LCD_PINS_D4 -1
#define LCD_PINS_D5 -1
#define LCD_PINS_D6 -1
#define LCD_PINS_D7 -1
#if ENABLED(SAV_3DLCD) #if ENABLED(SAV_3DLCD)
// For LCD SHIFT register LCD // For LCD SHIFT register LCD
...@@ -4890,13 +4779,6 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a ...@@ -4890,13 +4779,6 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#define KILL_PIN -1 #define KILL_PIN -1
#define ALARM_PIN -1 #define ALARM_PIN -1
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 21 // 9
#define MISO_PIN 23 // 11
#define MOSI_PIN 22 // 10
#endif
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
#define LCD_PINS_RS 8 #define LCD_PINS_RS 8
#define LCD_PINS_ENABLE 9 #define LCD_PINS_ENABLE 9
...@@ -4974,13 +4856,6 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a ...@@ -4974,13 +4856,6 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
// The SDSS pin uses a different pin mapping from file Sd2PinMap.h // The SDSS pin uses a different pin mapping from file Sd2PinMap.h
#define SDSS 20 #define SDSS 20
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 9
#define MISO_PIN 11
#define MOSI_PIN 10
#endif
// Microstepping pins // Microstepping pins
// Note that the pin mapping is not from fastio.h // Note that the pin mapping is not from fastio.h
// See Sd2PinMap.h for the pin configurations // See Sd2PinMap.h for the pin configurations
...@@ -5329,27 +5204,53 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a ...@@ -5329,27 +5204,53 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
/**************************************************************************************** /****************************************************************************************
*********** Available chip select pins for HW SPI are 4 10 52 77 ************************ ******************** Available chip select pins for HW SPI ******************************
****************************************************************************************/ *****************************************************************************************/
#if (SDSS == 4) || (SDSS == 10) || (SDSS == 52) || (SDSS == 77) #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#if (SDSS == 4) #define MOSI_PIN 51
#define SPI_PIN 87 #define MISO_PIN 50
#define SPI_CHAN 1 #define SCK_PIN 52
#elif (SDSS == 10) #elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__) || defined(__AVR_ATmega1284P__)
#define SPI_PIN 77 #define MOSI_PIN 5
#define SPI_CHAN 0 #define MISO_PIN 6
#elif (SDSS == 52) #define SCK_PIN 7
#define SPI_PIN 86 #elif defined(__AVR_ATmega32U4__)
#define SPI_CHAN 2 #define MOSI_PIN 2
#define MISO_PIN 3
#define SCK_PIN 1
#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
#define MOSI_PIN 22
#define MISO_PIN 23
#define SCK_PIN 21
#elif defined(__AVR_ATmega168__) ||defined(__AVR_ATmega168P__) ||defined(__AVR_ATmega328P__)
#define MOSI_PIN 11
#define MISO_PIN 12
#define SCK_PIN 13
#elif defined(__AVR_ATmega1281__)
#define MOSI_PIN 11
#define MISO_PIN 12
#define SCK_PIN 10
#elif defined (__SAM3X8E__)
#if (SDSS == 4) || (SDSS == 10) || (SDSS == 52) || (SDSS == 77)
#if (SDSS == 4)
#define SPI_PIN 87
#define SPI_CHAN 1
#elif (SDSS == 10)
#define SPI_PIN 77
#define SPI_CHAN 0
#elif (SDSS == 52)
#define SPI_PIN 86
#define SPI_CHAN 2
#else
#define SPI_PIN 77
#define SPI_CHAN 0
#endif
#define MOSI_PIN 75
#define MISO_PIN 74
#define SCK_PIN 76
#else #else
#define SPI_PIN 77 #define DUE_SOFTWARE_SPI
#define SPI_CHAN 0
#endif #endif
#define MOSI_PIN 75
#define MISO_PIN 74
#define SCK_PIN 76
#else
#define DUE_SOFTWARE_SPI
#endif #endif
/****************************************************************************************/ /****************************************************************************************/
......
...@@ -5725,7 +5725,7 @@ inline void gcode_M226() { ...@@ -5725,7 +5725,7 @@ inline void gcode_M226() {
uint16_t beepS = code_seen('S') ? code_value_short() : 100; uint16_t beepS = code_seen('S') ? code_value_short() : 100;
uint32_t beepP = code_seen('P') ? code_value_long() : 1000; uint32_t beepP = code_seen('P') ? code_value_long() : 1000;
if (beepP > 5000) beepP = 5000; // limit to 5 seconds if (beepP > 5000) beepP = 5000; // limit to 5 seconds
buzz(beepS, beepP); buzz(beepP, beepS);
} }
#endif // HAS(BUZZER) #endif // HAS(BUZZER)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#if HAS(BUZZER) #if HAS(BUZZER)
#include "buzzer.h" #include "buzzer.h"
void buzz(uint16_t freq, long duration) { void buzz(long duration, uint16_t freq) {
if (freq > 0) { if (freq > 0) {
#if ENABLED(LCD_USE_I2C_BUZZER) #if ENABLED(LCD_USE_I2C_BUZZER)
lcd_buzz(duration, freq); lcd_buzz(duration, freq);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define BUZZER_H #define BUZZER_H
#if HAS(BUZZER) #if HAS(BUZZER)
void buzz(uint16_t freq, long duration); void buzz(long duration, uint16_t freq);
#endif #endif
#endif // BUZZER_H #endif // BUZZER_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment