Commit Graph

448 Commits

Author SHA1 Message Date
hathach
315dae6a85 finally fixed fsdev setup handling, which cause race condition for ch32v203 2024-08-05 17:43:27 +07:00
hathach
46fd822990 increase freerto min task stack for some stm32 2024-08-01 14:24:23 +07:00
hathach
a5bc0430f7 fix race condition where reset event cleaar setup count 2024-07-25 16:49:01 +07:00
hathach
8183433600 fix compile with tud_vendor_control_xfer_cb() and check tud_descriptor_device_cb() 2024-07-19 21:05:10 +07:00
hathach
e92acf0a91 also migrate tud_descriptor_device_qualifier_cb() / tud_descriptor_other_speed_configuration_cb() 2024-07-19 20:53:23 +07:00
Frank Voorburg
d040644b6c Additional fix related to issue #1018. Corrects the usage of TU_ATTR_WEAK for the Keil
compiler for the callback functions:

* tud_descriptor_bos_cb()
* tud_vendor_control_xfer_cb()
* tud_mount_cb()
* tud_umount_cb()
* tud_suspend_cb()
* tud_resume_cb()

Without the fix for the first two functions, the USB device won't enumerate properly, if
the device makes use of a BOS description. For example when using a Microsoft OS 2.0
platform capability descriptor to set a specific Device Interface GUID for WinUSB.

The fix for the other four functions were added, because it's probably just a matter of
time before someone runs into the same problem with those callback functions.
2024-07-19 20:43:26 +07:00
hathach
6fb6602a09 - add tud_cdc_n_ready() though not used
- usbd now change _usbd_dev.cfg_num before calling driver's open()
2024-07-19 18:08:04 +07:00
hathach
be18af8235 revert changes to usbds configuration_reset() (deal with it in separated PR) 2024-07-19 17:10:53 +07:00
HiFiPhile
772398f6ea Save setup_count on bus reset. 2024-07-19 17:02:57 +07:00
HiFiPhile
a1fd43ebaf Clear _usbd_dev prior to driver reset. 2024-07-19 17:02:56 +07:00
hathach
4ce1cce40a simplify dwc2 test mode
- all dwc2 ip seems to support test mode in both fs/hs -> remove TUP_USBIP_DWC2_TEST_MODE
- remove dcd_check_test_mode_support(), all should be supported
- move enum tusb_feature_test_mode_t to tusb_types.h
2024-07-12 20:17:14 +07:00
HiFiPhile
003a5d4f55 Merge branch 'master' into additional_dcd_sof_enable 2024-05-27 20:10:44 +02:00
HiFiPhile
a9745c9818 Fix tud_sof_cb_enable() return type. 2024-05-27 20:35:35 +10:00
HiFiPhile
8f0459c89e Fix frame count in tud_sof_cb(). 2024-05-27 20:35:35 +10:00
hathach
4ce439a75a add ch32 support for fsdev driver. v20x can select fsdev or usbfs with make/cmake PORT=0/1. default to fsdev 2024-05-24 13:58:44 +07:00
hathach
927015baae wch usbfs/usbhs need to specify which driver to use. for v307 default to highspeed 2024-05-24 11:38:44 +07:00
HiFiPhile
e250b82377 Adjust logic. 2024-05-13 22:26:19 +02:00
HiFiPhile
0fce7d1f54 Merge branch 'master' into test-mode-support 2024-05-13 21:08:11 +02:00
HiFiPhile
36ba42cc0f Little optimization. 2024-05-09 22:57:25 +02:00
HiFiPhile
eea7d7b327 Fix CI. 2024-05-09 22:08:41 +02:00
HiFiPhile
376b43906a Convert to bit-field since it's more reliable. 2024-05-09 21:55:28 +02:00
HiFiPhile
16cd92fbf1 Don't forget to queue SOF event. 2024-05-09 21:47:22 +02:00
HiFiPhile
ca479d6e4b Disable SOF on configuration change. 2024-05-09 18:44:27 +02:00
HiFiPhile
11b5b2af51 Move sof status into usbd_device_t. 2024-05-09 18:37:51 +02:00
HiFiPhile
c8beaad2b1 Switch to weak default implementation. 2024-05-09 18:07:22 +02:00
HiFiPhile
6c286e3b02 Merge branch 'master' into patch-5 2024-05-09 18:00:52 +02:00
Ha Thach
ba6babf570 Rework ci (#2631)
* add name field to usbd_class_driver_t
* ci: use set matrix py script
* add riscv32 and cmake support for ch32v307, fomu,  gd32vf103
* update build_cmake.py to take --family --board --toolchain
* separate hil test to its own workflow
* move esp32 board into separated hil json
* add make build to ci
* remov build_make.py
* build.py support esp32 board
* setup toolchain support esp-idf
* fix missing click
* merge family in matrix build to reduce jobs
* skip cifuzz since it still has issue with get_deps and click
2024-05-09 20:43:46 +07:00
Ha Thach
f3781a45d8 Merge pull request #1662 from Erlkoenig90/check-usbd-queue-overflow
Check for event queue overflow in usbd / dcd_event_handler
2024-04-16 10:58:15 +07:00
hathach
189080b684 add TU_ASSERT() to check for adding new usb event 2024-04-16 10:40:24 +07:00
hathach
5dabef79ee don't check local endpoint stalled status, just carry the request for host. 2024-04-16 10:27:16 +07:00
NConrad
9588c3fac9 USBD: When SET_FEATURE(ENDPOINT_HALT), the DTOG must be reset. 2024-04-16 10:19:16 +07:00
hathach
be25a3fc20 revert usbd driver name change to be backward compatible 2024-04-08 22:56:22 +07:00
hathach
c3c0648456 add class driver deinit 2024-04-08 22:07:56 +07:00
Ha Thach
5738757e2c Merge pull request #2421 from antoniovazquezblanco/debug
Log outbound xfer bytes while in debug
2024-04-04 18:34:26 +07:00
Ha Thach
802ad885ab minor update 2024-04-04 17:15:38 +07:00
hathach
5630030a22 improve uvc debug message 2024-03-20 17:55:31 +07:00
hathach
834e2c9560 usbd only process last setup packet in the event queue 2024-03-13 11:46:23 +07:00
hathach
5653232144 reformat code 2024-03-11 21:59:30 +07:00
Rocky04
d0373f4749 Opt-out for USB Test-Mode 2024-02-19 17:44:18 +00:00
IngHK
4d4e20b71e missing \r\n after TU_LOG_BUF => moved \r\n to tu_print_buf() 2024-02-08 12:00:44 +01:00
Antonio Vázquez Blanco
0531027b57 usbd: log outbound xfer bytes in debug 2024-02-07 13:06:41 +01:00
Rocky04
e0ebece2c7 Missed static keyword 2024-01-15 18:23:59 +01:00
Rocky04
78a1d4c482 Merge branch 'master' into test-mode-support 2024-01-15 16:27:22 +01:00
Rocky04
c3e96e667f Change to control complete cb 2024-01-15 15:10:46 +00:00
Rocky04
1755bba509 Add DWC2 Test Mode SUpport 2024-01-15 12:47:13 +00:00
hathach
290f4bea91 - change tuh_event_hook_cb, tud_event_hook_cb to weak default implementation
- change code style
2024-01-12 15:47:08 +07:00
hathach
188fbd8ed9 add optional event hook callback tud_event_hook_cb() and tuh_event_hook_cb() 2023-11-24 18:21:24 +07:00
Angus Gratton
68894398af Add optional hooks for DCD and HCD events
These are intended to allow bare metal platforms with one-shot scheduling
capabilities to schedule the TinyUSB task handlers whenever they know there is
work for them to do.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-11-23 14:42:51 +11:00
Rocky04
c87fba1dc3 Bug 2023-09-14 19:03:16 +00:00
Rocky04
46977a011d Fixign errors 2023-09-14 18:53:55 +00:00