diff options
Diffstat (limited to 'firmware/usbstack/core/config.c')
-rw-r--r-- | firmware/usbstack/core/config.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/firmware/usbstack/core/config.c b/firmware/usbstack/core/config.c index c49d54702c..1a9b12508e 100644 --- a/firmware/usbstack/core/config.c +++ b/firmware/usbstack/core/config.c | |||
@@ -23,7 +23,8 @@ | |||
23 | #include <string.h> | 23 | #include <string.h> |
24 | #include "usbstack/core.h" | 24 | #include "usbstack/core.h" |
25 | 25 | ||
26 | static int usb_descriptor_fillbuf(void* buf, unsigned buflen, struct usb_descriptor_header** src) | 26 | static int usb_descriptor_fillbuf(void* buf, unsigned buflen, |
27 | struct usb_descriptor_header** src) | ||
27 | { | 28 | { |
28 | uint8_t* dest = buf; | 29 | uint8_t* dest = buf; |
29 | 30 | ||
@@ -45,7 +46,8 @@ static int usb_descriptor_fillbuf(void* buf, unsigned buflen, struct usb_descrip | |||
45 | return dest - (uint8_t *)buf; | 46 | return dest - (uint8_t *)buf; |
46 | } | 47 | } |
47 | 48 | ||
48 | int usb_stack_configdesc(const struct usb_config_descriptor* config, void* buf, unsigned length, struct usb_descriptor_header** desc) | 49 | int usb_stack_configdesc(const struct usb_config_descriptor* config, void* buf, |
50 | unsigned length, struct usb_descriptor_header** desc) | ||
49 | { | 51 | { |
50 | struct usb_config_descriptor* cp = buf; | 52 | struct usb_config_descriptor* cp = buf; |
51 | int len; | 53 | int len; |
@@ -58,7 +60,8 @@ int usb_stack_configdesc(const struct usb_config_descriptor* config, void* buf, | |||
58 | *cp = *config; | 60 | *cp = *config; |
59 | 61 | ||
60 | /* then interface/endpoint/class/vendor/... */ | 62 | /* then interface/endpoint/class/vendor/... */ |
61 | len = usb_descriptor_fillbuf(USB_DT_CONFIG_SIZE + (uint8_t*)buf, length - USB_DT_CONFIG_SIZE, desc); | 63 | len = usb_descriptor_fillbuf(USB_DT_CONFIG_SIZE + (uint8_t*)buf, |
64 | length - USB_DT_CONFIG_SIZE, desc); | ||
62 | 65 | ||
63 | if (len < 0) { | 66 | if (len < 0) { |
64 | return len; | 67 | return len; |