♻️ SD- and SPI-related pins cleanup (#27650)

This commit is contained in:
Scott Lahteine 2025-01-23 18:00:17 -06:00 committed by GitHub
parent 0f7fb5d88d
commit ac14c65643
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
215 changed files with 366 additions and 485 deletions

View file

@ -1869,7 +1869,7 @@
*
* SCLK, MOSI, MISO --> SCLK, MOSI, MISO
* INT --> SD_DETECT_PIN [1]
* SS --> SDSS
* SS --> SD_SS_PIN
*
* [1] On AVR an interrupt-capable pin is best for UHS3 compatibility.
*/
@ -1896,7 +1896,7 @@
//#define USE_OTG_USB_HOST
#if DISABLED(USE_OTG_USB_HOST)
#define USB_CS_PIN SDSS
#define USB_CS_PIN SD_SS_PIN
#define USB_INTR_PIN SD_DETECT_PIN
#endif
#endif

View file

@ -23,43 +23,41 @@
/**
* Define SPI Pins: SCK, MISO, MOSI, SS
* Platform pins have parentheses, e.g., "(53)", so we cannot use them.
*/
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
#define AVR_SCK_PIN 13
#define AVR_MISO_PIN 12
#define AVR_MOSI_PIN 11
#define AVR_SS_PIN 10
#define _PIN_SPI_SCK 13
#define _PIN_SPI_MISO 12
#define _PIN_SPI_MOSI 11
#define _PIN_SPI_SS 10
#elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
#define AVR_SCK_PIN 7
#define AVR_MISO_PIN 6
#define AVR_MOSI_PIN 5
#define AVR_SS_PIN 4
#define _PIN_SPI_SCK 7
#define _PIN_SPI_MISO 6
#define _PIN_SPI_MOSI 5
#define _PIN_SPI_SS 4
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#define AVR_SCK_PIN 52
#define AVR_MISO_PIN 50
#define AVR_MOSI_PIN 51
#define AVR_SS_PIN 53
#define _PIN_SPI_SCK 52
#define _PIN_SPI_MISO 50
#define _PIN_SPI_MOSI 51
#define _PIN_SPI_SS 53
#elif defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
#define AVR_SCK_PIN 21
#define AVR_MISO_PIN 23
#define AVR_MOSI_PIN 22
#define AVR_SS_PIN 20
#define _PIN_SPI_SCK 21
#define _PIN_SPI_MISO 23
#define _PIN_SPI_MOSI 22
#define _PIN_SPI_SS 20
#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
#define AVR_SCK_PIN 10
#define AVR_MISO_PIN 12
#define AVR_MOSI_PIN 11
#define AVR_SS_PIN 16
#define _PIN_SPI_SCK 10
#define _PIN_SPI_MISO 12
#define _PIN_SPI_MOSI 11
#define _PIN_SPI_SS 16
#endif
#ifndef SD_SCK_PIN
#define SD_SCK_PIN AVR_SCK_PIN
#define SD_SCK_PIN _PIN_SPI_SCK
#endif
#ifndef SD_MISO_PIN
#define SD_MISO_PIN AVR_MISO_PIN
#define SD_MISO_PIN _PIN_SPI_MISO
#endif
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN AVR_MOSI_PIN
#endif
#ifndef SD_SS_PIN
#define SD_SS_PIN AVR_SS_PIN
#define SD_MOSI_PIN _PIN_SPI_MOSI
#endif

View file

@ -48,7 +48,7 @@ uint16_t MarlinHAL::adc_result;
void MarlinHAL::init() {
#if HAS_MEDIA
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
OUT_WRITE(SD_SS_PIN, HIGH); // Try to set SDSS inactive before any other SPI users start up
#endif
usb_task_init(); // Initialize the USB stack
TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the min serial handler

View file

@ -600,9 +600,8 @@
OUT_WRITE(SPI_EEPROM1_CS_PIN, HIGH);
OUT_WRITE(SPI_EEPROM2_CS_PIN, HIGH);
OUT_WRITE(SPI_FLASH_CS_PIN, HIGH);
WRITE(SD_SS_PIN, HIGH);
OUT_WRITE(SDSS, LOW);
OUT_WRITE(SD_SS_PIN, HIGH);
WRITE(SD_SS_PIN, LOW);
PIO_Configure(
g_APinDescription[SPI_PIN].pPort,
@ -767,7 +766,7 @@
// Disable PIO on A26 and A27
REG_PIOA_PDR = 0x0C000000;
OUT_WRITE(SDSS, HIGH);
OUT_WRITE(SD_SS_PIN, HIGH);
// Reset SPI0 (from sam lib)
SPI0->SPI_CR = SPI_CR_SPIDIS;

View file

@ -26,39 +26,36 @@
*
* Available chip select pins for HW SPI are 4 10 52 77 87
*/
#if SDSS == 4 || SDSS == 10 || SDSS == 52 || SDSS == 77 || SDSS == 87
#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
#elif SDSS == 77
#define SPI_PIN 77
#define SPI_CHAN 0
#else
#define SPI_PIN 87
#define SPI_CHAN 1
#endif
#define SD_SCK_PIN 76
#define SD_MISO_PIN 74
#define SD_MOSI_PIN 75
#else
// defaults
#define SOFTWARE_SPI
#ifndef SD_SCK_PIN
#define SD_SCK_PIN 52
#endif
#ifndef SD_MISO_PIN
#define SD_MISO_PIN 50
#endif
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN 51
#endif
#if SD_SS_PIN == 4 || SD_SS_PIN == 10 || SD_SS_PIN == 52 || SD_SS_PIN == 77 || SD_SS_PIN == 87
#define SD_SCK_PIN 76
#define SD_MISO_PIN 74
#define SD_MOSI_PIN 75
#endif
/* A.28, A.29, B.21, C.26, C.29 */
#define SD_SS_PIN SDSS
#if SD_SS_PIN == 4
#define SPI_PIN 87
#define SPI_CHAN 1
#elif SD_SS_PIN == 10
#define SPI_PIN 77
#define SPI_CHAN 0
#elif SD_SS_PIN == 52
#define SPI_PIN 86
#define SPI_CHAN 2
#elif SD_SS_PIN == 77
#define SPI_PIN 77
#define SPI_CHAN 0
#elif SD_SS_PIN == 87
#define SPI_PIN 87
#define SPI_CHAN 1
#else
#define SOFTWARE_SPI
#ifndef SD_SCK_PIN
#define SD_SCK_PIN 52
#endif
#ifndef SD_MISO_PIN
#define SD_MISO_PIN 50
#endif
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN 51
#endif
#endif

View file

@ -21,7 +21,16 @@
*/
#pragma once
#define SD_SS_PIN SDSS
#define SD_SCK_PIN 18
#define SD_MISO_PIN 19
#define SD_MOSI_PIN 23
#define PIN_SPI_SCK 18
#define PIN_SPI_MISO 19
#define PIN_SPI_MOSI 23
#ifndef SD_SCK_PIN
#define SD_SCK_PIN PIN_SPI_SCK
#endif
#ifndef SD_MISO_PIN
#define SD_MISO_PIN PIN_SPI_MISO
#endif
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN PIN_SPI_MOSI
#endif

View file

@ -38,9 +38,3 @@
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN 52
#endif
#ifndef SD_SS_PIN
#define SD_SS_PIN 53
#endif
#ifndef SDSS
#define SDSS SD_SS_PIN
#endif

View file

@ -121,7 +121,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o
#if IS_TX1(BTN_EN2) || IS_RX1(BTN_EN1)
#error "Serial port pins (1) conflict with Encoder Buttons!"
#elif ANY_TX(1, SD_SCK_PIN, LCD_PINS_D4, DOGLCD_SCK, LCD_RESET_PIN, LCD_PINS_RS, SHIFT_CLK_PIN) \
|| ANY_RX(1, LCD_SDSS, LCD_PINS_RS, SD_MISO_PIN, DOGLCD_A0, SD_SS_PIN, LCD_SDSS, DOGLCD_CS, LCD_RESET_PIN, LCD_BACKLIGHT_PIN)
|| ANY_RX(1, LCD_SDSS_PIN, LCD_PINS_RS, SD_MISO_PIN, DOGLCD_A0, SD_SS_PIN, DOGLCD_CS, LCD_RESET_PIN, LCD_BACKLIGHT_PIN)
#error "Serial port pins (1) conflict with LCD pins!"
#endif
#endif
@ -211,8 +211,8 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o
#error "SCL0 overlaps with Encoder Button!"
#elif IS_SCL0(SD_SS_PIN)
#error "SCL0 overlaps with SD_SS_PIN!"
#elif IS_SCL0(LCD_SDSS)
#error "SCL0 overlaps with LCD_SDSS!"
#elif IS_SCL0(LCD_SDSS_PIN)
#error "SCL0 overlaps with LCD_SDSS_PIN!"
#endif
#undef PIN_IS_SDA0
#undef IS_SCL0

View file

@ -32,7 +32,6 @@
//#define SD_SCK_PIN P0_07
//#define SD_MISO_PIN P0_08
//#define SD_MOSI_PIN P0_09
//#define SD_SS_PIN P0_06
// External SD
#ifndef SD_SCK_PIN
@ -44,10 +43,3 @@
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN P0_18
#endif
#ifndef SD_SS_PIN
#define SD_SS_PIN P1_23
#endif
#if !defined(SDSS) || SDSS == P_NC // gets defaulted in pins.h
#undef SDSS
#define SDSS SD_SS_PIN
#endif

View file

@ -32,7 +32,6 @@
//#define SD_SCK_PIN P0_07
//#define SD_MISO_PIN P0_08
//#define SD_MOSI_PIN P0_09
//#define SD_SS_PIN P0_06
// External SD
#ifndef SD_SCK_PIN
@ -44,9 +43,3 @@
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN 52
#endif
#ifndef SD_SS_PIN
#define SD_SS_PIN 53
#endif
#ifndef SDSS
#define SDSS SD_SS_PIN
#endif

View file

@ -59,11 +59,8 @@ void MarlinHAL::init() {
constexpr int cpuFreq = F_CPU;
UNUSED(cpuFreq);
#undef SDSS
#define SDSS 2
#define PIN_EXISTS_(P1,P2) (defined(P1##P2) && P1##P2 >= 0)
#if HAS_MEDIA && DISABLED(SDIO_SUPPORT) && PIN_EXISTS_(SDSS,)
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
#if HAS_MEDIA && DISABLED(SDIO_SUPPORT) && PIN_EXISTS(SD_SS)
OUT_WRITE(SD_SS_PIN, HIGH); // Try to set SD_SS_PIN inactive before any other SPI users start up
#endif
#if PIN_EXISTS(LED)

View file

@ -24,6 +24,8 @@
/**
* Define SPI Pins: SCK, MISO, MOSI, SS
*/
#define PIN_SPI_SS 2
#ifndef SD_SCK_PIN
#define SD_SCK_PIN PIN_SPI_SCK
#endif
@ -33,6 +35,3 @@
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN PIN_SPI_MOSI
#endif
#ifndef SD_SS_PIN
#define SD_SS_PIN PIN_SPI_SS
#endif

View file

@ -107,7 +107,7 @@ void MarlinHAL::init() {
#if HAS_SD_DETECT && SD_CONNECTION_IS(ONBOARD)
SET_INPUT_PULLUP(SD_DETECT_PIN);
#endif
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
OUT_WRITE(SD_SS_PIN, HIGH); // Try to set SDSS inactive before any other SPI users start up
#endif
}

View file

@ -45,10 +45,3 @@
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN 37
#endif
#ifndef SDSS
#define SDSS 18
#endif
#ifndef SD_SS_PIN
#define SD_SS_PIN SDSS
#endif

View file

@ -669,7 +669,7 @@ void MarlinHAL::init() {
#if HAS_SD_DETECT && SD_CONNECTION_IS(ONBOARD)
SET_INPUT_PULLUP(SD_DETECT_PIN);
#endif
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
OUT_WRITE(SD_SS_PIN, HIGH); // Try to set SDSS inactive before any other SPI users start up
#endif
}

View file

@ -46,14 +46,9 @@
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN 51
#endif
#ifndef SDSS
#define SDSS 53
#endif
#else
#error "Unsupported board!"
#endif
#define SD_SS_PIN SDSS

View file

@ -69,8 +69,8 @@ void MarlinHAL::init() {
constexpr int cpuFreq = F_CPU;
UNUSED(cpuFreq);
#if HAS_MEDIA && DISABLED(ONBOARD_SDIO) && (defined(SDSS) && SDSS != -1)
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
#if HAS_MEDIA && DISABLED(ONBOARD_SDIO) && PIN_EXISTS(SD_SS)
OUT_WRITE(SD_SS_PIN, HIGH); // Try to set SDSS inactive before any other SPI users start up
#endif
#if PIN_EXISTS(LED)

View file

@ -33,6 +33,3 @@
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN PIN_SPI_MOSI
#endif
#ifndef SD_SS_PIN
#define SD_SS_PIN PIN_SPI_SS
#endif

View file

@ -46,11 +46,6 @@
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN PA7
#endif
#ifndef SD_SS_PIN
#define SD_SS_PIN PA4
#endif
#undef SDSS
#define SDSS SD_SS_PIN
#ifndef SPI_DEVICE
#define SPI_DEVICE 1

View file

@ -24,4 +24,3 @@
#define SD_SCK_PIN 13
#define SD_MISO_PIN 12
#define SD_MOSI_PIN 11
#define SD_SS_PIN 20 // SDSS // A.28, A.29, B.21, C.26, C.29

View file

@ -28,4 +28,3 @@
#define SD_SCK_PIN 13
#define SD_MISO_PIN 12
#define SD_MOSI_PIN 11
#define SD_SS_PIN 20 // SDSS // A.28, A.29, B.21, C.26, C.29

View file

@ -28,4 +28,3 @@
#define SD_SCK_PIN 13
#define SD_MISO_PIN 12
#define SD_MOSI_PIN 11
#define SD_SS_PIN 20 // SDSS // A.28, A.29, B.21, C.26, C.29

View file

@ -743,8 +743,18 @@
#error "MMU2_DEBUG is now MMU_DEBUG."
#elif defined(FTM_SHAPING_DEFAULT_X_FREQ) || defined(FTM_SHAPING_DEFAULT_Y_FREQ)
#error "FTM_SHAPING_DEFAULT_[XY]_FREQ is now FTM_SHAPING_DEFAULT_FREQ_[XY]."
#elif defined(SDSS)
#error "SDSS is now SD_SS_PIN."
#endif
// SDSS renamed to SD_SS_PIN
#undef SDSS
#define SDSS 8675309
#if USB_CS_PIN == SDSS
#error "SDSS is now SD_SS_PIN."
#endif
#undef SDSS
// Changes to Probe Temp Compensation (#17392)
#if HAS_PTC && TEMP_SENSOR_PROBE && TEMP_SENSOR_BED
#if defined(PTC_PARK_POS_X) || defined(PTC_PARK_POS_Y) || defined(PTC_PARK_POS_Z)

View file

@ -138,7 +138,7 @@
#define CLCD_SPI_CS BTN_EN1
#define CLCD_MOD_RESET BTN_EN2
#if MB(EINSY_RAMBO, EINSY_RETRO) && !HAS_MEDIA
#define CLCD_SPI_EXTRA_CS SDSS
#define CLCD_SPI_EXTRA_CS SD_SS_PIN
#endif
#endif

View file

@ -97,5 +97,5 @@
#define SD_MOSI_PIN 23
#define SD_MISO_PIN 19
#define SD_SCK_PIN 18
#define SDSS 5
#define SD_SS_PIN 5
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers

View file

@ -112,11 +112,8 @@
// #define FAN_SOFT_PWM_REQUIRED // check if needed
//
// NeoPixel Rings
//
#define BOARD_NEOPIXEL_PIN 14
#define NEOPIXEL2_PIN 27
// SPI
#define MISO_PIN 19
#define MOSI_PIN 23
#define SCK_PIN 18

View file

@ -85,4 +85,4 @@
#define HEATER_BED_PIN 4
// SPI
#define SDSS 5
#define SD_SS_PIN 5

View file

@ -77,5 +77,5 @@
#define SD_MOSI_PIN 23
#define SD_MISO_PIN 19
#define SD_SCK_PIN 18
#define SDSS 5
#define SD_SS_PIN 5
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers

View file

@ -91,7 +91,7 @@
#define SD_MOSI_PIN 23
#define SD_MISO_PIN 19
#define SD_SCK_PIN 18
#define SDSS 5
#define SD_SS_PIN 5
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
#if HAS_TMC_UART

View file

@ -160,7 +160,7 @@
//#define SD_SCK_PIN EXP2_02_PIN // uses esp32 default 18
// TODO: Migrate external SD Card to pins/lcd
#define SDSS EXP2_04_PIN
#define SD_SS_PIN EXP2_04_PIN
#define SD_DETECT_PIN EXP2_07_PIN // IO34 default is SD_DET signal (Jump to SDDET)
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers

View file

@ -213,7 +213,7 @@
#define SD_MOSI_PIN 23
#define SD_MISO_PIN 19
#define SD_SCK_PIN 18
#define SDSS 5
#define SD_SS_PIN 5
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
//

View file

@ -118,7 +118,7 @@
#define SD_MOSI_PIN 23
#define SD_MISO_PIN 19
#define SD_SCK_PIN 18
#define SDSS 5
#define SD_SS_PIN 5
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
//

View file

@ -111,7 +111,7 @@
#define SD_MOSI_PIN EXP2_06_PIN
#define SD_MISO_PIN EXP2_01_PIN
#define SD_SCK_PIN EXP2_02_PIN
#define SDSS EXP2_04_PIN
#define SD_SS_PIN EXP2_04_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#endif

View file

@ -123,10 +123,9 @@
// SPI
//
#define SPI_DEVICE -1 // Maple
#define SCK_PIN -1
#define MISO_PIN -1
#define MOSI_PIN -1
#define SS_PIN -1
#define SD_SCK_PIN -1
#define SD_MISO_PIN -1
#define SD_MOSI_PIN -1
//
// SDIO
@ -141,12 +140,10 @@
#else
#undef SDSS
#define SDSS PC11 // SDIO_D3_PIN
#define SS_PIN SDSS
#define SCK_PIN PC12 // SDIO_CK_PIN
#define MISO_PIN PC8 // SDIO_D0_PIN
#define MOSI_PIN PD2 // SDIO_CMD_PIN
#define SD_SS_PIN PC11 // SDIO_D3_PIN
#define SD_SCK_PIN PC12 // SDIO_CK_PIN
#define SD_MISO_PIN PC8 // SDIO_D0_PIN
#define SD_MOSI_PIN PD2 // SDIO_CMD_PIN
#define SOFTWARE_SPI
#endif

View file

@ -86,7 +86,7 @@
#endif
#define FAN1_PIN P0_26
#define LCD_SDSS P0_16 // LCD SD chip select
#define LCD_SDSS_PIN P0_16 // LCD SD chip select
#if ENABLED(AZSMZ_12864)
#define BEEPER_PIN P1_30
@ -104,7 +104,7 @@
#define SD_SCK_PIN P0_15
#define SD_MISO_PIN P0_17
#define SD_MOSI_PIN P0_18
#define SD_SS_PIN LCD_SDSS
#define SD_SS_PIN LCD_SDSS_PIN
#define SD_DETECT_PIN P3_25
#elif SD_CONNECTION_IS(ONBOARD)
#define SD_SCK_PIN P0_07

View file

@ -151,7 +151,6 @@
#define SD_MISO_PIN P0_16 // EXP1-4
#define SD_MOSI_PIN P0_18 // EXP1-3
#define SD_SS_PIN P1_30 // EXP1-2
#define SDSS SD_SS_PIN
#endif
/**

View file

@ -124,14 +124,11 @@
* Hardware SPI can't be used because P0_17 (MISO) is not brought out on this board.
*/
#if HAS_MEDIA
#define SD_SCK_PIN P0_15 // EXP1-5
#define SD_MISO_PIN P0_16 // EXP1-4
#define SD_MOSI_PIN P0_18 // EXP1-3
#define SD_SS_PIN P1_30 // EXP1-2
#define SDSS SD_SS_PIN
#endif // HAS_MEDIA
#endif
/**
* PWMS

View file

@ -109,7 +109,7 @@
#define BTN_EN2 EXP2_05_PIN
#define BTN_ENC EXP1_02_PIN
#define LCD_SDSS EXP2_04_PIN
#define LCD_SDSS_PIN EXP2_04_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_EN EXP2_06_PIN
#define LCD_PINS_D4 EXP2_02_PIN
@ -229,9 +229,9 @@
// We use SD_DETECT_PIN for E0
#undef SD_DETECT_PIN
#define E0_CS_PIN EXP2_07_PIN
// We use LCD_SDSS pin for E1
#undef LCD_SDSS
#define LCD_SDSS -1
// We use LCD_SDSS_PIN pin for E1
#undef LCD_SDSS_PIN
#define LCD_SDSS_PIN -1
#define E1_CS_PIN EXP2_04_PIN
#endif

View file

@ -472,7 +472,7 @@
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define LCD_SDSS EXP2_04_PIN // (16) J3-7 & AUX-4
#define LCD_SDSS_PIN EXP2_04_PIN // (16) J3-7 & AUX-4
#define SD_DETECT_PIN EXP2_07_PIN // (49) (NOT 5V tolerant)
#if ENABLED(FYSETC_MINI_12864)

View file

@ -519,7 +519,7 @@
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define LCD_SDSS EXP2_04_PIN // (16) J3-7 & AUX-4
#define LCD_SDSS_PIN EXP2_04_PIN // (16) J3-7 & AUX-4
#if ENABLED(FYSETC_MINI_12864)
#define DOGLCD_CS EXP1_03_PIN

View file

@ -246,7 +246,7 @@
#define BTN_EN1 EXP2_05_PIN
#define BTN_EN2 EXP2_03_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_SDSS EXP2_04_PIN
#define LCD_SDSS_PIN EXP2_04_PIN
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#if ANY(VIKI2, miniVIKI)

View file

@ -342,7 +342,7 @@
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define LCD_SDSS EXP2_04_PIN
#define LCD_SDSS_PIN EXP2_04_PIN
#if ENABLED(MKS_12864OLED_SSD1306)

View file

@ -322,7 +322,7 @@
#define SD_DETECT_PIN P1_31 // (49) J3-1 & AUX-3 (NOT 5V tolerant)
#define KILL_PIN P1_22 // (41) J5-4 & AUX-4
#define LCD_PINS_RS P0_16 // (16) J3-7 & AUX-4
#define LCD_SDSS P1_23 // (53) J3-5 & AUX-3
#define LCD_SDSS_PIN P1_23 // (53) J3-5 & AUX-3
#if IS_NEWPANEL
#if IS_RRW_KEYPAD

View file

@ -117,7 +117,7 @@
#define BTN_ENC P2_11
#define SD_DETECT_PIN P1_18
#define SDSS P1_21
#define SD_SS_PIN P1_21
#define STAT_LED_RED_PIN P1_19
#define STAT_LED_BLUE_PIN P1_20

View file

@ -178,7 +178,7 @@
#define SD_DETECT_PIN _EXP2_01
#define KILL_PIN _EXP1_10
#define LCD_PINS_RS _EXP2_07
#define LCD_SDSS _EXP2_07
#define LCD_SDSS_PIN _EXP2_07
#define LCD_BACKLIGHT_PIN _EXP2_07
#define LCD_PINS_EN _EXP2_10
#define LCD_PINS_D4 _EXP2_09

View file

@ -147,7 +147,7 @@
#define BTN_ENC P1_30 // EXP1-2
#define LCD_PINS_RS P0_16 // EXP1-4
#define LCD_SDSS P0_28 // EXP2-4
#define LCD_SDSS_PIN P0_28 // EXP2-4
#define LCD_PINS_EN P0_18 // EXP1-3
#define LCD_PINS_D4 P0_15 // EXP1-5

View file

@ -244,7 +244,7 @@
#define BTN_ENC EXP1_02_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_SDSS EXP2_04_PIN
#define LCD_SDSS_PIN EXP2_04_PIN
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN

View file

@ -324,7 +324,7 @@
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define LCD_SDSS EXP2_04_PIN
#define LCD_SDSS_PIN EXP2_04_PIN
#if ENABLED(MKS_12864OLED_SSD1306)

View file

@ -105,7 +105,7 @@
#define BTN_ENC P1_30
#define SD_DETECT_PIN P1_18
#define SDSS P1_21
#define SD_SS_PIN P1_21
#define STAT_LED_RED_PIN P1_19
#define STAT_LED_BLUE_PIN P1_20

View file

@ -196,7 +196,7 @@
#define BTN_EN1 P0_00
#define BTN_EN2 P0_01
#define LCD_SDSS P0_16
#define LCD_SDSS_PIN P0_16
#if ENABLED(MKS_12864OLED_SSD1306)

View file

@ -129,7 +129,7 @@
#define BEEPER_PIN 44
#if HAS_MEDIA
#define SDSS 53
#define SD_SS_PIN 53
#define SD_DETECT_PIN 49
#endif

View file

@ -117,7 +117,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define SD_DETECT_PIN 13
// Tools

View file

@ -117,7 +117,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define SD_DETECT_PIN 15
// Tools

View file

@ -112,7 +112,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define SD_DETECT_PIN 40
// Common I/O

View file

@ -75,7 +75,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define LED_PIN 4
//

View file

@ -109,7 +109,7 @@
#if ENABLED(RA_CONTROL_PANEL)
#define SDSS 53
#define SD_SS_PIN 53
#define SD_DETECT_PIN 28
#define BTN_EN1 14

View file

@ -138,7 +138,7 @@
#define EXP2_07_PIN 38 // SD_DET
#define EXP2_08_PIN -1 // RESET
#define SDSS EXP2_04_PIN
#define SD_SS_PIN EXP2_04_PIN
#define LED_PIN 13
#if HAS_WIRED_LCD

View file

@ -149,7 +149,7 @@
// Misc. Functions
//
#define SD_DETECT_PIN 38
#define SDSS 53
#define SD_SS_PIN 53
#define LED_PIN 13 // Use 6 (case light) for external LED. 13 is internal (yellow) LED.
#define PS_ON_PIN 12

View file

@ -185,7 +185,7 @@
// Misc. Functions
//
#define SD_DETECT_PIN 38
#define SDSS 53
#define SD_SS_PIN 53
#define LED_PIN 13 // Use 6 (case light) for external LED. 13 is internal (yellow) LED.
#define PS_ON_PIN 12

View file

@ -99,7 +99,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define SD_DETECT_PIN 39
//#define LED_PIN 8

View file

@ -104,7 +104,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define SD_DETECT_PIN 39
#if ENABLED(CASE_LIGHT_ENABLE)

View file

@ -84,7 +84,7 @@
//
// Misc. Functions
//
#define SDSS 11
#define SD_SS_PIN 11
#define LED_PIN 13
#define SOL1_PIN 16
#define SOL2_PIN 17

View file

@ -128,7 +128,7 @@
//
// Misc. Functions
//
#define SDSS MINI_06
#define SD_SS_PIN MINI_06
#define LED_PIN 13
#ifndef CASE_LIGHT_PIN

View file

@ -95,7 +95,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define LED_PIN 13
#define PS_ON_PIN 12

View file

@ -110,7 +110,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define LED_PIN 13
#define PS_ON_PIN 12

View file

@ -135,7 +135,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define LED_PIN 13
#define PS_ON_PIN 12

View file

@ -239,7 +239,7 @@
//
// SD Card
//
#define SDSS 53 // B0
#define SD_SS_PIN 53 // B0
#define SD_DETECT_PIN 9 // H6
#if HAS_TMC_UART

View file

@ -92,7 +92,7 @@
//
// Misc. Functions
//
#define SDSS 16
#define SD_SS_PIN 16
#define LED_PIN 46
//

View file

@ -99,7 +99,7 @@
//
// SD Card
//
#define SDSS 53
#define SD_SS_PIN 53
#define SD_DETECT_PIN 38
//

View file

@ -127,7 +127,7 @@
// SD Support
//
#define SD_DETECT_PIN EXP2_07_PIN
#define SDSS EXP2_04_PIN
#define SD_SS_PIN EXP2_04_PIN
/** PICA Expansion Headers
* ------ ------
@ -174,5 +174,5 @@
#define BTN_EN2 EXP2_05_PIN
#define BTN_ENC EXP1_02_PIN
#define LCD_SDSS EXP2_04_PIN
#define LCD_SDSS_PIN EXP2_04_PIN
#endif

View file

@ -51,7 +51,7 @@
#define E0_DIR_PIN 37
#define E0_ENABLE_PIN 45
#define SDSS 16
#define SD_SS_PIN 16
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 34 // X_MAX unless overridden

View file

@ -82,7 +82,7 @@
// SD Card
//
#define SD_DETECT_PIN 83
#define SDSS 53
#define SD_SS_PIN 53
//
// Misc. Functions

View file

@ -85,7 +85,7 @@
// SD Support
//
#if HAS_MEDIA
#define SDSS 53
#define SD_SS_PIN 53
#define SD_DETECT_PIN 49
#endif

View file

@ -193,7 +193,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define LED_PIN 13
#define BOARD_NEOPIXEL_PIN 71
@ -602,7 +602,7 @@
#define BTN_EN1 47
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS SDSS
#define LCD_SDSS_PIN SD_SS_PIN
#define KILL_PIN 41
#undef LCD_PINS_EN // not used, causes false pin conflict report
@ -612,7 +612,7 @@
#define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
#define BTN_ENC -1
#define LCD_SDSS SDSS
#define LCD_SDSS_PIN SD_SS_PIN
#define SD_DETECT_PIN 49
#elif ANY(VIKI2, miniVIKI)
@ -645,7 +645,7 @@
#define BTN_EN2 EXP1_01_PIN
#define BTN_ENC EXP2_03_PIN
#define LCD_SDSS SDSS
#define LCD_SDSS_PIN SD_SS_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#define KILL_PIN EXP2_08_PIN

View file

@ -943,8 +943,8 @@
#if _EXISTS(LCD_PINS_RS)
REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_RS)
#endif
#if _EXISTS(LCD_SDSS)
REPORT_NAME_DIGITAL(__LINE__, LCD_SDSS)
#if PIN_EXISTS(LCD_SDSS)
REPORT_NAME_DIGITAL(__LINE__, LCD_SDSS_PIN)
#endif
#if PIN_EXISTS(LCD_RESET)
REPORT_NAME_DIGITAL(__LINE__, LCD_RESET_PIN)
@ -1092,8 +1092,8 @@
#if PIN_EXISTS(SD_SCK)
REPORT_NAME_DIGITAL(__LINE__, SD_SCK_PIN)
#endif
#if _EXISTS(SDSS)
REPORT_NAME_DIGITAL(__LINE__, SDSS)
#if PIN_EXISTS(SD_SS)
REPORT_NAME_DIGITAL(__LINE__, SD_SS_PIN)
#endif
#if PIN_EXISTS(SD_SS)
REPORT_NAME_DIGITAL(__LINE__, SD_SS_PIN)

View file

@ -564,8 +564,8 @@
#ifndef SDPOWER_PIN
#define SDPOWER_PIN -1
#endif
#ifndef SDSS
#define SDSS -1
#ifndef SD_SS_PIN
#define SD_SS_PIN -1
#endif
#ifndef LED_PIN
#define LED_PIN -1

View file

@ -178,7 +178,7 @@
//
// Misc. Functions
//
#define SDSS EXP2_04_PIN
#define SD_SS_PIN EXP2_04_PIN
#define LED_PIN 13
#ifndef CASE_LIGHT_PIN

View file

@ -141,7 +141,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define LED_PIN 13
#ifndef CASE_LIGHT_PIN

View file

@ -121,7 +121,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define LED_PIN 13
#if !MB(MINIRAMBO_10A)
#define CASE_LIGHT_PIN 9

View file

@ -152,7 +152,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define LED_PIN 13
#define PS_ON_PIN 4

View file

@ -114,7 +114,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define LED_PIN 13
#define PS_ON_PIN 4

View file

@ -74,7 +74,7 @@
//
// Misc. Functions
//
#define SDSS 25
#define SD_SS_PIN 25
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN -1 // Hardware PWM but one is not available on expansion header

View file

@ -77,7 +77,7 @@
//
// Misc. Functions
//
#define SDSS 53 // PB0 / SS
#define SD_SS_PIN 53 // PB0 / SS
#define LED_PIN 13 // PB7 / PWM13
#define SD_MISO_PIN 50 // PB3

View file

@ -144,8 +144,8 @@
//
// Misc. Functions
//
#ifndef SDSS
#define SDSS 53
#ifndef SD_SS_PIN
#define SD_SS_PIN 53
#endif
#define LED_PIN 13
#define LED4_PIN 5

View file

@ -139,7 +139,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#ifndef LED_PIN
#define LED_PIN 13 // The Formbot v 1 board has almost no unassigned pins.
#endif // The Board's LED is a good place to connect the Max7219 Matrix.

View file

@ -141,7 +141,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#ifndef LED_PIN
#define LED_PIN 13

View file

@ -231,7 +231,7 @@
// SD Card
//
#define SDSS EXP2_04_PIN
#define SD_SS_PIN EXP2_04_PIN
#define SD_DETECT_PIN EXP2_07_PIN
//

View file

@ -54,7 +54,7 @@
//
// Misc. Functions
//
#define SDSS 25
#define SD_SS_PIN 25
#define CASE_LIGHT_PIN 7
//

View file

@ -85,7 +85,7 @@
//
// SD Card
//
#define SDSS 25
#define SD_SS_PIN 25
#define SD_DETECT_PIN 21 // PD0
//
@ -95,7 +95,7 @@
#if HAS_WIRED_LCD
#define LCD_SDSS 53
#define LCD_SDSS_PIN 53
#define DOGLCD_CS 29
#define DOGLCD_A0 27

View file

@ -121,7 +121,7 @@
// EXP2_06_PIN yellow MOSI
// EXP2_02_PIN orange SCK
//#define SDSS EXP2_04_PIN // SDCS blue
//#define SD_SS_PIN EXP2_04_PIN // SDCS blue
//
// VIKI2 4-wire lead

View file

@ -87,7 +87,7 @@
#define LCD_PINS_EN 23
#define LCD_PINS_D4 37
#define LCD_SDSS 53
#define LCD_SDSS_PIN 53
#define SD_DETECT_PIN 49
#define BTN_EN1 29

View file

@ -284,8 +284,8 @@
//
// Misc. Functions
//
#ifndef SDSS
#define SDSS AUX3_06
#ifndef SD_SS_PIN
#define SD_SS_PIN AUX3_06
#endif
#define LED_PIN 13
@ -750,7 +750,7 @@
#define BTN_EN1 AUX4_04
#define BTN_EN2 AUX4_06
#define BTN_ENC AUX4_03
#define LCD_SDSS SDSS
#define LCD_SDSS_PIN SD_SS_PIN
#define KILL_PIN EXP2_08_PIN
#undef LCD_PINS_EN // not used, causes false pin conflict report
@ -760,7 +760,7 @@
#define BTN_EN2 AUX2_08
#define BTN_ENC -1
#define LCD_SDSS SDSS
#define LCD_SDSS_PIN SD_SS_PIN
#ifndef SD_DETECT_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#endif
@ -800,7 +800,7 @@
#define BTN_EN2 EXP1_01_PIN
#define BTN_ENC EXP2_03_PIN
#define LCD_SDSS SDSS
#define LCD_SDSS_PIN SD_SS_PIN
#ifndef SD_DETECT_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#endif

View file

@ -103,7 +103,7 @@
// Misc. Functions
//
#define SDPOWER_PIN 48
#define SDSS 53
#define SD_SS_PIN 53
#define LED_PIN 13
#ifndef CASE_LIGHT_PIN

View file

@ -184,7 +184,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define LED_PIN 13
#ifndef KILL_PIN

View file

@ -239,7 +239,7 @@
#define BEEPER_PIN 44
#if HAS_MEDIA
#define SDSS 53
#define SD_SS_PIN 53
#define SD_DETECT_PIN 49
#endif

View file

@ -151,7 +151,7 @@
//
//#define PS_ON_PIN 40 // The M80/M81 PSU pin for boards v2.1-2.3
//#define CASE_LIGHT_PIN 5
#define SDSS 53
#define SD_SS_PIN 53
//#ifndef LED_PIN
//#define LED_PIN 13
//#endif

View file

@ -125,7 +125,7 @@
// Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
//#define FILWIDTH_PIN 5 // Analog Input
#define SDSS 53
#define SD_SS_PIN 53
#define SD_DETECT_PIN 49
//

View file

@ -206,7 +206,7 @@
//
// Misc. Functions
//
#define SDSS 53 // EXP2-4
#define SD_SS_PIN 53 // EXP2-4
#define LED_PIN 13
//#ifndef FILWIDTH_PIN
@ -421,7 +421,7 @@
#define BTN_EN1 47
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS EXP2_04_PIN
#define LCD_SDSS_PIN EXP2_04_PIN
//#define KILL_PIN 41
#undef LCD_PINS_EN // not used, causes false pin conflict report
@ -431,7 +431,7 @@
#define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
#define BTN_ENC -1
#define LCD_SDSS EXP2_04_PIN
#define LCD_SDSS_PIN EXP2_04_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#elif ANY(VIKI2, miniVIKI)
@ -447,7 +447,7 @@
#define BTN_EN2 7
#define BTN_ENC 39
#define SDSS EXP2_04_PIN
#define SD_SS_PIN EXP2_04_PIN
#define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board
//#define KILL_PIN 31
@ -465,7 +465,7 @@
#define BTN_EN2 37
#define BTN_ENC 31
#define LCD_SDSS EXP2_04_PIN
#define LCD_SDSS_PIN EXP2_04_PIN
#define SD_DETECT_PIN EXP2_07_PIN
//#define KILL_PIN 41
@ -481,7 +481,7 @@
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
//#define SDSS EXP2_04_PIN
//#define SD_SS_PIN EXP2_04_PIN
#define SD_DETECT_PIN EXP2_07_PIN
//#define KILL_PIN 64
@ -501,7 +501,7 @@
#define BTN_EN2 63
#define BTN_ENC 59
#define SDSS EXP2_04_PIN
#define SD_SS_PIN EXP2_04_PIN
#define SD_DETECT_PIN EXP2_07_PIN
//#define KILL_PIN 64

View file

@ -114,7 +114,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define SD_DETECT_PIN 39
#define LED_PIN 8
//#define SAFETY_TRIGGERED_PIN 28 // PIN to detect the safety circuit has triggered

View file

@ -106,7 +106,7 @@
//
// Misc. Functions
//
#define SDSS 53
#define SD_SS_PIN 53
#define LED_PIN 13
#define PS_ON_PIN 12
#define SUICIDE_PIN 54 // PIN that has to be turned on right after start, to keep power flowing.

Some files were not shown because too many files have changed in this diff Show more