diff options
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: |
