Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» Move PB0 init for MKS_ROBIN_NANO
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jan 12, 2022
1 parent eb8d819 commit 0470fbe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
4 changes: 0 additions & 4 deletions Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ void tft_lvgl_init() {

watchdog_refresh(); // LVGL init takes time

#if MB(MKS_ROBIN_NANO)
OUT_WRITE(PB0, LOW); // HE1
#endif

// Init TFT first!
SPI_TFT.spi_init(SPI_FULL_SPEED);
SPI_TFT.LCD_init();
Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@
//#define LED_PIN PB2

#include "pins_MKS_ROBIN_NANO_common.h"

#if HAS_TFT_LVGL_UI && FAN1_PIN != PB0 && HEATER_1_PIN != PB0
#define BOARD_INIT OUT_WRITE(PB0, LOW)
#endif
17 changes: 8 additions & 9 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,21 @@
#ifndef HEATER_0_PIN
#define HEATER_0_PIN PC3
#endif
#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL)
#ifndef FAN1_PIN
#define FAN1_PIN PB0
#endif
#else
#ifndef HEATER_1_PIN
#define HEATER_1_PIN PB0
#endif
#endif
#ifndef FAN_PIN
#define FAN_PIN PB1 // FAN
#endif
#ifndef HEATER_BED_PIN
#define HEATER_BED_PIN PA0
#endif

#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL)
#ifndef FAN1_PIN
#define FAN1_PIN PB0
#endif
#elif !defined(HEATER_1_PIN)
#define HEATER_1_PIN PB0
#endif

//
// Power Supply Control
//
Expand Down

0 comments on commit 0470fbe

Please sign in to comment.