Skip to content

Commit

Permalink
Use buffered input for USB channel when using tinyusb
Browse files Browse the repository at this point in the history
  • Loading branch information
dc42 committed Dec 15, 2023
1 parent 55ae311 commit 5f3a63f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GCodes/GCodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ GCodes::GCodes(Platform& p) noexcept :
gcodeSources[GCodeChannel::ToBaseType(GCodeChannel::Telnet)] = nullptr;
#endif // SUPPORT_TELNET || HAS_SBC_INTERFACE
#if defined(SERIAL_MAIN_DEVICE)
# if SAME5x
# if SAME5x && !CORE_USES_TINYUSB
// SAME5x USB driver already uses an efficient buffer for receiving data from USB
StreamGCodeInput * const usbInput = new StreamGCodeInput(SERIAL_MAIN_DEVICE);
# else
// Old USB driver is inefficient when read in single-character mode
// Old USB driver and tinyusb drivers are inefficient when read in single-character mode
BufferedStreamGCodeInput * const usbInput = new BufferedStreamGCodeInput(SERIAL_MAIN_DEVICE);
# endif
gcodeSources[GCodeChannel::ToBaseType(GCodeChannel::USB)] = new GCodeBuffer(GCodeChannel::USB, usbInput, fileInput, UsbMessage, Compatibility::Marlin);
Expand Down

0 comments on commit 5f3a63f

Please sign in to comment.