This commit is contained in:
Foxies 2020-10-08 11:17:23 +02:00
parent ef8a287703
commit 0cdfc71d79
4 changed files with 0 additions and 518 deletions

View file

@ -1,86 +0,0 @@
//===========================================================================
//=================== FLSun QQS - DELTA Printer =============================
//================= With pins_FLSUN_HiSPEED.h BOARD =========================
//===========================================================================
// For a Delta printer start with one of the configuration files in the
// config/examples/delta directory and customize for your machine.
// TIPS:
// For reduce binary size : https://thborges.github.io/blog/marlin/2019/01/07/reducing-marlin-binary-size.html
// For NeoPixel use library : https://github.com/................/archive/master.zip
// and commented error in SanityCheck.h
//========= Hardware ==========
//#define STOCK
/*------Drivers-(1 CHOICE)-----*/
//#define QQS //(S) 4xA4988
//#define QQS_TMC //(8) 4xTMC220x For 2208 or 2209
/* MODE UART XYZ*/
#define QQS_UART8 //(U8) 4xTMC2208 (Remove module ESP12)
//#define QQS_UART9 //(U9) 4xTMC2209 (Remove module ESP12)
/*------- Choice Other driver for EXTRUDER-------*/
#define DRIVER_EXT TMC2208_STANDALONE
// Set Software Serial UART for TMC 2208 / TMC 2209
#ifdef QQS_UART8
#define QQS_UART
#define SOFTWARE_SERIAL
#define DRIVER_AXES TMC2208
#ifndef DRIVER_EXT
#define DRIVER_EXT TMC2208
#endif
#endif
// Set Hardware Serial UART only TMC 2209
#ifdef QQS_UART9
#define QQS_UART
#define HARDWARE_SERIAL
#define DRIVER_AXES TMC2209
#ifndef DRIVER_EXT
#define DRIVER_EXT TMC2209
#endif
#endif
/*---- Modules -----*/
//#define ESP_WIFI //(W) Module ESP8266/ESP12
//#define ESP3D_WIFISUPPORT //(W)
//#define BMG //(B) Extruder
#define NEOPIXEL_LED //(N) Use port GPIO Wifi module (PA10/PA9/PA8/PC7)
//Many options for Modules:
#define POWER_LOSS_RECOVERY //NC LVGL pb SD
#define FILAMENT_RUNOUT_SENSOR //NC LVGL
#define ADVANCED_PAUSE_FEATURE //NC LVGL
#define LIN_ADVANCE //(L) Possible Bug with BabyStep.For TMC_UART prefer mode spreadCycle
/*-------Screen Mks_Robin_TFT_v2---(FSMC)-----*/
//Choice UI TFT
//#define FSMC_GRAPHICAL_TFT //(F) UI STANDARD
#define TFT_320x240 //(C) UI MARLIN (too big with mode UART+UBL=ok with nanolib)
//#define TFT_LVGL_UI_FSMC //(I) UI MKS => (Bug)
//============= End_Hardware ===============//
//Choice menu: (OPT)
#define DELTA_CALIBRATION_MENU //NC LVGL
#define PID_EDIT_MENU //
#define PID_AUTOTUNE_MENU //
#define PAUSE_BEFORE_DEPLOY_STOW //Message Stow/remove Probe (bug Octoprint & UI Marlin)
#define LCD_INFO_MENU //
//#define LED_CONTROL_MENU // For LedStrip
// Type Calibration (CAL)
//#define AUTO_BED_LEVELING_BILINEAR //(A)
#define AUTO_BED_LEVELING_UBL //(U)
// Option for Octoprint (OCTO)
#define HOST_ACTION_COMMANDS // Action Command Prompt support Message on Octoprint
//#define BINARY_FILE_TRANSFER // Bin transfert
//#define USE_CONTROLLER_FAN //BOARD FAN
//EXTRUDER_AUTO_FAN //
//

View file

@ -1,53 +0,0 @@
/**
* Made with Marlin Bitmap Converter
* https://marlinfw.org/tools/u8glib/converter.html
*
* This bitmap from the file 'flsun-logo-128x64-long.jpg'
*/
#pragma once
#define CUSTOM_BOOTSCREEN_BMPWIDTH 128
const unsigned char custom_start_bmp[] PROGMEM = {
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000001,B00000000,B00001000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000011,B10000000,B00011100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000001,B11000000,B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B11111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000011,B11111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000111,B01111111,B11011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00001111,B11111111,B11111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00110111,B11111111,B11111110,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00110011,B11111111,B11111101,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00011001,B00011111,B10001011,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00001100,B00000000,B00010110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000011,B10000000,B00111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B01111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B01111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B01111111,B11000000,B00000000,B00011111,B11111111,B11110011,B11000000,B00000000,B01111111,B11111100,B00000111,B10000000,B00001111,B10000111,B11111110,
B00000000,B01111111,B11000000,B00000000,B00011111,B11111111,B11110011,B11000000,B00000000,B11111111,B11111100,B00000111,B10000000,B00001111,B11000111,B11111110,
B00000000,B01111111,B11000000,B00000000,B00011111,B11111111,B11110011,B11000000,B00000001,B11111111,B11111100,B00000111,B10000000,B00001111,B11100011,B11111110,
B00000000,B01111111,B11000000,B00000000,B00011111,B11111111,B11110011,B11000000,B00000001,B11111111,B11111100,B00000111,B10000000,B00001111,B11110001,B11111110,
B00000000,B01111111,B11000000,B00000000,B00011111,B00000000,B00000011,B11000000,B00000001,B11100000,B00000000,B00000111,B10000000,B00001111,B11110000,B11111110,
B00000000,B01111111,B11000000,B00000000,B00011111,B00000000,B00000011,B11000000,B00000001,B11100000,B00000000,B00000111,B10000000,B00001111,B11111000,B01111110,
B00000000,B01111111,B11000000,B00000000,B00011111,B11111110,B00000011,B11000000,B00000001,B11111111,B11111111,B10000111,B10000000,B00000111,B01111100,B00111110,
B00000000,B01111111,B11000000,B00000000,B00011111,B11111110,B00000011,B11000000,B00000000,B11111111,B11111111,B11000111,B10000000,B00000001,B00111110,B00011110,
B00000000,B01111111,B11100000,B00000000,B00011111,B11111110,B00000011,B11000000,B00000000,B11111111,B11111111,B11100111,B10000000,B00001000,B00011111,B00001110,
B00000000,B01111111,B11000000,B00000000,B00011111,B11111110,B00000011,B11000000,B00000000,B00111111,B11111111,B11100111,B10000000,B00001100,B00001111,B10001110,
B00000000,B00111111,B10000000,B00000000,B00011111,B00000000,B00000011,B11000000,B00000000,B00000000,B00000001,B11110111,B10000000,B00001111,B00000111,B11000110,
B00000000,B00011111,B10000000,B00000000,B00011111,B00000000,B00000011,B11000000,B00000000,B00000000,B00000000,B11110111,B10000000,B00001111,B00000011,B11100010,
B00000000,B00011111,B00000000,B00000000,B00011111,B00000000,B00000011,B11111111,B11110011,B11111111,B11111111,B11110111,B11111111,B11111111,B00000001,B11110000,
B00000000,B00001110,B00000000,B00000000,B00011111,B00000000,B00000011,B11111111,B11110011,B11111111,B11111111,B11100011,B11111111,B11111111,B00000000,B11111000,
B00000000,B00000110,B00000000,B00000000,B00011110,B00000000,B00000011,B11111111,B11110011,B11111111,B11111111,B11000011,B11111111,B11111110,B00000000,B11111000,
B00000000,B00000011,B11111111,B11111000,B00001110,B00000000,B00000011,B11111111,B11110011,B11111111,B11111111,B10000001,B11111111,B11111100,B00000000,B01111100,
B00000000,B00000000,B00000000,B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00111111,B11110000,B00011111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00011111,B11111111,B11111111,B10000000,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B01111111,B11111000,B00000000,B00011111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B01111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00001111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00001111,B11111111,B11111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000
};

View file

@ -1,101 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Custom Status Screen bitmap
*
* Place this file in the root with your configuration files
* and enable CUSTOM_STATUS_SCREEN_IMAGE in Configuration.h.
*
* Use the Marlin Bitmap Converter to make your own:
* http://marlinfw.org/tools/u8glib/converter.html
*/
//
// Status Screen Logo bitmap
//
#define STATUS_LOGO_X 0
#define STATUS_LOGO_Y 0
#define STATUS_LOGO_WIDTH 40
const unsigned char status_logo_bmp[] PROGMEM = {
B00000010,B00000000,B00000000,B00000000,B01000000,
B00000011,B11000000,B00000000,B00000011,B11000000,
B00000011,B11110000,B00000000,B00011111,B11000000,
B00000011,B11111100,B00000000,B01111011,B11000000,
B00000011,B11001111,B00000000,B11110011,B10000000,
B00000011,B10100001,B11100111,B10000101,B10000000,
B00000001,B10010000,B11111110,B00001001,B10000000,
B00000001,B10011110,B00000000,B01111001,B10000000,
B00000001,B11100000,B00000000,B00000111,B10000000,
B00000001,B10000000,B00000000,B00000011,B10000000,
B00000011,B10000000,B00000000,B00000001,B11000000,
B00000111,B00000000,B00000000,B00000000,B11000000,
B00000111,B00111000,B00000000,B00011100,B11100000,
B00000110,B00011111,B10000001,B11111000,B11100000,
B00011100,B00000110,B10000001,B01100000,B00111000,
B01110000,B00000001,B11000011,B10000000,B00011110,
B01111111,B10000000,B11000011,B00000001,B11111110,
B00100000,B01110000,B01000010,B00001110,B00000100,
B00010000,B00001100,B11000011,B00110000,B00011000,
B00001110,B00000010,B10000001,B01000000,B01110000,
B00000000,B11110011,B10000001,B11001110,B00000000,
B00000000,B00001111,B00000000,B11110000,B00000000,
B00000000,B00000000,B11000011,B00000000,B00000000,
B00000000,B00000000,B01111100,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000
};
//
// Use default bitmaps
//
#define STATUS_HOTEND_ANIM
#define STATUS_BED_ANIM
//
<<<<<<< Updated upstream
<<<<<<< Updated upstream
<<<<<<< Updated upstream
<<<<<<< Updated upstream
<<<<<<< Updated upstream
#define STATUS_HEATERS_X 48
#define STATUS_BED_X 70
=======
#define STATUS_HEATERS_X 48 //48
#define STATUS_BED_X 70 //74
>>>>>>> Stashed changes
=======
#define STATUS_HEATERS_X 48 //48
#define STATUS_BED_X 70 //74
>>>>>>> Stashed changes
=======
#define STATUS_HEATERS_X 48 //48
#define STATUS_BED_X 70 //74
>>>>>>> Stashed changes
=======
#define STATUS_HEATERS_X 48 //48
#define STATUS_BED_X 70 //74
>>>>>>> Stashed changes
=======
#define STATUS_HEATERS_X 48 //48
#define STATUS_BED_X 70 //74
>>>>>>> Stashed changes

View file

@ -1,278 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* FLSUN HiSpeed V1 (STM32F130VET6) board pin assignments
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#elif HOTENDS > 1 || E_STEPPERS > 1
#error "FLSUN hispeed supports 1 hotends / E-steppers. Comment out this line to continue."
#endif
#define BOARD_INFO_NAME "FLSUN HISPEED"
//
//
//
#define DISABLE_DEBUG
//
// EEPROM
//
#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
#define FLASH_EEPROM_EMULATION
#define EEPROM_PAGE_SIZE (0x800U) // 2KB
#define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
#define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2KB
#endif
//
// Note: FLSun Hispeed (clone MKS_Robin_miniV2) board is using SPI2 interface.
//
//#define SPI_MODULE 2
#define ENABLE_SPI2
//#define SCK_PIN PB13
//#define MISO_PIN PB14
//#define MOSI_PIN PB15
//#define SS_PIN PB12
//
// Limit Switches
//
#define X_DIAG_PIN PA15 //-X
#define Y_DIAG_PIN PA12 //-Y
#define Z_DIAG_PIN PA11 //-Z
#define E0_DIAG_PIN PC4 //+Z
#define X_STOP_PIN PA15 //-X
#define Y_STOP_PIN PA12 //-Y
#define Z_MIN_PIN PA11 //-Z
#define Z_MAX_PIN PC4 //+Z
//
// Steppers
//
#define X_ENABLE_PIN PE4 //X_EN
#define X_STEP_PIN PE3 //X_STEP
#define X_DIR_PIN PE2 //X_DIR
#ifndef X_CS_PIN
#define X_CS_PIN PA10 //RXD1 /PD5
#endif
#define Y_ENABLE_PIN PE1 //Y_EN
#define Y_STEP_PIN PE0 //Y_STEP
#define Y_DIR_PIN PB9 //Y_DIR
#ifndef Y_CS_PIN
#define Y_CS_PIN PA9 //TXD1 /PD7
#endif
#define Z_ENABLE_PIN PB8 //Z_EN
#define Z_STEP_PIN PB5 //Z_STEP
#define Z_DIR_PIN PB4 //Z_DIR
#ifndef Z_CS_PIN
#define Z_CS_PIN PA8 //IO0 /PD4
#endif
#define E0_ENABLE_PIN PB3 //E0_EN
#define E0_STEP_PIN PD6 //E0_STEP
#define E0_DIR_PIN PD3 //E0_DIR
#ifndef E0_CS_PIN
#define E0_CS_PIN PC7 //IO1 /PD9
#endif
// Motor current PWM pins in orig //
//#define MOTOR_CURRENT_PWM_XY_PIN PA6 //Vref Control XY
//#define MOTOR_CURRENT_PWM_Z_PIN PA7 //Vref Control Z
//#define MOTOR_CURRENT_PWM_E_PIN PB0 //Vref Control E1
//#define MOTOR_CURRENT_PWM_RANGE 1500 // (255 * (1000mA / 65535)) * 257 = 1000 is equal 1.6v Vref in turn equal 1Amp
//#define DEFAULT_PWM_MOTOR_CURRENT { 1030, 1030, 1030 } // 1.05Amp per driver, here is XY, Z and E. This values determined empirically.
// This is a kind of workaround in case native marlin "digipot" interface won't work.
// Required to enable related code in STM32F1/HAL.cpp
//#ifndef MKS_ROBIN_MINI_VREF_PWM
// #define MKS_ROBIN_MINI_VREF_PWM
//#endif
#define VREF_XY_PIN PA6 //Vref Control XY
#define VREF_Z_PIN PA7 //Vref Control Z
#define VREF_E1_PIN PB0 //Vref Control E
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
//#define X_HARDWARE_SERIAL Serial
//#define X2_HARDWARE_SERIAL Serial1
//#define Y_HARDWARE_SERIAL Serial1
//#define Y2_HARDWARE_SERIAL Serial1
//#define Z_HARDWARE_SERIAL Serial1
//#define Z2_HARDWARE_SERIAL Serial1
//#define E0_HARDWARE_SERIAL Serial1
//#define E1_HARDWARE_SERIAL Serial1
//#define E2_HARDWARE_SERIAL Serial1
//#define E3_HARDWARE_SERIAL Serial1
//#define E4_HARDWARE_SERIAL Serial1
//
// Software serial
//
#define X_SERIAL_TX_PIN PA10 //RXD1 /PD5
#define X_SERIAL_RX_PIN PA10 //RXD1 /PD5
#define Y_SERIAL_TX_PIN PA9 //TXD1 /PD7
#define Y_SERIAL_RX_PIN PA9 //TXD1 /PD7
#define Z_SERIAL_TX_PIN PA8 //IO0 /PD4
#define Z_SERIAL_RX_PIN PA8 //IO0 /PD4
#define E0_SERIAL_TX_PIN PC7 //IO1 /PD9
#define E0_SERIAL_RX_PIN PC7 //IO1 /PD9
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif // TMC2208 || TMC2209
//
// Temperature Sensors
//
#define TEMP_0_PIN PC1 // TH1
#define TEMP_BED_PIN PC0 // TB1
//
// Heaters / Fans
//
#define HEATER_0_PIN PC3 // HEATER1
#define HEATER_BED_PIN PA0 // HOT BED
#define FAN_PIN PB1 // FAN
//
// Misc. Functions
//
#define POWER_LOSS_PIN PA1 // PW_SO /PW_DET
#define PS_ON_PIN PA3 // PW_OFF
//#define LED_PIN PB2
#define MT_DET_1_PIN PA4 //MT_DET
#define MT_DET_2_PIN PE6 //FALA_CTRL /EXT_IRQ
#define MT_DET_PIN_INVERTING false
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN MT_DET_1_PIN
#endif
//#define WIFI_IO0_PIN PA8 //PA10 //USUART1_RX /PC13
//#define WIFI_IO1_PIN PC7 //PA9 //USUART1_TX /PC7
//#define WIFI_RESET_PIN PA5 //WIFI_CTRL /PE9
//
// SD Card
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#define SDIO_SUPPORT
#define SDIO_CLOCK 4500000 // 4.5 MHz
#define SD_DETECT_PIN PD12 //FSCM_A17/USUART3_RX /SD_CD
#define ONBOARD_SD_CS_PIN PC11 //SD_CS
//#define SD_MOSI PD2 //SD_MOSI
//#define SD_MISO PC8 //SD_MISO
//
// LCD / Controller
//
#define BEEPER_PIN PC5
/**
* Note: MKS Robin TFT screens use various TFT controllers.
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
*/
#define XPT2046_X_CALIBRATION 12033
#define XPT2046_Y_CALIBRATION -9047
#define XPT2046_X_OFFSET -30
#define XPT2046_Y_OFFSET 254
#if ENABLED(FSMC_GRAPHICAL_TFT)
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#define LCD_RESET_PIN PC6 // FSMC_RST
#define LCD_BACKLIGHT_PIN PD13
#if NEED_TOUCH_PINS
#define TOUCH_CS_PIN PC2 // SPI2_NSS
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
#endif
#elif ENABLED(TFT_320x240) //TFT32/28
#define TFT_RESET_PIN PC6
#define TFT_BACKLIGHT_PIN PD13
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_CS_PIN PD7
#define FSMC_RS_PIN PD11
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#define TOUCH_CS_PIN PC2 // SPI2_NSS
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
#define TFT_DRIVER ILI9341
#define TFT_BUFFER_SIZE 14400
// YV for normal screen mounting
#define ILI9341_ORIENTATION ILI9341_MADCTL_MY | ILI9341_MADCTL_MV
// XV for 180° rotated screen mounting
//#define ILI9341_ORIENTATION ILI9341_MADCTL_MX | ILI9341_MADCTL_MV
#define ILI9341_COLOR_RGB
#endif
#define HAS_SPI_FLASH 1
#define SPI_FLASH_SIZE 0x1000000 // 16MB
#if HAS_SPI_FLASH
#define W25QXX_CS_PIN PB12 // Flash chip-select
#define W25QXX_MOSI_PIN PB15
#define W25QXX_MISO_PIN PB14
#define W25QXX_SCK_PIN PB13
#endif