OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Use the <code>chrome.serial</code> module to read from and write to a device |
| 6 // connected to a serial port. |
| 7 |
5 namespace serial { | 8 namespace serial { |
6 | 9 |
7 callback GetPortsCallback = void (DOMString[] ports); | 10 callback GetPortsCallback = void (DOMString[] ports); |
8 | 11 |
9 dictionary OpenOptions { | 12 dictionary OpenOptions { |
10 // The requested bitrate of the connection to be opened. For compatibility | 13 // The requested bitrate of the connection to be opened. For compatibility |
11 // with the widest range of hardware, this number should match one of | 14 // with the widest range of hardware, this number should match one of |
12 // commonly-available bitrates, such as 110, 300, 1200, 2400, 4800, 9600, | 15 // commonly-available bitrates, such as 110, 300, 1200, 2400, 4800, 9600, |
13 // 14400, 19200, 38400, 57600, 115200. There is no guarantee, of course, | 16 // 14400, 19200, 38400, 57600, 115200. There is no guarantee, of course, |
14 // that the device connected to the serial port will support the requested | 17 // that the device connected to the serial port will support the requested |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 127 |
125 static void getControlSignals(long connectionId, | 128 static void getControlSignals(long connectionId, |
126 GetControlSignalsCallback callback); | 129 GetControlSignalsCallback callback); |
127 | 130 |
128 static void setControlSignals(long connectionId, | 131 static void setControlSignals(long connectionId, |
129 ControlSignalOptions options, | 132 ControlSignalOptions options, |
130 SetControlSignalsCallback callback); | 133 SetControlSignalsCallback callback); |
131 }; | 134 }; |
132 | 135 |
133 }; | 136 }; |
OLD | NEW |