Skip to content

Commit 8077189

Browse files
GerogeFuthinkyhead
authored andcommitted
Support FT81050 with FYSETC F6 (MarlinFirmware#18678)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
1 parent 3ff4753 commit 8077189

File tree

2 files changed

+72
-83
lines changed

2 files changed

+72
-83
lines changed

Marlin/Configuration_adv.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,6 +1436,7 @@
14361436
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
14371437
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
14381438
//#define S6_TFT_PINMAP // FYSETC S6 pin mapping
1439+
//#define F6_TFT_PINMAP // FYSETC F6 pin mapping
14391440

14401441
//#define OTHER_PIN_LAYOUT // Define pins manually below
14411442
#if ENABLED(OTHER_PIN_LAYOUT)

Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/pin_mappings.h

Lines changed: 71 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@
2727
* without adding new pin definitions to the board.
2828
*/
2929

30-
#ifdef S6_TFT_PINMAP
31-
#ifndef __MARLIN_FIRMWARE__
32-
#error "This pin mapping requires Marlin."
33-
#endif
30+
#include "../../../../inc/MarlinConfig.h"
31+
32+
#if ENABLED(F6_TFT_PINMAP) // FYSETC F6 - ATmega2560
33+
34+
#define CLCD_SPI_CS 33
35+
#define CLCD_MOD_RESET 31
36+
37+
#elif ENABLED(S6_TFT_PINMAP) // FYSETC S6 - STM32F4
3438

3539
#define CLCD_SPI_CS PC7
3640
#define CLCD_MOD_RESET PC6
37-
#endif
3841

39-
#ifdef CR10_TFT_PINMAP
40-
#ifndef __MARLIN_FIRMWARE__
41-
#error "This pin mapping requires Marlin."
42-
#endif
42+
#elif ENABLED(CR10_TFT_PINMAP) // FYSETC S6 - STM32F4 - with TOUCH_UI_ULTIPANEL
4343

4444
#define CLCD_USE_SOFT_SPI
4545
#define CLCD_SOFT_SPI_SCLK LCD_PINS_D4 // PORTA1 Pin 6
@@ -49,17 +49,13 @@
4949
#define CLCD_MOD_RESET 11 // PORTD3 BTN_EN1 Pin 3
5050
#define CLCD_AUX_0 10 // PORTD2 BTN_EN2 Pin 5
5151
#define CLCD_AUX_1 BEEPER_PIN // PORTA4 Pin 1
52-
#endif
5352

54-
/**
55-
* The AlephObjects pinout for re-purposing the UltraLCD
56-
* connector EXP1 for software SPI (rev B, obsolete)
57-
*/
53+
#elif ENABLED(AO_EXP1_DEPRECATED_PINMAP)
5854

59-
#ifdef AO_EXP1_DEPRECATED_PINMAP
60-
#ifndef __MARLIN_FIRMWARE__
61-
#error "This pin mapping requires Marlin."
62-
#endif
55+
/**
56+
* This AlephObjects pinout re-purposes the UltraLCD
57+
* connector EXP1 for Software SPI (rev B, obsolete)
58+
*/
6359

6460
#define CLCD_MOD_RESET LCD_PINS_D4
6561
#define CLCD_SPI_CS LCD_PINS_D5
@@ -72,34 +68,30 @@
7268
#define CLCD_SOFT_SPI_SCLK LCD_PINS_D7
7369
#define CLCD_SOFT_SPI_MOSI LCD_PINS_D6
7470
#define CLCD_SOFT_SPI_MISO LCD_PINS_RS
75-
#endif
7671

77-
/**
78-
* AO_EXP1_PINMAP
79-
*
80-
* The AlephObjects mapping for re-purposing the UltraLCD
81-
* connector EXP1 for software SPI for display (rev C):
82-
*
83-
* EXP2: FTDI: SD -or- USB [1]: ULTRA_LCD:
84-
* 1 MISO MISO MISO --> BEEPER
85-
* 2 SCLK SCLK SCLK --> BTN_ENC
86-
* 3 PD_N - - --> LCDE
87-
* 4 - CS_N CS_N --> LCDRS
88-
* 5 CS_N - - --> LCD4
89-
* 6 MOSI MOSI MOSI --> LCD5
90-
* 7 - SD_DET INT --> LCD6
91-
* 8 RESET - RESET --> LCD4
92-
* 9 GND GND GND --> GND
93-
* 10 5V 5V 5V --> 5V
94-
*
95-
* [1] At the moment, Marlin does not support SD or USB
96-
* functionality over software SPI.
97-
*/
98-
99-
#ifdef AO_EXP1_PINMAP
100-
#ifndef __MARLIN_FIRMWARE__
101-
#error "This pin mapping requires Marlin."
102-
#endif
72+
#elif ENABLED(AO_EXP1_PINMAP)
73+
74+
/**
75+
* AO_EXP1_PINMAP with TOUCH_UI_ULTIPANEL
76+
*
77+
* This AlephObjects mapping re-purposes the UltraLCD
78+
* connector EXP1 for Software SPI for display (rev C):
79+
*
80+
* EXP2: FTDI: SD -or- USB [1]: ULTRA_LCD:
81+
* 1 MISO MISO MISO --> BEEPER
82+
* 2 SCLK SCLK SCLK --> BTN_ENC
83+
* 3 PD_N - - --> LCDE
84+
* 4 - CS_N CS_N --> LCDRS
85+
* 5 CS_N - - --> LCD4
86+
* 6 MOSI MOSI MOSI --> LCD5
87+
* 7 - SD_DET INT --> LCD6
88+
* 8 RESET - RESET --> LCD4
89+
* 9 GND GND GND --> GND
90+
* 10 5V 5V 5V --> 5V
91+
*
92+
* [1] At the moment, Marlin does not support SD or USB
93+
* functionality over software SPI.
94+
*/
10395

10496
#define CLCD_MOD_RESET LCD_PINS_ENABLE
10597
#define CLCD_SPI_CS LCD_PINS_D4
@@ -108,49 +100,45 @@
108100
#define CLCD_SOFT_SPI_SCLK BTN_ENC
109101
#define CLCD_SOFT_SPI_MOSI LCD_PINS_D5
110102
#define CLCD_SOFT_SPI_MISO BEEPER_PIN
111-
#endif
112103

113-
/**
114-
* AO_EXP2_PINMAP
115-
*
116-
* The AlephObjects mapping for re-purposing the UltraLCD
117-
* connector EXP2 for hardware SPI for display and SD card
118-
* or USB (rev C):
119-
*
120-
* EXP2: FTDI: SD -or- USB: ULTRA_LCD:
121-
* 1 MISO MISO MISO --> MISO
122-
* 2 SCLK SCLK SCLK --> SCLK
123-
* 3 PD_N - - --> BTN_EN2
124-
* 4 - CS_N CS_N --> SD_CSEL
125-
* 5 CS_N - - --> BTN_EN1
126-
* 6 MOSI MOSI MOSI --> MOSI
127-
* 7 - SD_DET INT --> SD_DET
128-
* 8 RESET - RESET --> RESET
129-
* 9 GND GND GND --> GND
130-
* 10 5V 5V 5V --> KILL [3]
131-
*
132-
* [1] This configuration allows daisy-chaining of the
133-
* display and SD/USB on EXP2, except for [2]
134-
*
135-
* [2] The Ultimachine Einsy boards have a level shifter
136-
* on MISO enabled by SD_CSEL chip select, hence it
137-
* is not possible to run both the display and the
138-
* SD/USB on EXP2.
139-
*
140-
* [3] Archim Rambo provides 5V on this pin. On any other
141-
* board, divert this wire from the ribbon cable and
142-
* connect it to 5V at an endstop.
143-
*/
144-
145-
#ifdef AO_EXP2_PINMAP
146-
#ifndef __MARLIN_FIRMWARE__
147-
#error "This pin mapping requires Marlin."
148-
#endif
104+
#elif ENABLED(AO_EXP2_PINMAP)
105+
106+
/**
107+
* AO_EXP2_PINMAP with TOUCH_UI_ULTIPANEL
108+
*
109+
* The AlephObjects mapping for re-purposing the UltraLCD
110+
* connector EXP2 for hardware SPI for display and SD card
111+
* or USB (rev C):
112+
*
113+
* EXP2: FTDI: SD -or- USB: ULTRA_LCD:
114+
* 1 MISO MISO MISO --> MISO
115+
* 2 SCLK SCLK SCLK --> SCLK
116+
* 3 PD_N - - --> BTN_EN2
117+
* 4 - CS_N CS_N --> SD_CSEL
118+
* 5 CS_N - - --> BTN_EN1
119+
* 6 MOSI MOSI MOSI --> MOSI
120+
* 7 - SD_DET INT --> SD_DET
121+
* 8 RESET - RESET --> RESET
122+
* 9 GND GND GND --> GND
123+
* 10 5V 5V 5V --> KILL [3]
124+
*
125+
* [1] This configuration allows daisy-chaining of the
126+
* display and SD/USB on EXP2, except for [2]
127+
*
128+
* [2] The Ultimachine Einsy boards have a level shifter
129+
* on MISO enabled by SD_CSEL chip select, hence it
130+
* is not possible to run both the display and the
131+
* SD/USB on EXP2.
132+
*
133+
* [3] Archim Rambo provides 5V on this pin. On any other
134+
* board, divert this wire from the ribbon cable and
135+
* connect it to 5V at an endstop.
136+
*/
149137

150138
#define CLCD_SPI_CS BTN_EN1
151139
#define CLCD_MOD_RESET BTN_EN2
152-
153140
#if MB(EINSY_RAMBO, EINSY_RETRO) && DISABLED(SDSUPPORT)
154141
#define CLCD_SPI_EXTRA_CS SDSS
155142
#endif
143+
156144
#endif

0 commit comments

Comments
 (0)