aboutsummaryrefslogtreecommitdiffstats
path: root/usbdrv
diff options
context:
space:
mode:
authorChristian Starkjohann <cs+github@obdev.at>2008-10-13 17:27:57 +0000
committerChristian Starkjohann <cs+github@obdev.at>2008-10-13 17:27:57 +0000
commit4fe49c716e972cbaeebbf2b54ccb17ad09ba6eba (patch)
treea77e8bc297cb897826d164448c07e1b231fb0243 /usbdrv
parent08d980c16c3e15a917e2e7752b94b340129532f9 (diff)
downloadv-usb-4fe49c716e972cbaeebbf2b54ccb17ad09ba6eba.tar.gz
v-usb-4fe49c716e972cbaeebbf2b54ccb17ad09ba6eba.tar.bz2
v-usb-4fe49c716e972cbaeebbf2b54ccb17ad09ba6eba.zip
- improved docs about descriptor property flags
- documented format of string descriptors
Diffstat (limited to 'usbdrv')
-rw-r--r--usbdrv/usbconfig-prototype.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/usbdrv/usbconfig-prototype.h b/usbdrv/usbconfig-prototype.h
index 035c627..437b3fb 100644
--- a/usbdrv/usbconfig-prototype.h
+++ b/usbdrv/usbconfig-prototype.h
@@ -251,7 +251,9 @@ section at the end of this file).
* no properties are defined or if they are 0, the default descriptor is used.
* Possible properties are:
* + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched
- * at runtime via usbFunctionDescriptor().
+ * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is
+ * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if
+ * you want RAM pointers.
* + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found
* in static memory is in RAM, not in flash memory.
* + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash),
@@ -283,6 +285,12 @@ section at the end of this file).
* USB_CFG_DESCR_PROPS_HID_REPORT
* USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver)
*
+ * Note about string descriptors: String descriptors are not just strings, they
+ * are Unicode strings prefixed with a 2 byte header. Example:
+ * int serialNumberDescriptor[] = {
+ * USB_STRING_DESCRIPTOR_HEADER(6),
+ * 'S', 'e', 'r', 'i', 'a', 'l'
+ * };
*/
#define USB_CFG_DESCR_PROPS_DEVICE 0