Browse Source

Fix build with Meatpack only on 2nd port (#21336)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
vanilla_fb_2.0.x
X-Ryl669 4 years ago
committed by Scott Lahteine
parent
commit
f6f5ed166f
  1. 6
      Marlin/src/HAL/HAL.h
  2. 1
      Marlin/src/feature/meatpack.cpp
  3. 26
      Marlin/src/inc/Conditionals_LCD.h
  4. 7
      Marlin/src/inc/Conditionals_adv.h
  5. 13
      Marlin/src/inc/Conditionals_post.h
  6. 2
      buildroot/share/PlatformIO/scripts/common-dependencies.h

6
Marlin/src/HAL/HAL.h

@ -29,12 +29,6 @@
#include HAL_PATH(.,HAL.h)
#ifdef SERIAL_PORT_2
#define NUM_SERIAL 2
#else
#define NUM_SERIAL 1
#endif
#define HAL_ADC_RANGE _BV(HAL_ADC_RESOLUTION)
#ifndef I2C_ADDRESS

1
Marlin/src/feature/meatpack.cpp

@ -42,7 +42,6 @@
#if HAS_MEATPACK
#include "meatpack.h"
MeatPack meatpack;
#define MeatPack_ProtocolVersion "PV01"
//#define MP_DEBUG

26
Marlin/src/inc/Conditionals_LCD.h

@ -654,13 +654,6 @@
#define UNUSED_E(E) UNUSED(E)
#endif
#if ENABLED(DWIN_CREALITY_LCD)
#define SERIAL_CATCHALL 0
#ifndef LCD_SERIAL_PORT
#define LCD_SERIAL_PORT 3 // Creality 4.x board
#endif
#endif
/**
* The BLTouch Probe emulates a servo probe
* and uses "special" angles for its state.
@ -950,6 +943,18 @@
#define HAS_CLASSIC_E_JERK 1
#endif
//
// Serial Port Info
//
#ifdef SERIAL_PORT_2
#define NUM_SERIAL 2
#define HAS_MULTI_SERIAL 1
#elif defined(SERIAL_PORT)
#define NUM_SERIAL 1
#else
#define NUM_SERIAL 0
#undef BAUD_RATE_GCODE
#endif
#if SERIAL_PORT == -1 || SERIAL_PORT_2 == -1
#define HAS_USB_SERIAL 1
#endif
@ -957,6 +962,13 @@
#define HAS_ETHERNET 1
#endif
#if ENABLED(DWIN_CREALITY_LCD)
#define SERIAL_CATCHALL 0
#ifndef LCD_SERIAL_PORT
#define LCD_SERIAL_PORT 3 // Creality 4.x board
#endif
#endif
// Fallback Stepper Driver types that don't depend on Configuration_adv.h
#ifndef X_DRIVER_TYPE
#define X_DRIVER_TYPE A4988

7
Marlin/src/inc/Conditionals_adv.h

@ -542,3 +542,10 @@
#else
#define HAS_USER_ITEM(N) 0
#endif
#if !HAS_MULTI_SERIAL
#undef MEATPACK_ON_SERIAL_PORT_2
#endif
#if EITHER(MEATPACK_ON_SERIAL_PORT_1, MEATPACK_ON_SERIAL_PORT_2)
#define HAS_MEATPACK 1
#endif

13
Marlin/src/inc/Conditionals_post.h

@ -2906,16 +2906,3 @@
#if BUTTONS_EXIST(EN1, EN2, ENC)
#define HAS_ROTARY_ENCODER 1
#endif
#if !NUM_SERIAL
#undef BAUD_RATE_GCODE
#elif NUM_SERIAL > 1
#define HAS_MULTI_SERIAL 1
#endif
#if !HAS_MULTI_SERIAL
#undef MEATPACK_ON_SERIAL_PORT_2
#endif
#if EITHER(MEATPACK_ON_SERIAL_PORT_1, MEATPACK_ON_SERIAL_PORT_2)
#define HAS_MEATPACK 1
#endif

2
buildroot/share/PlatformIO/scripts/common-dependencies.h

@ -26,8 +26,6 @@
* Used by common-dependencies.py
*/
#define NUM_SERIAL 1 // Normally provided by HAL/HAL.h
#include "../../../../Marlin/src/inc/MarlinConfig.h"
//

Loading…
Cancel
Save