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 |
saroop
2012/11/20 22:17:30
Should we mention Bluetooth here as well ?
mkearney1
2012/11/20 22:27:11
I've a short mention of Bluetooth here. We need to
| |
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="usb.html">USB API</a> |
9 and the | 9 and the |
10 <a href="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="bluetooth.html">Bluetooth API</a> is also available |
12 we'll write more on this soon. | 12 (<a href="app_known_issues.html">known issues</a> still to be resolved); |
13 We've included a link to an early sample below. | 13 we've include a link to a bluetooth sample below. |
saroop
2012/11/20 22:17:30
"we've included"
mkearney1
2012/11/20 22:27:11
Done.
| |
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>, |
21 <a href="https://github.com/GoogleChrome/chrome-app-samples/tree/master/servo">s ervo</a>, | 21 <a href="https://github.com/GoogleChrome/chrome-app-samples/tree/master/servo">s ervo</a>, |
22 <a href="https://github.com/GoogleChrome/chrome-app-samples/tree/master/usb">usb </a>, | 22 <a href="https://github.com/GoogleChrome/chrome-app-samples/tree/master/usb">usb </a>, |
23 and <a href="https://github.com/GoogleChrome/chrome-app-samples/tree/master/blue tooth-demo">bluetooth-demo</a> samples. | 23 and <a href="https://github.com/GoogleChrome/chrome-app-samples/tree/master/zeph yr_hxm">bluetooth</a> samples. |
24 </p> | 24 </p> |
25 | 25 |
26 <h2 id="usb">Accessing USB devices</h2> | 26 <h2 id="usb">Accessing USB devices</h2> |
27 | 27 |
28 <p> | 28 <p> |
29 You can use the USB API to send messages to any connected device. | 29 You can use the USB API to send messages to any connected device. |
30 </p> | 30 </p> |
31 | 31 |
32 <h3 id="manifest">Manifest requirement</h3> | 32 <h3 id="manifest">Manifest requirement</h3> |
33 | 33 |
(...skipping 653 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 |