OLD | NEW |
1 <h1>Accessing Hardware Devices</h1> | 1 <h1>Accessing Hardware Devices</h1> |
2 | 2 |
3 | 3 |
4 <p> | 4 <p> |
5 This doc shows you how packaged apps can connect to USB devices | 5 This doc shows you how packaged apps can connect to USB devices |
6 and read from and write to a user's serial ports. | 6 and read from and write to a user's serial ports. |
7 See also the reference docs for the | 7 See also the reference docs for the |
8 <a href="experimental.usb.html">USB API</a> | 8 <a href="experimental.usb.html">USB API</a> |
9 and the | 9 and the |
10 <a href="experimental.serial.html">Serial API</a>. | 10 <a href="serial.html">Serial API</a>. |
11 The <a href="experimental.bluetooth.html">Bluetooth API</a> has just landed and | 11 The <a href="experimental.bluetooth.html">Bluetooth API</a> has just landed and |
12 we'll write more on this soon. | 12 we'll write more on this soon. |
13 We've included a link to an early sample below. | 13 We've included a link to an early sample below. |
14 </p> | 14 </p> |
15 | 15 |
16 <p class="note"> | 16 <p class="note"> |
17 <b>API Samples: </b> | 17 <b>API Samples: </b> |
18 Want to play with the code? | 18 Want to play with the code? |
19 Check out the | 19 Check out the |
20 <a href="https://github.com/GoogleChrome/chrome-app-samples/tree/master/serial">
serial</a>, | 20 <a href="https://github.com/GoogleChrome/chrome-app-samples/tree/master/serial">
serial</a>, |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 You can flush your serial device buffer by issuing the flush command on the API: | 687 You can flush your serial device buffer by issuing the flush command on the API: |
688 </p> | 688 </p> |
689 | 689 |
690 <pre> | 690 <pre> |
691 var flushSerial=function(str) { | 691 var flushSerial=function(str) { |
692 chrome.experimental.serial.flush(connectionInfo.connectionId, onFlush); | 692 chrome.experimental.serial.flush(connectionInfo.connectionId, onFlush); |
693 } | 693 } |
694 </pre> | 694 </pre> |
695 | 695 |
696 <p class="backtotop"><a href="#top">Back to top</a></p> | 696 <p class="backtotop"><a href="#top">Back to top</a></p> |
OLD | NEW |