Support FT81050 with FYSETC F6 (#18678)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
George Fu 2020-07-17 20:40:28 +08:00 committed by GitHub
parent 4abad60bf1
commit bd0430dc38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 70 additions and 81 deletions

View file

@ -1436,6 +1436,7 @@
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
//#define S6_TFT_PINMAP // FYSETC S6 pin mapping
//#define F6_TFT_PINMAP // FYSETC F6 pin mapping
//#define OTHER_PIN_LAYOUT // Define pins manually below
#if ENABLED(OTHER_PIN_LAYOUT)

View file

@ -27,19 +27,19 @@
* without adding new pin definitions to the board.
*/
#ifdef S6_TFT_PINMAP
#ifndef __MARLIN_FIRMWARE__
#error "This pin mapping requires Marlin."
#endif
#include "../../../../inc/MarlinConfig.h"
#if ENABLED(F6_TFT_PINMAP) // FYSETC F6 - ATmega2560
#define CLCD_SPI_CS 33
#define CLCD_MOD_RESET 31
#elif ENABLED(S6_TFT_PINMAP) // FYSETC S6 - STM32F4
#define CLCD_SPI_CS PC7
#define CLCD_MOD_RESET PC6
#endif
#ifdef CR10_TFT_PINMAP
#ifndef __MARLIN_FIRMWARE__
#error "This pin mapping requires Marlin."
#endif
#elif ENABLED(CR10_TFT_PINMAP) // FYSETC S6 - STM32F4 - with TOUCH_UI_ULTIPANEL
#define CLCD_USE_SOFT_SPI
#define CLCD_SOFT_SPI_SCLK LCD_PINS_D4 // PORTA1 Pin 6
@ -49,18 +49,14 @@
#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
/**
* The AlephObjects pinout for re-purposing the UltraLCD
* connector EXP1 for software SPI (rev B, obsolete)
#elif ENABLED(AO_EXP1_DEPRECATED_PINMAP)
/**
* This AlephObjects pinout re-purposes the UltraLCD
* connector EXP1 for Software SPI (rev B, obsolete)
*/
#ifdef AO_EXP1_DEPRECATED_PINMAP
#ifndef __MARLIN_FIRMWARE__
#error "This pin mapping requires Marlin."
#endif
#define CLCD_MOD_RESET LCD_PINS_D4
#define CLCD_SPI_CS LCD_PINS_D5
@ -72,13 +68,14 @@
#define CLCD_SOFT_SPI_SCLK LCD_PINS_D7
#define CLCD_SOFT_SPI_MOSI LCD_PINS_D6
#define CLCD_SOFT_SPI_MISO LCD_PINS_RS
#endif
/**
* AO_EXP1_PINMAP
#elif ENABLED(AO_EXP1_PINMAP)
/**
* AO_EXP1_PINMAP with TOUCH_UI_ULTIPANEL
*
* The AlephObjects mapping for re-purposing the UltraLCD
* connector EXP1 for software SPI for display (rev C):
* This AlephObjects mapping re-purposes the UltraLCD
* connector EXP1 for Software SPI for display (rev C):
*
* EXP2: FTDI: SD -or- USB [1]: ULTRA_LCD:
* 1 MISO MISO MISO --> BEEPER
@ -96,11 +93,6 @@
* functionality over software SPI.
*/
#ifdef AO_EXP1_PINMAP
#ifndef __MARLIN_FIRMWARE__
#error "This pin mapping requires Marlin."
#endif
#define CLCD_MOD_RESET LCD_PINS_ENABLE
#define CLCD_SPI_CS LCD_PINS_D4
@ -108,10 +100,11 @@
#define CLCD_SOFT_SPI_SCLK BTN_ENC
#define CLCD_SOFT_SPI_MOSI LCD_PINS_D5
#define CLCD_SOFT_SPI_MISO BEEPER_PIN
#endif
/**
* AO_EXP2_PINMAP
#elif ENABLED(AO_EXP2_PINMAP)
/**
* AO_EXP2_PINMAP with TOUCH_UI_ULTIPANEL
*
* The AlephObjects mapping for re-purposing the UltraLCD
* connector EXP2 for hardware SPI for display and SD card
@ -142,15 +135,10 @@
* connect it to 5V at an endstop.
*/
#ifdef AO_EXP2_PINMAP
#ifndef __MARLIN_FIRMWARE__
#error "This pin mapping requires Marlin."
#endif
#define CLCD_SPI_CS BTN_EN1
#define CLCD_MOD_RESET BTN_EN2
#if MB(EINSY_RAMBO, EINSY_RETRO) && DISABLED(SDSUPPORT)
#define CLCD_SPI_EXTRA_CS SDSS
#endif
#endif