Browse Source

Fix serial index types

Scott Lahteine 3 years ago
parent
commit
fe0b770033

+ 2
- 2
Marlin/src/feature/binary_stream.h View File

@@ -29,11 +29,11 @@
29 29
   #include "../libs/heatshrink/heatshrink_decoder.h"
30 30
 #endif
31 31
 
32
-inline bool bs_serial_data_available(const uint8_t index) {
32
+inline bool bs_serial_data_available(const serial_index_t index) {
33 33
   return SERIAL_IMPL.available(index);
34 34
 }
35 35
 
36
-inline int bs_read_serial(const uint8_t index) {
36
+inline int bs_read_serial(const serial_index_t index) {
37 37
   return SERIAL_IMPL.read(index);
38 38
 }
39 39
 

+ 1
- 1
Marlin/src/gcode/queue.cpp View File

@@ -393,7 +393,7 @@ void GCodeQueue::get_serial_commands() {
393 393
        * receive buffer (which limits the packet size to MAX_CMD_SIZE).
394 394
        * The receive buffer also limits the packet size for reliable transmission.
395 395
        */
396
-      binaryStream[card.transfer_port_index].receive(serial_state[card.transfer_port_index].line_buffer);
396
+      binaryStream[card.transfer_port_index.index].receive(serial_state[card.transfer_port_index.index].line_buffer);
397 397
       return;
398 398
     }
399 399
   #endif

+ 1
- 1
Marlin/src/sd/cardreader.cpp View File

@@ -70,7 +70,7 @@ char CardReader::filename[FILENAME_LENGTH], CardReader::longFilename[LONG_FILENA
70 70
 IF_DISABLED(NO_SD_AUTOSTART, uint8_t CardReader::autofile_index); // = 0
71 71
 
72 72
 #if BOTH(HAS_MULTI_SERIAL, BINARY_FILE_TRANSFER)
73
-  int8_t CardReader::transfer_port_index;
73
+  serial_index_t CardReader::transfer_port_index;
74 74
 #endif
75 75
 
76 76
 // private:

+ 2
- 2
Marlin/src/sd/cardreader.h View File

@@ -72,9 +72,9 @@ public:
72 72
   // Fast! binary file transfer
73 73
   #if ENABLED(BINARY_FILE_TRANSFER)
74 74
     #if HAS_MULTI_SERIAL
75
-      static int8_t transfer_port_index;
75
+      static serial_index_t transfer_port_index;
76 76
     #else
77
-      static constexpr int8_t transfer_port_index = 0;
77
+      static constexpr serial_index_t transfer_port_index = 0;
78 78
     #endif
79 79
   #endif
80 80
 

Loading…
Cancel
Save