From d39c7aa517b722161a7dd792fafc5096d58beec8 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 1 Nov 2014 21:26:06 +0000 Subject: 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. --- docs/library/pyb.USB_VCP.rst | 4 ++++ docs/library/pyb.rst | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'docs') diff --git a/docs/library/pyb.USB_VCP.rst b/docs/library/pyb.USB_VCP.rst index 4d87be4a3..be1316432 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 79caa67d2..f93b884ab 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. -- cgit v1.2.3