Skip to content

Commit

Permalink
🪠 More granular sub-options undef (MarlinFirmware#27373)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Aug 29, 2024
1 parent 934fc52 commit 8ac0f14
Show file tree
Hide file tree
Showing 8 changed files with 1,445 additions and 1,232 deletions.
2 changes: 1 addition & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@

/**
* Select a third serial port on the board to use for communication with the host.
* Currently only supported for AVR, DUE, LPC1768/9 and STM32/STM32F1
* Currently supported for AVR, DUE, SAMD51, LPC1768/9, STM32/STM32F1/HC32, and Teensy 4.x
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
*/
//#define SERIAL_PORT_3 1
Expand Down
10 changes: 10 additions & 0 deletions Marlin/src/HAL/SAMD51/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@
#endif
#endif

#ifdef SERIAL_PORT_3
#if SERIAL_PORT_3 == -1
#define MYSERIAL3 MSerial0
#elif WITHIN(SERIAL_PORT_3, 0, 3)
#define MYSERIAL3 MSERIAL(SERIAL_PORT_3)
#else
#error "SERIAL_PORT_3 must be from 0 to 3. You can also use -1 if the board supports Native USB."
#endif
#endif

#ifdef MMU2_SERIAL_PORT
#if MMU2_SERIAL_PORT == -1
#define MMU2_SERIAL MSerial0
Expand Down
Loading

0 comments on commit 8ac0f14

Please sign in to comment.