summaryrefslogtreecommitdiff
path: root/firmware/export/usb_ch9.h
diff options
context:
space:
mode:
authorTomasz Moń <desowin@gmail.com>2021-06-08 16:46:07 +0200
committerTomasz Moń <desowin@gmail.com>2021-06-12 14:47:15 +0000
commitf3f9d1fb9533529776ded4fd3af7fd274ba5f2fe (patch)
tree85bdcf140180d0a32be37dcb617a3663b59f8182 /firmware/export/usb_ch9.h
parent663d846cf3867a6aab40b981b4755a1f62a64dcd (diff)
downloadrockbox-f3f9d1fb9533529776ded4fd3af7fd274ba5f2fe.tar.gz
rockbox-f3f9d1fb9533529776ded4fd3af7fd274ba5f2fe.zip
USB Serial: Implement Abstract Control Management
On devices that can assign interrupt IN, bulk IN and bulk OUT endpoints this change results in the serial interface working out of the box on Linux and Windows. On Linux it is registered as ttyACM device and on Windows it is assigned a COM port number. On devices that cannot assign the interrupt IN this change won't have any effect. Implement minimum required interface control requests. Respond with whatever line coding was set to make terminal programs happy. Change-Id: Id7d3899d8546e45d7cb4ecc3fe464908cb59e810
Diffstat (limited to 'firmware/export/usb_ch9.h')
-rw-r--r--firmware/export/usb_ch9.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/firmware/export/usb_ch9.h b/firmware/export/usb_ch9.h
index c11775b893..659bcca101 100644
--- a/firmware/export/usb_ch9.h
+++ b/firmware/export/usb_ch9.h
@@ -391,6 +391,23 @@ struct usb_debug_descriptor {
391} __attribute__((packed)); 391} __attribute__((packed));
392 392
393/*-------------------------------------------------------------------------*/ 393/*-------------------------------------------------------------------------*/
394
395/* USB_DT_INTERFACE_ASSOCIATION: groups interfaces */
396struct usb_interface_assoc_descriptor {
397 uint8_t bLength;
398 uint8_t bDescriptorType;
399
400 uint8_t bFirstInterface;
401 uint8_t bInterfaceCount;
402 uint8_t bFunctionClass;
403 uint8_t bFunctionSubClass;
404 uint8_t bFunctionProtocol;
405 uint8_t iFunction;
406} __attribute__ ((packed));
407
408#define USB_DT_INTERFACE_ASSOCIATION_SIZE 8
409
410/*-------------------------------------------------------------------------*/
394/* USB 2.0 defines three speeds, here's how Linux identifies them */ 411/* USB 2.0 defines three speeds, here's how Linux identifies them */
395 412
396enum usb_device_speed { 413enum usb_device_speed {