Skip to content

Commit

Permalink
Migrate Hispeedv1 (QQS-Pro) to HAL/STM32 (MarlinFirmware#20354)
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxies-CSTL authored and dpreed committed Feb 5, 2021
1 parent 84f1728 commit db84be5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 38 deletions.
49 changes: 25 additions & 24 deletions Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
// Note: FLSun Hispeed (clone MKS_Robin_miniV2) board is using SPI2 interface.
//
#define SPI_DEVICE 2
#define SCK_PIN PB13 // SPI2
#define MISO_PIN PB14 // SPI2
#define MOSI_PIN PB15 // SPI2

// SPI Flash
#define HAS_SPI_FLASH 1
Expand Down Expand Up @@ -269,41 +272,38 @@
#error "FLSun HiSpeed default BEEPER_PIN is not a SPEAKER."
#endif

/**
* Note: MKS Robin TFT screens use various TFT controllers
* Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
* ILI9488 is not supported
* Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
*
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
*
* Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/

// QQS-Pro uses MKS Robin TFT v2.0 320x240
#if HAS_FSMC_TFT || HAS_GRAPHICAL_TFT
#define TFT_CS_PIN PD7 // NE4
#define TFT_RS_PIN PD11 // A0
#endif

// Shared FSMC Configs
#if HAS_FSMC_TFT
#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
#define DOGLCD_SCK -1

#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0

#define TFT_RESET_PIN PC6 // FSMC_RST
/**
* Note: MKS Robin TFT screens use various TFT controllers
* Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
* ILI9488 is not supported
* Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
*
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
*
* Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/
//#define TFT_RESET_PIN PC6 // FSMC_RST
#define TFT_BACKLIGHT_PIN PD13
#define FSMC_CS_PIN TFT_CS_PIN // NE4
#define FSMC_RS_PIN TFT_RS_PIN // 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
#if ENABLED(TFT_CLASSIC_UI)
#ifdef TFT_CLASSIC_UI
#define TFT_MARLINBG_COLOR 0x3186 // Grey
#define TFT_MARLINUI_COLOR 0xC7B6 // Green
#define TFT_BTARROWS_COLOR 0xDEE6 // Yellow
#define TFT_BTOKMENU_COLOR 0x145F // Cyan
#endif
#endif
#define TFT_BUFFER_SIZE 14400
#elif HAS_GRAPHICAL_TFT
#define TFT_RESET_PIN PC6
Expand All @@ -315,4 +315,5 @@
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
#define TOUCH_INT_PIN -1
#endif
14 changes: 0 additions & 14 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1149,20 +1149,6 @@ extra_scripts = ${env:STM32F103RE.extra_scripts}
debug_tool = jlink
upload_protocol = jlink

#
# FLSUN QQ (STM32F103VET6)
#
[env:flsun_hispeed]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
extra_scripts = ${common.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin_mini.py
buildroot/share/PlatformIO/scripts/add_nanolib.py
build_flags = ${common_stm32f1.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DHAVE_SW_SERIAL
lib_deps = SoftwareSerialM
#Adafruit NeoPixel=https://github.com/Foxies-CSTL/Robin-NeoPixel-Lib/archive/master.zip

#
# FLSUN QQS Pro (STM32F103VET6) using hal STM32
# board Hispeedv1
Expand Down

0 comments on commit db84be5

Please sign in to comment.