Overrideable CASE_LIGHT_PIN

This commit is contained in:
Scott Lahteine 2020-05-07 14:57:25 -05:00
parent 10e875cd79
commit 6be76af617
25 changed files with 97 additions and 25 deletions

View file

@ -103,7 +103,10 @@
#define SDSS 53 #define SDSS 53
#define SD_DETECT_PIN 39 #define SD_DETECT_PIN 39
//#define LED_PIN 8 //#define LED_PIN 8
#define CASE_LIGHT_PIN 8 // 8 默认挤出机风扇作为Case LED如果需要PWM FAN,则需要将FAN_PIN置为7LED_PIN置为8
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 8 // 8 默认挤出机风扇作为Case LED如果需要PWM FAN,则需要将FAN_PIN置为7LED_PIN置为8
#endif
//#define SAFETY_TRIGGERED_PIN 28 // PIN to detect the safety circuit has triggered //#define SAFETY_TRIGGERED_PIN 28 // PIN to detect the safety circuit has triggered
//#define MAIN_VOLTAGE_MEASURE_PIN 14 // ANALOG PIN to measure the main voltage, with a 100k - 4k7 resitor divider. //#define MAIN_VOLTAGE_MEASURE_PIN 14 // ANALOG PIN to measure the main voltage, with a 100k - 4k7 resitor divider.

View file

@ -128,7 +128,10 @@
// //
#define SDSS 53 #define SDSS 53
#define LED_PIN 13 #define LED_PIN 13
#define CASE_LIGHT_PIN 2
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 2
#endif
// //
// LCD / Controller // LCD / Controller

View file

@ -98,7 +98,10 @@
#define SDSS 53 #define SDSS 53
#define LED_PIN 13 #define LED_PIN 13
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#define CASE_LIGHT_PIN 2
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 2
#endif
// //
// LCD / Controller // LCD / Controller

View file

@ -113,7 +113,10 @@
#define SDSS 53 #define SDSS 53
#define LED_PIN 13 #define LED_PIN 13
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#define CASE_LIGHT_PIN 2
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 2
#endif
// //
// M3/M4/M5 - Spindle/Laser Control // M3/M4/M5 - Spindle/Laser Control

View file

@ -132,7 +132,10 @@
#define SDSS 53 #define SDSS 53
#define LED_PIN 13 #define LED_PIN 13
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#define CASE_LIGHT_PIN 45 // Try the keypad connector
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 45 // Try the keypad connector
#endif
// //
// LCD / Controller // LCD / Controller

View file

@ -93,4 +93,7 @@
#define STAT_LED_RED_PIN 23 #define STAT_LED_RED_PIN 23
#define STAT_LED_BLUE_PIN 26 #define STAT_LED_BLUE_PIN 26
#define CASE_LIGHT_PIN 51
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 51
#endif

View file

@ -129,7 +129,10 @@
// //
#define SDSS 77 #define SDSS 77
#define LED_PIN 13 #define LED_PIN 13
#define CASE_LIGHT_PIN 9
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 9
#endif
// //
// M3/M4/M5 - Spindle/Laser Control // M3/M4/M5 - Spindle/Laser Control

View file

@ -143,7 +143,10 @@
// //
#define SDSS 53 #define SDSS 53
#define LED_PIN 13 #define LED_PIN 13
#define CASE_LIGHT_PIN 9
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 9
#endif
// //
// M3/M4/M5 - Spindle/Laser Control // M3/M4/M5 - Spindle/Laser Control

View file

@ -144,7 +144,10 @@
#define SDSS 53 #define SDSS 53
#define LED_PIN 13 #define LED_PIN 13
#define PS_ON_PIN 4 #define PS_ON_PIN 4
#define CASE_LIGHT_PIN 46
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 46
#endif
#ifndef FILWIDTH_PIN #ifndef FILWIDTH_PIN
#define FILWIDTH_PIN 3 // Analog Input #define FILWIDTH_PIN 3 // Analog Input

View file

@ -44,7 +44,9 @@
#define RAMPS_D9_PIN 8 #define RAMPS_D9_PIN 8
#define MOSFET_D_PIN 12 #define MOSFET_D_PIN 12
#define CASE_LIGHT_PIN -1 // Hardware PWM but one is not available on expansion header #ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN -1 // Hardware PWM but one is not available on expansion header
#endif
#include "pins_RAMPS.h" #include "pins_RAMPS.h"

View file

@ -102,7 +102,9 @@
#undef PS_ON_PIN // 12 #undef PS_ON_PIN // 12
#define PS_ON_PIN 81 // External Power Supply #define PS_ON_PIN 81 // External Power Supply
#define CASE_LIGHT_PIN 44 // Hardware PWM #ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 44 // Hardware PWM
#endif
// This board has headers for Z-min, Z-max and IND_S_5V *but* as the bq team // This board has headers for Z-min, Z-max and IND_S_5V *but* as the bq team
// decided to ship the printer only with the probe and no additional Z-min // decided to ship the printer only with the probe and no additional Z-min

View file

@ -172,7 +172,9 @@
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#endif #endif
#define CASE_LIGHT_PIN 5 #ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 5
#endif
// //
// LCD / Controller // LCD / Controller

View file

@ -175,7 +175,9 @@
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#endif #endif
#define CASE_LIGHT_PIN 8 #ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 8
#endif
// //
// LCD / Controller // LCD / Controller

View file

@ -134,12 +134,16 @@
// //
// Misc. Functions // Misc. Functions
// //
#define CASE_LIGHT_PIN 5
#define SDSS 53 #define SDSS 53
#ifndef LED_PIN #ifndef LED_PIN
#define LED_PIN 13 #define LED_PIN 13
#endif #endif
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 5
#endif
#define SPINDLE_LASER_PWM_PIN -1 // Hardware PWM #define SPINDLE_LASER_PWM_PIN -1 // Hardware PWM
#define SPINDLE_LASER_ENA_PIN 4 // Pullup! #define SPINDLE_LASER_ENA_PIN 4 // Pullup!

View file

@ -38,7 +38,7 @@
#define FAN_PIN 9 // PH6 ** Pin18 ** PWM9 #define FAN_PIN 9 // PH6 ** Pin18 ** PWM9
// Other Mods // Other Mods
#define CASE_LIGHT_PIN 11 // PB5 ** Pin24 ** PWM11
#define SERVO3_PIN 12 // PB6 ** Pin25 ** D12 #define SERVO3_PIN 12 // PB6 ** Pin25 ** D12
#define PS_ON_PIN 2 // X+ // PE4 ** Pin6 ** PWM2 **MUST BE HARDWARE PWM #define PS_ON_PIN 2 // X+ // PE4 ** Pin6 ** PWM2 **MUST BE HARDWARE PWM
#define FILWIDTH_PIN 15 // Y+ // PJ0 ** Pin63 ** USART3_RX **Pin should have a pullup! #define FILWIDTH_PIN 15 // Y+ // PJ0 ** Pin63 ** USART3_RX **Pin should have a pullup!
@ -54,6 +54,10 @@
#define RGB_LED_B_PIN 52 #define RGB_LED_B_PIN 52
#endif #endif
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 11 // PB5 ** Pin24 ** PWM11
#endif
#include "pins_MKS_BASE_common.h" #include "pins_MKS_BASE_common.h"
/* /*

View file

@ -106,7 +106,10 @@
#define SDPOWER_PIN 48 #define SDPOWER_PIN 48
#define SDSS 53 #define SDSS 53
#define LED_PIN 13 #define LED_PIN 13
#define CASE_LIGHT_PIN 45 // Hardware PWM
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 45 // Hardware PWM
#endif
// //
// M3/M4/M5 - Spindle/Laser Control // M3/M4/M5 - Spindle/Laser Control

View file

@ -153,7 +153,10 @@
#define LED_PIN 13 #define LED_PIN 13
#define PS_ON_PIN 45 #define PS_ON_PIN 45
#define KILL_PIN 46 #define KILL_PIN 46
#define CASE_LIGHT_PIN 45
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 45
#endif
// //
// M3/M4/M5 - Spindle/Laser Control // M3/M4/M5 - Spindle/Laser Control

View file

@ -111,7 +111,10 @@
#define LED_PIN 13 #define LED_PIN 13
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#define SUICIDE_PIN 54 // PIN that has to be turned on right after start, to keep power flowing. #define SUICIDE_PIN 54 // PIN that has to be turned on right after start, to keep power flowing.
#define CASE_LIGHT_PIN 8
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 8
#endif
// //
// LCD / Controller // LCD / Controller

View file

@ -216,7 +216,9 @@
// Case Light // Case Light
#define CASE_LIGHT_PIN GPIO_PB1_J20_5 #ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN GPIO_PB1_J20_5
#endif
// 2MB SPI Flash // 2MB SPI Flash
#define SPI_FLASH_SS 52 // D52 PB21 #define SPI_FLASH_SS 52 // D52 PB21

View file

@ -106,7 +106,10 @@
// //
#define SDSS 17 #define SDSS 17
#define DEBUG_PIN 0 #define DEBUG_PIN 0
#define CASE_LIGHT_PIN 16 // Hardware PWM
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 16 // Hardware PWM
#endif
// RS485 pins // RS485 pins
#define TX_ENABLE_PIN 12 #define TX_ENABLE_PIN 12

View file

@ -102,7 +102,10 @@
// Misc. Functions // Misc. Functions
// //
#define PS_ON_PIN 15 #define PS_ON_PIN 15
#define CASE_LIGHT_PIN 15 // Hardware PWM
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 15 // Hardware PWM
#endif
// A pin for debugging // A pin for debugging
#define DEBUG_PIN 0 #define DEBUG_PIN 0

View file

@ -104,7 +104,10 @@
// //
#define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support #define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support
#define PS_ON_PIN 19 #define PS_ON_PIN 19
#define CASE_LIGHT_PIN 15 // Hardware PWM
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 15 // Hardware PWM
#endif
// A pin for debugging // A pin for debugging
#define DEBUG_PIN -1 #define DEBUG_PIN -1

View file

@ -84,7 +84,10 @@
// //
#define SDSS -1 #define SDSS -1
#define LED_PIN -1 #define LED_PIN -1
#define CASE_LIGHT_PIN PA8 // 8
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN PA8 // 8
#endif
#define PS_ON_PIN -1 #define PS_ON_PIN -1
#define KILL_PIN PD6 // LED strip 24v #define KILL_PIN PD6 // LED strip 24v

View file

@ -160,7 +160,10 @@
#define SDSS 20 // B0 #define SDSS 20 // B0
#define LED_PIN 6 // D6 #define LED_PIN 6 // D6
#define PS_ON_PIN 27 // B7 #define PS_ON_PIN 27 // B7
#define CASE_LIGHT_PIN 1 // D1 PWM2B MUST BE HARDWARE PWM
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 1 // D1 PWM2B MUST BE HARDWARE PWM
#endif
// //
// LCD / Controller // LCD / Controller

View file

@ -134,7 +134,10 @@
// Misc. Functions // Misc. Functions
// //
#define SDSS 20 // B0 JP31-6 #define SDSS 20 // B0 JP31-6
#define CASE_LIGHT_PIN 0 // D0 IO-14 PWM0B
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 0 // D0 IO-14 PWM0B
#endif
// //
// LCD / Controller // LCD / Controller