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
   #include "../libs/heatshrink/heatshrink_decoder.h"
29
   #include "../libs/heatshrink/heatshrink_decoder.h"
30
 #endif
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
   return SERIAL_IMPL.available(index);
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
   return SERIAL_IMPL.read(index);
37
   return SERIAL_IMPL.read(index);
38
 }
38
 }
39
 
39
 

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

393
        * receive buffer (which limits the packet size to MAX_CMD_SIZE).
393
        * receive buffer (which limits the packet size to MAX_CMD_SIZE).
394
        * The receive buffer also limits the packet size for reliable transmission.
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
       return;
397
       return;
398
     }
398
     }
399
   #endif
399
   #endif

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

70
 IF_DISABLED(NO_SD_AUTOSTART, uint8_t CardReader::autofile_index); // = 0
70
 IF_DISABLED(NO_SD_AUTOSTART, uint8_t CardReader::autofile_index); // = 0
71
 
71
 
72
 #if BOTH(HAS_MULTI_SERIAL, BINARY_FILE_TRANSFER)
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
 #endif
74
 #endif
75
 
75
 
76
 // private:
76
 // private:

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

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

Loading…
Cancel
Save