Commit Graph

353 Commits

Author SHA1 Message Date
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
Wini-Buh cb0f1d98db Merge remote-tracking branch 'origin/master' into CCRX_Port
# Conflicts:
#	src/portable/renesas/usba/dcd_usba.c
#	src/tusb_option.h
2021-06-29 00:19:30 +02:00
Wini-Buh 51c6444e1d final clean up 2021-06-22 23:49:24 +02:00
hathach 832d22d7ad force single buffered for device mode, out endpoint 2021-06-17 01:55:35 +07:00
Wini-Buh 60d8ecbfe6 clean up 2021-06-11 22:36:17 +02:00
Wini-Buh 1c23462b43 weak atrribute work around removed from CCRX_Port 2021-06-11 22:25:36 +02:00
hathach c7f51cde40 implement usbh_edpt_busy (WIP), remove hcd_edpt_busy 2021-06-10 17:19:21 +07:00
Wini-Buh 5a554508ca Merge remote-tracking branch 'upstream/master' into CCRX_Port 2021-06-03 22:17:30 +02:00
Wini-Buh b4f092ec74 Adaptations for Renesas CCRX toolchain and Rx72N controller performed 2021-05-29 21:23:39 +02:00
hathach faa31152b4 rename usbd_edpt_iso_xfer to usbd_edpt_xfer_fifo 2021-05-26 20:34:06 +07:00
Jeremiah McCarthy ce59d69520 Merge remote-tracking branch 'official/master' 2021-05-25 09:27:35 -04:00
hathach db8ea7ea1c clean up 2021-05-18 12:58:24 +07:00
hathach 3a7f8b3ac3 separte tusb_init/inited() to tud/tuh init/inited
add rhport to tud_init()
2021-05-18 12:58:24 +07:00
hathach 2666e1efec add tuh_inited() and tud_inited() 2021-05-18 12:58:24 +07:00
Jeremiah McCarthy 05892a5a1e Merge branch 'master' of github.com:xmos-jmccarthy/tinyusb 2021-05-06 12:18:55 -04:00
hathach b15d126d59 lpc55 improve multiple controller support
port1 highspeed requires USB_RAM
2021-04-24 13:36:05 +07:00
hathach 9ecb91e1bd fix build with LOG=2 2021-04-15 23:47:28 +07:00
Jeremiah McCarthy 7b45b38fe4 Remove DFU mode and rt 2021-04-12 11:17:01 -04:00
Jeremiah McCarthy 2e2dc7bdc5 Revise per initial comments
Returns the RT driver to the function state of previous iteration, which
did not support the will_detach.  Behavior should be fine without this
feature.  This removes much of the added bloat to track state, and
handle requests in the APP_DETACH state which is no longer required.

Removes the optional bloat added to the RT driver, such as responding to
GETSTATE requests.

Fixes the DFU Mode to extract the attr bits from the functional
descriptor when opened.

Fixes some incorrect bitwise if checks.

Also, updates some naming of functions to be consistent with the rest of
the library.
2021-04-07 17:05:04 -04:00
Jeremiah McCarthy c39b7b8177 Add DFU runtime and mode "class"
With the runtime and mode portions in separate classes, a single
application should only be building with one or the other enabled.  In
some applications both might be desired at build time.

The CFG_TUD_DFU_RUNTIME_AND_MODE option creates a DFU class, which asks
the application which mode to initialize to.  This allows a runtime
change between RT and DFU mode, by just reinitializing tusb.
2021-04-05 17:52:33 -04:00
Jeremiah McCarthy bc2cb99780 Remove unreachable callback 2021-04-05 17:06:27 -04:00
Jeremiah McCarthy c5b8ef1529 Separate DFU RT and Mode. Untested 2021-04-05 16:32:58 -04:00
Jeremiah McCarthy 1138f8cc70 Add DFU Class per Version 1.1 Spec 2021-03-26 15:30:43 -04:00
hathach 794083b647 Merge branch 'master' into edpt_ISO_xfer 2021-03-10 17:10:49 +07:00
hathach eeea19c0ab usbd ack SET_INTERFACE if it is not implemented by class driver. 2021-03-10 11:33:03 +07:00
Reinhard Panhuber 7b8a08d2e1 Rename dcd_edpt_iso_xfer() to dcd_edpt_xfer_fifo() 2021-03-02 20:00:39 +01:00
hathach 9d5e369170 rp2040 add disconnection detection
- also use dcd_event_bus_reset()
- Add TODO for suspend, resume later on (need to test with/without vbus
detection).
2021-03-02 23:24:36 +07:00
Reinhard Panhuber cdf600048f Merge remote-tracking branch 'upstream/master' into edpt_ISO_xfer 2021-02-12 18:05:20 +01:00
Ha Thach 04ab6b4082
Merge pull request #648 from hathach/rename-dfu-rt-to-runtime
Rename dfu rt to runtime
2021-02-11 15:29:55 +07:00
Ha Thach d4281291e5
Merge pull request #647 from hathach/correct-fs-bulk-epsize
more epsize checking per type
2021-02-11 12:36:19 +07:00
hathach e12c25ec2c rename dfu_rt to dfu_runtime for easy reading
also rename tud_dfu_rt_reboot_to_dfu to tud_dfu_runtime_reboot_to_dfu_cb
2021-02-11 12:05:22 +07:00
hathach 9812cfc6c6 clean up 2021-02-11 11:48:34 +07:00
hathach 919bb9ce38 more epsize checking per type 2021-02-11 11:45:24 +07:00
hathach 49bc97b0ca remove the requirement of std SET/CLEAR_FEATURE must not return zlp status 2021-02-11 11:22:02 +07:00
Reinhard Panhuber 84406f1654 Rework audio driver 2021-01-31 19:08:23 +01:00
Reinhard Panhuber 93ec6f3735 Adjust #include "dcd.h" to "device/dcd.h", the same for usbd.h in usbd.c 2021-01-19 17:10:08 +01:00
Reinhard Panhuber 56edc2b261 Change names from edpt_ISO_xfer to edpt_iso_xfer 2021-01-19 10:50:19 +01:00
Reinhard Panhuber 2284db1fb5 Add usbd_edpt_ISO_xfer() 2021-01-18 17:14:17 +01:00
Reinhard Panhuber 485d8fa77e Merge remote-tracking branch 'upstream/master' into edpt_ISO_xfer 2021-01-09 12:10:08 +01:00
hathach 6e6e6265e4 use dcd_event_bus_reset() with speed to replace bus_signal 2021-01-08 22:34:36 +07:00
Reinhard Panhuber 09d8ead4b8 Start changes - not yet finished 2021-01-04 12:02:08 +01:00
HiFiPhile c8dc7f807f Fix more warnings.
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2020-12-22 10:13:10 +01:00
hathach 148eea1417 add tud_connected()
which return true as long as we receive the very first SETUP packet from
host.
2020-11-24 21:49:12 +07:00
hathach cebb375eac migrate audio device to new control xfer cb 2020-11-20 17:20:05 +07:00
hathach c4bc8b2561 migrate net device to new control xfer cb 2020-11-20 16:59:33 +07:00
hathach 9f853685ae migrate bth device to new control xfer cb 2020-11-20 16:13:58 +07:00
hathach 61ad7bef71 migrate vendor device to new control xfer cb 2020-11-20 15:50:11 +07:00
hathach 3cc1979adb migrate dfu runtime device to new control xfer cb 2020-11-20 15:42:32 +07:00
hathach 7df979673d migrate usbtmc device to new control xfer cb 2020-11-20 15:38:56 +07:00
hathach 8813f9d3b8 clean up 2020-11-20 15:33:05 +07:00
hathach e2abb089f4 migrate midi device to new control xfer cb 2020-11-20 15:30:36 +07:00
hathach dc9a309839 migrate hid device to new control xfer cb 2020-11-19 22:00:49 +07:00
hathach dd07fecc5f migrate cdc_device to new control_xfer_cb 2020-11-19 21:26:06 +07:00
hathach 3c31d08051 merge class driver control_request & control_complete to control_xfer_cb()
migrated msc_device
2020-11-19 21:01:33 +07:00
Reinhard Panhuber 032e84c9be Revert dcd_alloc_mem_for_conf() but keep changes from @kasjer for ISO EP
Add tud_audio_set_itf_close_EP_cb()
2020-10-09 19:50:05 +02:00
hathach d41248900b Merge branch 'uac2' of https://github.com/PanRe/tinyusb into PanRe-uac2 2020-10-06 22:32:22 +07:00
Jerzy Kasenberg b2ce7a39b0 device: Make number of endpoints configurable
Currently number of endpoints was hard coded to 8.
NRF52 has 9 IN and 9 OUT endpoints.
ISO endpoints are 0x08 and 0x88 and without this change those
two ISO endpoint could not be used.
2020-10-01 09:22:49 +02:00
Reinhard Panhuber 142871654e Merge remote-tracking branch 'upstream/master' into uac2 2020-09-28 18:08:39 +02:00
hathach 9c0d15fc43 more const 2020-09-14 22:23:59 +07:00
hathach 23e6ee2ea2 cdc device: claim endpoint before checking fifo availability
- add pre-check to reduce mutex lock in usbd_edpt_claim
2020-09-14 22:14:31 +07:00
hathach ce4a9b9c3a clean up 2020-09-11 00:14:07 +07:00
hathach 33f0a18523 update cdc edpt read 2020-09-09 16:25:31 +07:00
hathach 8b9893cada introduce optional usbd_edpt_claim, usbd_edpt_release which can be used to gain exclusive access to usbd_edpt_xfer 2020-09-09 15:48:11 +07:00
Reinhard Panhuber 6309364722 Merge remote-tracking branch 'upstream/master' into uac2
Conflicts:
	src/device/usbd.c
	src/device/usbd.h
	src/portable/st/synopsys/dcd_synopsys.c
2020-08-16 14:08:24 +02:00
hathach 01b9b77d3b allow application driver to overwrite built-in one
- position application driver before built-in
- remove dcd.h from public include.
2020-08-07 14:47:32 +07:00
hathach 9df8057702 Merge branch 'master' into add-app-driver 2020-08-07 12:13:13 +07:00
hathach acde49ccc9
enable pull-up in dcd_init() instead of usbd 2020-08-01 20:14:58 +07:00
Reinhard Panhuber 01903a4a6d Implement dynamic reallocation of RX and TX fifos for EP0.
Tested with EP0 size 8/16/32/64.
2020-07-27 21:03:20 +02:00
Reinhard Panhuber e047fbe8fb Merge remote-tracking branch 'upstream/master' into uac2 2020-07-25 14:26:24 +02:00
Ha Thach be744e1e01
Merge pull request #466 from chang196700/feature/string_desc_msos
Remove 0xEE index string if statement & change TU_ASSERT to TU_VERIFY
2020-07-21 20:25:08 +07:00
Chang Feng 5cd654838b
Remove 0xEE index string if statement & change TU_ASSERT to TU_VERIFY
Signed-off-by: Chang Feng <chang_196700@hotmail.com>
2020-07-19 19:13:17 +08:00
hathach 706413f751 add tud_speed_get()
- define both fs and hs configuration descriptor
- rename CFG_TUD_CDC_EPSIZE to CFG_TUD_CDC_EP_BUFSIZE with default size of 64 for FS, and 512 for HS
2020-07-16 00:44:09 +07:00
hathach ab75998316 Merge branch 'master' into add-stm-hs 2020-06-30 01:55:57 +07:00
Reinhard Panhuber 28505cf03e Merge branch 'master' into uac2
Conflicts:
	src/device/usbd.c
2020-06-20 11:10:35 +02:00
Reinhard Panhuber ada82b840f Get update from tinyusb. 2020-06-20 10:51:21 +02:00
Mengsk 57b553e023 Fix IAR warnings.
Pa039 : use of address of unaligned structure member.
Pe188: enumerated type mixed with another type.
2020-06-17 10:08:33 +02:00
Reinhard Panhuber bc7e24b659 Fix wrong comment for IAD checks. 2020-06-14 14:22:10 +02:00
hathach 95966c2201 improve usbd log for control transfer 2020-06-14 18:29:02 +07:00
Reinhard Panhuber b25bbf4776 Fix alignment. 2020-06-14 12:58:16 +02:00
Reinhard Panhuber 3012175351 Fix alignment. 2020-06-14 12:57:00 +02:00
Reinhard Panhuber 862d1667f0 Fix alignment. 2020-06-14 12:55:52 +02:00
Reinhard Panhuber 930817221d Merge branch 'fix-too-strict-iad-checks' into uac2
Conflicts:
	src/device/usbd.c
2020-06-14 12:36:59 +02:00
Reinhard Panhuber 48b2e6cf78 Fix too strict checks on subclass and interface of iad descriptor. 2020-06-13 13:51:50 +02:00
Reinhard Panhuber 4362665fb3 Fix mic audio descriptor, fix too strict check on IAD desc. in usbd.c 2020-06-13 12:36:05 +02:00
Reinhard Panhuber d2f1bb58b3 Merge branch 'master' into uac2 2020-06-11 14:35:44 +02:00
hathach e92118635c adding speed detect on bus reset 2020-06-01 13:40:18 +07:00
hathach f771afe6af fixed EP0 size to 64 since LS is not supported in device mode
- set turn-around and report actual speed in Enum Done
- add dcd_event_bus_reset() helper to report speed
2020-05-31 23:43:29 +07:00
Ha Thach 5efeaf2ac1
Merge pull request #413 from kasjer/kasjer/ble-over-usb
Bluetooth HCI transport over USB
2020-05-31 15:07:56 +07:00
hathach d6d29897f3 add get device qualifier descriptor 2020-05-28 23:16:16 +07:00
Jerzy Kasenberg 56d46483e4 Add bt hci device class
Code implements USB transport for bluetooth HCI.
2020-05-28 10:58:49 +02:00
Jerzy Kasenberg 077437b3dc Add non standard request handling in class
For some reason bluetooth stack implementations send class requests
to device instead of interface.
To implement HCI interface over USB non device addressed requests
for class need to be handled.
2020-05-28 10:11:37 +02:00
hathach e340404968
changing usbd driver open() return type, add max_len
only done with cdc and msc, push this interim for feedback first
2020-05-27 19:01:59 +07:00
hathach d4bf777c94 try to get synopsys work with OTG HS + external PHY 2020-05-27 11:01:33 +07:00
Reinhard Panhuber 9be2f1bf3d Add basic UAC2 structure - untested 2020-05-22 12:09:34 +02:00
hathach 88a455a9b9 added tud_task_event_ready()
to check if there is pending events in the tud task without executing
it. Useful to check before entering low power mode with WFI/WFE
2020-05-20 14:31:45 +07:00
hathach 6f4b6a1d03 remove the use of TU_VERIFY_HDLR 2020-04-29 11:31:27 +07:00
hathach c14c0cfc9f support class drivers implemented by application 2020-04-29 10:49:58 +07:00