More FTDI EVE fixes (RAMPS, Cheetah) (#17759)

This commit is contained in:
Gustavo Alvarez 2020-05-05 09:38:06 +02:00 committed by GitHub
parent 2acdd2fadc
commit 3fd8ef52c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 72 additions and 39 deletions

View file

@ -1387,7 +1387,7 @@
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
//#define S6_TFT_PINMAP // FYSETC S6 pin mapping
//#define CHEETAH_TFT_PINMAP // FYSETC Cheetah pin mapping
//#define E3_EXP1_PINMAP // E3 type boards (SKR E3/DIP, FYSETC Cheetah and Stock boards) EXP1 pin mapping
//#define E3_EXP1_PINMAP // E3 type boards (SKR E3/DIP, and Stock boards) EXP1 pin mapping
//#define GENERIC_EXP2_PINMAP // GENERIC EXP2 pin mapping
//#define OTHER_PIN_LAYOUT // Define pins manually below

View file

@ -27,31 +27,13 @@
* without adding new pin definitions to the board.
*/
#ifdef CHEETAH_TFT_PINMAP
#ifndef __MARLIN_FIRMWARE__
#error "This pin mapping requires Marlin."
#endif
#define CLCD_SPI_BUS 2
#define CLCD_MOD_RESET PC9
#define CLCD_SPI_CS PB12
//#define CLCD_USE_SOFT_SPI
#if ENABLED(CLCD_USE_SOFT_SPI)
#define CLCD_SOFT_SPI_MOSI PB15
#define CLCD_SOFT_SPI_MISO PB14
#define CLCD_SOFT_SPI_SCLK PB13
#endif
#endif
#ifdef S6_TFT_PINMAP
#ifndef __MARLIN_FIRMWARE__
#error "This pin mapping requires Marlin."
#endif
#define CLCD_SPI_CS PC7
#define CLCD_MOD_RESET PC6
#define CLCD_SPI_CS PC7
#define CLCD_MOD_RESET PC6
#endif
#ifdef CR10_TFT_PINMAP
@ -60,13 +42,13 @@
#endif
#define CLCD_USE_SOFT_SPI
#define CLCD_SOFT_SPI_SCLK LCD_PINS_D4 // PORTA1 Pin 6
#define CLCD_SOFT_SPI_MOSI LCD_PINS_ENABLE // PORTC1 Pin 8
#define CLCD_SPI_CS LCD_PINS_RS // PORTA3 Pin 7
#define CLCD_SOFT_SPI_MISO 16 // PORTC0 BTN_ENC Pin 2
#define CLCD_MOD_RESET 11 // PORTD3 BTN_EN1 Pin 3
#define CLCD_AUX_0 10 // PORTD2 BTN_EN2 Pin 5
#define CLCD_AUX_1 BEEPER_PIN // PORTA4 Pin 1
#define CLCD_SOFT_SPI_SCLK LCD_PINS_D4 // PORTA1 Pin 6
#define CLCD_SOFT_SPI_MOSI LCD_PINS_ENABLE // PORTC1 Pin 8
#define CLCD_SPI_CS LCD_PINS_RS // PORTA3 Pin 7
#define CLCD_SOFT_SPI_MISO 16 // PORTC0 BTN_ENC Pin 2
#define CLCD_MOD_RESET 11 // PORTD3 BTN_EN1 Pin 3
#define CLCD_AUX_0 10 // PORTD2 BTN_EN2 Pin 5
#define CLCD_AUX_1 BEEPER_PIN // PORTA4 Pin 1
#endif
/**
@ -181,3 +163,18 @@
#define CLCD_MOD_RESET BTN_EN1
#define CLCD_SPI_CS LCD_PINS_RS
#endif
#ifdef CHEETAH_TFT_PINMAP
#ifndef __MARLIN_FIRMWARE__
#error "This pin mapping requires Marlin."
#endif
#define CLCD_MOD_RESET BTN_EN2
#define CLCD_SPI_CS LCD_PINS_RS
#if ENABLED(CLCD_USE_SOFT_SPI)
#define CLCD_SOFT_SPI_MOSI LCD_PINS_ENABLE
#define CLCD_SOFT_SPI_MISO LCD_PINS_RS
#define CLCD_SOFT_SPI_SCLK LCD_PINS_D4
#endif
#endif

View file

@ -753,6 +753,8 @@
* EXP2-1 ----------- EXP1-2
* EXP1-10 ----------- EXP1-1
*
* NOTE: The MISO pin should not get a 5V signal.
* To fix, insert a 1N4148 diode in the MISO line.
*/
#define BEEPER_PIN 37

View file

@ -107,15 +107,35 @@
//
// LCD Pins
//
/**
* _____
* 5V | 1 2 | GND
* (MOSI) PB15 | 3 4 | PB12 (LCD_EN)
* (SCK) PB13 | 5 6 PC11 (BTN_EN1)
* (LCD_RS) PB14 | 7 8 | PC10 (BTN_EN2)
* (BTN_ENC) PC12 | 9 10| PC9 (BEEPER)
* -----
* EXP1
*/
#define EXPA1_03_PIN PB15
#define EXPA1_04_PIN PB12
#define EXPA1_05_PIN PB13
#define EXPA1_06_PIN PC11
#define EXPA1_07_PIN PB14
#define EXPA1_08_PIN PC10
#define EXPA1_09_PIN PC12
#define EXPA1_10_PIN PC9
#if HAS_SPI_LCD
#define BEEPER_PIN PC9
#define BEEPER_PIN EXPA1_10_PIN
#if HAS_GRAPHICAL_LCD
#define DOGLCD_A0 PB14
#define DOGLCD_CS PB12
#define DOGLCD_SCK PB13
#define DOGLCD_MOSI PB15
#define DOGLCD_A0 EXPA1_07_PIN
#define DOGLCD_CS EXPA1_04_PIN
#define DOGLCD_SCK EXPA1_05_PIN
#define DOGLCD_MOSI EXPA1_03_PIN
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
@ -125,9 +145,9 @@
#endif
#endif
#define LCD_PINS_RS PB12 // CS -- SOFT SPI for ENDER3 LCD
#define LCD_PINS_D4 PB13 // SCLK
#define LCD_PINS_ENABLE PB15 // DATA MOSI
#define LCD_PINS_RS EXPA1_04_PIN // CS -- SOFT SPI for ENDER3 LCD
#define LCD_PINS_D4 EXPA1_05_PIN // SCLK
#define LCD_PINS_ENABLE EXPA1_03_PIN // DATA MOSI
// not connected to a pin
#define SD_DETECT_PIN PC3
@ -145,9 +165,23 @@
//#define LCD_CONTRAST_INIT 190
#if ENABLED(NEWPANEL)
#define BTN_EN1 PC11
#define BTN_EN2 PC10
#define BTN_ENC PC12
#define BTN_EN1 EXPA1_06_PIN
#define BTN_EN2 EXPA1_08_PIN
#define BTN_ENC EXPA1_09_PIN
#endif
#endif
#if ENABLED(TOUCH_UI_FTDI_EVE)
#define BEEPER_PIN EXPA1_10_PIN
#define BTN_EN2 EXPA1_08_PIN
#define CLCD_SPI_BUS 2
//#define CLCD_USE_SOFT_SPI
#if ENABLED(CLCD_USE_SOFT_SPI)
#define LCD_PINS_RS EXPA1_04_PIN
#define LCD_PINS_D4 EXPA1_07_PIN
#define LCD_PINS_ENABLE EXPA1_05_PIN
#endif
#endif