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
3 // found in the LICENSE file.
10 bool has_vendor_id = false;
12 bool has_product_id = false;
51 struct ConnectionOptions {
53 DataBits data_bits = NONE;
54 ParityBit parity_bit = NONE;
55 StopBits stop_bits = NONE;
56 bool cts_flow_control;
57 bool has_cts_flow_control = false;
60 struct ConnectionInfo {
62 DataBits data_bits = NONE;
63 ParityBit parity_bit = NONE;
64 StopBits stop_bits = NONE;
65 bool cts_flow_control;
68 struct HostControlSignals {
75 struct DeviceControlSignals {
82 interface SerialService {
83 GetDevices() => (DeviceInfo[] devices);
85 // Creates a |Connection| to |path| with options specified by |options|,
86 // returning it via |connection|. This will fail and |connection| will not be
87 // usable if |path| does not specify a valid serial device or there is an
88 // error connecting to or configuring the connection.
90 ConnectionOptions options,
91 Connection& connection);
94 interface Connection {
95 GetInfo() => (ConnectionInfo info);
96 SetOptions(ConnectionOptions options) => (bool success);
97 SetControlSignals(HostControlSignals signals) => (bool success);
98 GetControlSignals() => (DeviceControlSignals signals);
99 Flush() => (bool success);