From 132a3f55f05dff4eedde0d23d844ecdedef8ba68 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 26 Nov 2010 12:25:32 +0100 Subject: usb descriptors: add settable strings. This patch allows to set usb descriptor strings per device instance. Signed-off-by: Gerd Hoffmann --- hw/usb-desc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/usb-desc.h') diff --git a/hw/usb-desc.h b/hw/usb-desc.h index d80efdb..20fc400 100644 --- a/hw/usb-desc.h +++ b/hw/usb-desc.h @@ -76,9 +76,11 @@ int usb_desc_config(const USBDescConfig *conf, uint8_t *dest, size_t len); int usb_desc_iface(const USBDescIface *iface, uint8_t *dest, size_t len); int usb_desc_endpoint(const USBDescEndpoint *ep, uint8_t *dest, size_t len); int usb_desc_other(const USBDescOther *desc, uint8_t *dest, size_t len); -int usb_desc_string(const char* const *str, int index, uint8_t *dest, size_t len); /* control message emulation helpers */ +void usb_desc_set_string(USBDevice *dev, uint8_t index, const char *str); +const char *usb_desc_get_string(USBDevice *dev, uint8_t index); +int usb_desc_string(USBDevice *dev, int index, uint8_t *dest, size_t len); int usb_desc_get_descriptor(USBDevice *dev, int value, uint8_t *dest, size_t len); int usb_desc_handle_control(USBDevice *dev, int request, int value, int index, int length, uint8_t *data); -- cgit v1.1