🎨 Update MKSPWC, some other pins (#22557)

This commit is contained in:
Scott Lahteine
2021-08-13 16:32:25 -05:00
committed by Scott Lahteine
parent e62486a610
commit eb0d80cb19
41 changed files with 279 additions and 321 deletions

View File

@ -416,10 +416,10 @@
#if HAS_SPI_FLASH
#define SPI_DEVICE 1
#define SPI_FLASH_SIZE 0x1000000 // 16MB
#define W25QXX_CS_PIN 31
#define W25QXX_MOSI_PIN SD_MOSI_PIN
#define W25QXX_MISO_PIN SD_MISO_PIN
#define W25QXX_SCK_PIN SD_SCK_PIN
#define SPI_FLASH_CS_PIN 31
#define SPI_FLASH_MOSI_PIN SD_MOSI_PIN
#define SPI_FLASH_MISO_PIN SD_MISO_PIN
#define SPI_FLASH_SCK_PIN SD_SCK_PIN
#endif
#define TFT_BUFFER_SIZE 0xFFFF

View File

@ -138,14 +138,10 @@
//
// Power Supply Control
//
#if ENABLED(PSU_CONTROL) // MKSPWC
#ifndef PS_ON_PIN
#define PS_ON_PIN P0_25 // SERVO
#endif
#ifndef KILL_PIN
#define KILL_PIN P1_29 // Z+
#define KILL_PIN_STATE HIGH
#endif
#if ENABLED(MKS_PWC)
#define PS_ON_PIN P0_25 // SERVO
#define KILL_PIN P1_29 // Z+
#define KILL_PIN_STATE HIGH
#endif
//

View File

@ -218,14 +218,10 @@
//
// Power Supply Control
//
#if ENABLED(PSU_CONTROL) // MKSPWC
#ifndef PS_ON_PIN
#define PS_ON_PIN P2_00 // SERVO
#endif
#ifndef KILL_PIN
#define KILL_PIN P1_24 // Z+
#define KILL_PIN_STATE HIGH
#endif
#if ENABLED(MKS_PWC)
#define PS_ON_PIN P2_00 // SERVO
#define KILL_PIN P1_24 // Z+
#define KILL_PIN_STATE HIGH
#endif
//

View File

@ -229,14 +229,10 @@
//
// Power Supply Control
//
#if ENABLED(PSU_CONTROL) // MKSPWC
#ifndef PS_ON_PIN
#define PS_ON_PIN P2_00 // Suggestion (SERVO)
#endif
#ifndef KILL_PIN
#define KILL_PIN P1_24 // Suggestion (Z+)
#define KILL_PIN_STATE HIGH
#endif
#if ENABLED(MKS_PWC)
#define PS_ON_PIN P2_00 // SERVO
#define KILL_PIN P1_24 // Z+
#define KILL_PIN_STATE HIGH
#endif
//

View File

@ -291,11 +291,11 @@
#if PIN_EXISTS(DAC_DISABLE)
REPORT_NAME_DIGITAL(__LINE__, DAC_DISABLE_PIN)
#endif
#if defined(DAC0_SYNC) && DAC0_SYNC >= 0
REPORT_NAME_DIGITAL(__LINE__, DAC0_SYNC)
#if PIN_EXISTS(DAC0_SYNC)
REPORT_NAME_DIGITAL(__LINE__, DAC0_SYNC_PIN)
#endif
#if defined(DAC1_SYNC) && DAC1_SYNC >= 0
REPORT_NAME_DIGITAL(__LINE__, DAC1_SYNC)
#if PIN_EXISTS(DAC1_SYNC)
REPORT_NAME_DIGITAL(__LINE__, DAC1_SYNC_PIN)
#endif
#if PIN_EXISTS(DEBUG)
REPORT_NAME_DIGITAL(__LINE__, DEBUG_PIN)
@ -974,14 +974,14 @@
#if defined(SPARE_IO) && SPARE_IO >= 0
REPORT_NAME_DIGITAL(__LINE__, SPARE_IO)
#endif
#if defined(SPI_EEPROM1_CS) && SPI_EEPROM1_CS >= 0
REPORT_NAME_DIGITAL(__LINE__, SPI_EEPROM1_CS)
#if PIN_EXISTS(SPI_EEPROM1_CS)
REPORT_NAME_DIGITAL(__LINE__, SPI_EEPROM1_CS_PIN)
#endif
#if defined(SPI_EEPROM2_CS) && SPI_EEPROM2_CS >= 0
REPORT_NAME_DIGITAL(__LINE__, SPI_EEPROM2_CS)
#if PIN_EXISTS(SPI_EEPROM2_CS)
REPORT_NAME_DIGITAL(__LINE__, SPI_EEPROM2_CS_PIN)
#endif
#if defined(SPI_FLASH_CS) && SPI_FLASH_CS >= 0
REPORT_NAME_DIGITAL(__LINE__, SPI_FLASH_CS)
#if PIN_EXISTS(SPI_FLASH_CS)
REPORT_NAME_DIGITAL(__LINE__, SPI_FLASH_CS_PIN)
#endif
#if PIN_EXISTS(SPINDLE_DIR)
REPORT_NAME_DIGITAL(__LINE__, SPINDLE_DIR_PIN)

View File

@ -391,8 +391,8 @@
#ifndef SUICIDE_PIN
#define SUICIDE_PIN -1
#endif
#ifndef SUICIDE_PIN_INVERTING
#define SUICIDE_PIN_INVERTING false
#ifndef SUICIDE_PIN_STATE
#define SUICIDE_PIN_STATE LOW
#endif
#ifndef NUM_SERVO_PLUGS

View File

@ -34,7 +34,7 @@
#endif
#define RESET_PIN 30
#define SPI_FLASH_CS 83
#define SPI_FLASH_CS_PIN 83
//
// Servos

View File

@ -63,6 +63,6 @@
#define EXP4_PIN 12 // PS_ON_PIN
#define SUICIDE_PIN 12 // Used by CR2020 Industrial series
#ifndef SUICIDE_PIN_INVERTING
#define SUICIDE_PIN_INVERTING true
#ifndef SUICIDE_PIN_STATE
#define SUICIDE_PIN_STATE HIGH
#endif

View File

@ -123,20 +123,20 @@
#define SPI_CHAN_DAC 1
#define DAC0_SYNC 53 // PB14
#define DAC1_SYNC 6 // PC24
#define DAC0_SYNC_PIN 53 // PB14
#define DAC1_SYNC_PIN 6 // PC24
// 64K SPI EEPROM
#define SPI_EEPROM
#define SPI_CHAN_EEPROM1 2
#define SPI_EEPROM1_CS 25 // PD0
#define SPI_EEPROM1_CS_PIN 25 // PD0
// 2K SPI EEPROM
#define SPI_EEPROM2_CS 26 // PD1
#define SPI_EEPROM2_CS_PIN 26 // PD1
// FLASH SPI
// 32Mb
#define SPI_FLASH_CS 23 // PA14
#define SPI_FLASH_CS_PIN 23 // PA14
//
// LCD / Controller

View File

@ -190,11 +190,11 @@
//#define EEPROM_SD // EEPROM on SDCARD
//#define SPI_EEPROM // EEPROM on SPI-0
//#define SPI_CHAN_EEPROM1 ?
//#define SPI_EEPROM1_CS ?
//#define SPI_EEPROM1_CS_PIN ?
// 2K EEPROM
//#define SPI_EEPROM2_CS ?
//#define SPI_EEPROM2_CS_PIN ?
// 32Mb FLASH
//#define SPI_FLASH_CS ?
//#define SPI_FLASH_CS_PIN ?
//
// LCD / Controller

View File

@ -176,11 +176,11 @@
//#define EEPROM_SD // EEPROM on SDCARD
//#define SPI_EEPROM // EEPROM on SPI-0
//#define SPI_CHAN_EEPROM1 ?
//#define SPI_EEPROM1_CS ?
//#define SPI_EEPROM1_CS_PIN ?
// 2K EEPROM
//#define SPI_EEPROM2_CS ?
//#define SPI_EEPROM2_CS_PIN ?
// 32Mb FLASH
//#define SPI_FLASH_CS ?
//#define SPI_FLASH_CS_PIN ?
//
// LCD / Controller

View File

@ -137,13 +137,13 @@
// SPI Buses
//
#define DAC0_SYNC 53 // PB14
#define DAC0_SYNC_PIN 53 // PB14
#define SPI_CHAN_DAC 1
#define SPI_CHAN_EEPROM1 -1
#define SPI_EEPROM1_CS -1
#define SPI_EEPROM2_CS -1
#define SPI_FLASH_CS -1
#define SPI_EEPROM1_CS_PIN -1
#define SPI_EEPROM2_CS_PIN -1
#define SPI_FLASH_CS_PIN -1
#define SD_SCK_PIN 76
#define SD_MISO_PIN 74

View File

@ -179,6 +179,6 @@
#endif
#define SUICIDE_PIN PC13
#ifndef SUICIDE_PIN_INVERTING
#define SUICIDE_PIN_INVERTING false
#ifndef SUICIDE_PIN_STATE
#define SUICIDE_PIN_STATE LOW
#endif

View File

@ -120,10 +120,10 @@
#endif
// SPI 2
#define W25QXX_CS_PIN PB12
#define W25QXX_MOSI_PIN PB15
#define W25QXX_MISO_PIN PB14
#define W25QXX_SCK_PIN PB13
#define SPI_FLASH_CS_PIN PB12
#define SPI_FLASH_MOSI_PIN PB15
#define SPI_FLASH_MISO_PIN PB14
#define SPI_FLASH_SCK_PIN PB13
//
// TFT with FSMC interface

View File

@ -61,13 +61,13 @@
// SPI
//#define SPI_EEPROM // EEPROM on SPI-0
//#define SPI_CHAN_EEPROM1 ?
//#define SPI_EEPROM1_CS ?
//#define SPI_EEPROM1_CS_PIN ?
// 2K EEPROM
//#define SPI_EEPROM2_CS ?
//#define SPI_EEPROM2_CS_PIN ?
// 32Mb FLASH
//#define SPI_FLASH_CS ?
//#define SPI_FLASH_CS_PIN ?
#endif
//

View File

@ -73,10 +73,10 @@
#if HAS_SPI_FLASH
// SPI 2
#define W25QXX_CS_PIN PB12 // SPI2_NSS / Flash chip-select
#define W25QXX_MOSI_PIN PB15
#define W25QXX_MISO_PIN PB14
#define W25QXX_SCK_PIN PB13
#define SPI_FLASH_CS_PIN PB12 // SPI2_NSS / Flash chip-select
#define SPI_FLASH_MOSI_PIN PB15
#define SPI_FLASH_MISO_PIN PB14
#define SPI_FLASH_SCK_PIN PB13
#endif
//
@ -222,9 +222,11 @@
//#define PS_ON_PIN PA3 // PW_CN /PW_OFF
#endif
#define MT_DET_1_PIN PA4 // MT_DET
#define MT_DET_2_PIN PE6 // FALA_CRTL
#define MT_DET_PIN_INVERTING false
#if HAS_TFT_LVGL_UI
#define MT_DET_1_PIN PA4 // MT_DET
#define MT_DET_2_PIN PE6
#define MT_DET_PIN_STATE LOW
#endif
//
// LED / NEOPixel

View File

@ -170,18 +170,18 @@
#if ENABLED(SPI_EEPROM)
// SPI1 EEPROM Winbond W25Q64 (8MB/64Mbits)
#define SPI_CHAN_EEPROM1 1
#define SPI_EEPROM1_CS PC5 // pin 34
#define EEPROM_SCK BOARD_SPI1_SCK_PIN // PA5 pin 30
#define EEPROM_MISO BOARD_SPI1_MISO_PIN // PA6 pin 31
#define EEPROM_MOSI BOARD_SPI1_MOSI_PIN // PA7 pin 32
#define SPI_EEPROM1_CS_PIN PC5 // pin 34
#define EEPROM_SCK_PIN BOARD_SPI1_SCK_PIN // PA5 pin 30
#define EEPROM_MISO_PIN BOARD_SPI1_MISO_PIN // PA6 pin 31
#define EEPROM_MOSI_PIN BOARD_SPI1_MOSI_PIN // PA7 pin 32
#define EEPROM_PAGE_SIZE 0x1000U // 4KB (from datasheet)
#define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE) // Limit to 64KB for now...
#elif HAS_SPI_FLASH
#define SPI_FLASH_SIZE 0x40000U // limit to 256KB (M993 will reboot with 512)
#define W25QXX_CS_PIN PC5
#define W25QXX_MOSI_PIN PA7
#define W25QXX_MISO_PIN PA6
#define W25QXX_SCK_PIN PA5
#define SPI_FLASH_CS_PIN PC5
#define SPI_FLASH_MOSI_PIN PA7
#define SPI_FLASH_MISO_PIN PA6
#define SPI_FLASH_SCK_PIN PA5
#elif ENABLED(FLASH_EEPROM_EMULATION)
// SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
#define EEPROM_PAGE_SIZE (0x800U) // 2KB

View File

@ -275,8 +275,8 @@
#define HAS_SPI_FLASH 1
#if HAS_SPI_FLASH
#define SPI_FLASH_SIZE 0x800000 // 8MB
#define W25QXX_CS_PIN PG9
#define W25QXX_MOSI_PIN PB15
#define W25QXX_MISO_PIN PB14
#define W25QXX_SCK_PIN PB13
#define SPI_FLASH_CS_PIN PG9
#define SPI_FLASH_MOSI_PIN PB15
#define SPI_FLASH_MISO_PIN PB14
#define SPI_FLASH_SCK_PIN PB13
#endif

View File

@ -183,19 +183,19 @@
// Misc. Functions
//
#if HAS_TFT_LVGL_UI
#if ENABLED(PSU_CONTROL) // MKSPWC
#define SUICIDE_PIN PB2 // PW_OFF
#define SUICIDE_PIN_INVERTING false
#define KILL_PIN PA2 // PW_DET
#if ENABLED(MKS_PWC)
#define SUICIDE_PIN PB2
#define SUICIDE_PIN_STATE LOW
#define KILL_PIN PA2
#define KILL_PIN_STATE HIGH
#endif
#define MT_DET_1_PIN PA4 // LVGL UI FILAMENT RUNOUT1 PIN
#define MT_DET_PIN_INVERTING false // LVGL UI filament RUNOUT PIN STATE
#define MT_DET_1_PIN PA4
#define MT_DET_PIN_STATE LOW
#define WIFI_IO0_PIN PC13 // MKS ESP WIFI IO0 PIN
#define WIFI_IO1_PIN PC7 // MKS ESP WIFI IO1 PIN
#define WIFI_RESET_PIN PE9 // MKS ESP WIFI RESET PIN
#define WIFI_IO0_PIN PC13
#define WIFI_IO1_PIN PC7
#define WIFI_RESET_PIN PE9
#if ENABLED(MKS_TEST)
#define MKS_TEST_POWER_LOSS_PIN PA2 // PW_DET
@ -363,10 +363,10 @@
#define HAS_SPI_FLASH 1
#if HAS_SPI_FLASH
#define SPI_FLASH_SIZE 0x1000000 // 16MB
#define W25QXX_CS_PIN PB12
#define W25QXX_MOSI_PIN PB15
#define W25QXX_MISO_PIN PB14
#define W25QXX_SCK_PIN PB13
#define SPI_FLASH_CS_PIN PB12
#define SPI_FLASH_MOSI_PIN PB15
#define SPI_FLASH_MISO_PIN PB14
#define SPI_FLASH_SCK_PIN PB13
#endif
#ifndef BEEPER_PIN

View File

@ -129,14 +129,10 @@
//
// Power Supply Control
//
#if ENABLED(PSU_CONTROL) // MKSPWC
#ifndef PS_ON_PIN
#define PS_ON_PIN PA14 // PW_OFF
#endif
#ifndef KILL_PIN
#define KILL_PIN PB10 // PW_DET
#define KILL_PIN_STATE HIGH
#endif
#if ENABLED(MKS_PWC)
#define PS_ON_PIN PA14 // PW_OFF
#define KILL_PIN PB10 // PW_DET
#define KILL_PIN_STATE HIGH
#endif
/**

View File

@ -119,8 +119,10 @@
#define POWER_LOSS_PIN PA2 // PW_DET
#define PS_ON_PIN PA3 // PW_OFF
#define MT_DET_1_PIN PA4
#define MT_DET_PIN_INVERTING false
#if HAS_TFT_LVGL_UI
#define MT_DET_1_PIN PA4 // MT_DET
#define MT_DET_PIN_STATE LOW
#endif
#define WIFI_IO0_PIN PC13
@ -194,8 +196,8 @@
#define HAS_SPI_FLASH 1
#if HAS_SPI_FLASH
#define SPI_FLASH_SIZE 0x1000000 // 16MB
#define W25QXX_CS_PIN PB12 // Flash chip-select
#define W25QXX_MOSI_PIN PB15
#define W25QXX_MISO_PIN PB14
#define W25QXX_SCK_PIN PB13
#define SPI_FLASH_CS_PIN PB12 // Flash chip-select
#define SPI_FLASH_MOSI_PIN PB15
#define SPI_FLASH_MISO_PIN PB14
#define SPI_FLASH_SCK_PIN PB13
#endif

View File

@ -130,33 +130,30 @@
//
// Power Supply Control
//
#if ENABLED(PSU_CONTROL) // MKSPWC
#if HAS_TFT_LVGL_UI
#error "PSU_CONTROL cannot be used with TFT_LVGL_UI. Disable PSU_CONTROL to continue."
#if ENABLED(MKS_PWC)
#if ENABLED(TFT_LVGL_UI)
#undef PSU_CONTROL
#undef MKS_PWC
#define SUICIDE_PIN PB2
#define SUICIDE_PIN_STATE LOW
#else
#define PS_ON_PIN PB2 // PW_OFF
#endif
#ifndef PS_ON_PIN
#define PS_ON_PIN PB2 // SUICIDE
#endif
#ifndef KILL_PIN
#define KILL_PIN PA2
#define KILL_PIN_STATE HIGH
#endif
#else
#define SUICIDE_PIN PB2
#define SUICIDE_PIN_INVERTING false
#define KILL_PIN PA2
#define KILL_PIN_STATE HIGH
#endif
//
// Misc. Functions
//
#if HAS_TFT_LVGL_UI
#define MT_DET_1_PIN PA4 // LVGL UI FILAMENT RUNOUT1 PIN
#define MT_DET_2_PIN PE6 // LVGL UI FILAMENT RUNOUT2 PIN
#define MT_DET_PIN_INVERTING false // LVGL UI filament RUNOUT PIN STATE
#define MT_DET_1_PIN PA4
#define MT_DET_2_PIN PE6
#define MT_DET_PIN_STATE LOW
#define WIFI_IO0_PIN PC13 // MKS ESP WIFI IO0 PIN
#define WIFI_IO1_PIN PC7 // MKS ESP WIFI IO1 PIN
#define WIFI_RESET_PIN PA5 // MKS ESP WIFI RESET PIN
#define WIFI_IO0_PIN PC13
#define WIFI_IO1_PIN PC7
#define WIFI_RESET_PIN PA5
#else
//#define POWER_LOSS_PIN PA2 // PW_DET
//#define PS_ON_PIN PB2 // PW_OFF
@ -221,8 +218,8 @@
#define HAS_SPI_FLASH 1
#if HAS_SPI_FLASH
#define SPI_FLASH_SIZE 0x1000000 // 16MB
#define W25QXX_CS_PIN PB12
#define W25QXX_MOSI_PIN PB15
#define W25QXX_MISO_PIN PB14
#define W25QXX_SCK_PIN PB13
#define SPI_FLASH_CS_PIN PB12
#define SPI_FLASH_MOSI_PIN PB15
#define SPI_FLASH_MISO_PIN PB14
#define SPI_FLASH_SCK_PIN PB13
#endif

View File

@ -194,34 +194,30 @@
//
// Power Supply Control
//
#if ENABLED(PSU_CONTROL) // MKSPWC
#if HAS_TFT_LVGL_UI
#error "PSU_CONTROL cannot be used with TFT_LVGL_UI. Disable PSU_CONTROL to continue."
#if ENABLED(MKS_PWC)
#if ENABLED(TFT_LVGL_UI)
#undef PSU_CONTROL
#undef MKS_PWC
#define SUICIDE_PIN PB2
#define SUICIDE_PIN_STATE LOW
#else
#define PS_ON_PIN PB2 // PW_OFF
#endif
#ifndef PS_ON_PIN
#define PS_ON_PIN PB2 // SUICIDE
#endif
#ifndef KILL_PIN
#define KILL_PIN PA2
#define KILL_PIN_STATE HIGH
#endif
#else
#define SUICIDE_PIN PB2
#define SUICIDE_PIN_INVERTING false
#define KILL_PIN PA2
#define KILL_PIN_STATE HIGH
#endif
//
// Misc. Functions
//
#if HAS_TFT_LVGL_UI
#define MT_DET_1_PIN PA4
#define MT_DET_2_PIN PE6
#define MT_DET_PIN_STATE LOW
#define MT_DET_1_PIN PA4 // LVGL UI FILAMENT RUNOUT1 PIN
#define MT_DET_2_PIN PE6 // LVGL UI FILAMENT RUNOUT2 PIN
#define MT_DET_PIN_INVERTING false // LVGL UI filament RUNOUT PIN STATE
#define WIFI_IO0_PIN PC13 // MKS ESP WIFI IO0 PIN
#define WIFI_IO1_PIN PC7 // MKS ESP WIFI IO1 PIN
#define WIFI_RESET_PIN PE9 // MKS ESP WIFI RESET PIN
#define WIFI_IO0_PIN PC13
#define WIFI_IO1_PIN PC7
#define WIFI_RESET_PIN PE9
#if ENABLED(MKS_TEST)
#define MKS_TEST_POWER_LOSS_PIN PA2 // PW_DET
@ -390,10 +386,10 @@
#define HAS_SPI_FLASH 1
#if HAS_SPI_FLASH
#define SPI_FLASH_SIZE 0x1000000 // 16MB
#define W25QXX_CS_PIN PB12
#define W25QXX_MOSI_PIN PB15
#define W25QXX_MISO_PIN PB14
#define W25QXX_SCK_PIN PB13
#define SPI_FLASH_CS_PIN PB12
#define SPI_FLASH_MOSI_PIN PB15
#define SPI_FLASH_MISO_PIN PB14
#define SPI_FLASH_SCK_PIN PB13
#endif
#ifndef BEEPER_PIN

View File

@ -186,20 +186,17 @@
//
// Power Supply Control
//
#if ENABLED(PSU_CONTROL) // MKSPWC
#if HAS_TFT_LVGL_UI
#error "PSU_CONTROL cannot be used with TFT_LVGL_UI. Disable PSU_CONTROL to continue."
#if ENABLED(MKS_PWC)
#if ENABLED(TFT_LVGL_UI)
#undef PSU_CONTROL
#undef MKS_PWC
#define SUICIDE_PIN PG11
#define SUICIDE_PIN_STATE LOW
#else
#define PS_ON_PIN PG11 // PW_OFF
#endif
#ifndef PS_ON_PIN
#define PS_ON_PIN PG11 // SUICIDE
#endif
#ifndef KILL_PIN
#define KILL_PIN PA2
#define KILL_PIN_STATE HIGH
#endif
#else
#define SUICIDE_PIN PG11
#define SUICIDE_PIN_INVERTING false
#define KILL_PIN PA2
#define KILL_PIN_STATE HIGH
#endif
//
@ -318,8 +315,8 @@
#define HAS_SPI_FLASH 1
#if HAS_SPI_FLASH
#define SPI_FLASH_SIZE 0x1000000 // 16MB
#define W25QXX_CS_PIN PB12 // Flash chip-select
#define W25QXX_MOSI_PIN PB15
#define W25QXX_MISO_PIN PB14
#define W25QXX_SCK_PIN PB13
#define SPI_FLASH_CS_PIN PB12 // Flash chip-select
#define SPI_FLASH_MOSI_PIN PB15
#define SPI_FLASH_MISO_PIN PB14
#define SPI_FLASH_SCK_PIN PB13
#endif

View File

@ -179,10 +179,10 @@
#if ENABLED(SPI_EEPROM)
// Lerdge has an SPI EEPROM Winbond W25Q128 (128Mbits) https://www.pjrc.com/teensy/W25Q128FV.pdf
#define SPI_CHAN_EEPROM1 1
#define SPI_EEPROM1_CS PB12 // datasheet: /CS pin, found with multimeter, not tested
#define EEPROM_SCK PB13 // datasheet: CLK pin, found with multimeter, not tested
#define EEPROM_MISO PB14 // datasheet: DO pin, found with multimeter, not tested
#define EEPROM_MOSI PB15 // datasheet: DI pin, found with multimeter, not tested
#define SPI_EEPROM1_CS_PIN PB12 // datasheet: /CS pin, found with multimeter, not tested
#define EEPROM_SCK_PIN PB13 // datasheet: CLK pin, found with multimeter, not tested
#define EEPROM_MISO_PIN PB14 // datasheet: DO pin, found with multimeter, not tested
#define EEPROM_MOSI_PIN PB15 // datasheet: DI pin, found with multimeter, not tested
#define EEPROM_PAGE_SIZE 0x1000U // 4KB (from datasheet)
#define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE) // Limit to 64KB for now...
#else

View File

@ -210,32 +210,24 @@
//
// Misc. Functions
//
#define MT_DET_1 PC5 // Y+
#define MT_DET_2 PB12 // Z+
#define PW_DET PC5 // Y+
#define PW_OFF PB12 // Z+
#define MT_DET_1_PIN PW_DET
#define MT_DET_2_PIN PW_OFF
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN MT_DET_1
#define FIL_RUNOUT_PIN MT_DET_1_PIN
#endif
#ifndef FIL_RUNOUT2_PIN
#define FIL_RUNOUT2_PIN MT_DET_2
#define FIL_RUNOUT2_PIN MT_DET_2_PIN
#endif
//
// Power Supply Control
//
#if ENABLED(PSU_CONTROL) // MKSPWC
#ifndef PS_ON_PIN
#define PS_ON_PIN MT_DET_2 // Z+
#endif
#ifndef KILL_PIN
#define KILL_PIN MT_DET_1 // Y+
#define KILL_PIN_STATE HIGH
#endif
#else
#define PW_DET MT_DET_1
#define PW_OFF MT_DET_2
#define POWER_LOSS_PIN PW_DET
#define PS_ON_PIN PW_OFF
#if ENABLED(MKS_PWC)
#define PS_ON_PIN PW_OFF
#define KILL_PIN PW_DET
#define KILL_PIN_STATE HIGH
#endif
// Random Info

View File

@ -178,9 +178,11 @@
//
// Misc. Functions
//
#define MT_DET_1_PIN PA4
#define MT_DET_2_PIN PE6
#define MT_DET_PIN_INVERTING false // LVGL UI filament RUNOUT PIN STATE
#if HAS_TFT_LVGL_UI
#define MT_DET_1_PIN PA4 // MT_DET
#define MT_DET_2_PIN PE6
#define MT_DET_PIN_STATE LOW
#endif
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN MT_DET_1_PIN
@ -189,35 +191,29 @@
#define FIL_RUNOUT2_PIN MT_DET_2_PIN
#endif
//
// Enable MKSPWC support
//
#ifndef POWER_LOSS_PIN
#define POWER_LOSS_PIN PA13 // PW_DET
#endif
//#define SUICIDE_PIN PB2
//#define LED_PIN PB2
//#define KILL_PIN PA2
//#define KILL_PIN_STATE HIGH
//#define KILL_PIN_STATE LOW
//
// Power Supply Control
//
#if ENABLED(PSU_CONTROL) // MKSPWC
#if HAS_TFT_LVGL_UI
#error "PSU_CONTROL cannot be used with TFT_LVGL_UI. Disable PSU_CONTROL to continue."
#if ENABLED(MKS_PWC)
#if ENABLED(TFT_LVGL_UI)
#undef PSU_CONTROL
#undef MKS_PWC
#define SUICIDE_PIN PB2
#define SUICIDE_PIN_STATE LOW
#else
#define PS_ON_PIN PB2 // PW_OFF
#endif
#ifndef PS_ON_PIN
#define PS_ON_PIN PB2 // SUICIDE
#endif
#ifndef KILL_PIN
#define KILL_PIN PA13 // PW_DET
#define KILL_PIN_STATE HIGH
#endif
#else
#define SUICIDE_PIN PB2
#define SUICIDE_PIN_INVERTING false
#endif
#ifndef POWER_LOSS_PIN
#define POWER_LOSS_PIN PA13 // PW_DET
#define KILL_PIN PA13 // PW_DET
#define KILL_PIN_STATE HIGH
#endif
// Random Info
@ -232,9 +228,9 @@
// MKS WIFI MODULE
#if ENABLED(MKS_WIFI_MODULE)
#define WIFI_IO0_PIN PC13 // MKS ESP WIFI IO0 PIN
#define WIFI_IO1_PIN PC7 // MKS ESP WIFI IO1 PIN
#define WIFI_RESET_PIN PE9 // MKS ESP WIFI RESET PIN
#define WIFI_IO0_PIN PC13
#define WIFI_IO1_PIN PC7
#define WIFI_RESET_PIN PE9
#endif
// MKS TEST
@ -276,10 +272,10 @@
#define SPI_DEVICE 2
#define SPI_FLASH_SIZE 0x1000000
#if ENABLED(SPI_FLASH)
#define W25QXX_CS_PIN PB12
#define W25QXX_MOSI_PIN PC3
#define W25QXX_MISO_PIN PC2
#define W25QXX_SCK_PIN PB13
#define SPI_FLASH_CS_PIN PB12
#define SPI_FLASH_MOSI_PIN PC3
#define SPI_FLASH_MISO_PIN PC2
#define SPI_FLASH_SCK_PIN PB13
#endif
/**

View File

@ -195,18 +195,18 @@
//
// Misc. Functions
//
//#define POWER_LOSS_PIN PA2 // PW_DET
//#define PS_ON_PIN PA3 // PW_OFF
//
// Power Supply Control
//
#if ENABLED(PSU_CONTROL) // MKSPWC
//#define SUICIDE_PIN PB2 // LED
//#define KILL_PIN PA2 // PW_DET
//#define KILL_PIN_STATE HIGH
#if ENABLED(MKS_PWC)
#define SUICIDE_PIN PB2
#define KILL_PIN PA2
#define KILL_PIN_STATE LOW
#else
//#define POWER_LOSS_PIN PA2 // PW_DET
//#define LED_PIN PB2
#define LED_PIN PB2
#endif
#ifndef SDCARD_CONNECTION
@ -251,14 +251,14 @@
//
// LCD / Controller
#define SPI_FLASH
#define HAS_SPI_FLASH 1
#define HAS_SPI_FLASH 1
#define SPI_DEVICE 2
#define SPI_FLASH_SIZE 0x1000000
#if ENABLED(SPI_FLASH)
#define W25QXX_CS_PIN PB12
#define W25QXX_MOSI_PIN PB15
#define W25QXX_MISO_PIN PB14
#define W25QXX_SCK_PIN PB13
#define SPI_FLASH_CS_PIN PB12
#define SPI_FLASH_MOSI_PIN PB15
#define SPI_FLASH_MISO_PIN PB14
#define SPI_FLASH_SCK_PIN PB13
#endif
/**