Commit Graph

349 Commits

Author SHA1 Message Date
hathach
a32cb1bb93 clean up pio driver 2022-04-18 17:49:21 +07:00
hathach
d56cde33ef refactor usbd to also use common endpoint claim/release 2022-03-09 17:34:12 +07:00
hathach
a5fb20533c adding tusb_private.h to implement common edpt claim 2022-03-09 17:17:36 +07:00
hathach
708f05668d add tusb_debug.h remove tusb_error.h
move debug utils to new header
2022-03-09 16:44:19 +07:00
hathach
2f593e767c update use of mutex for host 2022-03-09 12:26:56 +07:00
hathach
e08a875d52 add tuh_descriptor_get() and tuh_descriptor_device_get() 2022-03-04 19:26:54 +07:00
hathach
309540473b minor house keeping 2022-02-25 22:26:35 +07:00
hathach
d10326cb4e rename TUSB_OPT_DEVICE_ENABLED to CFG_TUD_ENABLED
TUSB_OPT_DEVICE_ENABLED still usable for backward compatible
2022-02-25 18:35:21 +07:00
hathach
4a5a53b3b8 improve rphort management for usbd 2022-02-25 18:35:21 +07:00
hathach
c5d2c82cbb fix unreachable warnings with keil 2021-12-30 20:59:53 +07:00
Yunhao Tian
dba59217da usbd: supress "statement is unreachable" warning on ARMCC 2021-11-30 17:19:10 +08:00
hathach
a5f516893b more with -Wcast-qual 2021-10-17 16:36:53 +07:00
hathach
0b249618b0 fix -Wcast-qual 2021-10-15 23:54:31 +07:00
Ha Thach
379537cb6d Merge branch 'master' into add_uvc 2021-10-12 22:01:02 +07:00
hathach
a867d87072 rename CFG_TUD_NET to CFG_TUD_ECM_RNDIS 2021-10-05 16:00:07 +07:00
hathach
fdd1e4fbf0 more usbd clean up 2021-10-01 21:52:29 +07:00
kkitayam
97d5d1e491 add files for video class device 2021-09-29 21:23:14 +09:00
hathach
0b31c40b9f Merge branch 'master' into enhance 2021-09-29 16:18:17 +07:00
Jerzy Kasenberg
c62c1433e7 usbd: Workaround for non standard device descriptor request
Windows and Linux host during enumeration requests device
descriptor with request size set to 64 bytes when device
was in default state (no address).
Those systems do not want 64 bytes though since usb descriptors is
only 18 bytes long so they silently expect that only one packet
will be received possibly 18 bytes for EPS > 16 or 8 or 16 bytes
for smaller EP0.

For devices with CFG_TUD_ENDPOINT0_SIZE size 8 or 16 there was
workaround that reduced request size to CFG_TUD_ENDPOINT0_SIZE
and that was enough to satisfy Windows and Linux hosts.

However USBCV testing application also requests device descriptor
but with size set to 18 bytes. Workaround for Window/Linux
prevented USBVC to tests devices with 8 bytes EP0 size since it
send only 8 bytes while application did wanted 18 bytes.

Solution that satisfies both cases it to check if in default state device
descriptor request wants more bytes than descriptor size (18).
If so host is expecting to receive less bytes then requested
and workaround would be applied since Linux/Windows only try
to read one packet.
If 18 bytes was requested as is the case for USBCV, core returns
descriptor in 2 or 3 packets as application expects.
2021-09-24 14:19:04 +02:00
MasterPhi
0ded1c5bac Reset EP flags on close. 2021-09-14 21:08:12 +02:00
hathach
a23944035d correct assoc_itf_count for bth driver 2021-09-15 00:51:01 +07:00
hathach
b474522245 make vendor driver more flexible
- skip additional custom descriptor between interface and endpoints
- can have up to 2 bulk endpoint ( 1 in & 1 out)
2021-09-14 21:30:38 +07:00
hathach
25ea8f9c9e update configuration parser 2021-09-14 21:02:38 +07:00
MasterPhi
3639168066 Fix warning. 2021-09-14 11:58:22 +02:00
hathach
5404d6d8ae usbd pre-compute total interface length without replying on driver open 2021-09-14 12:47:20 +07:00
hathach
27800f7e4f remove connected check for DCD_EVENT_UNPLUGGED since previous bus reset can clear this
implement unplugged detection for trans dimension dcd
2021-09-09 16:01:05 +07:00
hathach
f81368174b add other speed descriptor callback tud_descriptor_other_speed_configuration_cb()
example implement tud_descriptor_device_qualifier_cb() and
tud_descriptor_other_speed_configuration_cb() on high speed device to
fully compliant to usbcv
2021-09-09 15:17:19 +07:00
hathach
d4c56c70a8 minor clean up 2021-09-01 20:01:40 +07:00
hathach
1398226bb5 only attempt to clear if stalled, and stall if cleared 2021-09-01 16:54:03 +07:00
hathach
90dc9bc289 revert previous changes, edpt stall also clear any pending (not complete) transfer 2021-09-01 12:42:45 +07:00
hathach
d047b28aa2 remove set/clear busy flag in set/clear stall since they are different status
note: dcd should resume to prio-stalled queued transfer when unstall
2021-08-31 17:39:54 +07:00
hathach
9394de6ae7 update msc driver to pass MSC BOT error recovery compliant test 2021-08-27 12:38:41 +07:00
hathach
71e77e47fa add dcd_edpt_close_all() for clear existing configured state
correctly responded to TD 9.13 Set Configuration Test
2021-08-26 17:07:03 +07:00
hathach
07adc26ce3 fix usbcv TD 9.4 Interface Descriptor test 2021-08-26 13:07:10 +07:00
hathach
beb1a5c678 minor clean up 2021-08-20 19:39:33 +07:00
hathach
1cef2b6a42 extra common edpt helper for device and host stack
tu_edpt_validate() and tu_edpt_bind_driver()
2021-08-20 18:01:10 +07:00
Ha Thach
830757d9ce Merge pull request #1020 from hathach/rp2040-disconnect-suspend
Add Rp2040 suspend & resume support
2021-08-18 16:45:35 +07:00
hathach
9b869463dd skipped suspend/resume if not connected 2021-08-17 17:00:53 +07:00
hathach
ab2eec77d4 complete suspend, resume, remote wakeup for nrf52 2021-08-16 20:22:14 +07:00
hathach
d52b981c3a revert ready() check in claim (do it later in separated PR) 2021-08-12 17:07:39 +07:00
hathach
17ef9f4843 add ready check for edpt claim 2021-08-12 15:54:04 +07:00
hathach
8cd23489d5 update endian 2021-07-22 17:49:39 +07:00
hathach
b35ad6edcb clean up max packet size endian 2021-07-22 17:04:55 +07:00
hathach
fa0936bf58 Merge branch 'CCRX_Port' of https://github.com/Wini-Buh/tinyusb into Wini-Buh-CCRX_Port 2021-07-22 16:48:18 +07:00
Ha Thach
1c2bc47c07 Merge pull request #950 from HiFiPhile/dfu
DFU improvements
2021-07-22 11:17:01 +07:00
hathach
37cac414f8 fix ci 2021-07-22 00:12:01 +07:00
hathach
a226dbaa4d add dcd_attr for DCD_ATTR_ENDPOINT_MAX
could be useful with more dcd specific attribute
2021-07-22 00:12:01 +07:00
hathach
3960beece0 rename CFG_TUD_DFU_MODE to simply CFG_TUD_DFU 2021-07-15 20:52:58 +07:00
hathach
daca9e520b wrap up DFU update 2021-07-15 20:47:50 +07:00
hathach
ca98996e1f better support for hid device set/get protocol
add caplock detection for hid_composite
2021-07-01 22:46:39 +07:00