diff options
| author | Philip Potter | 2016-08-29 22:42:38 +0100 |
|---|---|---|
| committer | Damien George | 2016-10-04 15:38:01 +1100 |
| commit | eb239b839855de4f7fbf241635b702773f421b60 (patch) | |
| tree | 0f25ae9631705bf49279e2babac52638ff076344 /docs | |
| parent | 03de5a13cf7349bc43b9c50a43df9aa1113492fa (diff) | |
stmhal/usb: Add support to receive USB HID messages from host.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/library/pyb.USB_HID.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/library/pyb.USB_HID.rst b/docs/library/pyb.USB_HID.rst index 65fb4014e..7d17c3099 100644 --- a/docs/library/pyb.USB_HID.rst +++ b/docs/library/pyb.USB_HID.rst @@ -20,6 +20,17 @@ Constructors Methods ------- +.. method:: USB_HID.recv(data, \*, timeout=5000) + + Receive data on the bus: + + - ``data`` can be an integer, which is the number of bytes to receive, + or a mutable buffer, which will be filled with received bytes. + - ``timeout`` is the timeout in milliseconds to wait for the receive. + + Return value: if ``data`` is an integer then a new buffer of the bytes received, + otherwise the number of bytes read into ``data`` is returned. + .. method:: USB_HID.send(data) Send data over the USB HID interface: |
