Commit Graph

480 Commits

Author SHA1 Message Date
d2f1b1899d Actually exit the loop in addition to logging. ENOTENOUGHCOFFEE 2026-02-01 22:29:52 +01:00
b73df6c22e Limit events processed by tud_task_ext() / tuh_task_ext() 2026-02-01 21:08:03 +01:00
b93d463afa fix rusb2 hcd_port_connect_status() using line state, add post root reset delay for stable speed detection 2026-01-03 23:54:05 +07:00
ebf7ce76cc minor update 2025-12-15 17:15:39 +07:00
0355fa8819 Merge branch 'master' into enum_catch 2025-12-15 16:05:24 +07:00
fa36515e6f Merge branch 'refs/heads/master' into enum_catch 2025-12-15 15:31:55 +07:00
80886fb32a Merge branch 'refs/heads/master' into hcd_fsdev 2025-12-13 14:56:15 +07:00
b73003745f move host hacked bulk mps out of tu_edpt_validate() 2025-12-11 16:41:33 +07:00
ef018e364e refactor usbh_class_driver_t's open() to return number of driver len instead of bool. help to simplify parsing configuration 2025-12-11 15:58:10 +07:00
97c5151b34 Update note
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-11-30 15:57:50 +01:00
07ff25eb1e Add max nak config
Signed-off-by: Zixun LI <admin@hifiphile.com>
2025-11-27 22:38:30 +01:00
e5d775def8 usbh: detach existing device first if an attach event is received
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-11-27 19:11:21 +01:00
66ab814520 usbh: watch hub status before driver config
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-11-26 23:34:56 +01:00
c05d809e3e usbh: Stop enumeration gracefully if EP0 can't be open
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-11-26 23:06:15 +01:00
652342b57b fix more alerts found by pvs-studio 2025-11-07 23:50:16 +07:00
22f01aea0d fix more warnings/alerts 2025-11-03 15:14:52 +07:00
d92b810df7 fix Identifiers that start with '__' or '_[A-Z]' are reserved.
fix compiling with nuc family
2025-10-28 14:14:01 +07:00
e621f2f77b set driver count to 0
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-09-18 19:09:10 +02:00
369a1ff515 Update weak callbacks to new syntax
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-09-17 22:48:59 +02:00
99bee6a900 ehci: fix removed qhd get reused
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-09-12 15:00:19 +02:00
5755afa690 Fix some IAR warnings
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-09-12 11:39:41 +02:00
77e142ed76 Merge branch 'master' into fork/HiFiPhile/async_io 2025-06-30 21:09:40 +07:00
d789a87a7d Merge branch 'master' into async_io
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-06-22 17:19:08 +02:00
5c974cee23 usbh make TU_API_SYNC() public, to implement sync() API, change return of sync API from uint8_t to tusb_xfer_result_t 2025-06-20 12:51:29 +07:00
9503883ba7 usbh: add new API tuh_descriptor_get_device_local()
cdc host: remove the local desc_dev and the get_device descriptor call for ftdi and pl2303
2025-06-18 23:44:03 +07:00
d533650105 Fix TUH_EPSIZE_BULK_MPS macro
TUH_EPSIZE_BULK_MPS should be set based on TUH_OPT_HIGH_SPEED, not TUD_OPT_HIGH_SPEED
2025-06-09 16:56:02 +02:00
e41a63c60d add usbh_spin_lock/unlock() use spinlock instead of atomic flag for hcd max3421 2025-05-21 15:27:18 +07:00
fe4446090e fix dual example for rp2350 conflict printf and cdc_printf 2025-05-13 16:27:26 +07:00
baf67539fc fix warnings, minor clean up 2025-05-13 12:16:22 +07:00
809af3e74c chore(usbh): change removing_hubs to array instead of bitmask 2025-05-06 15:58:07 +07:00
bc37ed6e3e usbh: force removed device in the same bus info, before setting address.
usbh: move code around
hub: queue status endpoint for detach/remove event
2025-05-06 15:23:23 +07:00
2abd3c54c4 define hcd_devtree_info_t forr backward compatible 2025-04-29 20:49:47 +07:00
e7d4b5c9e7 add enum for set addr recovery 2025-04-29 20:16:50 +07:00
42d4f7c81e remove the old attach duplicated logic, debouncing skip should take care of it. 2025-04-28 15:10:03 +07:00
2c1414b4c1 usbh: add roothub debounncing flag to ignore attach/remove event on the roothub that is currently doing debouncing delay 2025-04-28 14:59:32 +07:00
b5b7a4be60 hub check status before get 1st device descriptor 2025-04-24 22:21:38 +07:00
093720f60b fix build 2025-04-24 18:08:00 +07:00
0f784e8a07 refactor hub driver and move port reset on connection change to usbh.
hub: add hub_port_get_status_local(), ignore resp in hub_port_get_status(pot != 0)
usbh properly deboucning with hub/rootport accordingly to usb specs, also add 10ms of reset recovery
2025-04-24 17:59:45 +07:00
89f8d0cffb add tuh_address_set() API
minor rename and move code around
2025-04-24 10:41:00 +07:00
9a1f690ec4 move usbh ctrl_xfer into usbh_data 2025-04-23 16:50:58 +07:00
a2da575793 rename and expose tuh_bus_info_get() to application 2025-04-23 16:03:40 +07:00
741cb3cf02 rename hcd_devtree_info_t to tuh_bus_info_t, hcd_devtree_get_info to hcd_bus_info_get
streamline bus info to usbh_devies, also replace dev0 (renamed to dev0_bus)
2025-04-23 12:35:32 +07:00
b6170c965f Compile fix.
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-04-22 21:14:04 +02:00
8f9ef7dfbe reduce ENUM_DEBOUNCING_DELAY_MS to 200ms
replace dev0.enumerating by enumerating_daddr for better clean up on unplugging while enumerating
move controller_id & enumerating_daddr into _usbh_data struct
2025-04-22 22:09:06 +07:00
940fe43e68 move removing dev0 to process_removing_device() 2025-04-22 17:33:37 +07:00
7ba63a6302 Also cleanup unaddressed device.
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-04-22 16:58:13 +07:00
3c4e6a779d Move decouncing delay before USB reset.
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-04-22 16:58:12 +07:00
9f096ac56b host: fix enumerate racing
- if a previous enumeration failed _ctrl_xfer status could stuck, it needs to be cleared before next attempt.
- after _dev0.enumerating is reset in hcd_event_handler(), if an attach event arrived before _ctrl_xfer clean up in remove event, a racing condition will happen.

Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-04-22 16:58:10 +07:00
5725d33121 improve usbh stability with failed setup send, prevent control stage locked out 2025-04-21 20:39:23 +07:00
b3d20442e2 Fix usbh racing later.
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-04-18 14:57:53 +02:00