🧑‍💻 Pins and debug list cleanup (#24878)

This commit is contained in:
Scott Lahteine 2022-10-17 23:00:26 -05:00 committed by GitHub
parent e298266eff
commit 81976c4360
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 1092 additions and 763 deletions

View file

@ -293,11 +293,11 @@ enum ClockSource2 : uint8_t {
#if HAS_MOTOR_CURRENT_PWM #if HAS_MOTOR_CURRENT_PWM
#if PIN_EXISTS(MOTOR_CURRENT_PWM_XY) #if PIN_EXISTS(MOTOR_CURRENT_PWM_XY)
#define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_Z || P == MOTOR_CURRENT_PWM_XY) #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_E0 || P == MOTOR_CURRENT_PWM_E1 || P == MOTOR_CURRENT_PWM_Z || P == MOTOR_CURRENT_PWM_XY)
#elif PIN_EXISTS(MOTOR_CURRENT_PWM_Z) #elif PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
#define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_Z) #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_E0 || P == MOTOR_CURRENT_PWM_E1 || P == MOTOR_CURRENT_PWM_Z)
#else #else
#define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E) #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_E0 || P == MOTOR_CURRENT_PWM_E1)
#endif #endif
#else #else
#define PWM_CHK_MOTOR_CURRENT(P) false #define PWM_CHK_MOTOR_CURRENT(P) false

View file

@ -26,7 +26,7 @@
#if ((!HAS_ADC_BUTTONS && IS_NEWPANEL) || BUTTONS_EXIST(EN1, EN2)) && !IS_TFTGLCD_PANEL #if ((!HAS_ADC_BUTTONS && IS_NEWPANEL) || BUTTONS_EXIST(EN1, EN2)) && !IS_TFTGLCD_PANEL
#define HAS_ENCODER_WHEEL 1 #define HAS_ENCODER_WHEEL 1
#endif #endif
#if (HAS_ENCODER_WHEEL || ANY_BUTTON(ENC, BACK, UP, DWN, LFT, RT)) && DISABLED(TOUCH_UI_FTDI_EVE) #if (HAS_ENCODER_WHEEL || ANY_BUTTON(ENC, BACK, UP, DOWN, LEFT, RIGHT)) && DISABLED(TOUCH_UI_FTDI_EVE)
#define HAS_DIGITAL_BUTTONS 1 #define HAS_DIGITAL_BUTTONS 1
#endif #endif
#if !HAS_ADC_BUTTONS && (IS_RRW_KEYPAD || (HAS_WIRED_LCD && !IS_NEWPANEL)) #if !HAS_ADC_BUTTONS && (IS_RRW_KEYPAD || (HAS_WIRED_LCD && !IS_NEWPANEL))
@ -190,18 +190,18 @@
#else #else
#define _BUTTON_PRESSED_UP false #define _BUTTON_PRESSED_UP false
#endif #endif
#if BUTTON_EXISTS(DWN) #if BUTTON_EXISTS(DOWN)
#define _BUTTON_PRESSED_DWN _BUTTON_PRESSED(DWN) #define _BUTTON_PRESSED_DWN _BUTTON_PRESSED(DOWN)
#else #else
#define _BUTTON_PRESSED_DWN false #define _BUTTON_PRESSED_DWN false
#endif #endif
#if BUTTON_EXISTS(LFT) #if BUTTON_EXISTS(LEFT)
#define _BUTTON_PRESSED_LFT _BUTTON_PRESSED(LFT) #define _BUTTON_PRESSED_LFT _BUTTON_PRESSED(LEFT)
#else #else
#define _BUTTON_PRESSED_LFT false #define _BUTTON_PRESSED_LFT false
#endif #endif
#if BUTTON_EXISTS(RT) #if BUTTON_EXISTS(RIGHT)
#define _BUTTON_PRESSED_RT _BUTTON_PRESSED(RT) #define _BUTTON_PRESSED_RT _BUTTON_PRESSED(RIGHT)
#else #else
#define _BUTTON_PRESSED_RT false #define _BUTTON_PRESSED_RT false
#endif #endif

View file

@ -482,14 +482,14 @@ void lv_encoder_pin_init() {
#if BUTTON_EXISTS(UP) #if BUTTON_EXISTS(UP)
SET_INPUT(BTN_UP); SET_INPUT(BTN_UP);
#endif #endif
#if BUTTON_EXISTS(DWN) #if BUTTON_EXISTS(DOWN)
SET_INPUT(BTN_DWN); SET_INPUT(BTN_DOWN);
#endif #endif
#if BUTTON_EXISTS(LFT) #if BUTTON_EXISTS(LEFT)
SET_INPUT(BTN_LFT); SET_INPUT(BTN_LEFT);
#endif #endif
#if BUTTON_EXISTS(RT) #if BUTTON_EXISTS(RIGHT)
SET_INPUT(BTN_RT); SET_INPUT(BTN_RIGHT);
#endif #endif
} }

View file

@ -227,14 +227,14 @@ void MarlinUI::init() {
#if BUTTON_EXISTS(UP) #if BUTTON_EXISTS(UP)
SET_INPUT(BTN_UP); SET_INPUT(BTN_UP);
#endif #endif
#if BUTTON_EXISTS(DWN) #if BUTTON_EXISTS(DOWN)
SET_INPUT(BTN_DWN); SET_INPUT(BTN_DOWN);
#endif #endif
#if BUTTON_EXISTS(LFT) #if BUTTON_EXISTS(LFT)
SET_INPUT(BTN_LFT); SET_INPUT(BTN_LEFT);
#endif #endif
#if BUTTON_EXISTS(RT) #if BUTTON_EXISTS(RT)
SET_INPUT(BTN_RT); SET_INPUT(BTN_RIGHT);
#endif #endif
#endif #endif
@ -1303,7 +1303,7 @@ void MarlinUI::init() {
// //
// Directional buttons // Directional buttons
// //
#if ANY_BUTTON(UP, DWN, LFT, RT) #if ANY_BUTTON(UP, DOWN, LEFT, RIGHT)
const int8_t pulses = epps * encoderDirection; const int8_t pulses = epps * encoderDirection;
@ -1311,20 +1311,20 @@ void MarlinUI::init() {
encoderDiff = (ENCODER_STEPS_PER_MENU_ITEM) * pulses; encoderDiff = (ENCODER_STEPS_PER_MENU_ITEM) * pulses;
next_button_update_ms = now + 300; next_button_update_ms = now + 300;
} }
else if (BUTTON_PRESSED(DWN)) { else if (BUTTON_PRESSED(DOWN)) {
encoderDiff = -(ENCODER_STEPS_PER_MENU_ITEM) * pulses; encoderDiff = -(ENCODER_STEPS_PER_MENU_ITEM) * pulses;
next_button_update_ms = now + 300; next_button_update_ms = now + 300;
} }
else if (BUTTON_PRESSED(LFT)) { else if (BUTTON_PRESSED(LEFT)) {
encoderDiff = -pulses; encoderDiff = -pulses;
next_button_update_ms = now + 300; next_button_update_ms = now + 300;
} }
else if (BUTTON_PRESSED(RT)) { else if (BUTTON_PRESSED(RIGHT)) {
encoderDiff = pulses; encoderDiff = pulses;
next_button_update_ms = now + 300; next_button_update_ms = now + 300;
} }
#endif // UP || DWN || LFT || RT #endif // UP || DOWN || LEFT || RIGHT
buttons = (newbutton | TERN0(HAS_SLOW_BUTTONS, slow_buttons) buttons = (newbutton | TERN0(HAS_SLOW_BUTTONS, slow_buttons)
#if BOTH(HAS_TOUCH_BUTTONS, HAS_ENCODER_ACTION) #if BOTH(HAS_TOUCH_BUTTONS, HAS_ENCODER_ACTION)

View file

@ -101,9 +101,9 @@
// LCD Display input pins // LCD Display input pins
// //
#define BTN_UP 25 #define BTN_UP 25
#define BTN_DWN 26 #define BTN_DOWN 26
#define BTN_LFT 27 #define BTN_LEFT 27
#define BTN_RT 28 #define BTN_RIGHT 28
// 'OK' button // 'OK' button
#define BTN_ENC 29 #define BTN_ENC 29

View file

@ -204,13 +204,12 @@
#define BTN_EN2 75 // J4, UP #define BTN_EN2 75 // J4, UP
#define BTN_EN1 73 // J3, DOWN #define BTN_EN1 73 // J3, DOWN
// STOP button connected as KILL_PIN // STOP button connected as KILL_PIN
#define KILL_PIN 14 // J1, RIGHT #define KILL_PIN 14 // J1, RIGHT (not connected)
//KILL - not connected
#define BEEPER_PIN 8 // H5, SD_WP #define BEEPER_PIN 8 // H5, SD_WP
//on board leds // Onboard leds
#define STAT_LED_RED_LED SERVO0_PIN // C1 (1280-EX1, DEBUG2) #define STAT_LED_RED_PIN SERVO0_PIN // C1 (1280-EX1, DEBUG2)
#define STAT_LED_BLUE_PIN SERVO1_PIN // C0 (1280-EX2, DEBUG3) #define STAT_LED_BLUE_PIN SERVO1_PIN // C0 (1280-EX2, DEBUG3)
#else #else
@ -220,9 +219,9 @@
#define SR_STROBE_PIN 33 // C4 #define SR_STROBE_PIN 33 // C4
#define BTN_UP 75 // J4 #define BTN_UP 75 // J4
#define BTN_DWN 73 // J3 #define BTN_DOWN 73 // J3
#define BTN_LFT 72 // J2 #define BTN_LEFT 72 // J2
#define BTN_RT 14 // J1 #define BTN_RIGHT 14 // J1
// Disable encoder // Disable encoder
#undef BTN_EN1 #undef BTN_EN1

View file

@ -135,7 +135,7 @@
#if IS_NEWPANEL #if IS_NEWPANEL
#define BTN_ENC 16 // Enter Pin #define BTN_ENC 16 // Enter Pin
#define BTN_UP 19 // Button UP Pin #define BTN_UP 19 // Button UP Pin
#define BTN_DWN 17 // Button DOWN Pin #define BTN_DOWN 17 // Button DOWN Pin
#endif #endif
// Additional connectors/pins on the Overlord V1.X board // Additional connectors/pins on the Overlord V1.X board

View file

@ -45,7 +45,7 @@
#define REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(#NAME, COUNTER) #define REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(#NAME, COUNTER)
#include "pinsDebug_list.h" #include "pinsDebug_list.h"
#line 48 #line 49
// manually add pins that have names that are macros which don't play well with these macros // manually add pins that have names that are macros which don't play well with these macros
#if ANY(AVR_ATmega2560_FAMILY, AVR_ATmega1284_FAMILY, ARDUINO_ARCH_SAM, TARGET_LPC1768) #if ANY(AVR_ATmega2560_FAMILY, AVR_ATmega1284_FAMILY, ARDUINO_ARCH_SAM, TARGET_LPC1768)
@ -164,7 +164,7 @@ const PinInfo pin_array[] PROGMEM = {
#endif #endif
#include "pinsDebug_list.h" #include "pinsDebug_list.h"
#line 167 #line 168
}; };

File diff suppressed because it is too large Load diff

View file

@ -103,9 +103,9 @@
// Direction buttons // Direction buttons
#define BTN_UP 37 #define BTN_UP 37
#define BTN_DWN 35 #define BTN_DOWN 35
#define BTN_LFT 33 #define BTN_LEFT 33
#define BTN_RT 32 #define BTN_RIGHT 32
// 'R' button // 'R' button
#undef BTN_ENC #undef BTN_ENC

View file

@ -107,8 +107,8 @@
#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 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.
// //
// LCD / Controller // LCD / Controller

View file

@ -28,31 +28,20 @@
#include "pins_MKS_GEN_13.h" // ... RAMPS #include "pins_MKS_GEN_13.h" // ... RAMPS
#define ZRIB_V20_D6_PIN 6 // Fan
#define ZRIB_V20_D9_PIN 9 // Fan2
#define ZRIB_V20_A10_PIN 10
#define ZRIB_V20_D16_PIN 16
#define ZRIB_V20_D17_PIN 17
#define ZRIB_V20_D23_PIN 23
#define ZRIB_V20_D25_PIN 25
#define ZRIB_V20_D27_PIN 27
#define ZRIB_V20_D29_PIN 29
#define ZRIB_V20_D37_PIN 37
// //
// Auto fans // Auto fans
// //
#ifndef E0_AUTO_FAN_PIN #ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN ZRIB_V20_D6_PIN #define E0_AUTO_FAN_PIN 6 // Fan
#endif #endif
#ifndef E1_AUTO_FAN_PIN #ifndef E1_AUTO_FAN_PIN
#define E1_AUTO_FAN_PIN ZRIB_V20_D6_PIN #define E1_AUTO_FAN_PIN 6
#endif #endif
#ifndef E2_AUTO_FAN_PIN #ifndef E2_AUTO_FAN_PIN
#define E2_AUTO_FAN_PIN ZRIB_V20_D6_PIN #define E2_AUTO_FAN_PIN 6
#endif #endif
#ifndef E3_AUTO_FAN_PIN #ifndef E3_AUTO_FAN_PIN
#define E3_AUTO_FAN_PIN ZRIB_V20_D6_PIN #define E3_AUTO_FAN_PIN 6
#endif #endif
#ifndef FILWIDTH_PIN #ifndef FILWIDTH_PIN
@ -76,12 +65,12 @@
#undef BTN_EN2 #undef BTN_EN2
#undef BTN_ENC #undef BTN_ENC
#define LCD_PINS_RS ZRIB_V20_D16_PIN #define LCD_PINS_RS 16
#define LCD_PINS_ENABLE ZRIB_V20_D17_PIN #define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 ZRIB_V20_D23_PIN #define LCD_PINS_D4 23
#define LCD_PINS_D5 ZRIB_V20_D25_PIN #define LCD_PINS_D5 25
#define LCD_PINS_D6 ZRIB_V20_D27_PIN #define LCD_PINS_D6 27
#define LCD_PINS_D7 ZRIB_V20_D29_PIN #define LCD_PINS_D7 29
#define ADC_KEYPAD_PIN ZRIB_V20_A10_PIN #define ADC_KEYPAD_PIN 10 // Analog Input
#define BEEPER_PIN ZRIB_V20_D37_PIN #define BEEPER_PIN 37
#endif #endif