@ -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);
@ -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;
@ -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;
// private:
@ -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;