diff --git a/Marlin/src/feature/binary_stream.h b/Marlin/src/feature/binary_stream.h index d092b7152..80f26cc7c 100644 --- a/Marlin/src/feature/binary_stream.h +++ b/Marlin/src/feature/binary_stream.h @@ -29,11 +29,11 @@ #include "../libs/heatshrink/heatshrink_decoder.h" #endif -inline bool bs_serial_data_available(const uint8_t index) { +inline bool bs_serial_data_available(const serial_index_t index) { return SERIAL_IMPL.available(index); } -inline int bs_read_serial(const uint8_t index) { +inline int bs_read_serial(const serial_index_t index) { return SERIAL_IMPL.read(index); } diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index 0f4169a2c..4f676eaeb 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -393,7 +393,7 @@ void GCodeQueue::get_serial_commands() { * receive buffer (which limits the packet size to MAX_CMD_SIZE). * The receive buffer also limits the packet size for reliable transmission. */ - binaryStream[card.transfer_port_index].receive(serial_state[card.transfer_port_index].line_buffer); + binaryStream[card.transfer_port_index.index].receive(serial_state[card.transfer_port_index.index].line_buffer); return; } #endif diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index fac14e72a..a3e057703 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -70,7 +70,7 @@ char CardReader::filename[FILENAME_LENGTH], CardReader::longFilename[LONG_FILENA IF_DISABLED(NO_SD_AUTOSTART, uint8_t CardReader::autofile_index); // = 0 #if BOTH(HAS_MULTI_SERIAL, BINARY_FILE_TRANSFER) - int8_t CardReader::transfer_port_index; + serial_index_t CardReader::transfer_port_index; #endif // private: diff --git a/Marlin/src/sd/cardreader.h b/Marlin/src/sd/cardreader.h index 0a89bbba7..f823b79e7 100644 --- a/Marlin/src/sd/cardreader.h +++ b/Marlin/src/sd/cardreader.h @@ -72,9 +72,9 @@ public: // Fast! binary file transfer #if ENABLED(BINARY_FILE_TRANSFER) #if HAS_MULTI_SERIAL - static int8_t transfer_port_index; + static serial_index_t transfer_port_index; #else - static constexpr int8_t transfer_port_index = 0; + static constexpr serial_index_t transfer_port_index = 0; #endif #endif