Fixes for FYSETC Touch EVE 5" on AVR (#17659)

Co-Authored-By: RudolphRiedel <rudolphriedel@users.noreply.github.com>
Co-authored-by: sL1pKn07 <sl1pkn07@gmail.com>
This commit is contained in:
Scott Lahteine 2020-04-24 22:35:46 -05:00 committed by GitHub
parent d7f90c36df
commit 3a27933ae7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 294 additions and 111 deletions

View file

@ -1379,6 +1379,8 @@
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
//#define S6_TFT_PINMAP // FYSETC S6 pin mapping //#define S6_TFT_PINMAP // FYSETC S6 pin mapping
//#define E3_EXP1_PINMAP // E3 type boards (SKR E3/DIP, FYSETC Cheetah and Stock boards) EXP1 pin mapping
//#define GENERIC_EXP2_PINMAP // GENERIC EXP2 pin mapping
//#define OTHER_PIN_LAYOUT // Define pins manually below //#define OTHER_PIN_LAYOUT // Define pins manually below
#if ENABLED(OTHER_PIN_LAYOUT) #if ENABLED(OTHER_PIN_LAYOUT)

View file

@ -361,7 +361,7 @@
#define HAS_DGUS_LCD 1 #define HAS_DGUS_LCD 1
#endif #endif
// Extensible UI serial touch screens. (See src/lcd/extensible_ui) // Extensible UI serial touch screens. (See src/lcd/extui)
#if ANY(HAS_DGUS_LCD, MALYAN_LCD, TOUCH_UI_FTDI_EVE) #if ANY(HAS_DGUS_LCD, MALYAN_LCD, TOUCH_UI_FTDI_EVE)
#define IS_EXTUI #define IS_EXTUI
#define EXTENSIBLE_UI #define EXTENSIBLE_UI

View file

@ -198,7 +198,7 @@ void CLCD::mem_write_16 (uint32_t reg_address, uint16_t data) {
using namespace SPI::least_significant_byte_first; using namespace SPI::least_significant_byte_first;
spi_ftdi_select(); spi_ftdi_select();
spi_write_addr(reg_address); spi_write_addr(reg_address);
spi_write_32(data); spi_write_16(data);
spi_ftdi_deselect(); spi_ftdi_deselect();
} }
@ -1054,13 +1054,7 @@ void CLCD::init() {
spi_init(); // Set Up I/O Lines for SPI and FT800/810 Control spi_init(); // Set Up I/O Lines for SPI and FT800/810 Control
ftdi_reset(); // Power down/up the FT8xx with the apropriate delays ftdi_reset(); // Power down/up the FT8xx with the apropriate delays
if (Use_Crystal == 1) { host_cmd(Use_Crystal ? CLKEXT : CLKINT, 0);
host_cmd(CLKEXT, 0);
}
else {
host_cmd(CLKINT, 0);
}
host_cmd(FTDI::ACTIVE, 0); // Activate the System Clock host_cmd(FTDI::ACTIVE, 0); // Activate the System Clock
/* read the device-id until it returns 0x7c or times out, should take less than 150ms */ /* read the device-id until it returns 0x7c or times out, should take less than 150ms */
@ -1073,9 +1067,9 @@ void CLCD::init() {
#endif #endif
break; break;
} }
else { else
delay(1); delay(1);
}
if (counter == 249) { if (counter == 249) {
#if ENABLED(TOUCH_UI_DEBUG) #if ENABLED(TOUCH_UI_DEBUG)
SERIAL_ECHO_START(); SERIAL_ECHO_START();
@ -1130,7 +1124,7 @@ void CLCD::init() {
mem_write_8(REG::PCLK, Pclk); // Turns on Clock by setting PCLK Register to the value necessary for the module mem_write_8(REG::PCLK, Pclk); // Turns on Clock by setting PCLK Register to the value necessary for the module
mem_write_16(REG::PWM_HZ, 0x00FA); mem_write_16(REG::PWM_HZ, ENABLED(LCD_FYSETC_TFT81050) ? 0x2710 : 0x00FA);
// Turning off dithering seems to help prevent horizontal line artifacts on certain colors // Turning off dithering seems to help prevent horizontal line artifacts on certain colors
mem_write_8(REG::DITHER, 0); mem_write_8(REG::DITHER, 0);

View file

@ -27,7 +27,11 @@
/********************************* SPI Functions *********************************/ /********************************* SPI Functions *********************************/
namespace FTDI { namespace FTDI {
#ifndef CLCD_USE_SOFT_SPI #ifndef CLCD_USE_SOFT_SPI
#ifndef __AVR__
SPIClass EVE_SPI(CLCD_SPI_BUS);
#endif
SPISettings SPI::spi_settings(SPI_FREQUENCY, MSBFIRST, SPI_MODE0); SPISettings SPI::spi_settings(SPI_FREQUENCY, MSBFIRST, SPI_MODE0);
#endif #endif
@ -57,7 +61,7 @@ namespace FTDI {
SET_INPUT_PULLUP(CLCD_SOFT_SPI_MISO); SET_INPUT_PULLUP(CLCD_SOFT_SPI_MISO);
#else #else
::SPI.begin(); SPI_OBJ.begin();
#endif #endif
} }
@ -71,8 +75,8 @@ namespace FTDI {
for (k = 0; k < 8; k++) { // Output and Read each bit of spiOutByte and spiInByte for (k = 0; k < 8; k++) { // Output and Read each bit of spiOutByte and spiInByte
WRITE(CLCD_SOFT_SPI_MOSI, (spiOutByte & spiIndex) ? 1 : 0); // Output MOSI Bit WRITE(CLCD_SOFT_SPI_MOSI, (spiOutByte & spiIndex) ? 1 : 0); // Output MOSI Bit
WRITE(CLCD_SOFT_SPI_SCLK, 1); // Pulse Clock WRITE(CLCD_SOFT_SPI_SCLK, 1); // Pulse Clock
if (READ(CLCD_SOFT_SPI_MISO)) spiInByte |= spiIndex; // MISO changes on the falling edge of clock, so sample it before
WRITE(CLCD_SOFT_SPI_SCLK, 0); WRITE(CLCD_SOFT_SPI_SCLK, 0);
if (READ(CLCD_SOFT_SPI_MISO)) spiInByte |= spiIndex;
spiIndex >>= 1; spiIndex >>= 1;
} }
interrupts(); interrupts();
@ -97,11 +101,7 @@ namespace FTDI {
void SPI::spi_read_bulk(void *data, uint16_t len) { void SPI::spi_read_bulk(void *data, uint16_t len) {
uint8_t* p = (uint8_t *)data; uint8_t* p = (uint8_t *)data;
#ifndef CLCD_USE_SOFT_SPI
::SPI.transfer(p, len);
#else
while (len--) *p++ = spi_recv(); while (len--) *p++ = spi_recv();
#endif
} }
bool SPI::spi_verify_bulk(const void *data, uint16_t len) { bool SPI::spi_verify_bulk(const void *data, uint16_t len) {
@ -113,7 +113,7 @@ namespace FTDI {
// CLCD SPI - Chip Select // CLCD SPI - Chip Select
void SPI::spi_ftdi_select() { void SPI::spi_ftdi_select() {
#ifndef CLCD_USE_SOFT_SPI #ifndef CLCD_USE_SOFT_SPI
::SPI.beginTransaction(spi_settings); SPI_OBJ.beginTransaction(spi_settings);
#endif #endif
WRITE(CLCD_SPI_CS, 0); WRITE(CLCD_SPI_CS, 0);
#ifdef CLCD_SPI_EXTRA_CS #ifdef CLCD_SPI_EXTRA_CS
@ -129,7 +129,7 @@ namespace FTDI {
WRITE(CLCD_SPI_EXTRA_CS, 1); WRITE(CLCD_SPI_EXTRA_CS, 1);
#endif #endif
#ifndef CLCD_USE_SOFT_SPI #ifndef CLCD_USE_SOFT_SPI
::SPI.endTransaction(); SPI_OBJ.endTransaction();
#endif #endif
} }
@ -137,7 +137,7 @@ namespace FTDI {
// Serial SPI Flash SPI - Chip Select // Serial SPI Flash SPI - Chip Select
void SPI::spi_flash_select() { void SPI::spi_flash_select() {
#ifndef CLCD_USE_SOFT_SPI #ifndef CLCD_USE_SOFT_SPI
::SPI.beginTransaction(spi_settings); SPI_OBJ.beginTransaction(spi_settings);
#endif #endif
WRITE(SPI_FLASH_SS, 0); WRITE(SPI_FLASH_SS, 0);
delayMicroseconds(1); delayMicroseconds(1);
@ -147,7 +147,7 @@ namespace FTDI {
void SPI::spi_flash_deselect() { void SPI::spi_flash_deselect() {
WRITE(SPI_FLASH_SS, 1); WRITE(SPI_FLASH_SS, 1);
#ifndef CLCD_USE_SOFT_SPI #ifndef CLCD_USE_SOFT_SPI
::SPI.endTransaction(); SPI_OBJ.endTransaction();
#endif #endif
} }
#endif #endif

View file

@ -27,6 +27,14 @@
#endif #endif
namespace FTDI { namespace FTDI {
#if defined(__AVR__) || defined(CLCD_USE_SOFT_SPI)
#define SPI_OBJ ::SPI
#else
extern SPIClass EVE_SPI;
#define SPI_OBJ EVE_SPI
#endif
namespace SPI { namespace SPI {
#ifndef CLCD_USE_SOFT_SPI #ifndef CLCD_USE_SOFT_SPI
extern SPISettings spi_settings; extern SPISettings spi_settings;
@ -47,7 +55,7 @@ namespace FTDI {
#ifdef CLCD_USE_SOFT_SPI #ifdef CLCD_USE_SOFT_SPI
return _soft_spi_xfer(0x00); return _soft_spi_xfer(0x00);
#else #else
return ::SPI.transfer(0x00); SPI_OBJ.transfer(0x00);
#endif #endif
}; };
@ -55,7 +63,7 @@ namespace FTDI {
#ifdef CLCD_USE_SOFT_SPI #ifdef CLCD_USE_SOFT_SPI
_soft_spi_send(val); _soft_spi_send(val);
#else #else
::SPI.transfer(val); SPI_OBJ.transfer(val);
#endif #endif
}; };

View file

@ -30,9 +30,9 @@ class SoundList {
public: public:
static const uint8_t n; static const uint8_t n;
static inline const char* name(uint8_t val) { static inline const char* name(uint8_t val) {
return (const char* ) pgm_read_ptr_near(&list[val].name); return (const char* ) pgm_read_ptr_far(&list[val].name);
} }
static inline FTDI::SoundPlayer::sound_t* data(uint8_t val) { static inline FTDI::SoundPlayer::sound_t* data(uint8_t val) {
return (FTDI::SoundPlayer::sound_t*) pgm_read_ptr_near(&list[val].data); return (FTDI::SoundPlayer::sound_t*) pgm_read_ptr_far(&list[val].data);
} }
}; };

View file

@ -154,3 +154,12 @@
#define CLCD_SPI_EXTRA_CS SDSS #define CLCD_SPI_EXTRA_CS SDSS
#endif #endif
#endif #endif
#if EITHER(E3_EXP1_PINMAP, GENERIC_EXP2_PINMAP)
#ifndef __MARLIN_FIRMWARE__
#error "This pin mapping requires Marlin."
#endif
#define CLCD_MOD_RESET BTN_EN1
#define CLCD_SPI_CS LCD_PINS_RS
#endif

View file

@ -82,7 +82,7 @@ void AboutScreen::onRedraw(draw_mode_t) {
); );
draw_text_box(cmd, FW_VERS_POS, progmem_str(getFirmwareName_str()), OPT_CENTER, font_medium); draw_text_box(cmd, FW_VERS_POS, progmem_str(getFirmwareName_str()), OPT_CENTER, font_medium);
draw_text_box(cmd, FW_INFO_POS, about_str, OPT_CENTER, font_medium); draw_text_box(cmd, FW_INFO_POS, about_str, OPT_CENTER, font_medium);
draw_text_box(cmd, INSET_POS(LICENSE_POS), GET_TEXT_F(MSG_LICENSE), OPT_CENTER, font_tiny); draw_text_box(cmd.tag(3), INSET_POS(LICENSE_POS), GET_TEXT_F(MSG_LICENSE), OPT_CENTER, font_tiny);
cmd.font(font_medium) cmd.font(font_medium)
.colors(normal_btn) .colors(normal_btn)

View file

@ -74,7 +74,9 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) {
#define EDGE_R 30 #define EDGE_R 30
.font(font_small) .font(font_small)
.tag(0) .tag(0)
#if DISABLED(LCD_FYSETC_TFT81050)
.text(BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXT_F(MSG_LCD_BRIGHTNESS), OPT_RIGHTX | OPT_CENTERY) .text(BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXT_F(MSG_LCD_BRIGHTNESS), OPT_RIGHTX | OPT_CENTERY)
#endif
.text(BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_SOUND_VOLUME), OPT_RIGHTX | OPT_CENTERY) .text(BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_SOUND_VOLUME), OPT_RIGHTX | OPT_CENTERY)
.text(BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_SCREEN_LOCK), OPT_RIGHTX | OPT_CENTERY); .text(BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_SCREEN_LOCK), OPT_RIGHTX | OPT_CENTERY);
#if DISABLED(TOUCH_UI_NO_BOOTSCREEN) #if DISABLED(TOUCH_UI_NO_BOOTSCREEN)
@ -93,7 +95,9 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) {
cmd.font(font_medium) cmd.font(font_medium)
#define EDGE_R 30 #define EDGE_R 30
.colors(ui_slider) .colors(ui_slider)
#if DISABLED(LCD_FYSETC_TFT81050)
.tag(2).slider(BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.brightness, 128) .tag(2).slider(BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.brightness, 128)
#endif
.tag(3).slider(BTN_POS(3,3), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.volume, 0xFF) .tag(3).slider(BTN_POS(3,3), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.volume, 0xFF)
.colors(ui_toggle) .colors(ui_toggle)
.tag(4).toggle2(BTN_POS(3,4), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), LockScreen::is_enabled()) .tag(4).toggle2(BTN_POS(3,4), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), LockScreen::is_enabled())

View file

@ -721,3 +721,47 @@
#define BTN_ENC 63 #define BTN_ENC 63
#endif #endif
#endif #endif
#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
#error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_RAMPS.h' for details. Comment out this line to continue."
/** FYSECT TFT TFT81050 display pinout
*
* Board Display
* _____ _____
* (SCK) D52 | 1 2 | D50 (MISO) MISO | 1 2 | SCK
* (SD_CS) D53 | 3 4 | D33 (BNT_EN2) (BNT_EN2) MOD_RESET | 3 4 | SD_CS
* (MOSI) D51 | 5 6 D31 (BNT_EN1) (BNT_EN1) LCD_CS | 5 6 MOSI
* RESET | 7 8 | D49 (SD_DET) SD_DET | 7 8 | RESET
* NC | 9 10| GND GND | 9 10| 5V
* ----- -----
* EXP2 EXP1
*
* Needs custom cable:
*
* Board Adapter Display
* _________
* EXP2-1 ----------- EXP1-10
* EXP2-2 ----------- EXP1-9
* EXP2-4 ----------- EXP1-8
* EXP2-4 ----------- EXP1-7
* EXP2-3 ----------- EXP1-6
* EXP2-6 ----------- EXP1-5
* EXP2-7 ----------- EXP1-4
* EXP2-8 ----------- EXP1-3
* EXP2-1 ----------- EXP1-2
* EXT1-10 ----------- EXP1-1
*
*/
#define BEEPER_PIN 37
#define BTN_EN1 31
#define LCD_PINS_RS 33
#define SD_DETECT_PIN 49
#define KILL_PIN -1
#endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050

View file

@ -47,20 +47,20 @@
// //
// Limit Switches // Limit Switches
// //
#define X_STOP_PIN PC1 // X-STOP #define X_STOP_PIN PC1 // "X-STOP"
#define Y_STOP_PIN PC0 // Y-STOP #define Y_STOP_PIN PC0 // "Y-STOP"
#define Z_STOP_PIN PC15 // Z-STOP #define Z_STOP_PIN PC15 // "Z-STOP"
// //
// Z Probe must be this pin // Z Probe must be this pin
// //
#define Z_MIN_PROBE_PIN PC14 // PROBE #define Z_MIN_PROBE_PIN PC14 // "PROBE"
// //
// Filament Runout Sensor // Filament Runout Sensor
// //
#ifndef FIL_RUNOUT_PIN #ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PC2 // E0-STOP #define FIL_RUNOUT_PIN PC2 // "E0-STOP"
#endif #endif
// //
@ -149,9 +149,9 @@
// //
// Heaters / Fans // Heaters / Fans
// //
#define HEATER_0_PIN PC8 // HE #define HEATER_0_PIN PC8 // "HE"
#define HEATER_BED_PIN PC9 // HB #define HEATER_BED_PIN PC9 // "HB"
#define FAN_PIN PA8 // FAN0 #define FAN_PIN PA8 // "FAN0"
// //
// USB connect control // USB connect control
@ -159,8 +159,6 @@
#define USB_CONNECT_PIN PC13 #define USB_CONNECT_PIN PC13
#define USB_CONNECT_INVERTING false #define USB_CONNECT_INVERTING false
#define SD_DETECT_PIN PC4
/** /**
* _____ * _____
* 5V | 1 2 | GND * 5V | 1 2 | GND
@ -182,18 +180,31 @@
#define EXPA1_10_PIN PA15 #define EXPA1_10_PIN PA15
#if HAS_SPI_LCD #if HAS_SPI_LCD
#define BTN_ENC EXPA1_09_PIN
#define BTN_EN1 EXPA1_08_PIN
#define BTN_EN2 EXPA1_06_PIN
#if ENABLED(CR10_STOCKDISPLAY) #if ENABLED(CR10_STOCKDISPLAY)
#define BEEPER_PIN EXPA1_10_PIN #define BEEPER_PIN EXPA1_10_PIN
#define BTN_ENC EXPA1_09_PIN
#define BTN_EN1 EXPA1_08_PIN
#define BTN_EN2 EXPA1_06_PIN
#define LCD_PINS_RS EXPA1_04_PIN #define LCD_PINS_RS EXPA1_04_PIN
#define LCD_PINS_ENABLE EXPA1_03_PIN #define LCD_PINS_ENABLE EXPA1_03_PIN
#define LCD_PINS_D4 EXPA1_05_PIN #define LCD_PINS_D4 EXPA1_05_PIN
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_MINI_E3.h' for details. Comment out this line to continue."
#define LCD_PINS_RS EXPA1_05_PIN
#define LCD_PINS_ENABLE EXPA1_09_PIN
#define LCD_PINS_D4 EXPA1_04_PIN
#define LCD_PINS_D5 EXPA1_06_PIN
#define LCD_PINS_D6 EXPA1_08_PIN
#define LCD_PINS_D7 EXPA1_10_PIN
#define ADC_KEYPAD_PIN PA1 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
/** Creality Ender-2 display pinout /** Creality Ender-2 display pinout
@ -207,6 +218,10 @@
* EXP1 * EXP1
*/ */
#define BTN_ENC EXPA1_09_PIN
#define BTN_EN1 EXPA1_08_PIN
#define BTN_EN2 EXPA1_06_PIN
#define DOGLCD_CS EXPA1_04_PIN #define DOGLCD_CS EXPA1_04_PIN
#define DOGLCD_A0 EXPA1_05_PIN #define DOGLCD_A0 EXPA1_05_PIN
#define DOGLCD_SCK EXPA1_10_PIN #define DOGLCD_SCK EXPA1_10_PIN
@ -215,17 +230,71 @@
#define LCD_BACKLIGHT_PIN -1 #define LCD_BACKLIGHT_PIN -1
#else #else
#error "Only CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY, and MKS_MINI_12864 are currently supported on the BIGTREE_SKR_E3_DIP." #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, and MKS_MINI_12864 are currently supported on the BIGTREE_SKR_E3_DIP."
#endif #endif
#endif // HAS_SPI_LCD #endif // HAS_SPI_LCD
#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
#error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_SKR_E3_DIP.h' for details. Comment out this line to continue."
/** FYSECT TFT TFT81050 display pinout
*
* Board Display
* _____ _____
* 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK)
* (FREE) PB7 | 3 4 | PB8 (LCD_CS) (PA9) MOD_RESET | 3 4 | SD_CS (PA10)
* (FREE) PB9 | 5 6 PA10 (SD_CS) (PB8) LCD_CS | 5 6 MOSI (SPI1-MOSI)
* RESET | 7 8 | PA9 (MOD_RESET) (PA15) SD_DET | 7 8 | RESET
* (BEEPER) PB6 | 9 10| PA15 (SD_DET) GND | 9 10| 5V
* ----- -----
* EXP1 EXP1
*
* Needs custom cable:
*
* Board Adapter Display
* _________
* EXP1-1 ----------- EXP1-10
* EXP1-2 ----------- EXP1-9
* SPI1-4 ----------- EXP1-6
* EXP1-4 ----------- EXP1-5
* SP11-3 ----------- EXP1-2
* EXP1-6 ----------- EXP1-4
* EXP1-7 ----------- EXP1-8
* EXP1-8 ----------- EXP1-3
* SPI1-1 ----------- EXP1-1
* EXT1-10 ----------- EXP1-4
*
*/
#define CLCD_SPI_BUS 1 // SPI1 connector
#define BEEPER_PIN EXPA1_09_PIN
#define BTN_EN1 EXPA1_08_PIN
#define LCD_PINS_RS EXPA1_04_PIN
#endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050
// //
// SD Support // SD Support
// //
#ifndef SDCARD_CONNECTION #ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD #define SDCARD_CONNECTION ONBOARD
#endif #endif
#if SD_CONNECTION_IS(ONBOARD)
#define SD_DETECT_PIN PC4
#endif
#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) && SD_CONNECTION_IS(LCD)
#define SD_DETECT_PIN EXPA1_10_PIN
#define SS_PIN EXPA1_06_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "SD CUSTOM_CABLE is not compatible with SKR E3 DIP."
#endif
#define ON_BOARD_SPI_DEVICE 1 // SPI1 #define ON_BOARD_SPI_DEVICE 1 // SPI1
#define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card

View file

@ -40,19 +40,19 @@
// //
// Servos // Servos
// //
#define SERVO0_PIN PA1 #define SERVO0_PIN PA1 // "SERVOS"
// //
// Limit Switches // Limit Switches
// //
#define X_STOP_PIN PC0 #define X_STOP_PIN PC0 // "X-STOP"
#define Y_STOP_PIN PC1 #define Y_STOP_PIN PC1 // "Y-STOP"
#define Z_STOP_PIN PC2 #define Z_STOP_PIN PC2 // "Z-STOP"
// //
// Z Probe must be this pins // Z Probe must be this pin
// //
#define Z_MIN_PROBE_PIN PC14 #define Z_MIN_PROBE_PIN PC14 // "PROBE"
// //
// Filament Runout Sensor // Filament Runout Sensor
@ -83,15 +83,15 @@
// //
// Temperature Sensors // Temperature Sensors
// //
#define TEMP_0_PIN PA0 // Analog Input #define TEMP_0_PIN PA0 // Analog Input "TH0"
#define TEMP_BED_PIN PC3 // Analog Input #define TEMP_BED_PIN PC3 // Analog Input "TB0"
// //
// Heaters / Fans // Heaters / Fans
// //
#define HEATER_0_PIN PC8 // EXTRUDER #define HEATER_0_PIN PC8 // "HE"
#define HEATER_BED_PIN PC9 // BED #define HEATER_BED_PIN PC9 // "HB"
#define FAN_PIN PA8 #define FAN_PIN PA8 // "FAN0"
// //
// USB connect control // USB connect control
@ -99,8 +99,6 @@
#define USB_CONNECT_PIN PC13 #define USB_CONNECT_PIN PC13
#define USB_CONNECT_INVERTING false #define USB_CONNECT_INVERTING false
#define SD_DETECT_PIN PC4
/** /**
* _____ * _____
* 5V | 1 2 | GND * 5V | 1 2 | GND
@ -127,9 +125,9 @@
#define BEEPER_PIN EXPA1_10_PIN #define BEEPER_PIN EXPA1_10_PIN
#define BTN_ENC EXPA1_09_PIN
#define BTN_EN1 EXPA1_08_PIN #define BTN_EN1 EXPA1_08_PIN
#define BTN_EN2 EXPA1_06_PIN #define BTN_EN2 EXPA1_06_PIN
#define BTN_ENC EXPA1_09_PIN
#define LCD_PINS_RS EXPA1_04_PIN #define LCD_PINS_RS EXPA1_04_PIN
#define LCD_PINS_ENABLE EXPA1_03_PIN #define LCD_PINS_ENABLE EXPA1_03_PIN
@ -159,9 +157,10 @@
* ----- * -----
* EXP1 * EXP1
*/ */
#define BTN_ENC EXPA1_09_PIN
#define BTN_EN1 EXPA1_08_PIN #define BTN_EN1 EXPA1_08_PIN
#define BTN_EN2 EXPA1_06_PIN #define BTN_EN2 EXPA1_06_PIN
#define BTN_ENC EXPA1_09_PIN
#define DOGLCD_CS EXPA1_04_PIN #define DOGLCD_CS EXPA1_04_PIN
#define DOGLCD_A0 EXPA1_05_PIN #define DOGLCD_A0 EXPA1_05_PIN
@ -171,19 +170,73 @@
#define LCD_BACKLIGHT_PIN -1 #define LCD_BACKLIGHT_PIN -1
#else #else
#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, and MKS_MINI_12864 are currently supported on the BIGTREE_SKR_MINI_E3."
#error "Only ZONESTAR_LCD, MKS_MINI_12864, ENDER2_STOCKDISPLAY, and CR10_STOCKDISPLAY are currently supported on the BIGTREE_SKR_MINI_E3."
#endif #endif
#endif // HAS_SPI_LCD #endif // HAS_SPI_LCD
#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
#error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_SKR_MINI_E3.h' for details. Comment out this line to continue."
/** FYSECT TFT TFT81050 display pinout
*
* Board Display
* _____ _____
* 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK)
* (FREE) PB7 | 3 4 | PB8 (LCD_CS) (PA9) MOD_RESET | 3 4 | SD_CS (PA10)
* (FREE) PB9 | 5 6 PA10 (SD_CS) (PB8) LCD_CS | 5 6 MOSI (SPI1-MOSI)
* RESET | 7 8 | PA9 (MOD_RESET) (PB5) SD_DET | 7 8 | RESET
* (BEEPER) PB6 | 9 10| PB5 (SD_DET) GND | 9 10| 5V
* ----- -----
* EXP1 EXP1
*
* Needs custom cable:
*
* Board Adapter Display
* _________
* EXP1-1 ----------- EXP1-10
* EXP1-2 ----------- EXP1-9
* SPI1-4 ----------- EXP1-6
* EXP1-4 ----------- EXP1-5
* SPI1-3 ----------- EXP1-2
* EXP1-6 ----------- EXP1-4
* EXP1-7 ----------- EXP1-8
* EXP1-8 ----------- EXP1-3
* SPI1-1 ----------- EXP1-1
* EXP1-10 ----------- EXP1-4
*
*/
#define CLCD_SPI_BUS 1 // SPI1 connector
#define BEEPER_PIN EXPA1_09_PIN
#define BTN_EN1 EXPA1_08_PIN
#define LCD_PINS_RS EXPA1_04_PIN
#define LCD_PINS_ENABLE EXPA1_03_PIN
#define LCD_PINS_D4 EXPA1_05_PIN
#endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050
// //
// SD Support // SD Support
// //
#ifndef SDCARD_CONNECTION #ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD #define SDCARD_CONNECTION ONBOARD
#endif #endif
#if SD_CONNECTION_IS(ONBOARD)
#define SD_DETECT_PIN PC4
#endif
#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) && SD_CONNECTION_IS(LCD)
#define SD_DETECT_PIN EXPA1_10_PIN
#define SS_PIN EXPA1_06_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "SD CUSTOM_CABLE is not compatible with SKR Mini E3."
#endif
#define ON_BOARD_SPI_DEVICE 1 // SPI1 #define ON_BOARD_SPI_DEVICE 1 // SPI1
#define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card