summaryrefslogtreecommitdiffstatshomepage
path: root/docs/library
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-11-01 21:26:06 +0000
committerDamien George <damien.p.george@gmail.com>2015-02-13 14:02:51 +0000
commitd39c7aa517b722161a7dd792fafc5096d58beec8 (patch)
treef7287fe0f4b6790a3538e31b0a5a06b8939fd64f /docs/library
parentb384bcc5de2c20d1d985e2768729578373bd73c1 (diff)
downloadmicropython-d39c7aa517b722161a7dd792fafc5096d58beec8.tar.gz
micropython-d39c7aa517b722161a7dd792fafc5096d58beec8.zip
stmhal: Add Python-configurable USB HID mode.
Different HID modes can be configured in Python. You can either use predefined mouse or keyboard, or write your own report descriptor.
Diffstat (limited to 'docs/library')
-rw-r--r--docs/library/pyb.USB_VCP.rst4
-rw-r--r--docs/library/pyb.rst4
2 files changed, 8 insertions, 0 deletions
diff --git a/docs/library/pyb.USB_VCP.rst b/docs/library/pyb.USB_VCP.rst
index 4d87be4a36..be1316432c 100644
--- a/docs/library/pyb.USB_VCP.rst
+++ b/docs/library/pyb.USB_VCP.rst
@@ -26,6 +26,10 @@ Methods
Set to -1 to disable this interrupt feature. This is useful when you
want to send raw bytes over the USB VCP port.
+.. method:: usb_vcp.isconnected()
+
+ Return ``True`` if USB is connected as a serial device, else ``False``.
+
.. method:: usb_vcp.any()
Return ``True`` if any characters waiting, else ``False``.
diff --git a/docs/library/pyb.rst b/docs/library/pyb.rst
index 79caa67d2f..f93b884ab4 100644
--- a/docs/library/pyb.rst
+++ b/docs/library/pyb.rst
@@ -149,11 +149,15 @@ Miscellaneous functions
Return True if USB is connected as a serial device, False otherwise.
+ .. note:: This function is deprecated. Use pyb.USB_VCP().isconnected() instead.
+
.. function:: hid((buttons, x, y, z))
Takes a 4-tuple (or list) and sends it to the USB host (the PC) to
signal a HID mouse-motion event.
+ .. note:: This function is deprecated. Use pyb.USB_HID().send(...) instead.
+
.. function:: info([dump_alloc_table])
Print out lots of information about the board.