ZoneStar Z6FB (#18918)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
wmariz 2020-08-07 19:03:59 -03:00 committed by GitHub
parent cec035688d
commit da4eaebdc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 340 additions and 68 deletions

View File

@ -2097,6 +2097,13 @@
//#define MKS_12864OLED // Uses the SH1106 controller (default) //#define MKS_12864OLED // Uses the SH1106 controller (default)
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller //#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
//
// Zonestar OLED 128×64 FULL GRAPHICS CONTROLLER
//
//#define ZONESTAR_12864LCD // Graphical (DOGM) with ST7920 controller
//#define ZONESTAR_12864OLED // 1.3" OLED with SH1106 controller (default)
//#define ZONESTAR_12864OLED_SSD1306 // 0.96" OLED with SSD1306 controller
// //
// Einstart S OLED SSD1306 // Einstart S OLED SSD1306
// //

View File

@ -171,6 +171,7 @@
#define BOARD_STB_11 1508 // STB V1.1 #define BOARD_STB_11 1508 // STB V1.1
#define BOARD_AZTEEG_X1 1509 // Azteeg X1 #define BOARD_AZTEEG_X1 1509 // Azteeg X1
#define BOARD_ANET_10 1510 // Anet 1.0 (Melzi clone) #define BOARD_ANET_10 1510 // Anet 1.0 (Melzi clone)
#define BOARD_ZMIB_V2 1511 // ZoneStar ZMIB V2
// //
// Other ATmega644P, ATmega644, ATmega1284P // Other ATmega644P, ATmega644, ATmega1284P

View File

@ -62,6 +62,19 @@
#define ENCODER_STEPS_PER_MENU_ITEM 1 #define ENCODER_STEPS_PER_MENU_ITEM 1
#define ENCODER_FEEDRATE_DEADZONE 2 #define ENCODER_FEEDRATE_DEADZONE 2
#elif ENABLED(ZONESTAR_12864LCD)
#define DOGLCD
#define IS_RRD_SC
#define U8GLIB_ST7920
#elif ENABLED(ZONESTAR_12864OLED)
#define IS_RRD_SC
#define U8GLIB_SH1106
#elif ENABLED(ZONESTAR_12864OLED_SSD1306)
#define IS_RRD_SC
#define IS_U8GLIB_SSD1306
#elif ENABLED(RADDS_DISPLAY) #elif ENABLED(RADDS_DISPLAY)
#define IS_ULTIPANEL #define IS_ULTIPANEL
#define ENCODER_PULSES_PER_STEP 2 #define ENCODER_PULSES_PER_STEP 2

View File

@ -312,6 +312,10 @@
#define _LCD_CONTRAST_INIT 17 #define _LCD_CONTRAST_INIT 17
#elif ENABLED(MINIPANEL) #elif ENABLED(MINIPANEL)
#define _LCD_CONTRAST_INIT 150 #define _LCD_CONTRAST_INIT 150
#elif ENABLED(ZONESTAR_12864OLED)
#define _LCD_CONTRAST_MIN 64
#define _LCD_CONTRAST_INIT 128
#define _LCD_CONTRAST_MAX 255
#endif #endif
#ifdef _LCD_CONTRAST_INIT #ifdef _LCD_CONTRAST_INIT

View File

@ -2227,6 +2227,9 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
+ ENABLED(OLED_PANEL_TINYBOY2) \ + ENABLED(OLED_PANEL_TINYBOY2) \
+ ENABLED(MKS_12864OLED) \ + ENABLED(MKS_12864OLED) \
+ ENABLED(MKS_12864OLED_SSD1306) \ + ENABLED(MKS_12864OLED_SSD1306) \
+ ENABLED(ZONESTAR_12864LCD) \
+ ENABLED(ZONESTAR_12864OLED) \
+ ENABLED(ZONESTAR_12864OLED_SSD1306) \
+ ENABLED(U8GLIB_SH1106_EINSTART) \ + ENABLED(U8GLIB_SH1106_EINSTART) \
+ ENABLED(OVERLORD_OLED) \ + ENABLED(OVERLORD_OLED) \
+ ENABLED(FYSETC_242_OLED_12864) \ + ENABLED(FYSETC_242_OLED_12864) \
@ -2242,7 +2245,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
+ ENABLED(TFT_LVGL_UI_SPI) \ + ENABLED(TFT_LVGL_UI_SPI) \
+ ENABLED(ANYCUBIC_LCD_I3MEGA) \ + ENABLED(ANYCUBIC_LCD_I3MEGA) \
+ ENABLED(ANYCUBIC_LCD_CHIRON) + ENABLED(ANYCUBIC_LCD_CHIRON)
#error "Please select no more than one LCD controller option." #error "Please select only one LCD controller option."
#endif #endif
#undef IS_RRD_SC #undef IS_RRD_SC

View File

@ -246,7 +246,7 @@ void MarlinUI::init_lcd() {
OUT_WRITE(LCD_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); // Illuminate after reset or right away OUT_WRITE(LCD_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); // Illuminate after reset or right away
#endif #endif
#if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306, FYSETC_242_OLED_12864) #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306, FYSETC_242_OLED_12864, ZONESTAR_12864OLED)
SET_OUTPUT(LCD_PINS_DC); SET_OUTPUT(LCD_PINS_DC);
#ifndef LCD_RESET_PIN #ifndef LCD_RESET_PIN
#define LCD_RESET_PIN LCD_PINS_RS #define LCD_RESET_PIN LCD_PINS_RS

View File

@ -33,6 +33,9 @@
//#define ALTERNATIVE_LCD //#define ALTERNATIVE_LCD
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
// RepRapWorld Graphical LCD
#define U8G_CLASS U8GLIB_ST7920_128X64_4X #define U8G_CLASS U8GLIB_ST7920_128X64_4X
#if DISABLED(SDSUPPORT) && (LCD_PINS_D4 == SCK_PIN) && (LCD_PINS_ENABLE == MOSI_PIN) #if DISABLED(SDSUPPORT) && (LCD_PINS_D4 == SCK_PIN) && (LCD_PINS_ENABLE == MOSI_PIN)
#define U8G_PARAM LCD_PINS_RS #define U8G_PARAM LCD_PINS_RS
@ -43,6 +46,7 @@
#elif ENABLED(U8GLIB_ST7920) #elif ENABLED(U8GLIB_ST7920)
// RepRap Discount Full Graphics Smart Controller // RepRap Discount Full Graphics Smart Controller
// and other variant LCDs using ST7920
#if DISABLED(SDSUPPORT) && (LCD_PINS_D4 == SCK_PIN) && (LCD_PINS_ENABLE == MOSI_PIN) #if DISABLED(SDSUPPORT) && (LCD_PINS_D4 == SCK_PIN) && (LCD_PINS_ENABLE == MOSI_PIN)
#define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL // 2 stripes, HW SPI (Shared with SD card. Non-standard LCD adapter on AVR.) #define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL // 2 stripes, HW SPI (Shared with SD card. Non-standard LCD adapter on AVR.)
@ -88,43 +92,28 @@
#define FORCE_SOFT_SPI // SW-SPI #define FORCE_SOFT_SPI // SW-SPI
#endif #endif
#elif ENABLED(MKS_12864OLED_SSD1306) #elif ANY(FYSETC_MINI_12864, MKS_MINI_12864, ENDER2_STOCKDISPLAY)
// The FYSETC Mini 12864 display // "4 stripes"
// The MKS_MINI_12864 V1/V2 aren't exact copies of the MiniPanel.
// Panel management is in u8g_dev_uc1701_mini12864_HAL.cpp with
// extra delays added to remove glitches seen with fast MCUs.
#define U8G_CLASS U8GLIB_MINI12864_2X_HAL // 8 stripes (HW-SPI)
#elif ENABLED(MINIPANEL)
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_MINI12864
#else
#define U8G_CLASS U8GLIB_MINI12864_2X // 8 stripes (HW-SPI)
#endif
#elif EITHER(MKS_12864OLED_SSD1306, FYSETC_242_OLED_12864)
// MKS 128x64 (SSD1306) OLED I2C LCD // MKS 128x64 (SSD1306) OLED I2C LCD
// - or -
#define FORCE_SOFT_SPI // SW-SPI
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_SSD1306_128X64_2X // 4 stripes
#else
#define U8G_CLASS U8GLIB_SSD1306_128X64 // 8 stripes
#endif
#elif ENABLED(U8GLIB_SSD1306)
// Generic SSD1306 OLED I2C LCD
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE // 4 stripes
#else
#define U8G_CLASS U8GLIB_SSD1306_128X64_2X // 4 stripes
#endif
#define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST)
#elif ENABLED(MKS_12864OLED)
// MKS 128x64 (SH1106) OLED I2C LCD
#define FORCE_SOFT_SPI // SW-SPI
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_SH1106_128X64_2X // 4 stripes
#else
#define U8G_CLASS U8GLIB_SH1106_128X64 // 8 stripes
#endif
#elif ENABLED(FYSETC_242_OLED_12864)
// FYSETC OLED 2.42" 128 × 64 FULL GRAPHICS CONTROLLER // FYSETC OLED 2.42" 128 × 64 FULL GRAPHICS CONTROLLER
#define FORCE_SOFT_SPI // SW-SPI #define FORCE_SOFT_SPI // SW-SPI
@ -135,6 +124,37 @@
#define U8G_CLASS U8GLIB_SSD1306_128X64 // 8 stripes #define U8G_CLASS U8GLIB_SSD1306_128X64 // 8 stripes
#endif #endif
#elif ENABLED(ZONESTAR_12864OLED_SSD1306)
// Zonestar SSD1306 OLED SPI LCD
#define FORCE_SOFT_SPI // SW-SPI
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_SH1306_128X64_2X // 4 stripes
#else
#define U8G_CLASS U8GLIB_SH1306_128X64 // 8 stripes
#endif
#elif EITHER(MKS_12864OLED, ZONESTAR_12864OLED)
// MKS 128x64 (SH1106) OLED I2C LCD
// - or -
// Zonestar SH1106 OLED SPI LCD
#define FORCE_SOFT_SPI // SW-SPI
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_SH1106_128X64_2X // 4 stripes
#else
#define U8G_CLASS U8GLIB_SH1106_128X64 // 8 stripes
#endif
#elif ENABLED(U8GLIB_SH1106_EINSTART)
// Connected via motherboard header
#define U8G_CLASS U8GLIB_SH1106_128X64
#define U8G_PARAM DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, LCD_PINS_DC, LCD_PINS_RS
#elif ENABLED(U8GLIB_SH1106) #elif ENABLED(U8GLIB_SH1106)
// Generic SH1106 OLED I2C LCD // Generic SH1106 OLED I2C LCD
@ -153,34 +173,16 @@
#define U8G_CLASS U8GLIB_SSD1309_128X64 #define U8G_CLASS U8GLIB_SSD1309_128X64
#define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST) // I2C #define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST) // I2C
#elif ENABLED(FYSETC_MINI_12864) #elif ENABLED(U8GLIB_SSD1306)
// The FYSETC Mini 12864 display // Generic SSD1306 OLED I2C LCD
#define U8G_CLASS U8GLIB_MINI12864_2X_HAL // 4 stripes
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
// The MKS_MINI_12864 V1/V2 aren't exact copies of the MiniPanel.
// Panel management is in u8g_dev_uc1701_mini12864_HAL.cpp with
// extra delays added to remove glitches seen with fast MCUs.
#define U8G_CLASS U8GLIB_MINI12864_2X_HAL // 8 stripes (HW-SPI)
#elif ENABLED(MINIPANEL)
#if ENABLED(ALTERNATIVE_LCD) #if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_MINI12864 #define U8G_CLASS U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE // 4 stripes
#else #else
#define U8G_CLASS U8GLIB_MINI12864_2X // 8 stripes (HW-SPI) #define U8G_CLASS U8GLIB_SSD1306_128X64_2X // 4 stripes
#endif #endif
#define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST)
#elif ENABLED(U8GLIB_SH1106_EINSTART)
// Connected via motherboard header
#define U8G_CLASS U8GLIB_SH1106_128X64
#define U8G_PARAM DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, LCD_PINS_DC, LCD_PINS_RS
#elif TFT_SCALED_DOGLCD #elif TFT_SCALED_DOGLCD

View File

@ -16,7 +16,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
* *
*/ */

View File

@ -300,6 +300,8 @@
#include "sanguino/pins_STB_11.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p #include "sanguino/pins_STB_11.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
#elif MB(AZTEEG_X1) #elif MB(AZTEEG_X1)
#include "sanguino/pins_AZTEEG_X1.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p #include "sanguino/pins_AZTEEG_X1.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
#elif MB(ZMIB_V2)
#include "sanguino/pins_ZMIB_V2.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
// //
// Other ATmega644P, ATmega644, ATmega1284P // Other ATmega644P, ATmega644, ATmega1284P

View File

@ -0,0 +1,234 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 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
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
#error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644P' or 'ATmega1284P' in 'Tools > Processor.'"
#endif
#define BOARD_INFO_NAME "Zonestar ZMIB_V2"
#define BOARD_WEBSITE_URL "https://www.aliexpress.com/item/32957490744.html"
#define IS_ZMIB_V2
/**
* ZMIB pin assignments
*
* The ZMIB board needs a bootloader installed before Marlin can be uploaded.
* If you don't have a chip programmer you can use a spare Arduino plus a few
* electronic components to write the bootloader.
*
* See http://www.instructables.com/id/Burn-Arduino-Bootloader-with-Arduino-MEGA/
*/
/**
* PIN: 0 Port: B0 HEATER_0_PIN
* PIN: 1 Port: B1 HEATER_BED_PIN
* PIN: 2 Port: B2 EXP1_4(BTN_EN2)
* PIN: 3 Port: B3 V1: SD_DETECT_PIN
* PIN: 3 Port: B3 V2: EXP1_6
* PIN: 4 Port: B4 SDSS
* PIN: 4 Port: B4 V1: EXP1_6
* PIN: 5 Port: B5 AVR_MOSI_PIN
* . MOSI_PIN
* PIN: 6 Port: B6 AVR_MISO_PIN
* . EXP1_9(MISO_PIN)
* PIN: 7 Port: B7 AVR_SCK_PIN
* . EXP1_10(SCK_PIN)
* PIN: 8 Port: D0 RXD
* PIN: 9 Port: D1 TXD
* PIN: 10 Port: D2 EXP1_8
* PIN: 11 Port: D3 EXP1_7
* PIN: 12 Port: D4 EXP1_5(BTN_EN1)
* PIN: 13 Port: D5 Z_MIN_PIN
* PIN: 14 Port: D6 E1_DIR_PIN
* PIN: 15 Port: D7 E1_STEP_PIN
* PIN: 16 Port: C0 Z_DIR_PIN
* PIN: 17 Port: C1 Z_STEP_PIN
* PIN: 18 Port: C2 Y_MIN_PIN
* PIN: 19 Port: C3 Y_DIR_PIN
* PIN: 20 Port: C4 Y_STEP_PIN
* PIN: 21 Port: C5 X_MIN_PIN
* PIN: 22 Port: C6 X_DIR_PIN
* PIN: 23 Port: C7 X_STEP_PIN
* PIN: 24 Port: A7 X_ENABLE_PIN
* Y_ENABLE_PIN
* Z_ENABLE_PIN
* E0_ENABLE_PIN
* E1_ENABLE_PIN
* PIN: 25 Port: A6 FIL_RUNOUT_PIN
* PIN: 26 Port: A5 E0_DIR_PIN
* PIN: 27 Port: A4 E0_STEP_PIN
* PIN: 28 Port: A3 FAN_PIN
* PIN: 29 Port: A2 EXP1_3(BTN_ENC)
* ADC_KEY_PIN
* PIN: 30 Port: A1 TEMP_0_PIN
* PIN: 31 Port: A0 TEMP_BED_PIN
*/
//
// Limit Switches
//
#define X_MIN_PIN 21
#define Y_MIN_PIN 18
#if EITHER(Z6S_ZFAULT, Z6BS_ZFAULT)
#define Z_MIN_PIN 25
#else
#define Z_MIN_PIN 13
#endif
//
// Steppers
//
#define X_STEP_PIN 23
#define X_DIR_PIN 22
#define X_ENABLE_PIN 24
#define Y_STEP_PIN 20
#define Y_DIR_PIN 19
#define Y_ENABLE_PIN 24
#if EITHER(Z6S_ZFAULT, Z6BS_ZFAULT)
#define Z_STEP_PIN 27
#define Z_DIR_PIN 26
#else
#define Z_STEP_PIN 17
#define Z_DIR_PIN 16
#endif
#define Z_ENABLE_PIN 24
#if EITHER(Z6S_ZFAULT, Z6BS_ZFAULT)
#define E0_STEP_PIN 15
#define E0_DIR_PIN 14
#else
#define E0_STEP_PIN 27
#define E0_DIR_PIN 26
#endif
#define E0_ENABLE_PIN 24
#define E1_STEP_PIN 15
#define E1_DIR_PIN 14
#define E1_ENABLE_PIN 24
//
// Temperature Sensors
//
#define TEMP_0_PIN 1 // Analog Input
#define TEMP_BED_PIN 0 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 0
#define HEATER_BED_PIN 1
#define FAN_PIN 28
#define FAN1_PIN -1
//
//filament run out sensor
//
#if EITHER(Z6S_ZFAULT, Z6BS_ZFAULT)
#define FIL_RUNOUT_PIN 13
#else
#define FIL_RUNOUT_PIN 25 // Z-MIN
#endif
//
// SD card
//
#if ENABLED(SDSUPPORT)
#define SDSS 4
#endif
#define SD_DETECT_PIN -1
/*===================================================
* ZMIB Version 1 - EXP1 Connector
* MOSI(D5) TX1(D11) ENA(D12) ENC(D29/A2) 5V
* SCK(D7) RX1(D10) SCS(D4) ENB(D2) GND
*===================================================
* ZMIB Version 2 - EXP1 Connector
* MOSI(D5) TX1(D11) ENA(D12) ENC(D29/A2) 5V
* SCK(D7) RX1(D10) SCS(D3) ENB(D2) GND
*===================================================
* LCD 128x64
*==================================================*/
#if ENABLED(ZONESTAR_12864LCD)
//
// LCD 128x64
//
#define LCDSCREEN_NAME "ZONESTAR_12864LCD"
#define FORCE_SOFT_SPI
//#define LCD_SDSS 11
#define LCD_PINS_RS 11 // ST7920_CS_PIN LCD_PIN_RS (PIN4 of LCD module)
#ifdef IS_ZMIB_V2
#define LCD_PINS_ENABLE 3 // ST7920_DAT_PIN LCD_PIN_R/W (PIN5 of LCD module)
#else
#define LCD_PINS_ENABLE 4 // ST7920_DAT_PIN LCD_PIN_R/W (PIN5 of LCD module)
#endif
#define LCD_PINS_D4 10 // ST7920_CLK_PIN LCD_PIN_ENABLE (PIN6 of LCD module)
// Alter timing for graphical display
#define ST7920_DELAY_1 DELAY_2_NOP
#define ST7920_DELAY_2 DELAY_2_NOP
#define ST7920_DELAY_3 DELAY_2_NOP
#elif EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306)
//
// OLED 128x64
//
#define LCDSCREEN_NAME "ZONESTAR 12864OLED"
#define FORCE_SOFT_SPI
#ifdef IS_ZMIB_V2
#define LCD_PINS_RS 3 // RESET
#else
#define LCD_PINS_RS 4 // RESET
#endif
#define LCD_PINS_DC 10 // DC
#define DOGLCD_CS 11 // CS
#if ENABLED(OLED_HW_IIC)
#error "Oops! can't choose HW IIC for ZMIB board!!"
#elif ENABLED(OLED_HW_SPI)
// HW SPI
#define DOGLCD_A0 LCD_PINS_DC // A0 = DC
#else
// SW SPI
#define DOGLCD_A0 LCD_PINS_DC // A0 = DC
#define DOGLCD_MOSI AVR_MOSI_PIN // SDA
#define DOGLCD_SCK AVR_SCK_PIN // SCK
#endif
#endif
//
// All the above are also RRDSC with rotary encoder
//
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BTN_EN1 2
#define BTN_EN2 12
#define BTN_ENC 29
#define BEEPER_PIN -1
#define KILL_PIN -1
#endif

View File

@ -240,8 +240,15 @@ bool Sd2Card::init(const uint8_t sckRateID, const pin_t chipSelectPin) {
watchdog_refresh(); // In case init takes too long watchdog_refresh(); // In case init takes too long
// Set pin modes // Set pin modes
#if ENABLED(ZONESTAR_12864OLED)
if (chipSelectPin_ != DOGLCD_CS) {
SET_OUTPUT(DOGLCD_CS);
WRITE(DOGLCD_CS, HIGH);
}
#else
extDigitalWrite(chipSelectPin_, HIGH); // For some CPUs pinMode can write the wrong data so init desired data value first extDigitalWrite(chipSelectPin_, HIGH); // For some CPUs pinMode can write the wrong data so init desired data value first
pinMode(chipSelectPin_, OUTPUT); // Solution for #8746 by @benlye pinMode(chipSelectPin_, OUTPUT); // Solution for #8746 by @benlye
#endif
spiBegin(); spiBegin();
// Set SCK rate for initialization commands // Set SCK rate for initialization commands

View File

@ -869,7 +869,6 @@ board = genericSTM32F103VE
platform_packages = tool-stm32duino platform_packages = tool-stm32duino
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin_nano35.py buildroot/share/PlatformIO/scripts/mks_robin_nano35.py
lib_deps = ${common_stm32f1.lib_deps}
build_flags = ${common_stm32f1.build_flags} build_flags = ${common_stm32f1.build_flags}
-DMCU_STM32F103VE -DSS_TIMER=4 -DMCU_STM32F103VE -DSS_TIMER=4
debug_tool = jlink debug_tool = jlink