Skip to content

Commit

Permalink
Merge branch 'MARLIN-E3S1PROFORK-BYTT-RELEASE-CODE-v005-dev' of https…
Browse files Browse the repository at this point in the history
…://github.com/ThomasToka/Marlin into MARLIN-E3S1PROFORK-BYTT-RELEASE-CODE-v005-dev
  • Loading branch information
ThomasToka committed Jul 31, 2023
2 parents c68849c + 2c80874 commit 723d599
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2023-07-28"
//#define STRING_DISTRIBUTION_DATE "2023-07-30"

/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
Expand Down
14 changes: 7 additions & 7 deletions Marlin/src/HAL/AVR/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
* Check for common serial pin conflicts
*/
#define CHECK_SERIAL_PIN(N) ( \
X_STOP_PIN == N || Y_STOP_PIN == N || Z_STOP_PIN == N \
|| X_MIN_PIN == N || Y_MIN_PIN == N || Z_MIN_PIN == N \
|| X_MAX_PIN == N || Y_MAX_PIN == N || Z_MAX_PIN == N \
|| X_STEP_PIN == N || Y_STEP_PIN == N || Z_STEP_PIN == N \
|| X_DIR_PIN == N || Y_DIR_PIN == N || Z_DIR_PIN == N \
|| X_ENA_PIN == N || Y_ENA_PIN == N || Z_ENA_PIN == N \
|| BTN_EN1 == N || BTN_EN2 == N \
X_STOP_PIN == N || Y_STOP_PIN == N || Z_STOP_PIN == N \
|| X_MIN_PIN == N || Y_MIN_PIN == N || Z_MIN_PIN == N \
|| X_MAX_PIN == N || Y_MAX_PIN == N || Z_MAX_PIN == N \
|| X_STEP_PIN == N || Y_STEP_PIN == N || Z_STEP_PIN == N \
|| X_DIR_PIN == N || Y_DIR_PIN == N || Z_DIR_PIN == N \
|| X_ENA_PIN == N || Y_ENA_PIN == N || Z_ENA_PIN == N \
|| BTN_EN1 == N || BTN_EN2 == N || LCD_PINS_EN == N \
)
#if SERIAL_IN_USE(0)
// D0-D1. No known conflicts.
Expand Down
30 changes: 15 additions & 15 deletions Marlin/src/HAL/STM32/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,61 +57,61 @@
#define _MSERIAL(X) MSerial##X
#define MSERIAL(X) _MSERIAL(X)

#if WITHIN(SERIAL_PORT, 1, 6)
#if WITHIN(SERIAL_PORT, 1, 9)
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
#elif !defined(USBCON)
#error "SERIAL_PORT must be from 1 to 6."
#error "SERIAL_PORT must be from 1 to 9."
#elif SERIAL_PORT == -1
#define MYSERIAL1 MSerialUSB
#else
#error "SERIAL_PORT must be from 1 to 6, or -1 for Native USB."
#error "SERIAL_PORT must be from 1 to 9, or -1 for Native USB."
#endif

#ifdef SERIAL_PORT_2
#if WITHIN(SERIAL_PORT_2, 1, 6)
#if WITHIN(SERIAL_PORT_2, 1, 9)
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
#elif !defined(USBCON)
#error "SERIAL_PORT_2 must be from 1 to 6."
#error "SERIAL_PORT_2 must be from 1 to 9."
#elif SERIAL_PORT_2 == -1
#define MYSERIAL2 MSerialUSB
#else
#error "SERIAL_PORT_2 must be from 1 to 6, or -1 for Native USB."
#error "SERIAL_PORT_2 must be from 1 to 9, or -1 for Native USB."
#endif
#endif

#ifdef SERIAL_PORT_3
#if WITHIN(SERIAL_PORT_3, 1, 6)
#if WITHIN(SERIAL_PORT_3, 1, 9)
#define MYSERIAL3 MSERIAL(SERIAL_PORT_3)
#elif !defined(USBCON)
#error "SERIAL_PORT_3 must be from 1 to 6."
#error "SERIAL_PORT_3 must be from 1 to 9."
#elif SERIAL_PORT_3 == -1
#define MYSERIAL3 MSerialUSB
#else
#error "SERIAL_PORT_3 must be from 1 to 6, or -1 for Native USB."
#error "SERIAL_PORT_3 must be from 1 to 9, or -1 for Native USB."
#endif
#endif

#ifdef MMU2_SERIAL_PORT
#if WITHIN(MMU2_SERIAL_PORT, 1, 6)
#if WITHIN(MMU2_SERIAL_PORT, 1, 9)
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
#elif !defined(USBCON)
#error "MMU2_SERIAL_PORT must be from 1 to 6."
#error "MMU2_SERIAL_PORT must be from 1 to 9."
#elif MMU2_SERIAL_PORT == -1
#define MMU2_SERIAL MSerialUSB
#else
#error "MMU2_SERIAL_PORT must be from 1 to 6, or -1 for Native USB."
#error "MMU2_SERIAL_PORT must be from 1 to 9, or -1 for Native USB."
#endif
#endif

#ifdef LCD_SERIAL_PORT
#if WITHIN(LCD_SERIAL_PORT, 1, 6)
#if WITHIN(LCD_SERIAL_PORT, 1, 9)
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
#elif !defined(USBCON)
#error "LCD_SERIAL_PORT must be from 1 to 6."
#error "LCD_SERIAL_PORT must be from 1 to 9."
#elif LCD_SERIAL_PORT == -1
#define LCD_SERIAL MSerialUSB
#else
#error "LCD_SERIAL_PORT must be from 1 to 6, or -1 for Native USB."
#error "LCD_SERIAL_PORT must be from 1 to 9, or -1 for Native USB."
#endif
#if HAS_DGUS_LCD
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
Expand Down
9 changes: 9 additions & 0 deletions Marlin/src/HAL/STM32/MarlinSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@
#ifndef USART5
#define USART5 UART5
#endif
#ifndef USART7
#define USART7 UART7
#endif
#ifndef USART8
#define USART8 UART8
#endif
#ifndef USART9
#define USART9 UART9
#endif

#define DECLARE_SERIAL_PORT(ser_num) \
void _rx_complete_irq_ ## ser_num (serial_t * obj); \
Expand Down
7 changes: 5 additions & 2 deletions Marlin/src/HAL/STM32/MinSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct USARTMin {
volatile uint32_t CR2;
};

#if WITHIN(SERIAL_PORT, 1, 6)
#if WITHIN(SERIAL_PORT, 1, 9)
// Depending on the CPU, the serial port is different for USART1
static const uintptr_t regsAddr[] = {
TERN(STM32F1xx, 0x40013800, 0x40011000), // USART1
Expand All @@ -54,6 +54,9 @@ struct USARTMin {
0x40004C00, // UART4_BASE
0x40005000, // UART5_BASE
0x40011400 // USART6
0x40007800 // UART7_BASE
0x40007C00 // UART8_BASE
0x40011800 // UART9_BASE
};
static USARTMin * regs = (USARTMin*)regsAddr[SERIAL_PORT - 1];
#endif
Expand Down Expand Up @@ -116,7 +119,7 @@ static void TXBegin() {
// A SW memory barrier, to ensure GCC does not overoptimize loops
#define sw_barrier() __asm__ volatile("": : :"memory");
static void TX(char c) {
#if WITHIN(SERIAL_PORT, 1, 6)
#if WITHIN(SERIAL_PORT, 1, 9)
constexpr uint32_t usart_sr_txe = _BV(7);
while (!(regs->SR & usart_sr_txe)) {
hal.watchdog_refresh();
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* version was tagged.
*/
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2023-07-28"
#define STRING_DISTRIBUTION_DATE "2023-07-30"
#endif

/**
Expand Down
6 changes: 6 additions & 0 deletions ini/renamed.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ board = genericSTM32F103RE
# List of environment names that are no longer used
#

[env:megaatmega1280] ;=> mega1280
extends = renamed

[env:megaatmega2560] ;=> mega2560
extends = renamed

[env:STM32F103RET6_creality_maple] ;=> STM32F103RE_creality_maple
extends = renamed

Expand Down

0 comments on commit 723d599

Please sign in to comment.