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

Side by Side Diff: device/serial/serial_io_handler_posix.h

Issue 2494513002: Explicitly put serial port fd in non-blocking mode on Chrome OS. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « device/serial/serial_io_handler.cc ('k') | device/serial/serial_io_handler_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_SERIAL_SERIAL_IO_HANDLER_POSIX_H_ 5 #ifndef DEVICE_SERIAL_SERIAL_IO_HANDLER_POSIX_H_
6 #define DEVICE_SERIAL_SERIAL_IO_HANDLER_POSIX_H_ 6 #define DEVICE_SERIAL_SERIAL_IO_HANDLER_POSIX_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/files/file_descriptor_watcher_posix.h" 10 #include "base/files/file_descriptor_watcher_posix.h"
(...skipping 10 matching lines...) Expand all
21 enum class ErrorDetectState { NO_ERROR, MARK_377_SEEN, MARK_0_SEEN }; 21 enum class ErrorDetectState { NO_ERROR, MARK_377_SEEN, MARK_0_SEEN };
22 22
23 class SerialIoHandlerPosix : public SerialIoHandler { 23 class SerialIoHandlerPosix : public SerialIoHandler {
24 protected: 24 protected:
25 // SerialIoHandler impl. 25 // SerialIoHandler impl.
26 void ReadImpl() override; 26 void ReadImpl() override;
27 void WriteImpl() override; 27 void WriteImpl() override;
28 void CancelReadImpl() override; 28 void CancelReadImpl() override;
29 void CancelWriteImpl() override; 29 void CancelWriteImpl() override;
30 bool ConfigurePortImpl() override; 30 bool ConfigurePortImpl() override;
31 bool PostOpen() override;
31 bool Flush() const override; 32 bool Flush() const override;
32 serial::DeviceControlSignalsPtr GetControlSignals() const override; 33 serial::DeviceControlSignalsPtr GetControlSignals() const override;
33 bool SetControlSignals( 34 bool SetControlSignals(
34 const serial::HostControlSignals& control_signals) override; 35 const serial::HostControlSignals& control_signals) override;
35 serial::ConnectionInfoPtr GetPortInfo() const override; 36 serial::ConnectionInfoPtr GetPortInfo() const override;
36 bool SetBreak() override; 37 bool SetBreak() override;
37 bool ClearBreak() override; 38 bool ClearBreak() override;
38 int CheckReceiveError(char* buffer, 39 int CheckReceiveError(char* buffer,
39 int buffer_len, 40 int buffer_len,
40 int bytes_read, 41 int bytes_read,
(...skipping 27 matching lines...) Expand all
68 bool parity_check_enabled_; 69 bool parity_check_enabled_;
69 char chars_stashed_[2]; 70 char chars_stashed_[2];
70 int num_chars_stashed_; 71 int num_chars_stashed_;
71 72
72 DISALLOW_COPY_AND_ASSIGN(SerialIoHandlerPosix); 73 DISALLOW_COPY_AND_ASSIGN(SerialIoHandlerPosix);
73 }; 74 };
74 75
75 } // namespace device 76 } // namespace device
76 77
77 #endif // DEVICE_SERIAL_SERIAL_IO_HANDLER_POSIX_H_ 78 #endif // DEVICE_SERIAL_SERIAL_IO_HANDLER_POSIX_H_
OLDNEW
« no previous file with comments | « device/serial/serial_io_handler.cc ('k') | device/serial/serial_io_handler_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698