Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_STM32F1/HAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

#ifdef __STM32F1__

#include "HAL.h"
#include "../../inc/MarlinConfig.h"
#include "HAL.h"

#include <STM32ADC.h>

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_STM32F1/timers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

#ifdef __STM32F1__

#include "../../inc/MarlinConfig.h"
#include "HAL.h"

#include "timers.h"

// ------------------------
Expand Down
9 changes: 8 additions & 1 deletion Marlin/src/HAL/HAL_STM32F1/timers.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include <stdint.h>
#include <libmaple/timer.h>
#include "../../core/boards.h"

// ------------------------
// Defines
Expand Down Expand Up @@ -54,7 +55,13 @@ typedef uint16_t hal_timer_t;
#define TEMP_TIMER_NUM 2 // index of timer to use for temperature
//#define TEMP_TIMER_NUM 4 // 2->4, Timer 2 for Stepper Current PWM
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#define SERVO0_TIMER_NUM 1 // SERVO0 or BLTOUCH

#if MB(BIGTREE_SKR_MINI_E3, BIGTREE_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE)
// SKR Mini E3 boards use PA8 as FAN_PIN, so TIMER 1 is used for Fan PWM.
#define SERVO0_TIMER_NUM 8
#else
#define SERVO0_TIMER_NUM 1 // SERVO0 or BLTOUCH
#endif

#define STEP_TIMER_IRQ_PRIO 1
#define TEMP_TIMER_IRQ_PRIO 2
Expand Down
7 changes: 6 additions & 1 deletion Marlin/src/core/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
*/
#pragma once

#include "macros.h"

#define BOARD_UNKNOWN -1

//
Expand Down Expand Up @@ -316,4 +318,7 @@

#define BOARD_LINUX_RAMPS 9999

#define MB(board) (defined(BOARD_##board) && MOTHERBOARD==BOARD_##board)
#define _MB_1(B) (defined(BOARD_##B) && MOTHERBOARD==BOARD_##B)
#define MB(V...) DO(MB,||,V)

#define IS_MELZI MB(MELZI, MELZI_CREALITY, MELZI_MAKR3D, MELZI_MALYAN, MELZI_TRONXY)
2 changes: 1 addition & 1 deletion Marlin/src/feature/digipot/digipot_mcp4451.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#if MB(5DPRINT)
#define DIGIPOT_I2C_FACTOR 117.96
#define DIGIPOT_I2C_MAX_CURRENT 1.736
#elif MB(AZTEEG_X5_MINI) || MB(AZTEEG_X5_MINI_WIFI)
#elif MB(AZTEEG_X5_MINI, AZTEEG_X5_MINI_WIFI)
#define DIGIPOT_I2C_FACTOR 113.5
#define DIGIPOT_I2C_MAX_CURRENT 2.0
#else
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@
#define BOOT_MARLIN_LOGO_SMALL
#endif

#define IS_RE_ARM_BOARD (MB(RAMPS_14_RE_ARM_EFB) || MB(RAMPS_14_RE_ARM_EEB) || MB(RAMPS_14_RE_ARM_EFF) || MB(RAMPS_14_RE_ARM_EEF) || MB(RAMPS_14_RE_ARM_SF))
#define IS_RE_ARM_BOARD MB(RAMPS_14_RE_ARM_EFB, RAMPS_14_RE_ARM_EEB, RAMPS_14_RE_ARM_EFF, RAMPS_14_RE_ARM_EEF, RAMPS_14_RE_ARM_SF)

#define HAS_SDCARD_CONNECTION EITHER(TARGET_LPC1768, ADAFRUIT_GRAND_CENTRAL_M4)

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/dogm/ultralcd_DOGM.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

// MaKrPanel, Mini Viki, Viki 2.0, AZSMZ 12864 ST7565 controller

#define SMART_RAMPS (MB(RAMPS_SMART_EFB) || MB(RAMPS_SMART_EEB) || MB(RAMPS_SMART_EFF) || MB(RAMPS_SMART_EEF) || MB(RAMPS_SMART_SF))
#define SMART_RAMPS MB(RAMPS_SMART_EFB, RAMPS_SMART_EEB, RAMPS_SMART_EFF, RAMPS_SMART_EEF, RAMPS_SMART_SF)
#define U8G_CLASS U8GLIB_64128N_2X_HAL // 4 stripes (HW-SPI)
#if SMART_RAMPS || DOGLCD_SCK != SCK_PIN || DOGLCD_MOSI != MOSI_PIN
#define FORCE_SOFT_SPI // SW-SPI
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
#define CPU_ST7920_DELAY_2 DELAY_NS(0)
#define CPU_ST7920_DELAY_3 DELAY_NS(50)
#elif MB(3DRAG) || MB(K8200) || MB(K8400) || MB(SILVER_GATE)
#elif MB(3DRAG, K8200, K8400, SILVER_GATE)
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
#define CPU_ST7920_DELAY_2 DELAY_NS(188)
#define CPU_ST7920_DELAY_3 DELAY_NS(0)
#elif MB(MINIRAMBO) || MB(EINSY_RAMBO) || MB(EINSY_RETRO)
#elif MB(MINIRAMBO, EINSY_RAMBO, EINSY_RETRO)
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
#define CPU_ST7920_DELAY_2 DELAY_NS(250)
#define CPU_ST7920_DELAY_3 DELAY_NS(0)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/mega/pins_MEGATRONICS_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
#define SHIFT_OUT 34
#define SHIFT_EN 44

#if MB(MEGATRONICS_31) || MB(MEGATRONICS_32)
#if MB(MEGATRONICS_31, MEGATRONICS_32)
#define SD_DETECT_PIN 56
#endif

Expand Down
14 changes: 7 additions & 7 deletions Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@

#define MAX_EXTRUDERS 6

#if MB(RAMPS_13_EFB) || MB(RAMPS_14_EFB) || MB(RAMPS_PLUS_EFB) || MB(RAMPS_14_RE_ARM_EFB) || MB(RAMPS_SMART_EFB) || MB(RAMPS_DUO_EFB) || MB(RAMPS4DUE_EFB)
#if MB(RAMPS_13_EFB, RAMPS_14_EFB, RAMPS_PLUS_EFB, RAMPS_14_RE_ARM_EFB, RAMPS_SMART_EFB, RAMPS_DUO_EFB, RAMPS4DUE_EFB)
#define IS_RAMPS_EFB
#elif MB(RAMPS_13_EEB) || MB(RAMPS_14_EEB) || MB(RAMPS_PLUS_EEB) || MB(RAMPS_14_RE_ARM_EEB) || MB(RAMPS_SMART_EEB) || MB(RAMPS_DUO_EEB) || MB(RAMPS4DUE_EEB)
#elif MB(RAMPS_13_EEB, RAMPS_14_EEB, RAMPS_PLUS_EEB, RAMPS_14_RE_ARM_EEB, RAMPS_SMART_EEB, RAMPS_DUO_EEB, RAMPS4DUE_EEB)
#define IS_RAMPS_EEB
#elif MB(RAMPS_13_EFF) || MB(RAMPS_14_EFF) || MB(RAMPS_PLUS_EFF) || MB(RAMPS_14_RE_ARM_EFF) || MB(RAMPS_SMART_EFF) || MB(RAMPS_DUO_EFF) || MB(RAMPS4DUE_EFF)
#elif MB(RAMPS_13_EFF, RAMPS_14_EFF, RAMPS_PLUS_EFF, RAMPS_14_RE_ARM_EFF, RAMPS_SMART_EFF, RAMPS_DUO_EFF, RAMPS4DUE_EFF)
#define IS_RAMPS_EFF
#elif MB(RAMPS_13_EEF) || MB(RAMPS_14_EEF) || MB(RAMPS_PLUS_EEF) || MB(RAMPS_14_RE_ARM_EEF) || MB(RAMPS_SMART_EEF) || MB(RAMPS_DUO_EEF) || MB(RAMPS4DUE_EEF)
#elif MB(RAMPS_13_EEF, RAMPS_14_EEF, RAMPS_PLUS_EEF, RAMPS_14_RE_ARM_EEF, RAMPS_SMART_EEF, RAMPS_DUO_EEF, RAMPS4DUE_EEF)
#define IS_RAMPS_EEF
#elif MB(RAMPS_13_SF) || MB(RAMPS_14_SF) || MB(RAMPS_PLUS_SF) || MB(RAMPS_14_RE_ARM_SF) || MB(RAMPS_SMART_SF) || MB(RAMPS_DUO_SF) || MB(RAMPS4DUE_SF)
#elif MB(RAMPS_13_SF, RAMPS_14_SF, RAMPS_PLUS_SF, RAMPS_14_RE_ARM_SF, RAMPS_SMART_SF, RAMPS_DUO_SF, RAMPS4DUE_SF)
#define IS_RAMPS_SF
#endif

Expand Down Expand Up @@ -185,7 +185,7 @@

#elif MB(RAMBO)
#include "rambo/pins_RAMBO.h" // ATmega2560 env:rambo
#elif MB(MINIRAMBO) || MB(MINIRAMBO_10A)
#elif MB(MINIRAMBO, MINIRAMBO_10A)
#include "rambo/pins_MINIRAMBO.h" // ATmega2560 env:rambo
#elif MB(EINSY_RAMBO)
#include "rambo/pins_EINSY_RAMBO.h" // ATmega2560 env:rambo
Expand Down Expand Up @@ -214,7 +214,7 @@
#include "mega/pins_MEGATRONICS.h" // ATmega2560 env:megaatmega2560
#elif MB(MEGATRONICS_2)
#include "mega/pins_MEGATRONICS_2.h" // ATmega2560 env:megaatmega2560
#elif MB(MEGATRONICS_3) || MB(MEGATRONICS_31) || MB(MEGATRONICS_32)
#elif MB(MEGATRONICS_3, MEGATRONICS_31, MEGATRONICS_32)
#include "mega/pins_MEGATRONICS_3.h" // ATmega2560 env:megaatmega2560
#elif MB(ELEFU_3)
#include "mega/pins_ELEFU_3.h" // ATmega2560 env:megaatmega2560
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/pins/sanguino/pins_MELZI.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@
#define BOARD_INFO_NAME "Melzi"
#endif

#define IS_MELZI
#include "pins_SANGUINOLOLU_12.h"
10 changes: 5 additions & 5 deletions Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@

#endif

#if !defined(FAN_PIN) && (MB(AZTEEG_X1) || MB(STB_11) || ENABLED(IS_MELZI))
#if !defined(FAN_PIN) && (MB(AZTEEG_X1, STB_11) || IS_MELZI)
#define FAN_PIN 4 // Works for Panelolu2 too
#endif

Expand All @@ -132,7 +132,7 @@
//#define SDSS 24
#define SDSS 31

#if ENABLED(IS_MELZI)
#if IS_MELZI
#define LED_PIN 27
#elif MB(STB_11)
#define LCD_BACKLIGHT_PIN 17 // LCD backlight LED
Expand Down Expand Up @@ -160,7 +160,7 @@

#if ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0

#if ENABLED(IS_MELZI)
#if IS_MELZI
#define LCD_PINS_RS 30 // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE 29 // SID (MOSI)
#define LCD_PINS_D4 17 // SCK (CLK) clock
Expand All @@ -187,7 +187,7 @@
#define DOGLCD_CS 17
#define LCD_BACKLIGHT_PIN 28 // PA3

#elif ENABLED(IS_MELZI)
#elif IS_MELZI

#define BEEPER_PIN 27
#define DOGLCD_CS 28
Expand Down Expand Up @@ -219,7 +219,7 @@

#if ENABLED(LCD_I2C_PANELOLU2)

#if ENABLED(IS_MELZI)
#if IS_MELZI
#define BTN_ENC 29
#define LCD_SDSS 30 // Panelolu2 SD card reader rather than the Melzi
#else
Expand Down
6 changes: 3 additions & 3 deletions buildroot/share/tests/STM32F103RC_bigtree_USB-tests
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Build tests for STM32F103RC Bigtreetech (SKR Mini v1.1)
# Build tests for STM32F103RC Bigtreetech (SKR Mini E3)
#

# exit on first failure
Expand All @@ -10,10 +10,10 @@ set -e
# Build with the default configurations
#
restore_configs
opt_set MOTHERBOARD BOARD_BIGTREE_SKR_MINI_V1_1
opt_set MOTHERBOARD BOARD_BIGTREE_SKR_MINI_E3
opt_set SERIAL_PORT 1
opt_set SERIAL_PORT_2 -1
exec_test $1 $2 "Bigtreetech SKR Mini v1.1 - Basic Configuration"
exec_test $1 $2 "Bigtreetech SKR Mini E3 - Basic Configuration"

# clean up
restore_configs