summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2024-10-31 21:43:41 +0800
committersakumisu <[email protected]>2024-10-31 21:45:19 +0800
commitc51a6f35a6edb7cb86b6994be609ba2e86115200 (patch)
treeceb9b48ca30954907c86f78daff64273b27fd7a2
parenta13bee0663731661eb8a2ba5daeb3fc8f3142d12 (diff)
feat(class/aoa): add usb aoa host
-rw-r--r--CherryUSB.svg2
-rw-r--r--Kconfig5
-rw-r--r--README.md1
-rw-r--r--README_zh.md1
-rw-r--r--cherryusb.cmake4
-rw-r--r--class/aoa/usb_aoa.h48
-rw-r--r--class/aoa/usbh_aoa.c289
-rw-r--r--class/aoa/usbh_aoa.h40
-rw-r--r--demo/usb_host.c23
9 files changed, 412 insertions, 1 deletions
diff --git a/CherryUSB.svg b/CherryUSB.svg
index c1ed4782..91de329f 100644
--- a/CherryUSB.svg
+++ b/CherryUSB.svg
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="811px" height="681px" viewBox="-0.5 -0.5 811 681" style="background-color: rgb(47, 47, 54);"><defs/><g><path d="M 0 50 L 0 0 L 810 0 L 810 50" fill="#c43f3f" stroke="#ff3333" stroke-miterlimit="10" pointer-events="all"/><path d="M 0 50 L 0 680 L 810 680 L 810 50" fill="none" stroke="#ff3333" stroke-miterlimit="10" pointer-events="none"/><path d="M 0 50 L 810 50" fill="none" stroke="#ff3333" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 808px; height: 1px; padding-top: 25px; margin-left: 1px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 24px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;"><font style="font-size: 24px;"><b style="font-size: 24px;">CherryUSB</b></font></div></div></div></foreignObject><text x="405" y="32" fill="#F0F0F0" font-family="Helvetica" font-size="24px" text-anchor="middle">CherryUSB</text></switch></g><path d="M 10 593 L 10 570 L 800 570 L 800 593" fill="#937ab3" stroke="#937ab3" stroke-miterlimit="10" pointer-events="none"/><path d="M 10 593 L 10 670 L 800 670 L 800 593" fill="none" stroke="#937ab3" stroke-miterlimit="10" pointer-events="none"/><path d="M 10 593 L 800 593" fill="none" stroke="#937ab3" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 788px; height: 1px; padding-top: 582px; margin-left: 11px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; font-weight: bold; white-space: normal; overflow-wrap: normal;"><font style="font-size: 14px;">Hardware</font></div></div></div></foreignObject><text x="405" y="585" fill="#F0F0F0" font-family="Helvetica" font-size="12px" text-anchor="middle" font-weight="bold">Hardware</text></switch></g><path d="M 742 630 L 790 630" fill="none" stroke="#f0f0f0" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="2 6" pointer-events="none"/><rect x="650" y="600" width="80" height="60" fill="#2f2f36" stroke="#937ab3" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 630px; margin-left: 651px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">BL</div></div></div></foreignObject><text x="690" y="634" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">BL</text></switch></g><rect x="290" y="600" width="80" height="60" fill="#2f2f36" stroke="#937ab3" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 630px; margin-left: 291px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">DWC2</div></div></div></foreignObject><text x="330" y="634" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">DWC2</text></switch></g><rect x="20" y="600" width="80" height="60" fill="#2f2f36" stroke="#937ab3" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 630px; margin-left: 21px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">OHCI</div></div></div></foreignObject><text x="60" y="634" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">OHCI</text></switch></g><rect x="110" y="600" width="80" height="60" fill="#2f2f36" stroke="#937ab3" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 630px; margin-left: 111px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">EHCI</div></div></div></foreignObject><text x="150" y="634" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">EHCI</text></switch></g><rect x="200" y="600" width="80" height="60" fill="#2f2f36" stroke="#937ab3" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 630px; margin-left: 201px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">XHCI</div></div></div></foreignObject><text x="240" y="634" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">XHCI</text></switch></g><rect x="380" y="600" width="80" height="60" fill="#2f2f36" stroke="#937ab3" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 630px; margin-left: 381px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">MUSB</div></div></div></foreignObject><text x="420" y="634" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">MUSB</text></switch></g><rect x="470" y="600" width="80" height="60" fill="#2f2f36" stroke="#937ab3" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 630px; margin-left: 471px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">FSDEV</div></div></div></foreignObject><text x="510" y="634" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">FSDEV</text></switch></g><rect x="560" y="600" width="80" height="60" fill="#2f2f36" stroke="#937ab3" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 630px; margin-left: 561px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">HPM</div></div></div></foreignObject><text x="600" y="634" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">HPM</text></switch></g><rect x="10" y="500" width="390" height="60" fill="#73ad5b" stroke="#73ad5b" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 388px; height: 1px; padding-top: 530px; margin-left: 11px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 16px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;"><font style="font-size: 16px;">Device Controller Driver (DCD)</font></div></div></div></foreignObject><text x="205" y="535" fill="#F0F0F0" font-family="Helvetica" font-size="16px" text-anchor="middle">Device Controller Driver (DCD)</text></switch></g><rect x="410" y="500" width="390" height="60" fill="#658cb8" stroke="#658cb8" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 388px; height: 1px; padding-top: 530px; margin-left: 411px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 16px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;"><font style="font-size: 16px;">Host Controller Driver (HCD)</font></div></div></div></foreignObject><text x="605" y="535" fill="#F0F0F0" font-family="Helvetica" font-size="16px" text-anchor="middle">Host Controller Driver (HCD)</text></switch></g><rect x="10" y="430" width="790" height="60" fill="#2f2f36" stroke="#8c8c8c" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 788px; height: 1px; padding-top: 460px; margin-left: 11px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 16px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;"><font style="font-size: 16px;">OS Abstraction Layer (OSAL)</font></div></div></div></foreignObject><text x="405" y="465" fill="#F0F0F0" font-family="Helvetica" font-size="16px" text-anchor="middle">OS Abstraction Layer (OSAL)</text></switch></g><path d="M 410 90 L 410 60 L 800 60 L 800 90" fill="#658cb8" stroke="#658cb8" stroke-miterlimit="10" pointer-events="none"/><path d="M 410 90 L 410 420 L 800 420 L 800 90" fill="none" stroke="#658cb8" stroke-miterlimit="10" pointer-events="none"/><path d="M 410 90 L 800 90" fill="none" stroke="#658cb8" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 388px; height: 1px; padding-top: 75px; margin-left: 411px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; font-weight: bold; white-space: normal; overflow-wrap: normal;">USB Host</div></div></div></foreignObject><text x="605" y="79" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle" font-weight="bold">USB Host</text></switch></g><rect x="420" y="350" width="370" height="60" fill="#2f2f36" stroke="#658cb8" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 368px; height: 1px; padding-top: 380px; margin-left: 421px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 16px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;"><font style="font-size: 16px;">USB Host Core</font></div></div></div></foreignObject><text x="605" y="385" fill="#F0F0F0" font-family="Helvetica" font-size="16px" text-anchor="middle">USB Host Core</text></switch></g><rect x="610" y="250" width="180" height="40" fill="#2f2f36" stroke="#658cb8" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 270px; margin-left: 611px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">HID</div></div></div></foreignObject><text x="700" y="274" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">HID</text></switch></g><rect x="610" y="200" width="180" height="40" fill="#2f2f36" stroke="#658cb8" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 220px; margin-left: 611px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">MSC</div></div></div></foreignObject><text x="700" y="224" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">MSC</text></switch></g><rect x="420" y="250" width="180" height="40" fill="#2f2f36" stroke="#658cb8" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 270px; margin-left: 421px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">CDC</div></div></div></foreignObject><text x="510" y="274" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">CDC</text></switch></g><rect x="420" y="200" width="180" height="40" fill="#2f2f36" stroke="#658cb8" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 220px; margin-left: 421px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">UAC</div></div></div></foreignObject><text x="510" y="224" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">UAC</text></switch></g><rect x="610" y="150" width="180" height="40" fill="#2f2f36" stroke="#658cb8" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 170px; margin-left: 611px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">UVC</div></div></div></foreignObject><text x="700" y="174" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">UVC</text></switch></g><rect x="420" y="150" width="180" height="40" fill="#2f2f36" stroke="#658cb8" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 170px; margin-left: 421px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">RNDIS</div></div></div></foreignObject><text x="510" y="174" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">RNDIS</text></switch></g><rect x="420" y="100" width="180" height="40" fill="#2f2f36" stroke="#658cb8" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 120px; margin-left: 421px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">VENDOR</div></div></div></foreignObject><text x="510" y="124" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">VENDOR</text></switch></g><rect x="610" y="100" width="180" height="40" fill="#2f2f36" stroke="#658cb8" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 120px; margin-left: 611px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">HUB</div></div></div></foreignObject><text x="700" y="124" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">HUB</text></switch></g><path d="M 635 320 L 575 320" fill="none" stroke="#f0f0f0" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="2 6" pointer-events="none"/><path d="M 10 90 L 10 60 L 400 60 L 400 90" fill="#73ad5b" stroke="#73ad5b" stroke-miterlimit="10" pointer-events="none"/><path d="M 10 90 L 10 420 L 400 420 L 400 90" fill="none" stroke="#73ad5b" stroke-miterlimit="10" pointer-events="none"/><path d="M 10 90 L 400 90" fill="none" stroke="#73ad5b" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 388px; height: 1px; padding-top: 75px; margin-left: 11px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; font-weight: bold; white-space: normal; overflow-wrap: normal;">USB Device</div></div></div></foreignObject><text x="205" y="79" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle" font-weight="bold">USB Device</text></switch></g><rect x="20" y="350" width="370" height="60" fill="#000000" stroke="#000000" pointer-events="none" transform="translate(2,3)" opacity="0.25"/><rect x="20" y="350" width="370" height="60" fill="#2f2f36" stroke="#73ad5b" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 368px; height: 1px; padding-top: 380px; margin-left: 21px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 16px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;"><font style="font-size: 16px;">USB Device Core</font></div></div></div></foreignObject><text x="205" y="385" fill="#F0F0F0" font-family="Helvetica" font-size="16px" text-anchor="middle">USB Device Core</text></switch></g><rect x="210" y="250" width="180" height="40" fill="#000000" stroke="#000000" pointer-events="none" transform="translate(2,3)" opacity="0.25"/><rect x="210" y="250" width="180" height="40" fill="#2f2f36" stroke="#73ad5b" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 270px; margin-left: 211px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">HID</div></div></div></foreignObject><text x="300" y="274" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">HID</text></switch></g><rect x="210" y="200" width="180" height="40" fill="#000000" stroke="#000000" pointer-events="none" transform="translate(2,3)" opacity="0.25"/><rect x="210" y="200" width="180" height="40" fill="#2f2f36" stroke="#73ad5b" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 220px; margin-left: 211px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">MSC</div></div></div></foreignObject><text x="300" y="224" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">MSC</text></switch></g><rect x="20" y="250" width="180" height="40" fill="#000000" stroke="#000000" pointer-events="none" transform="translate(2,3)" opacity="0.25"/><rect x="20" y="250" width="180" height="40" fill="#2f2f36" stroke="#73ad5b" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 270px; margin-left: 21px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">CDC</div></div></div></foreignObject><text x="110" y="274" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">CDC</text></switch></g><rect x="20" y="200" width="180" height="40" fill="#000000" stroke="#000000" pointer-events="none" transform="translate(2,3)" opacity="0.25"/><rect x="20" y="200" width="180" height="40" fill="#2f2f36" stroke="#73ad5b" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 220px; margin-left: 21px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">UAC</div></div></div></foreignObject><text x="110" y="224" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">UAC</text></switch></g><rect x="210" y="150" width="180" height="40" fill="#000000" stroke="#000000" pointer-events="none" transform="translate(2,3)" opacity="0.25"/><rect x="210" y="150" width="180" height="40" fill="#2f2f36" stroke="#73ad5b" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 170px; margin-left: 211px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">UVC</div></div></div></foreignObject><text x="300" y="174" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">UVC</text></switch></g><rect x="20" y="150" width="180" height="40" fill="#000000" stroke="#000000" pointer-events="none" transform="translate(2,3)" opacity="0.25"/><rect x="20" y="150" width="180" height="40" fill="#2f2f36" stroke="#73ad5b" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 170px; margin-left: 21px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">RNDIS</div></div></div></foreignObject><text x="110" y="174" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">RNDIS</text></switch></g><rect x="20" y="100" width="180" height="40" fill="#000000" stroke="#000000" pointer-events="none" transform="translate(2,3)" opacity="0.25"/><rect x="20" y="100" width="180" height="40" fill="#2f2f36" stroke="#73ad5b" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 120px; margin-left: 21px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">VENDOR</div></div></div></foreignObject><text x="110" y="124" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">VENDOR</text></switch></g><rect x="210" y="100" width="180" height="40" fill="#000000" stroke="#000000" pointer-events="none" transform="translate(2,3)" opacity="0.25"/><rect x="210" y="100" width="180" height="40" fill="#2f2f36" stroke="#73ad5b" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 120px; margin-left: 211px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">DFU</div></div></div></foreignObject><text x="300" y="124" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">DFU</text></switch></g><path d="M 235 320 L 175 320" fill="none" stroke="#f0f0f0" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="2 6" pointer-events="none"/><rect x="145" y="430" width="120" height="22" fill="#000000" stroke="#000000" pointer-events="none" transform="translate(2,3)" opacity="0.25"/><rect x="145" y="430" width="120" height="22" fill="#2f2f36" stroke="#73ad5b" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 440px; margin-left: 205px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: nowrap;">optional</div></div></div></foreignObject><text x="205" y="444" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">optional</text></switch></g><rect x="545" y="430" width="120" height="22" fill="#000000" stroke="#000000" pointer-events="none" transform="translate(2,3)" opacity="0.25"/><rect x="545" y="430" width="120" height="22" fill="#2f2f36" stroke="#658cb8" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 440px; margin-left: 605px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: none; white-space: nowrap;">required</div></div></div></foreignObject><text x="605" y="444" fill="#F0F0F0" font-family="Helvetica" font-size="14px" text-anchor="middle">required</text></switch></g><path d="M 10 430 L 800 430" fill="none" stroke="#8c8c8c" stroke-miterlimit="10" pointer-events="none"/></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg> \ No newline at end of file
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="811px" height="681px" viewBox="-0.5 -0.5 811 681" style="background-color: rgb(47, 47, 54);"><defs/><rect fill="#2F2F36" width="100%" height="100%" x="0" y="0"/><g><g data-cell-id="0"><g data-cell-id="1"><g data-cell-id="3"><g><path d="M 0 50 L 0 0 L 810 0 L 810 50" fill="#c43f3f" stroke="#ff3333" stroke-miterlimit="10" pointer-events="all"/><path d="M 0 50 L 0 680 L 810 680 L 810 50" fill="none" stroke="#ff3333" stroke-miterlimit="10" pointer-events="none"/><path d="M 0 50 L 810 50" fill="none" stroke="#ff3333" stroke-miterlimit="10" pointer-events="none"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 808px; height: 1px; padding-top: 25px; margin-left: 1px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 24px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 24px;"><b style="font-size: 24px;">CherryUSB</b></font></div></div></div></foreignObject><text x="405" y="32" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="24px" text-anchor="middle">CherryUSB</text></switch></g></g><g data-cell-id="5"><g><path d="M 10 593 L 10 570 L 800 570 L 800 593" fill="#937ab3" stroke="#937ab3" stroke-miterlimit="10" pointer-events="all"/><path d="M 10 593 L 10 670 L 800 670 L 800 593" fill="none" stroke="#937ab3" stroke-miterlimit="10" pointer-events="none"/><path d="M 10 593 L 800 593" fill="none" stroke="#937ab3" stroke-miterlimit="10" pointer-events="none"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 788px; height: 1px; padding-top: 582px; margin-left: 11px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;"><font style="font-size: 14px;">Hardware</font></div></div></div></foreignObject><text x="405" y="585" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle" font-weight="bold">Hardware</text></switch></g></g><g data-cell-id="17"><g><path d="M 742 630 L 790 630" fill="none" stroke="#f0f0f0" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="2 6" pointer-events="stroke"/></g></g><g data-cell-id="14"><g><rect x="650" y="600" width="80" height="60" fill="#2f2f36" stroke="#937ab3" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 630px; margin-left: 651px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">CDNS3</div></div></div></foreignObject><text x="690" y="634" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">CDNS3</text></switch></g></g></g><g data-cell-id="7"><g><rect x="290" y="600" width="80" height="60" fill="#2f2f36" stroke="#937ab3" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 630px; margin-left: 291px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">CHIPIDEA</div></div></div></foreignObject><text x="330" y="634" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">CHIPIDEA</text></switch></g></g></g><g data-cell-id="66"><g><rect x="20" y="600" width="80" height="60" fill="#2f2f36" stroke="#937ab3" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 630px; margin-left: 21px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">XHCI</div></div></div></foreignObject><text x="60" y="634" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">XHCI</text></switch></g></g></g><g data-cell-id="10"><g><rect x="110" y="600" width="80" height="60" fill="#2f2f36" stroke="#937ab3" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 630px; margin-left: 111px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">EHCI</div></div></div></foreignObject><text x="150" y="634" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">EHCI</text></switch></g></g></g><g data-cell-id="6"><g><rect x="200" y="600" width="80" height="60" fill="#2f2f36" stroke="#937ab3" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 630px; margin-left: 201px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">OHCI</div></div></div></foreignObject><text x="240" y="634" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">OHCI</text></switch></g></g></g><g data-cell-id="8"><g><rect x="380" y="600" width="80" height="60" fill="#2f2f36" stroke="#937ab3" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 630px; margin-left: 381px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">DWC2</div></div></div></foreignObject><text x="420" y="634" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">DWC2</text></switch></g></g></g><g data-cell-id="12"><g><rect x="470" y="600" width="80" height="60" fill="#2f2f36" stroke="#937ab3" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 630px; margin-left: 471px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">MUSB</div></div></div></foreignObject><text x="510" y="634" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">MUSB</text></switch></g></g></g><g data-cell-id="15"><g><rect x="560" y="600" width="80" height="60" fill="#2f2f36" stroke="#937ab3" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 630px; margin-left: 561px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">FOTG</div></div></div></foreignObject><text x="600" y="634" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">FOTG</text></switch></g></g></g></g><g data-cell-id="18"><g><rect x="10" y="500" width="390" height="60" fill="#73ad5b" stroke="#73ad5b" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 388px; height: 1px; padding-top: 530px; margin-left: 11px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 16px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 16px;">Device Controller Driver (DCD)</font></div></div></div></foreignObject><text x="205" y="535" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="16px" text-anchor="middle">Device Controller Driver (DCD)</text></switch></g></g></g><g data-cell-id="19"><g><rect x="410" y="500" width="390" height="60" fill="#658cb8" stroke="#658cb8" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 388px; height: 1px; padding-top: 530px; margin-left: 411px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 16px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 16px;">Host Controller Driver (HCD)</font></div></div></div></foreignObject><text x="605" y="535" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="16px" text-anchor="middle">Host Controller Driver (HCD)</text></switch></g></g></g><g data-cell-id="21"><g><rect x="10" y="430" width="790" height="60" fill="#2f2f36" stroke="#8c8c8c" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 788px; height: 1px; padding-top: 460px; margin-left: 11px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 16px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 16px;">OS Abstraction Layer (OSAL)</font></div></div></div></foreignObject><text x="405" y="465" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="16px" text-anchor="middle">OS Abstraction Layer (OSAL)</text></switch></g></g></g><g data-cell-id="23"><g><path d="M 410 90 L 410 60 L 800 60 L 800 90" fill="#658cb8" stroke="#658cb8" stroke-miterlimit="10" pointer-events="all"/><path d="M 410 90 L 410 420 L 800 420 L 800 90" fill="none" stroke="#658cb8" stroke-miterlimit="10" pointer-events="none"/><path d="M 410 90 L 800 90" fill="none" stroke="#658cb8" stroke-miterlimit="10" pointer-events="none"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 388px; height: 1px; padding-top: 75px; margin-left: 411px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;">USB Host</div></div></div></foreignObject><text x="605" y="79" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle" font-weight="bold">USB Host</text></switch></g></g><g data-cell-id="25"><g><rect x="420" y="350" width="370" height="60" fill="#2f2f36" stroke="#658cb8" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 368px; height: 1px; padding-top: 380px; margin-left: 421px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 16px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 16px;">USB Host Core</font></div></div></div></foreignObject><text x="605" y="385" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="16px" text-anchor="middle">USB Host Core</text></switch></g></g></g><g data-cell-id="43"><g><rect x="610" y="250" width="180" height="40" fill="#2f2f36" stroke="#658cb8" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 270px; margin-left: 611px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">HID</div></div></div></foreignObject><text x="700" y="274" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">HID</text></switch></g></g></g><g data-cell-id="44"><g><rect x="610" y="200" width="180" height="40" fill="#2f2f36" stroke="#658cb8" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 220px; margin-left: 611px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">MSC</div></div></div></foreignObject><text x="700" y="224" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">MSC</text></switch></g></g></g><g data-cell-id="45"><g><rect x="420" y="250" width="180" height="40" fill="#2f2f36" stroke="#658cb8" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 270px; margin-left: 421px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">CDC</div></div></div></foreignObject><text x="510" y="274" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">CDC</text></switch></g></g></g><g data-cell-id="46"><g><rect x="420" y="200" width="180" height="40" fill="#2f2f36" stroke="#658cb8" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 220px; margin-left: 421px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">UAC</div></div></div></foreignObject><text x="510" y="224" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">UAC</text></switch></g></g></g><g data-cell-id="47"><g><rect x="610" y="150" width="180" height="40" fill="#2f2f36" stroke="#658cb8" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 170px; margin-left: 611px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">UVC</div></div></div></foreignObject><text x="700" y="174" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">UVC</text></switch></g></g></g><g data-cell-id="48"><g><rect x="420" y="150" width="180" height="40" fill="#2f2f36" stroke="#658cb8" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 170px; margin-left: 421px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">RNDIS</div></div></div></foreignObject><text x="510" y="174" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">RNDIS</text></switch></g></g></g><g data-cell-id="50"><g><rect x="420" y="100" width="180" height="40" fill="#2f2f36" stroke="#658cb8" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 120px; margin-left: 421px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">VENDOR</div></div></div></foreignObject><text x="510" y="124" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">VENDOR</text></switch></g></g></g><g data-cell-id="51"><g><rect x="610" y="100" width="180" height="40" fill="#2f2f36" stroke="#658cb8" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 120px; margin-left: 611px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">HUB</div></div></div></foreignObject><text x="700" y="124" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">HUB</text></switch></g></g></g><g data-cell-id="68"><g><path d="M 635 320 L 575 320" fill="none" stroke="#f0f0f0" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="2 6" pointer-events="stroke"/></g></g></g><g data-cell-id="22"><g><path d="M 10 90 L 10 60 L 400 60 L 400 90" fill="#73ad5b" stroke="#73ad5b" stroke-miterlimit="10" pointer-events="all"/><path d="M 10 90 L 10 420 L 400 420 L 400 90" fill="none" stroke="#73ad5b" stroke-miterlimit="10" pointer-events="none"/><path d="M 10 90 L 400 90" fill="none" stroke="#73ad5b" stroke-miterlimit="10" pointer-events="none"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 388px; height: 1px; padding-top: 75px; margin-left: 11px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;">USB Device</div></div></div></foreignObject><text x="205" y="79" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle" font-weight="bold">USB Device</text></switch></g></g><g data-cell-id="24"><g style="filter: drop-shadow(rgba(0, 0, 0, 0.25) 2px 3px 2px);"><rect x="20" y="350" width="370" height="60" fill="#2f2f36" stroke="#73ad5b" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 368px; height: 1px; padding-top: 380px; margin-left: 21px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 16px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 16px;">USB Device Core</font></div></div></div></foreignObject><text x="205" y="385" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="16px" text-anchor="middle">USB Device Core</text></switch></g></g></g><g data-cell-id="26"><g style="filter: drop-shadow(rgba(0, 0, 0, 0.25) 2px 3px 2px);"><rect x="210" y="250" width="180" height="40" fill="#2f2f36" stroke="#73ad5b" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 270px; margin-left: 211px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">HID</div></div></div></foreignObject><text x="300" y="274" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">HID</text></switch></g></g></g><g data-cell-id="36"><g style="filter: drop-shadow(rgba(0, 0, 0, 0.25) 2px 3px 2px);"><rect x="210" y="200" width="180" height="40" fill="#2f2f36" stroke="#73ad5b" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 220px; margin-left: 211px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">MSC</div></div></div></foreignObject><text x="300" y="224" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">MSC</text></switch></g></g></g><g data-cell-id="37"><g style="filter: drop-shadow(rgba(0, 0, 0, 0.25) 2px 3px 2px);"><rect x="20" y="250" width="180" height="40" fill="#2f2f36" stroke="#73ad5b" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 270px; margin-left: 21px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">CDC</div></div></div></foreignObject><text x="110" y="274" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">CDC</text></switch></g></g></g><g data-cell-id="39"><g style="filter: drop-shadow(rgba(0, 0, 0, 0.25) 2px 3px 2px);"><rect x="20" y="200" width="180" height="40" fill="#2f2f36" stroke="#73ad5b" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 220px; margin-left: 21px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">UAC</div></div></div></foreignObject><text x="110" y="224" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">UAC</text></switch></g></g></g><g data-cell-id="40"><g style="filter: drop-shadow(rgba(0, 0, 0, 0.25) 2px 3px 2px);"><rect x="210" y="150" width="180" height="40" fill="#2f2f36" stroke="#73ad5b" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 170px; margin-left: 211px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">UVC</div></div></div></foreignObject><text x="300" y="174" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">UVC</text></switch></g></g></g><g data-cell-id="33"><g style="filter: drop-shadow(rgba(0, 0, 0, 0.25) 2px 3px 2px);"><rect x="20" y="150" width="180" height="40" fill="#2f2f36" stroke="#73ad5b" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 170px; margin-left: 21px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">RNDIS</div></div></div></foreignObject><text x="110" y="174" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">RNDIS</text></switch></g></g></g><g data-cell-id="41"><g style="filter: drop-shadow(rgba(0, 0, 0, 0.25) 2px 3px 2px);"><rect x="20" y="100" width="180" height="40" fill="#2f2f36" stroke="#73ad5b" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 120px; margin-left: 21px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">VENDOR</div></div></div></foreignObject><text x="110" y="124" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">VENDOR</text></switch></g></g></g><g data-cell-id="42"><g style="filter: drop-shadow(rgba(0, 0, 0, 0.25) 2px 3px 2px);"><rect x="210" y="100" width="180" height="40" fill="#2f2f36" stroke="#73ad5b" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 120px; margin-left: 211px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">DFU</div></div></div></foreignObject><text x="300" y="124" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">DFU</text></switch></g></g></g><g data-cell-id="69"><g><path d="M 235 320 L 175 320" fill="none" stroke="#f0f0f0" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="2 6" pointer-events="stroke"/></g></g></g><g data-cell-id="54"><g style="filter: drop-shadow(rgba(0, 0, 0, 0.25) 2px 3px 2px);"><rect x="145" y="430" width="120" height="22" fill="#2f2f36" stroke="#73ad5b" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 440px; margin-left: 205px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: nowrap;">optional</div></div></div></foreignObject><text x="205" y="444" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">optional</text></switch></g></g></g><g data-cell-id="55"><g style="filter: drop-shadow(rgba(0, 0, 0, 0.25) 2px 3px 2px);"><rect x="545" y="430" width="120" height="22" fill="#2f2f36" stroke="#658cb8" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 440px; margin-left: 605px;"><div data-drawio-colors="color: #F0F0F0; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(240, 240, 240); line-height: 1.2; pointer-events: all; white-space: nowrap;">required</div></div></div></foreignObject><text x="605" y="444" fill="#F0F0F0" font-family="&quot;Helvetica&quot;" font-size="14px" text-anchor="middle">required</text></switch></g></g></g><g data-cell-id="56"><g><path d="M 10 430 L 800 430" fill="none" stroke="#8c8c8c" stroke-miterlimit="10" pointer-events="stroke"/></g></g></g></g></g></g></svg> \ No newline at end of file
diff --git a/Kconfig b/Kconfig
index 12faa67f..ddcc04ca 100644
--- a/Kconfig
+++ b/Kconfig
@@ -295,6 +295,11 @@ if CHERRYUSB
prompt "Enable usb pl2303 driver"
default n
+ config CHERRYUSB_HOST_AOA
+ bool
+ prompt "Enable usb aoa driver"
+ default n
+
config USBHOST_PLATFORM_CDC_ECM
bool
diff --git a/README.md b/README.md
index bbea73f2..b84747ae 100644
--- a/README.md
+++ b/README.md
@@ -103,6 +103,7 @@ CherryUSB Host Stack has the following functions:
- Support USB Bluetooth class (support nimble and zephyr bluetooth stack, support **CLASS:0xE0** or vendor class like cdc acm)
- Support Vendor class (serial, net, wifi)
- Support USB modeswitch
+- Support Android Open Accessory
- Support multi host with the same USB IP
The CherryUSB Host stack also provides the lsusb function, which allows you to view information about all mounted devices, including those on external hubs, with the help of a shell plugin.
diff --git a/README_zh.md b/README_zh.md
index 1e8b5439..1e701e78 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -103,6 +103,7 @@ CherryUSB Host 协议栈当前实现以下功能:
- 支持 USB Bluetooth (支持 nimble and zephyr bluetooth 协议栈,支持 **CLASS: 0xE0** 或者厂家自定义类,类似于 cdc acm 功能)
- 支持 Vendor 类 class (serial, net, wifi)
- 支持 USB modeswitch
+- 支持 Android Open Accessory
- 支持相同 USB IP 的多主机
同时,CherryUSB Host 协议栈还提供了 lsusb 的功能,借助 shell 插件可以查看所有挂载设备的信息,包括外部 hub 上的设备的信息。
diff --git a/cherryusb.cmake b/cherryusb.cmake
index 81e4f826..d5ac4577 100644
--- a/cherryusb.cmake
+++ b/cherryusb.cmake
@@ -40,6 +40,7 @@ ${CMAKE_CURRENT_LIST_DIR}/class/adb
${CMAKE_CURRENT_LIST_DIR}/class/vendor/net
${CMAKE_CURRENT_LIST_DIR}/class/vendor/serial
${CMAKE_CURRENT_LIST_DIR}/class/vendor/wifi
+${CMAKE_CURRENT_LIST_DIR}/class/aoa
)
if(CONFIG_CHERRYUSB_DEVICE)
@@ -218,6 +219,9 @@ if(CONFIG_CHERRYUSB_HOST)
if(CONFIG_CHERRYUSB_HOST_BL616)
list(APPEND cherryusb_srcs ${CMAKE_CURRENT_LIST_DIR}/class/vendor/wifi/usbh_bl616.c)
endif()
+ if(CONFIG_CHERRYUSB_HOST_AOA)
+ list(APPEND cherryusb_srcs ${CMAKE_CURRENT_LIST_DIR}/class/aoa/usbh_aoa.c)
+ endif()
if(DEFINED CONFIG_CHERRYUSB_HOST_HCD)
if("${CONFIG_CHERRYUSB_HOST_HCD}" STREQUAL "ehci_bouffalo")
diff --git a/class/aoa/usb_aoa.h b/class/aoa/usb_aoa.h
new file mode 100644
index 00000000..6b6c715c
--- /dev/null
+++ b/class/aoa/usb_aoa.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2024, sakumisu
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+#ifndef USB_AOA_H
+#define USB_AOA_H
+
+//AOA 1.0
+#define AOA_ACCESSORY_VENDOR_ID 0x18D1
+#define AOA_ACCESSORY_PRODUCT_ID 0x2D00
+#define AOA_ACCESSORY_ADB_PRODUCT_ID 0x2D01
+
+//AOA 2.0
+#define AOA_AUDIO_PRODUCT_ID 0x2D02
+#define AOA_AUDIO_ADB_PRODUCT_ID 0x2D03
+#define AOA_ACCESSORY_AUDIO_PRODUCT_ID 0x2D04
+#define AOA_ACCESSORY_AUDIO_ADB_PRODUCT_ID 0x2D05
+
+//AOA 1.0
+#define AOA_ACCESSORY_GET_PROTOCOL 51
+#define AOA_ACCESSORY_SEND_STRING 52
+#define AOA_ACCESSORY_START 53
+
+//AOA 2.0
+#define AOA_ACCESSORY_REGISTER_HID 54
+#define AOA_ACCESSORY_UNREGISTER_HID 55
+#define AOA_ACCESSORY_SET_HID_REPORT_DESC 56
+#define AOA_ACCESSORY_SEND_HID_EVENT 57
+#define AOA_ACCESSORY_SET_AUDIO_MODE 58
+
+#define AOA_ACCESSORY_STRING_MANUFACTURER 0
+#define AOA_ACCESSORY_STRING_MODEL 1
+#define AOA_ACCESSORY_STRING_DESCRIPTION 2
+#define AOA_ACCESSORY_STRING_VERSION 3
+#define AOA_ACCESSORY_STRING_URI 4
+#define AOA_ACCESSORY_STRING_SERIAL 5
+
+struct aoa_string_info {
+ char acc_manufacturer[64];
+ char acc_model[64];
+ char acc_description[64];
+ char acc_version[64];
+ char acc_uri[64];
+ char acc_serial[64];
+};
+
+#endif /* USB_AOA_H */ \ No newline at end of file
diff --git a/class/aoa/usbh_aoa.c b/class/aoa/usbh_aoa.c
new file mode 100644
index 00000000..20cef52c
--- /dev/null
+++ b/class/aoa/usbh_aoa.c
@@ -0,0 +1,289 @@
+/*
+ * Copyright (c) 2024, sakumisu
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+#include "usbh_core.h"
+#include "usbh_aoa.h"
+
+#undef USB_DBG_TAG
+#define USB_DBG_TAG "usbh_aoa"
+#include "usb_log.h"
+
+#define DEV_FORMAT "/dev/aoa"
+
+USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_aoa_buffer[128];
+
+static struct usbh_aoa g_aoa_class;
+
+int usbh_aoa_switch(struct usbh_hubport *hport, struct aoa_string_info *info)
+{
+ struct usb_setup_packet *setup;
+ int ret;
+
+ setup = hport->setup;
+
+ if (setup == NULL) {
+ return -USB_ERR_INVAL;
+ }
+
+ USB_LOG_INFO("Try switch into aoa mode\r\n");
+
+ setup->bmRequestType = USB_REQUEST_DIR_IN | USB_REQUEST_VENDOR | USB_REQUEST_RECIPIENT_DEVICE;
+ setup->bRequest = AOA_ACCESSORY_GET_PROTOCOL;
+ setup->wValue = 0;
+ setup->wIndex = 0;
+ setup->wLength = 2;
+
+ ret = usbh_control_transfer(hport, setup, g_aoa_buffer);
+ if (ret < 0) {
+ return ret;
+ }
+
+ USB_LOG_INFO("AOA version: v%d.%d\r\n", g_aoa_buffer[0], g_aoa_buffer[1]);
+
+ setup->bmRequestType = USB_REQUEST_DIR_OUT | USB_REQUEST_VENDOR | USB_REQUEST_RECIPIENT_DEVICE;
+ setup->bRequest = AOA_ACCESSORY_SEND_STRING;
+ setup->wValue = 0;
+ setup->wIndex = AOA_ACCESSORY_STRING_MANUFACTURER;
+ setup->wLength = strlen(info->acc_manufacturer) + 1;
+
+ memcpy(g_aoa_buffer, info->acc_manufacturer, strlen(info->acc_manufacturer));
+ ret = usbh_control_transfer(hport, setup, g_aoa_buffer);
+ if (ret < 0) {
+ return ret;
+ }
+
+ setup->bmRequestType = USB_REQUEST_DIR_OUT | USB_REQUEST_VENDOR | USB_REQUEST_RECIPIENT_DEVICE;
+ setup->bRequest = AOA_ACCESSORY_SEND_STRING;
+ setup->wValue = 0;
+ setup->wIndex = AOA_ACCESSORY_STRING_MODEL;
+ setup->wLength = strlen(info->acc_model) + 1;
+
+ memcpy(g_aoa_buffer, info->acc_model, strlen(info->acc_model));
+ ret = usbh_control_transfer(hport, setup, g_aoa_buffer);
+ if (ret < 0) {
+ return ret;
+ }
+
+ setup->bmRequestType = USB_REQUEST_DIR_OUT | USB_REQUEST_VENDOR | USB_REQUEST_RECIPIENT_DEVICE;
+ setup->bRequest = AOA_ACCESSORY_SEND_STRING;
+ setup->wValue = 0;
+ setup->wIndex = AOA_ACCESSORY_STRING_DESCRIPTION;
+ setup->wLength = strlen(info->acc_description) + 1;
+
+ memcpy(g_aoa_buffer, info->acc_description, strlen(info->acc_description));
+ ret = usbh_control_transfer(hport, setup, g_aoa_buffer);
+ if (ret < 0) {
+ return ret;
+ }
+
+ setup->bmRequestType = USB_REQUEST_DIR_OUT | USB_REQUEST_VENDOR | USB_REQUEST_RECIPIENT_DEVICE;
+ setup->bRequest = AOA_ACCESSORY_SEND_STRING;
+ setup->wValue = 0;
+ setup->wIndex = AOA_ACCESSORY_STRING_VERSION;
+ setup->wLength = strlen(info->acc_version) + 1;
+
+ memcpy(g_aoa_buffer, info->acc_version, strlen(info->acc_version));
+ ret = usbh_control_transfer(hport, setup, g_aoa_buffer);
+ if (ret < 0) {
+ return ret;
+ }
+
+ setup->bmRequestType = USB_REQUEST_DIR_OUT | USB_REQUEST_VENDOR | USB_REQUEST_RECIPIENT_DEVICE;
+ setup->bRequest = AOA_ACCESSORY_SEND_STRING;
+ setup->wValue = 0;
+ setup->wIndex = AOA_ACCESSORY_STRING_URI;
+ setup->wLength = strlen(info->acc_uri) + 1;
+
+ memcpy(g_aoa_buffer, info->acc_uri, strlen(info->acc_uri));
+ ret = usbh_control_transfer(hport, setup, g_aoa_buffer);
+ if (ret < 0) {
+ return ret;
+ }
+
+ setup->bmRequestType = USB_REQUEST_DIR_OUT | USB_REQUEST_VENDOR | USB_REQUEST_RECIPIENT_DEVICE;
+ setup->bRequest = AOA_ACCESSORY_SEND_STRING;
+ setup->wValue = 0;
+ setup->wIndex = AOA_ACCESSORY_STRING_SERIAL;
+ setup->wLength = strlen(info->acc_serial) + 1;
+
+ memcpy(g_aoa_buffer, info->acc_serial, strlen(info->acc_serial));
+ ret = usbh_control_transfer(hport, setup, g_aoa_buffer);
+ if (ret < 0) {
+ return ret;
+ }
+
+ setup->bmRequestType = USB_REQUEST_DIR_OUT | USB_REQUEST_VENDOR | USB_REQUEST_RECIPIENT_DEVICE;
+ setup->bRequest = AOA_ACCESSORY_START;
+ setup->wValue = 0;
+ setup->wIndex = 0;
+ setup->wLength = 0;
+
+ ret = usbh_control_transfer(hport, setup, NULL);
+ if (ret < 0) {
+ return ret;
+ }
+
+ USB_LOG_INFO("Switch into aoa mode success, wait usb device restart...\r\n");
+ return 0;
+}
+
+int usbh_aoa_register_hid(struct usbh_aoa *aoa_class, uint16_t id, uint8_t *report, uint32_t report_len)
+{
+ struct usb_setup_packet *setup;
+ int ret;
+ uint8_t len;
+ uint32_t offset;
+
+ if (!aoa_class || !aoa_class->hport) {
+ return -USB_ERR_INVAL;
+ }
+ setup = aoa_class->hport->setup;
+
+ setup->bmRequestType = USB_REQUEST_DIR_OUT | USB_REQUEST_VENDOR | USB_REQUEST_RECIPIENT_DEVICE;
+ setup->bRequest = AOA_ACCESSORY_REGISTER_HID;
+ setup->wValue = id;
+ setup->wIndex = report_len;
+ setup->wLength = 0;
+
+ ret = usbh_control_transfer(aoa_class->hport, setup, NULL);
+ if (ret < 0) {
+ return ret;
+ }
+
+ offset = 0;
+ while (report_len > 0) {
+ len = report_len > 64 ? 64 : report_len;
+
+ setup->bmRequestType = USB_REQUEST_DIR_OUT | USB_REQUEST_VENDOR | USB_REQUEST_RECIPIENT_DEVICE;
+ setup->bRequest = AOA_ACCESSORY_SET_HID_REPORT_DESC;
+ setup->wValue = id;
+ setup->wIndex = offset;
+ setup->wLength = len;
+
+ memcpy(g_aoa_buffer, report + offset, len);
+ ret = usbh_control_transfer(aoa_class->hport, setup, g_aoa_buffer);
+ if (ret < 0) {
+ return ret;
+ }
+ offset += len;
+ report_len -= len;
+ }
+ return ret;
+}
+
+int usbh_aoa_send_hid_event(struct usbh_aoa *aoa_class, uint16_t id, uint8_t *event, uint32_t event_len)
+{
+ struct usb_setup_packet *setup;
+ int ret;
+ uint8_t len;
+ uint32_t offset;
+
+ if (!aoa_class || !aoa_class->hport) {
+ return -USB_ERR_INVAL;
+ }
+ setup = aoa_class->hport->setup;
+
+ setup->bmRequestType = USB_REQUEST_DIR_OUT | USB_REQUEST_VENDOR | USB_REQUEST_RECIPIENT_DEVICE;
+ setup->bRequest = AOA_ACCESSORY_SEND_HID_EVENT;
+ setup->wValue = id;
+ setup->wIndex = 0;
+ setup->wLength = event_len;
+
+ memcpy(g_aoa_buffer, event, event_len);
+ return usbh_control_transfer(aoa_class->hport, setup, event);
+}
+
+static int usbh_aoa_connect(struct usbh_hubport *hport, uint8_t intf)
+{
+ struct usb_endpoint_descriptor *ep_desc;
+ int ret = 0;
+
+ struct usbh_aoa *aoa_class = &g_aoa_class;
+
+ memset(aoa_class, 0, sizeof(struct usbh_aoa));
+
+ aoa_class->hport = hport;
+ aoa_class->intf = intf;
+
+ hport->config.intf[intf].priv = aoa_class;
+
+ for (uint8_t i = 0; i < hport->config.intf[intf].altsetting[0].intf_desc.bNumEndpoints; i++) {
+ ep_desc = &hport->config.intf[intf].altsetting[0].ep[i].ep_desc;
+
+ if (ep_desc->bEndpointAddress & 0x80) {
+ USBH_EP_INIT(aoa_class->bulkin, ep_desc);
+ } else {
+ USBH_EP_INIT(aoa_class->bulkout, ep_desc);
+ }
+ }
+
+ strncpy(hport->config.intf[intf].devname, DEV_FORMAT, CONFIG_USBHOST_DEV_NAMELEN);
+
+ USB_LOG_INFO("Register AOA Class:%s\r\n", hport->config.intf[intf].devname);
+
+ usbh_aoa_run(aoa_class);
+ return 0;
+}
+
+static int usbh_aoa_disconnect(struct usbh_hubport *hport, uint8_t intf)
+{
+ int ret = 0;
+
+ struct usbh_aoa *aoa_class = (struct usbh_aoa *)hport->config.intf[intf].priv;
+
+ if (aoa_class) {
+ if (aoa_class->bulkin) {
+ usbh_kill_urb(&aoa_class->bulkin_urb);
+ }
+
+ if (aoa_class->bulkout) {
+ usbh_kill_urb(&aoa_class->bulkout_urb);
+ }
+
+ if (hport->config.intf[intf].devname[0] != '\0') {
+ USB_LOG_INFO("Unregister AOA Class:%s\r\n", hport->config.intf[intf].devname);
+ usbh_aoa_stop(aoa_class);
+ }
+
+ memset(aoa_class, 0, sizeof(struct usbh_aoa));
+ }
+
+ return ret;
+}
+
+__WEAK void usbh_aoa_run(struct usbh_aoa *aoa_class)
+{
+ (void)aoa_class;
+}
+
+__WEAK void usbh_aoa_stop(struct usbh_aoa *aoa_class)
+{
+ (void)aoa_class;
+}
+
+static const uint16_t aoa_id_table[][2] = {
+ { AOA_ACCESSORY_VENDOR_ID, AOA_ACCESSORY_PRODUCT_ID },
+ { AOA_ACCESSORY_VENDOR_ID, AOA_ACCESSORY_ADB_PRODUCT_ID },
+ { AOA_ACCESSORY_VENDOR_ID, AOA_AUDIO_PRODUCT_ID },
+ { AOA_ACCESSORY_VENDOR_ID, AOA_AUDIO_ADB_PRODUCT_ID },
+ { AOA_ACCESSORY_VENDOR_ID, AOA_ACCESSORY_AUDIO_PRODUCT_ID },
+ { AOA_ACCESSORY_VENDOR_ID, AOA_ACCESSORY_AUDIO_ADB_PRODUCT_ID },
+ { 0, 0 },
+};
+
+const struct usbh_class_driver aoa_class_driver = {
+ .driver_name = "aoa",
+ .connect = usbh_aoa_connect,
+ .disconnect = usbh_aoa_disconnect
+};
+
+CLASS_INFO_DEFINE const struct usbh_class_info aoa_intf_class_info = {
+ .match_flags = USB_CLASS_MATCH_VID_PID | USB_CLASS_MATCH_INTF_CLASS | USB_CLASS_MATCH_INTF_SUBCLASS,
+ .bInterfaceClass = 0xff,
+ .bInterfaceSubClass = 0xff,
+ .bInterfaceProtocol = 0x00,
+ .id_table = aoa_id_table,
+ .class_driver = &aoa_class_driver
+}; \ No newline at end of file
diff --git a/class/aoa/usbh_aoa.h b/class/aoa/usbh_aoa.h
new file mode 100644
index 00000000..3b184e8b
--- /dev/null
+++ b/class/aoa/usbh_aoa.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2024, sakumisu
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+#ifndef USBH_AOA_H
+#define USBH_AOA_H
+
+#include "usb_aoa.h"
+
+struct usbh_aoa {
+ struct usbh_hubport *hport;
+ struct usb_endpoint_descriptor *bulkin; /* Bulk IN endpoint */
+ struct usb_endpoint_descriptor *bulkout; /* Bulk OUT endpoint */
+
+ struct usbh_urb bulkout_urb;
+ struct usbh_urb bulkin_urb;
+
+ uint8_t intf;
+ uint8_t minor;
+
+ void *user_data;
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int usbh_aoa_switch(struct usbh_hubport *hport, struct aoa_string_info *info);
+int usbh_aoa_register_hid(struct usbh_aoa *aoa_class, uint16_t id, uint8_t *report, uint32_t report_len);
+int usbh_aoa_send_hid_event(struct usbh_aoa *aoa_class, uint16_t id, uint8_t *event, uint32_t event_len);
+
+void usbh_aoa_run(struct usbh_aoa *aoa_class);
+void usbh_aoa_stop(struct usbh_aoa *aoa_class);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* USBH_AOA_H */ \ No newline at end of file
diff --git a/demo/usb_host.c b/demo/usb_host.c
index 71984188..bc99a4d2 100644
--- a/demo/usb_host.c
+++ b/demo/usb_host.c
@@ -294,3 +294,26 @@ void usbh_msc_stop(struct usbh_msc *msc_class)
#if TEST_USBH_VIDEO
#error "commercial charge"
#endif
+
+#if 0
+#include "usbh_aoa.h"
+
+static struct aoa_string_info deviceinfo = {
+ .acc_manufacturer = "CherryUSB",
+ .acc_model = "CherryUSB",
+ .acc_description = "Android Open Accessory CherryUSB",
+ .acc_version = "1.0",
+ .acc_uri = "http://developer.android.com/tools/adk/index.html",
+ .acc_serial = "CherryUSB"
+};
+
+int aoa_switch(int argc, char **argv)
+{
+ struct usbh_hubport *hport = usbh_find_hubport(0, 1, 1);
+
+ usbh_aoa_switch(hport, &deviceinfo);
+ return 0;
+}
+
+SHELL_CMD_EXPORT_ALIAS(aoa_switch, aoa_switch, aoa_switch);
+#endif \ No newline at end of file