Skip to content

Commit

Permalink
Update following the new management of screens.
Browse files Browse the repository at this point in the history
Removal of part XPT2046.
Displacement of the TFT buffer in the FSMC part and of the colors specific to the LCD emulation (UI Classic).
  • Loading branch information
Foxies-CSTL authored and dpreed committed Feb 5, 2021
1 parent 65b5a19 commit 8a1a1b1
Showing 1 changed file with 18 additions and 55 deletions.
73 changes: 18 additions & 55 deletions Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
#define SPI_DEVICE 2

// SPI Flash
#define HAS_SPI_FLASH 1
#define HAS_SPI_FLASH 1
#define SPI_FLASH_SIZE 0x1000000 // 16MB

#if HAS_SPI_FLASH
Expand All @@ -76,7 +76,7 @@
//
// Servos
//
//#define SERVO0_PIN PA8 // use IO0 to enable BLTOUCH support/remove Mks_Wifi
//#define SERVO0_PIN PA8 // use IO0 to enable BLTOUCH support/remove Mks_Wifi

//
// Limit Switches
Expand Down Expand Up @@ -119,57 +119,20 @@
// Drivers
//
#if HAS_TMC220x
// SoftwareSerial with one pin per driver
// Compatible with TMC2208 and TMC2209 drivers
#define X_SERIAL_TX_PIN PA10 // RXD1
#define X_SERIAL_RX_PIN PA10 // RXD1
#define Y_SERIAL_TX_PIN PA9 // TXD1
#define Y_SERIAL_RX_PIN PA9 // TXD1
#define Z_SERIAL_TX_PIN PC7 // IO1
#define Z_SERIAL_RX_PIN PC7 // IO1
#define TMC_BAUD_RATE 19200
#ifdef HARDWARE_SERIAL /* TMC2209 */
/**
* HardwareSerial with one pin for four drivers.
* Compatible with TMC2209. Provides best performance.
* Requires SLAVE_ADDRESS definitions in Configuration_adv.h and proper
* jumper configuration. Uses only one I/O pin like PA10/PA9/PC7/PA8.
* Install the jumpers in the following way, for example:
*/
// The 4xTMC2209 module doesn't have a serial multiplexer and
// needs to set *_SLAVE_ADDRESS in Configuration_adv.h for X,Y,Z,E0
#define X_SLAVE_ADDRESS 3 // | | :
#define Y_SLAVE_ADDRESS 2 // : | :
#define Z_SLAVE_ADDRESS 1 // | : :
//#define E0_SLAVE_ADDRESS 0 // : : :

#define X_SERIAL_TX_PIN PA8 // IO0
#define X_SERIAL_RX_PIN PA8 // IO0
#define Y_SERIAL_TX_PIN PA8 // IO0
#define Y_SERIAL_RX_PIN PA8 // IO0
#define Z_SERIAL_TX_PIN PA8 // IO0
#define Z_SERIAL_RX_PIN PA8 // IO0
#ifdef ESP_WIFI
//Module ESP-WIFI
#define ESP_WIFI_MODULE_COM 2
#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE
#define ESP_WIFI_MODULE_RESET_PIN PA5
#define ESP_WIFI_MODULE_ENABLE_PIN -1
#define ESP_WIFI_MODULE_TXD_PIN PA9
#define ESP_WIFI_MODULE_RXD_PIN PA10
#endif
#else /* TMC220x */
// SoftwareSerial with one pin per driver
// Compatible with TMC2208 and TMC2209 drivers
#define X_SLAVE_ADDRESS 0
#define Y_SLAVE_ADDRESS 0
#define Z_SLAVE_ADDRESS 0

#define X_SERIAL_TX_PIN PA10 // RXD1
#define X_SERIAL_RX_PIN PA10 // RXD1
#define Y_SERIAL_TX_PIN PA9 // TXD1
#define Y_SERIAL_RX_PIN PA9 // TXD1
#define Z_SERIAL_TX_PIN PC7 // IO1
#define Z_SERIAL_RX_PIN PC7 // IO1
#endif

#else
// Motor current PWM pins
#define MOTOR_CURRENT_PWM_XY_PIN PA6 // VREF2/3 CONTROL XY
#define MOTOR_CURRENT_PWM_Z_PIN PA7 // VREF4 CONTROL Z
#define MOTOR_CURRENT_PWM_RANGE 1500 // (255 * (1000mA / 65535)) * 257 = 1000 is equal 1.6v Vref in turn equal 1Amp
#define MOTOR_CURRENT_PWM_RANGE 1500 // (255 * (1000mA / 65535)) * 257 = 1000 is equal 1.6v Vref in turn equal 1Amp
#ifndef DEFAULT_PWM_MOTOR_CURRENT
#define DEFAULT_PWM_MOTOR_CURRENT { 800, 800, 800 }
#endif
Expand Down Expand Up @@ -203,11 +166,11 @@
#if AXIS_DRIVER_TYPE_E0(TMC2208) || AXIS_DRIVER_TYPE_E0(TMC2209)
#define E0_SERIAL_TX_PIN PA8 // IO0
#define E0_SERIAL_RX_PIN PA8 // IO0
#define TMC_BAUD_RATE 19200
#define TMC_BAUD_RATE 19200
#else
// Motor current PWM pins
#define MOTOR_CURRENT_PWM_E_PIN PB0 // VREF1 CONTROL E
#define MOTOR_CURRENT_PWM_RANGE 1500 // (255 * (1000mA / 65535)) * 257 = 1000 is equal 1.6v Vref in turn equal 1Amp
#define MOTOR_CURRENT_PWM_RANGE 1500 // (255 * (1000mA / 65535)) * 257 = 1000 is equal 1.6v Vref in turn equal 1Amp
#ifndef DEFAULT_PWM_MOTOR_CURRENT
#define DEFAULT_PWM_MOTOR_CURRENT { 800, 800, 800 }
#endif
Expand All @@ -230,7 +193,7 @@
//
// Misc. Functions
//
//#define POWER_LOSS_PIN PA1 // PW_SO
//#define POWER_LOSS_PIN PA1 // PW_SO
#if ENABLED(BACKUP_POWER_SUPPLY)
#define POWER_LOSS_PIN PA2 // PW_DET (UPS) MKSPWC
#endif
Expand Down Expand Up @@ -258,12 +221,12 @@

#define MT_DET_1_PIN PA4 // MT_DET
#define MT_DET_2_PIN PE6 // FALA_CRTL
#define MT_DET_PIN_INVERTING false
#define MT_DET_PIN_INVERTING false

//
// LED / NEOPixel
//
//#define LED_PIN PB2 // BOOT1
//#define LED_PIN PB2 // BOOT1

#if ENABLED(NEOPIXEL_LED)
#define LED_PWM PC7 // IO1
Expand Down Expand Up @@ -337,9 +300,9 @@
#define FSMC_DMA_CHANNEL DMA_CH5

#define TFT_BUFFER_SIZE 14400
#ifdef TFT_CLASSIC_UI
#if ENABLED(TFT_CLASSIC_UI)
#define TFT_MARLINBG_COLOR 0x3186 // White
#define TFT_MARLINUI_COLOR 0xC7B6 // Green
#define TFT_MARLINUI_COLOR 0xC7B6 // green
#define TFT_BTARROWS_COLOR 0xDEE6 // Yellow
#define TFT_BTOKMENU_COLOR 0x145F // Cyan
#endif
Expand Down

0 comments on commit 8a1a1b1

Please sign in to comment.