Skip to content

Commit

Permalink
windows/serialInterface: Switched buffering modes so I/O is more reli…
Browse files Browse the repository at this point in the history
…able
  • Loading branch information
dragonmux committed Jan 16, 2024
1 parent 205837c commit 8461073
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/windows/serialInterface.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@ serialInterface_t::serialInterface_t(const usbDevice_t &usbDevice) : device
// Try and open the node so we can start communications with the the device
return CreateFile
(
portName.c_str(), // UNC path to the target node
GENERIC_READ | GENERIC_WRITE, // Standard file permissions
0, // With no sharing
nullptr, // Default security attributes
OPEN_EXISTING, // Only succeed if the node already exists
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_NO_BUFFERING, // Normal but unbuffered I/O
nullptr // No template file
portName.c_str(), // UNC path to the target node

Check warning on line 173 in src/windows/serialInterface.cxx

View check run for this annotation

Codecov / codecov/patch

src/windows/serialInterface.cxx#L173

Added line #L173 was not covered by tests
GENERIC_READ | GENERIC_WRITE, // Standard file permissions
0, // With no sharing
nullptr, // Default security attributes
OPEN_EXISTING, // Only succeed if the node already exists
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH, // Normal I/O w/ write-through
nullptr // No template file
);
}()
}
Expand Down

0 comments on commit 8461073

Please sign in to comment.