diff options
author | Wei-Han Chen <stimim@google.com> | 2017-12-11 14:41:46 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-01-31 08:29:46 -0800 |
commit | b245e71e82d4da9b1be27c6de45da1d2bd460751 (patch) | |
tree | 61bc0d5203c1aa46b87e97f63db2505a0e9fc8f1 /include | |
parent | 924d21d904b9f2c640ee5b0ccabcf78200456a0f (diff) | |
download | chrome-ec-b245e71e82d4da9b1be27c6de45da1d2bd460751.tar.gz |
stm32: add usb_isochronous
Templates for USB isochronous implementation. Current implementation
only supports TX transmit. Example of usage can be found in CL:803414.
Basically, declare an USB isochronous interface by
USB_ISOCHRONOUS_CONFIG_FULL(<NAME>,
<INTERFACE_NUM>,
<USB_CLASS>,
<USB_SUBCLASS>,
<SUB_PROTOCOL>,
<USB_STR_FOR_INTERFACE_NAME>,
<USB_EP_NUM>,
<PACKET_SIZE>,
<TX_CALLBACK>,
<SET_INTERFACE>)
where <PACKET_SIZE> is size of each USB packet, <TX_CALLBACK> is called
when USB hardware has completed a packet. The buffer that USB is not
currently using will be passed to <TX_CALLBACK>, allow applications to
write next packet to it.
When a SET_INTERFACE packet is received, <SET_INTERFACE> will be called
with bAlternateSetting and bInterfaceNumber.
We will declare interface descriptor with bAlternateSetting = 0 and 1
for you, if you need more alternate settings, you need to declare by
yourself.
BUG=b:70482333
TEST=manually on reworked staff board
Signed-off-by: Wei-Han Chen <stimim@google.com>
Change-Id: Ic6d41da6ddd7945edf0bdfff55ede38a97661783
Reviewed-on: https://chromium-review.googlesource.com/818853
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h index 4b2364f7e7..5b2697ae93 100644 --- a/include/config.h +++ b/include/config.h @@ -2830,6 +2830,9 @@ /* Compile chip support for the USB device controller */ #undef CONFIG_USB +/* Support USB isochronous handler */ +#undef CONFIG_USB_ISOCHRONOUS + /* Support USB blob handler. */ #undef CONFIG_USB_BLOB |