Commit Graph

311 Commits

Author SHA1 Message Date
hathach 103309b88b
Merge branch 'master' of github.com:hathach/tinyusb into zhangslice-master
examples/device/hid_composite_freertos/src/FreeRTOSConfig/FreeRTOSConfig.h
2021-09-29 15:27:41 +07:00
hathach 73872a5df0 add CFG_TUSB_OS_INC_PATH for os include path
useful for freertos/ prefix with esp IDF
2021-09-25 16:16:55 +07:00
hathach 3333703d25 Merge branch 'master' into zhangslice-master 2021-09-18 13:35:26 +07:00
hathach cdc63459eb esp32sx implement dcd_remote_wakeup(), fully compliance to chapter9 test suite 2021-09-13 16:49:38 +07:00
hathach ad8c0ee818
nxp tdi: enhance qhd using DCD_ATTR_ENDPOINT_MAX 2021-09-09 20:26:03 +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 fc889ece74
rp2040 correct ep set/clear stall
- stall will remove pending (not complete) transfer. Correct reset data
toggle when clear stall.
- remove buf ctrl debug code
2021-09-01 16:52:27 +07:00
hathach 9394de6ae7 update msc driver to pass MSC BOT error recovery compliant test 2021-08-27 12:38:41 +07:00
hathach 97703587d9 improve host configuration parsing
- remove driver class code binding
- fully support IAD
- auto calculate total length for interface descriptor for driver
2021-08-20 19:08:38 +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
hathach 98e4ba6a12 correct midi available with already stream read 2021-08-02 18:55:12 +07:00
hathach 15112fdbba clean up compiler 2021-07-22 22:10:48 +07:00
hathach c4da1abb1e rename bit filed order
clean up packed/bit order begin end
2021-07-22 17:30:08 +07:00
hathach 4e50ceba48 rename packed begin/end 2021-07-22 17:07:39 +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 daca9e520b wrap up DFU update 2021-07-15 20:47:50 +07:00
hathach 95ded08e3b simplify upload request 2021-07-14 16:42:12 +07:00
hathach 137dff620b add option to silent a driver log 2021-07-13 20:41:28 +07:00
MasterPhi 7321972380 Force unsigned compare on advance_pointer. 2021-06-30 20:26:27 +02:00
Mengsk 2b2549b573 Fix fifo overflow correction. 2021-06-30 17:00:56 +02:00
hathach 3eec011a7c add tud_vendor_control_request_cb() to poisoned list 2021-06-29 17:28:35 +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
Ha Thach 6e939de9d6
Merge pull request #891 from hathach/host-rp2040-double-buffer
RP2040 double buffer
2021-06-28 17:39:09 +07:00
Wini-Buh 51c6444e1d final clean up 2021-06-22 23:49:24 +02:00
Wini-Buh c5f6b57755 Merge remote-tracking branch 'upstream/master' into CCRX_Port 2021-06-22 23:21:01 +02:00
Ned Konz 76336a67a0 Changed order of struct initializer to avoid compiler error 2021-06-18 14:50:55 -07:00
hathach 82618d2d5f fix build with mm32 board 2021-06-18 17:18:11 +07:00
hathach f38c460433 fix ep tx with double buffered 2021-06-13 17:19:14 +07:00
hathach a4ad064e63 increase example CFG_TUH_HID from 2 to 4 2021-06-12 14:20:09 +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 572d986a02 improve usbh 2021-06-11 17:14:22 +07:00
hathach d81a37d1be fix enum overflow with msp430 2021-06-09 12:10:44 +07:00
Wini-Buh 5a554508ca Merge remote-tracking branch 'upstream/master' into CCRX_Port 2021-06-03 22:17:30 +02:00
hathach 54107100bb fix missing TU_LOG symbol 2021-06-02 00:26:50 +07:00
hathach 6e2cf2a3ee clean up log 2021-06-02 00:10:35 +07:00
hathach eb8ca14bf8 add level 3 log for info, add generic TU_LOG() 2021-05-30 22:19:46 +07:00
Wini-Buh b4f092ec74 Adaptations for Renesas CCRX toolchain and Rx72N controller performed 2021-05-29 21:23:39 +02:00
hathach f384d6f67e
more with clean up 2021-05-27 18:11:12 +07:00
hathach 9736e54734
include clean up 2021-05-27 17:40:39 +07:00
hathach c7cecf28c8
clean up 2021-05-27 00:16:45 +07:00
hathach dbef50f8ff Merge branch 'master' into xmos-jmccarthy-master 2021-05-26 17:32:49 +07:00
hathach 954056da0c
fix warnings cast function type for nrf, fix pico osal warning
add TODO for overflow in tusb_fifo.c
2021-05-25 21:02:40 +07:00
Jeremiah McCarthy ce59d69520 Merge remote-tracking branch 'official/master' 2021-05-25 09:27:35 -04:00
hathach 13de8f5d98 minor clean up 2021-05-10 19:15:46 +07:00
Jeremiah McCarthy 05892a5a1e Merge branch 'master' of github.com:xmos-jmccarthy/tinyusb 2021-05-06 12:18:55 -04:00
Ha Thach 42a1d2f3b9
Merge pull request #804 from hathach/audio_make_dma_ready
Implement functions to allow for DMA usage in audio driver.
2021-05-02 15:29:38 +07:00
hathach 18c35bb89e some text fomarting, update unit test to test get buffer info for fifo 2021-05-02 15:01:28 +07:00
Reinhard Panhuber 5add664874 Remove n from tu_fifo_get_write_info() and fix bug in vendor class 2021-04-30 17:37:14 +02:00
Reinhard Panhuber 5f88def9c9 Comment cleanup 2021-04-30 15:14:27 +02:00
Reinhard Panhuber 14e2c004cd Remove variable n in tu_fifo_get_read_info() 2021-04-30 15:08:14 +02:00
Reinhard Panhuber de933c45bc Remove all remainings with peek_at 2021-04-30 14:56:14 +02:00
Reinhard Panhuber 5f268608d7 Remove offset feature from fifo.c 2021-04-30 13:39:55 +02:00
Reinhard Panhuber 8f72c97f7b Change read infos to pointer type 2021-04-30 12:59:12 +02:00
hathach c26875e70d add TUP_MCU_STRICT_ALIGN macro that manually pick bytes for lpc55 port1 that is m4 but cannot unaligned acces on usb ram 2021-04-26 17:42:49 +07:00
hathach 8ebdf2b097 ip3511 correct buffer offset, nbytes layout for highspeed port1
able to get passed enumeration and up to READ10
2021-04-26 14:43:58 +07:00
Reinhard Panhuber 7072f0155e Change tu_fifo_get_linear_write/read_info() to return a struct
Compilers always complain that variables set by function via pointer
might be uninitialized so to avoid that return values are now delivered
via struct.
2021-04-23 11:48:54 +02:00
Reinhard Panhuber 03f974c9b9 Implement functions to allow for DMA usage in audio driver.
- Add tud_audio_n_get_ep_out_ff(), tud_audio_n_get_ep_in_ff(),
tud_audio_n_get_rx_support_ff(), and tud_audio_n_get_tx_support_ff()
- Change get_linear_read/write_info() to return linear and wrapped part
at once
- Adjusted affected code in audio_device.c and tested with
audio_4_channel.
2021-04-23 10:27:48 +02: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
hathach d9a0cc9e9f
more cleanup 2021-04-07 16:50:45 +07:00
hathach 893919a848 remove tu_fifo_backward_write/read_pointer API
since it is illegal from fifo perspective
2021-04-07 13:27:28 +07:00
hathach 2468f9e26d more _ff_pull/push clean up 2021-04-07 13:15:25 +07:00
hathach 9042e973d3 clean up _ff_push_n 2021-04-07 12:52:57 +07:00
hathach d6737fb5fe use tu_unaligned_write32() for _ff_push_const_addr 2021-04-07 12:34:00 +07:00
hathach d0fa4d5189 rename 2021-04-07 12:24:24 +07:00
hathach 8ac156622d fix cast-align warning 2021-04-07 00:38:12 +07:00
hathach a3c06aa7bc more clean up for _ff_pull_const_addr_in_full_words() 2021-04-06 23:39:39 +07:00
hathach d82ee2f8c0 refactor _ff_pull_n() with const addr 2021-04-06 23:12:04 +07:00
hathach c5db2282ad Merge branch 'master' of github.com:hathach/tinyusb into edpt_ISO_xfer 2021-04-06 19:35:01 +07:00
Ha Thach 1d20c84798
add tu_unaligned_read32/write32 (#772)
* add tu_unaligned_read32/write32
* added tu_unaligned_read16/write16
* add TU_ATTR_ALWAYS_INLINE, add to most of simple inline function
2021-04-06 19:32:01 +07:00
Jeremiah McCarthy c5b8ef1529 Separate DFU RT and Mode. Untested 2021-04-05 16:32:58 -04:00
Reinhard Panhuber 9b2ddd9cc6 Generalize audio driver for 3 audio functions plus a lot more.
- Audio format and parameters are parsed from descriptors thus user no
longer needs to give them explicitely

- Tested for 4 channel software type I PCM encoding with 16 bit with 1
channel per FIFO and 2 channels per FIFO (this is I2S specific)
2021-04-03 09:49:27 +02:00
Jeremiah McCarthy 1138f8cc70 Add DFU Class per Version 1.1 Spec 2021-03-26 15:30:43 -04:00
Reinhard Panhuber 994dddc231 Fix shadowing parameter in fifo.c 2021-03-25 14:38:55 +01:00
Reinhard Panhuber bfddfbadc7 Implement unaligned word copy. 2021-03-25 14:28:59 +01:00
Reinhard Panhuber 1e4e87de51 Rework to copy wrapped word bytes by byte in copy_to_cont_dst etc. 2021-03-25 13:53:26 +01:00
Reinhard Panhuber a60bd0c8ac Fix bug in writing to constant src/dst address.
Copying has to be conduct in full words (at least for STM32). Renamed
copy function to tu_fifo_write_n_const_addr_full_words()
2021-03-23 19:33:04 +01:00
hathach 4ee1216aaf fix fifo unlock typo, also clean up a bit 2021-03-13 00:22:04 +07:00
Reinhard Panhuber 8cb3bd3cd3 Merge remote-tracking branch 'upstream/edpt_ISO_xfer' into edpt_ISO_xfer 2021-03-10 19:33:11 +01:00
Reinhard Panhuber d5a5a1cab6 Implement audio PCM type I enc./decoding acc. to 2.3.1.5 Audio Streams
Extending capabilities of support FIFOs
Removing copy from to FIFO
Adjusting audio examples
Remove peek/read into other FIFO
2021-03-10 19:32:13 +01:00
hathach a397353916 fix ci build with rp2040 2021-03-10 17:58:39 +07:00
hathach e864bda627 fix build with freertos 2021-03-10 17:21:59 +07:00
Reinhard Panhuber de1f36f2b0 Adapt mutexes in fifo.c 2021-03-04 19:52:48 +01:00
Reinhard Panhuber 2e28861cf8 Remove TODOs done. 2021-03-04 18:20:22 +01:00
Reinhard Panhuber 7e56f46957 Extend FIFO mutex to use separate write and read mutexes.
Adjust all USB drivers using FIFO and mutexes.
2021-03-04 13:52:14 +01:00
Reinhard Panhuber 848e403e37 Fix unused parameter in _ff_push_copy_fct() and _ff_pull_copy_fct 2021-03-03 08:18:57 +01:00
Reinhard Panhuber bd2bab7aff Remove set_copy_modes(), implement:
tu_fifo_read_n_const_addr(), tu_fifo_write_n_const_addr()
2021-03-02 21:41:51 +01:00
Reinhard Panhuber cc948288bd Revert tusb_fifo.h include form to original. 2021-02-25 11:18:37 +01:00
Reinhard Panhuber 387bf1478e Fix missing , in tusb_fifo.h 2021-02-23 19:52:31 +01:00
Reinhard Panhuber e223d46033 Merge remote-tracking branch 'upstream/master' into edpt_ISO_xfer
Conflicts:
	src/common/tusb_fifo.h
	src/osal/osal_none.h
2021-02-23 19:47:57 +01:00
hathach 2a04ee68b8 add TU_FIFO_INIT() to help with tu_fifo declaration
tu_fifo_clear() also reset max_pointer_idx and non_used_index_space
2021-02-19 11:57:56 +07:00
Ha Thach 044d29c927
Merge pull request #654 from xmos-jmccarthy/master
Add alternate bitfield padding option
2021-02-19 11:03:53 +07:00
Reinhard Panhuber 8904874f76 Exclude #include "osal/osal.h" for OPT_OS_NONE 2021-02-18 20:52:57 +01:00
Reinhard Panhuber 31bf73517e Add #include "osal/osal.h" in tu_fifo.h 2021-02-18 20:16:57 +01:00
Jeremiah McCarthy 21f1cd4ec7 Implement requested PR changes
Removes CFG_TUSB_ALT_BIT_PACKING_ALIGNMENT, and makes the manual padding
behavior standard.  Replaced unused variable name with TU_RESERVED.
2021-02-18 13:26:03 -05:00
Reinhard Panhuber 681cfd0bf2 Correct for wrong pointer type in audio_device.c 2021-02-18 11:12:16 +01:00
Reinhard Panhuber ae20d11124 Merge remote-tracking branch 'upstream/master' into edpt_ISO_xfer
Conflicts:
	src/common/tusb_fifo.h
2021-02-17 22:08:21 +01:00
Reinhard Panhuber c87357c025 Improve tu_fifo capabilites
Added tu_fifo_get_linear_write_info(), tu_fifo_backward_write_pointer(),
and tu_fifo_backward_read_pointer()
2021-02-17 20:44:26 +01:00
Nicholas R Dinsmore b7ec66e33a This fixes the overflow mathmatic in the fifo 2021-02-16 23:08:08 -05:00