Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2196)

Unified Diff: device/serial/serial_io_handler_win.cc

Issue 1128943005: Implement break signal for serial api. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: histogram, VLOG Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/serial/serial_io_handler_win.h ('k') | device/serial/test_serial_io_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/serial_io_handler_win.cc
diff --git a/device/serial/serial_io_handler_win.cc b/device/serial/serial_io_handler_win.cc
index 60a2a332745679ee2c6eba789096ef26b3227a37..15165f60a71dfec41fd29c659985ce930cad1b6d 100644
--- a/device/serial/serial_io_handler_win.cc
+++ b/device/serial/serial_io_handler_win.cc
@@ -391,6 +391,22 @@ serial::ConnectionInfoPtr SerialIoHandlerWin::GetPortInfo() const {
return info.Pass();
}
+bool SerialIoHandlerWin::SetBreak() {
+ if (!SetCommBreak(file().GetPlatformFile())) {
+ VPLOG(1) << "Failed to set break";
+ return false;
+ }
+ return true;
+}
+
+bool SerialIoHandlerWin::ClearBreak() {
+ if (!ClearCommBreak(file().GetPlatformFile())) {
+ VPLOG(1) << "Failed to clear break";
+ return false;
+ }
+ return true;
+}
+
std::string SerialIoHandler::MaybeFixUpPortName(const std::string& port_name) {
// For COM numbers less than 9, CreateFile is called with a string such as
// "COM1". For numbers greater than 9, a prefix of "\\\\.\\" must be added.
« no previous file with comments | « device/serial/serial_io_handler_win.h ('k') | device/serial/test_serial_io_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698