Merge upstream changes from Marlin 2.1.1
This commit is contained in:
@@ -37,13 +37,15 @@ public:
|
||||
inline constexpr bool enabled(const SerialMask PortMask) const { return mask & PortMask.mask; }
|
||||
inline constexpr SerialMask combine(const SerialMask other) const { return SerialMask(mask | other.mask); }
|
||||
inline constexpr SerialMask operator<< (const int offset) const { return SerialMask(mask << offset); }
|
||||
static inline SerialMask from(const serial_index_t index) {
|
||||
static SerialMask from(const serial_index_t index) {
|
||||
if (index.valid()) return SerialMask(_BV(index.index));
|
||||
return SerialMask(0); // A invalid index mean no output
|
||||
}
|
||||
|
||||
constexpr SerialMask(const uint8_t mask) : mask(mask) {}
|
||||
constexpr SerialMask(const SerialMask & other) : mask(other.mask) {} // Can't use = default here since not all framework support this
|
||||
constexpr SerialMask(const SerialMask &rs) : mask(rs.mask) {} // Can't use = default here since not all frameworks support this
|
||||
|
||||
SerialMask& operator=(const SerialMask &rs) { mask = rs.mask; return *this; }
|
||||
|
||||
static constexpr uint8_t All = 0xFF;
|
||||
};
|
||||
@@ -298,7 +300,7 @@ struct MultiSerial : public SerialBase< MultiSerial< REPEAT(NUM_SERIAL, _S_NAME)
|
||||
// Build the actual serial object depending on current configuration
|
||||
#define Serial1Class TERN(SERIAL_RUNTIME_HOOK, RuntimeSerial, BaseSerial)
|
||||
#define ForwardSerial1Class TERN(SERIAL_RUNTIME_HOOK, RuntimeSerial, ForwardSerial)
|
||||
#ifdef HAS_MULTI_SERIAL
|
||||
#if HAS_MULTI_SERIAL
|
||||
#define Serial2Class ConditionalSerial
|
||||
#if NUM_SERIAL >= 3
|
||||
#define Serial3Class ConditionalSerial
|
||||
|
Reference in New Issue
Block a user