Add HAS_MULTI_SERIAL conditional
This commit is contained in:
@@ -51,7 +51,7 @@ card_flags_t CardReader::flag;
|
||||
char CardReader::filename[FILENAME_LENGTH], CardReader::longFilename[LONG_FILENAME_LENGTH];
|
||||
int8_t CardReader::autostart_index;
|
||||
|
||||
#if ENABLED(BINARY_FILE_TRANSFER) && NUM_SERIAL > 1
|
||||
#if BOTH(HAS_MULTI_SERIAL, BINARY_FILE_TRANSFER)
|
||||
int8_t CardReader::transfer_port_index;
|
||||
#endif
|
||||
|
||||
@@ -1095,7 +1095,7 @@ void CardReader::fileHasFinished() {
|
||||
#if ENABLED(AUTO_REPORT_SD_STATUS)
|
||||
uint8_t CardReader::auto_report_sd_interval = 0;
|
||||
millis_t CardReader::next_sd_report_ms;
|
||||
#if NUM_SERIAL > 1
|
||||
#if HAS_MULTI_SERIAL
|
||||
int8_t CardReader::auto_report_port;
|
||||
#endif
|
||||
|
||||
|
@@ -61,7 +61,7 @@ public:
|
||||
|
||||
// Fast! binary file transfer
|
||||
#if ENABLED(BINARY_FILE_TRANSFER)
|
||||
#if NUM_SERIAL > 1
|
||||
#if HAS_MULTI_SERIAL
|
||||
static int8_t transfer_port_index;
|
||||
#else
|
||||
static constexpr int8_t transfer_port_index = 0;
|
||||
@@ -164,9 +164,7 @@ public:
|
||||
#if ENABLED(AUTO_REPORT_SD_STATUS)
|
||||
static void auto_report_sd_status();
|
||||
static inline void set_auto_report_interval(uint8_t v) {
|
||||
#if NUM_SERIAL > 1
|
||||
auto_report_port = serial_port_index;
|
||||
#endif
|
||||
TERN_(HAS_MULTI_SERIAL, auto_report_port = serial_port_index);
|
||||
NOMORE(v, 60);
|
||||
auto_report_sd_interval = v;
|
||||
next_sd_report_ms = millis() + 1000UL * v;
|
||||
@@ -258,7 +256,7 @@ private:
|
||||
#if ENABLED(AUTO_REPORT_SD_STATUS)
|
||||
static uint8_t auto_report_sd_interval;
|
||||
static millis_t next_sd_report_ms;
|
||||
#if NUM_SERIAL > 1
|
||||
#if HAS_MULTI_SERIAL
|
||||
static int8_t auto_report_port;
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user