aboutsummaryrefslogtreecommitdiffstats
path: root/libusb/hotplug.c
diff options
context:
space:
mode:
authorPete Batard <pete@akeo.ie>2013-07-03 22:41:55 +0100
committerPete Batard <pete@akeo.ie>2013-07-04 18:39:22 +0100
commitb4c18fac65a594502eec5edd2611d5953e7950f7 (patch)
treec4229cee1b5081bc013e04222b13c598cce6a14a /libusb/hotplug.c
parentea39a14d0afc255a47f380480d7f0fc925a0e7eb (diff)
downloadandroid_external_libusbx-b4c18fac65a594502eec5edd2611d5953e7950f7.tar.gz
android_external_libusbx-b4c18fac65a594502eec5edd2611d5953e7950f7.tar.bz2
android_external_libusbx-b4c18fac65a594502eec5edd2611d5953e7950f7.zip
Doc: update hotplug, topology and descriptor documentation
* Also fix some typos * Closes #95
Diffstat (limited to 'libusb/hotplug.c')
-rw-r--r--libusb/hotplug.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/libusb/hotplug.c b/libusb/hotplug.c
index 77ccb31..4bc4cbd 100644
--- a/libusb/hotplug.c
+++ b/libusb/hotplug.c
@@ -35,25 +35,33 @@
/**
* @defgroup hotplug Device hotplug event notification
- * This page details how to use the libusb hotplug interface.
+ * This page details how to use the libusb hotplug interface, where available.
+ *
+ * Be mindful that not all platforms currently implement hotplug notification and
+ * that you should first call on \ref libusb_has_capability() with parameter
+ * \ref LIBUSB_CAP_HAS_HOTPLUG to confirm that hotplug support is available.
*
* \page hotplug Device hotplug event notification
*
* \section intro Introduction
*
* Version 1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102, has added support
- * for hotplug events. This interface allows you to request notification for
- * the arrival and departure of matching USB devices.
+ * for hotplug events on <b>some</b> platforms (you should test if your platform
+ * supports hotplug notification by calling \ref libusb_has_capability() with
+ * parameter \ref LIBUSB_CAP_HAS_HOTPLUG).
+ *
+ * This interface allows you to request notification for the arrival and departure
+ * of matching USB devices.
*
* To receive hotplug notification you register a callback by calling
- * libusb_hotplug_register_callback(). This function will optionally return
- * a handle that can be passed to libusb_hotplug_deregister_callback().
+ * \ref libusb_hotplug_register_callback(). This function will optionally return
+ * a handle that can be passed to \ref libusb_hotplug_deregister_callback().
*
* A callback function must return an int (0 or 1) indicating whether the callback is
* expecting additional events. Returning 0 will rearm the callback and 1 will cause
* the callback to be deregistered.
*
- * Callbacks for a particulat context are automatically deregistered by libusb_exit().
+ * Callbacks for a particular context are automatically deregistered by libusb_exit().
*
* As of 1.0.16 there are two supported hotplug events:
* - LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED: A device has arrived and is ready to use