Commit Graph

3142 Commits

Author SHA1 Message Date
hathach 206d63e038
correct EHCI reporting failed xfer (instead of stalled) when device is unplugged 2023-05-16 11:09:21 +07:00
hathach c0e4c02b9d allow imxrt build with dual exmaples 2023-05-10 11:15:11 +07:00
hathach 77f0726361 fix ehci issue with portsc when enable port power and port reset
fix attached device not regconized if attached before power on
2023-05-09 17:32:14 +07:00
hathach 654f182176 build host examples with imx 2023-05-08 00:24:48 +07:00
hathach 6945c594d5 update all device cmake example for imx 2023-05-07 22:09:08 +07:00
hathach f15f79df5d cmake work well with imxrt 2023-05-06 15:14:54 +07:00
hathach cda5ab8b25 more temp work 2023-05-05 19:15:19 +07:00
hathach 8a9d2b4b75 wip 2023-05-04 23:29:37 +07:00
Martino Facchin 6ff62c0fe8 renesas: add fallback for targets not defining CFG_TUSB_RHPORT*_MODE 2023-05-03 11:47:41 +02:00
Martino Facchin 5f7e7b4b0a renesas_ra: support RA2A1 (FS only) 2023-05-03 10:06:13 +02:00
Martino Facchin 4afed62646 renesas_ra: host: handle retry on attach() 2023-05-03 10:05:29 +02:00
Martino Facchin be54870c3b renesas_ra: add support for HS port 2023-05-03 10:02:24 +02:00
hathach 1763eede48
more update to host serial API 2023-04-28 22:14:14 +07:00
hathach fb5fe3360f
allow call tuh cdc with blocking (callback = NULL)
- tuh_cdc_set_control_line_state()
- tuh_cdc_set_baudrate()
- tuh_cdc_set_line_coding()
2023-04-28 21:50:54 +07:00
hathach 0a43a7b418
improve host serial drivers
- tuh_control_xfer() update xfer result to user_data if complete
callback = NULL (sync/blocking)
- refactor host serial driver for acm/ftdi/cp210x
2023-04-28 19:13:25 +07:00
hathach 190acc1fb0 add aligned(4) for cdc_line_coding_t 2023-04-28 11:12:03 +07:00
Jean-Baptiste Theou 8f47976639 cdc: fix line_coding aligment
While calling tud_cdc_n_get_line_coding, the structure is copied into
the destination.

Dump of assembler code for function tud_cdc_n_get_line_coding:
   0x000193f4 <+0>:	mov.w	r2, #2112	@ 0x840
0x000193f8 <+4>:	ldr	r3, [pc, #20]	@ (0x19410
<tud_cdc_n_get_line_coding+28>)
   0x000193fa <+6>:	mla	r0, r2, r0, r3
=> 0x000193fe <+10>:	ldr.w	r3, [r0, #6]
   0x00019402 <+14>:	str	r3, [r1, #0]

On some platform (tested on LPC55S28), the address needs to be 4-bytes
aligned. Without this, the address is

(gdb) p &_cdcd_itf.line_coding
$3 = (cdc_line_coding_t *) 0x40100006 <_cdcd_itf+6>

which leads to a HardFault. With this fix

(gdb) p &_cdcd_itf.line_coding
$5 = (cdc_line_coding_t *) 0x40100008 <_cdcd_itf+8>

and the function can be called properly

Signed-off-by: Jean-Baptiste Theou <jb@thing.com>
2023-04-27 15:48:15 -10:00
hathach 732686cc10 add tuh_cdc_set_baudrate() 2023-04-27 23:22:10 +07:00
hathach ee58278ed2 add code to calculate divisor from baudrate for ftdi 2023-04-27 23:08:25 +07:00
hathach 8214f0f497 clean up 2023-04-27 17:40:08 +07:00
hathach c10f52b237 forgot to add cp210x header 2023-04-27 17:39:02 +07:00
hathach 438387be8c more refactor 2023-04-27 17:32:56 +07:00
hathach 86f6fd17ed cp210x seems to work well 2023-04-27 17:09:21 +07:00
hathach a32ef1cde1 more host serial refactor 2023-04-27 16:32:42 +07:00
hathach 9698a088db refactor acm function 2023-04-27 15:29:44 +07:00
hathach 85d9925d24 refactor ftdi driver 2023-04-27 15:20:04 +07:00
hathach 293a6222f8 rename ftdi_host to ftdi_sio 2023-04-27 11:08:42 +07:00
hathach 45169d833d hacky, but ftdi work with hard code baudrate = 9600 2023-04-26 22:36:17 +07:00
Ha Thach 964e7ebf21
Merge pull request #2013 from tannewt/imx_1042
Handle iMX RT 1042 usb naming
2023-04-24 16:53:24 +07:00
Ha Thach 8ede566c41
Merge pull request #2039 from hathach/add-cmake-build
Add cmake build
2023-04-24 16:43:40 +07:00
hathach a4d5d51549 add wip note 2023-04-24 16:24:06 +07:00
hathach 5254202b20 minor update 2023-04-24 11:54:58 +07:00
hathach 0afe1b3684 example run well with cmake for imxrt 2023-04-21 18:10:28 +07:00
Jacek Fedorynski 9bf97e3e52 [rp2040] Make writes to SIE_CTRL aware of concurrent access
This commit makes it so that when setting the START_TRANS bit in the
SIE_CTRL register, along with some other bits, we first set all the
other bits, then wait some cycles, and then set the START_TRANS bit.

Doing so protects against a situation where the USB controller is
reading the register at the same time and gets an incorrect value.

This mirrors the procedure already applied to buffer control
registers.
2023-04-20 20:23:31 +02:00
Reimu NotMoe c0674142a8
Merge branch 'hathach:master' into master 2023-04-18 23:20:25 +08:00
Reimu NotMoe 9002dc7067 Use __GNUC__ macro to determine if __has_attribute is supported 2023-04-18 17:27:42 +08:00
Ha Thach c3a60ed355
Merge pull request #1920 from mikee47/fix/midi-definition
MIDI_CIN_NOTE_ON definition transposed with MIDI_CIN_NOTE_OFF
2023-04-18 10:43:52 +07:00
Mengsk 412b557a08 Cleanup unnecessary code for 16bit access. 2023-04-17 15:34:20 +02:00
Reimu NotMoe fa8f3731c1 Implement TU_BSWAP{16,32} correctly for Microchip XC16 2023-04-17 21:02:12 +08:00
Reimu NotMoe d97b6d57de Fix compatibility with the latest Microchip XC16 compiler 2023-04-17 20:20:22 +08:00
HiFiPhile 818bda18c2 Fix FIFO transfer and buffer alignment. 2023-04-14 23:37:07 +02:00
HiFiPhile 2f2c8ce9ec Fix GCC build. 2023-04-14 21:00:55 +02:00
HiFiPhile 413b0a7da5 Use PLL clock. 2023-04-14 17:12:47 +02:00
HiFiPhile cbf4b1aec8 Merge branch 'master' of https://github.com/hathach/tinyusb into pr1942 2023-04-14 13:16:52 +02:00
Scott Shawcroft 2cda9b60c9
Handle iMX RT 1042 usb naming 2023-04-06 15:45:23 -07:00
hathach 6db24e0dba implement tuh_hid_receive_ready() and tuh_hid_send_ready() 2023-04-06 11:16:28 +07:00
hathach 106084289d add define for vendor_flush() to write_flush() for backward compatible 2023-04-06 11:15:57 +07:00
Ha Thach f7aa716a61
Merge pull request #2000 from jncronin/stm32l5
Add STM32L5 support - no OTG similar to some L4s
2023-04-04 16:30:47 +07:00
John Cronin 718bcdb8bc Add STM32L5 support - no OTG similar to some L4s 2023-04-03 13:56:16 +01:00
epatstarkey 1372d4e4d5 Remove trailing whitespace 2023-03-31 12:58:51 -05:00
epatstarkey 1fb2a2f1bd
Update vendor_device.c 2023-03-28 14:01:33 -05:00
epatstarkey 876f49f6ad
Update vendor_device.c 2023-03-28 14:00:23 -05:00
epatstarkey faaed198b4
Update vendor_device.h 2023-03-28 13:59:59 -05:00
kkitayam 993b8d6686 Add state variable 2023-03-26 21:18:00 +09:00
kkitayam e508831561 Update handle streaming interface 2023-03-25 21:25:13 +09:00
kkitayam 78732d6733 Fix streaming interface handling 2023-03-25 21:25:12 +09:00
kkitayam 97f9321e1d Add handling for bulk EPs 2023-03-25 21:25:12 +09:00
Ha Thach 5add4c97fa
Merge pull request #1979 from hathach/fix-cdc-host-unsupported-line-request
fix cdc host enumeration issue when device does not support line request
2023-03-24 17:58:34 +07:00
hathach df5f60b6d6 fix shadow warning 2023-03-24 17:36:29 +07:00
hathach b054229780 fix cdc host enumeration issue when device does not support line request 2023-03-24 17:26:30 +07:00
Ha Thach 59cbfbbdbe
Merge pull request #1971 from MattMills/class_net_net_device_mac_address_shouldnt_be_consts
Update net_device.h to make MAC addresses not const.
2023-03-24 16:48:33 +07:00
Ha Thach f640163ee9
Merge pull request #1969 from hathach/fix-tmc488-bit-order-1658
Fix tmc488 bit order 1658
2023-03-24 14:41:57 +07:00
hathach 71fb6469d4 separate CFG_TUSB_MEM_SECTION and CFG_TUSB_MEM_ALIGN to
- CFG_TUD_MEM_SECTION and CFG_TUD_MEM_ALIGN
- CFG_TUH_MEM_SECTION and CFG_TUH_MEM_ALIGN
- fix missing mem section and align for host
2023-03-24 14:05:21 +07:00
Matt Mills 4274cab395
Update net_device.h 2023-03-22 07:18:27 -06:00
hathach 096da11e88
more update 2023-03-22 17:01:04 +07:00
hathach c85f46c4ab
fix bitorder in usbtmc_response_capabilities_488_t 2023-03-22 16:59:57 +07:00
Ha Thach 07976ad26d
Merge pull request #1968 from hathach/refactor-hid-host
Refactor hid host
2023-03-22 10:37:06 +07:00
hathach f27486e19a add tuh_hid_itf_get_info() and change tuh_cdc_itf_get_info() to use new tuh_itf_info_t 2023-03-22 10:00:42 +07:00
hathach f8a5cde3c7 add tuh_task_event_ready(), better implement blocking control transfer for rtos 2023-03-22 09:23:44 +07:00
hathach 0921edaf59 use tud_inited() instead of tusb_inited() 2023-03-22 09:23:11 +07:00
hathach d22fc550c7 change meaning of CFG_TUH_HID to total number of HID interfaces supported.
- previously CFG_TUH_HID is max number of interfaces per device which is
rather limited and consume more resources than needed.
- change hid host instance in API to index
2023-03-21 21:04:06 +07:00
hathach 8a0b17598c add osal_task_delay() for control blocking 2023-03-21 18:15:45 +07:00
hathach d34508a316 add note for blocking tuh_configuration_set(), tuh_interface_set() 2023-03-21 18:13:25 +07:00
hathach 878f2b54fe relax hid host enumeration, allow set protocol to be stalled 2023-03-21 18:12:55 +07:00
Ha Thach ec9c666107
Merge pull request #1965 from HiFiPhile/align
UAC2: fix feedback EP buffer alignment.
2023-03-21 15:46:00 +07:00
Mengsk 42decd94e5 UAC2: fix feedback EP buffer alignment. 2023-03-21 07:58:39 +01:00
hathach e44e461ce3 add tuh_set_interface 2023-03-21 12:55:52 +07:00
hathach 4520218786
more compatible with IAR 2023-03-20 11:33:39 +07:00
hathach 1fc203b085
more update to kinetis bsp 2023-03-18 19:50:24 +07:00
hathach 2d187777c0
merge kinetis into its own family in bsp 2023-03-18 18:30:51 +07:00
Bob Paddock f9b8a0667a Add support for NXP FRDM_K32L2A4S eval board. 2023-03-18 16:50:50 +07:00
hathach 9f54cc1eb7
more clean up 2023-03-18 11:43:47 +07:00
hathach d919f107c7
minor clean up 2023-03-18 11:22:44 +07:00
hathach bdfcd50b1b
Merge branch 'master' into portability 2023-03-17 23:53:38 +07:00
hathach 3623ba1884
fix trailing space and new line
temporarily disable codespell
2023-03-17 16:12:49 +07:00
hathach e1fda007f6
minor refactor to invalid index 2023-03-17 14:46:02 +07:00
hathach 317177c83d
update host example, add pio-pico-usb for rp2040 2023-03-17 14:06:25 +07:00
hathach f349ae7702
fix enumerate one device at a time 2023-03-17 13:58:01 +07:00
hathach e7d212f337
more fix 2023-03-16 23:21:15 +07:00
hathach 92aed7e3e0
rename symbols 2023-03-16 11:28:10 +07:00
hathach bc2127b330
rename file link to rusb2 2023-03-16 11:03:53 +07:00
hathach cd1726c009 Merge branch 'master' into renesas-ra 2023-03-16 09:51:27 +07:00
hathach d9a9dc5ac0 fix PICO_SHARED_IRQ_HANDLER_HIGHEST_ORDER_PRIORITY not defined in old pico-sdk 2023-03-15 17:38:14 +07:00
Ha Thach ea8ecea59a
Merge pull request #1953 from tannewt/fix_cached_imx_reset
Flush the dcd data on reset
2023-03-14 09:08:32 +07:00
Scott Shawcroft d31aac453e
Flush the dcd data on reset 2023-03-13 15:22:00 -07:00
James Smith 296ce528fc Updated host hid_controller example to demo tuh_hid_send_report 2023-03-13 16:31:25 +07:00
James Smith f6774d5611 Implemented tuh_hid_send_report 2023-03-13 16:31:25 +07:00
Hubert Denkmair f8a21fff17 dcd_write_packet_memory: use volatile modifier for destination pointer 2023-03-12 15:51:07 +01:00
hathach 0a7c08d16e minor format 2023-03-12 16:01:24 +07:00
Ha Thach be21413361
Merge pull request #1948 from dhalbert/remove-volatile-cast-include
rp2040: include hardware/sync.h explicitly
2023-03-11 09:35:04 +07:00
hathach fe77976765 Merge branch 'master' into renesas-ra 2023-03-11 08:15:23 +07:00
Dan Halbert 4857abdc6b rp2040: include hardware/sync.h explicitly 2023-03-10 14:01:51 -05:00
Jerzy Kasenberg f0ddf8d10f dcd_nrf5x: ISO OUT handling
For incoming ISO OUT packets it was possible to start
DMA from endpoint to RAM before transfer was started
resulting in unrelated memory corruption.
This is scenario that causes memory corruption:
- ISO OUT packet is received
- Packet is transferred by DMA to transfer buffer
- xfer->started is cleared and xfer->buffer is updated as
  it is in every case
- Application takes to long to handle it (it happens when debugger
  is connected breakpoint is hit slowing down software).
- Next ISO OUT packet arrives
At this point there was no check if transfer was started and packet
was copied by DMA to location beyond previous data, possibly overwriting
unrelated memory.

This solves the issue by checking that transfer was
started and there is buffer ready for incoming packet.
2023-03-10 08:22:43 +01:00
hathach 0f8e530de1
fix incorrect merge of hcd link 2023-03-08 23:01:37 +07:00
hathach 2cf092464b
fix freertos build with iar, format/indent link_type 2023-03-08 22:34:54 +07:00
hathach 05e0205ad0
Merge branch 'master' into renesas-ra 2023-03-08 21:05:06 +07:00
Hubert Denkmair b3ad560e62 fix path to stm32g0xx.h 2023-03-08 14:22:11 +01:00
Hubert Denkmair 8ae4f8f069 add basic STM32G0 support 2023-03-08 12:14:40 +01:00
Hubert Denkmair 410ad4d0f9 add basic STM32G0 support 2023-03-08 12:05:58 +01:00
Ha Thach 3387c86108
Merge pull request #1933 from kilograham/rp2040_llvm_tweaks
make rp2040 code compile cleanly with LLVM embedded toochain for ARM.
2023-03-06 15:24:51 +07:00
Nathaniel Brough 95cfa37bf5 fix: Fix wrong destsz used with tu_memcpy_s
Bug: #1935
2023-03-05 18:47:48 -08:00
graham sanderson b7fa90e706 rp2040: Fixup lib and example compile for LLVM Embedded Toolchain for ARM 2023-03-02 14:32:22 -06:00
hathach 5d3084a714 add TUP_USBIP_FSDEV and TUP_USBIP_FSDEV_STM32, clean up ifdef with stm32 2023-03-01 11:22:04 +07:00
Ha Thach 3c38c7dc25
Merge pull request #1828 from HiFiPhile/stm32_fsdev
stm32_fsdev & ISO EP buffer allocation improvements
2023-02-28 23:45:02 +07:00
hathach ffdc100cb9 rename ep_num to ep_idx, minor clean up 2023-02-28 17:11:59 +07:00
Ha Thach 65ac519715
Merge pull request #1852 from silvergasp/mem_s
fix: Replace device calls to memcpy with tu_memcpy_s
2023-02-27 10:22:53 +07:00
hathach e34aeb5cf6 minor clean up 2023-02-27 09:11:35 +07:00
Ha Thach 73afca14eb
Merge pull request #1491 from Ryzee119/ohci_fixes
OHCI usbh, tweaks and improvements
2023-02-22 22:52:41 +07:00
hathach eca96c635d
comment out osal_task_delay if using os none 2023-02-22 22:28:22 +07:00
hathach 4caa6063b0
white space 2023-02-22 22:17:45 +07:00
hathach 1466afafeb
move and add optional tusb_app_virt_to_phys/tusb_app_phys_to_virt
also add place holder for tusb_app_dcache_flush() and
tusb_app_dcache_invalidate()
2023-02-22 22:14:50 +07:00
mikee47 302b9562dc MIDI_CIN_NOTE_ON definition transposed with MIDI_CIN_NOTE_OFF 2023-02-22 09:58:30 +00:00
hathach 498989ee00
use tu_static instead of static _fuzz_thread 2023-02-22 16:23:40 +07:00
hathach 4c846af53e
rename OHCI_RHPORTS to TUP_OHCI_RHPORTS 2023-02-22 16:18:45 +07:00
Ha Thach 557bf82336
Merge pull request #1867 from silvergasp/thread_local_globals
fix: Change all static variables to thread when fuzzing
2023-02-22 12:54:32 +07:00
hathach 03ec49450d
rename maros from FUZZ to _FUZZ, change TU_STATIC to static _fuzz_thread 2023-02-22 11:47:09 +07:00
wooyay 4e2afdf5e1 ohci: Disable MIE interrupt during IRQ processing, zero HccADoneHead on completion 2023-02-18 10:48:39 +10:30
Ryzee119 75f6583c1c ohci: Use enum instead of magic number 2023-02-18 10:48:39 +10:30
Ryan Wendland f2a6af05b1 ohci: Add ability to separate physical and virtual memory 2023-02-18 10:48:38 +10:30
Ryan Wendland f87262185e ohci: Set skip on ed prior to removal 2023-02-18 10:24:21 +10:30
Ryan Wendland cc9c3feeae ohci: Fix bug in ed removal 2023-02-18 10:24:21 +10:30
Ryzee119 e89e8ba392 ohci: Direct port commands to the correct rhport. 2023-02-18 10:24:21 +10:30
Ryzee119 5d3c0fb922 ohci: Force reset of devices already connected on power up 2023-02-18 10:24:21 +10:30
Ryzee119 c1d0fd1bd7 ohci: Wait POTG time after port power 2023-02-18 10:24:21 +10:30
Ryzee119 2063ee5f15 ohci: Toggle frameinterval bit on update 2023-02-18 10:24:21 +10:30
Ryzee119 d5e6d02817 ohci: Leave SMM or bios mode during init 2023-02-18 10:24:21 +10:30
Ryzee119 c820c87692 ohci: Support configurable number of roothub ports 2023-02-18 10:24:21 +10:30
Ryzee119 d367e8f8a8 ohci: Expand roothub descriptors into unions 2023-02-18 10:24:21 +10:30
rppicomidi fde7577117 Fix issue 1909 2023-02-15 20:02:12 -08:00
Jeff Trull 7e2c5fcc8a Correct bitfields for cdc_desc_func_telephone_call_state_reporting_capabilities_t 2023-02-12 20:52:17 -08:00
Jeff Trull f48ae4aad7 Adjust reserved bitfields to make SDCC happy
- keep each field at or under 16b
- For optimal packing, segment fields to 8b boundaries
2023-02-10 15:54:04 -08:00
hathach 7e48da5b44
update version to 0.15.0
add changelog
2023-02-10 12:47:48 +07:00
hathach 3422e05684
change length in tud_hid_report_complete_cb() from uint8 to uint16 2023-02-04 11:43:23 +07:00
Ha Thach d6354a2aa7
Merge pull request #1877 from hathach/fix-host-cdc-without-iad
Fix host cdc without iad
2023-02-01 11:18:04 +07:00
Ha Thach 49628d8c18
Merge pull request #1779 from P33M/rp2040_device_babble_fix
rp2040: avoid device-mode state machine hang
2023-01-31 21:38:27 +07:00
hathach ddb061f639 fix typos 2023-01-31 19:03:31 +07:00
hathach 95403ed9ac fix host issue when mounting an CDC device without IAD 2023-01-31 18:40:07 +07:00
hathach 6759721e9a move errata to end of c file 2023-01-31 17:38:27 +07:00
hathach 19b6cbc616 add e15 prefix or walkaround related functions, also minor refactor 2023-01-31 17:15:42 +07:00
hathach 0cce42fcc6 minor clean up 2023-01-31 11:38:15 +07:00
Ha Thach b03a688b24
Merge pull request #1768 from ftdigdm/port-ft90x
Port ft90x
2023-01-30 22:13:14 +07:00
hathach 6257123157 Merge branch 'master' into support-iar 2023-01-30 16:44:22 +07:00
hathach cc18784479 hardcoded configPRIO_BITS for IAR build to pass CI 2023-01-30 16:42:56 +07:00
hathach 6dd40603f9 fix typo 2023-01-30 11:46:52 +07:00
Ha Thach 88f3279c3c
Merge branch 'master' into port-ft90x 2023-01-30 11:40:53 +07:00
Jonathan Bell 0d2078d295 rp2040: shuffle hw_endpoint members
Ordering by element size prevents alignment holes, and as a consequence the
host mode version of the struct is the same size as device, as pad bytes at
the end are used instead.
2023-01-24 12:05:32 +00:00
Jonathan Bell 73b0047efc rp2040: avoid device-mode state machine hang
Don't mark IN buffers as available during the last 200us of a full-speed
frame. This avoids a situation seen with the USB2.0 hub on a Raspberry
Pi 4 where a late IN token before the next full-speed SOF can cause port
babble and a corrupt ACK packet. The nature of the data corruption has a
chance to cause device lockup.

Use the next SOF to mark delayed buffers as available. This reduces
available Bulk IN bandwidth by approximately 20%, and requires that the
SOF interrupt is enabled while these transfers are ongoing.

Inherit the top-level enable from the corresponding Pico-SDK flag.
Applications that will not use the device in a situation where it could
be plugged into a Pi 4 or Pi 400 (for example, when directly connected
to a commodity hub or other host) can turn off the flag in the SDK.

v2: use a field in hw_endpoint to mark pending.

v3: Partial rewrite following review comments

- Stub functions out if the workaround is not required
- Only force-enable SOF while any vulnerable endpoints are active
- Respect dcd_sof_enable() functionality
- Get rid of all but necessary ifdef hackery
- Fix a bug where the "endpoint lock" was used with an uninitialised pointer.
2023-01-24 11:53:28 +00:00
Jonathan Bell c3e47c31cc rp2040: export hw_endpoint_start_next_buffer() and hw_endpoint_lock_update()
The next change to the driver requires the export of these functions. Leave the
lock unimplemented for now.

Also move hw_set and hw_clear aliases into the top-level header file.
2023-01-23 10:55:20 +00:00
hathach 1bbeb6ad79 update stm32f1 to support iar build 2023-01-21 11:32:37 +07:00
Nathaniel Brough 18c3095346 fix: Change all static variables to thread when fuzzing 2023-01-20 15:45:31 -08:00
hathach daec3c24d8 fix warnings with arithmetic on void* pointer 2023-01-20 15:30:45 +07:00
hathach 074289caa3 add helper tu_desc_find/find2/find3 2023-01-20 15:30:24 +07:00
Ha Thach ea098aeda1
Merge pull request #1847 from HiFiPhile/dwc2_iar
dwc2: fix iar warnings
2023-01-18 17:41:33 +07:00
Nathaniel Brough 2e47210c1a fix: Replace device calls to memcpy with tu_memcpy_s
Introduces a new function tu_memcpy_s, which is effectively
a backport of memcpy_s. The change also refactors calls
to memcpy over to the more secure tu_memcpy_s.
2023-01-13 15:20:32 -08:00
Ha Thach fa9d19027b
Merge pull request #1405 from gregdavill/ch32v307
Add WCH CH32V307 port
2023-01-12 17:51:56 +07:00
hathach b1021d53f3 add TUP_RHPORT_HIGHSPEED for ch32v307 2023-01-12 15:38:18 +07:00
hathach 3cf21c66b6 add dcd_remote_wakeup() stub 2023-01-12 15:26:48 +07:00
hathach e61d4aefe6 rename driver with dcd_ to be consitent with other ports 2023-01-12 12:08:56 +07:00
hathach 3cc6cece07 add note for openocd with wch, also add wch-riscv.cfg 2023-01-12 10:25:48 +07:00
MasterPhi 9d19ed940e dwc2: fix IAR warnings. 2023-01-11 18:50:38 +01:00
Ha Thach 8775d55adc
Merge pull request #1843 from HiFiPhile/ip3511
ip3511 : Fix IAR build.
2023-01-09 10:02:59 +07:00
MasterPhi 57de6016f9 ip3511 : Fix IAR build. 2023-01-08 11:23:18 +01:00
Ha Thach 949950e592
Merge branch 'master' into ch32v307 2023-01-07 23:46:46 +07:00
Ha Thach 83cc71feaf
Merge pull request #1820 from Staacks/master
Fix UVC probe and commit on MacOS
2023-01-07 23:30:30 +07:00
hathach c84de8f06b
minor clean up 2023-01-07 19:40:06 +07:00
hathach 9e551c9f5c
remove _ff_overflowed() due to lack of use 2023-01-07 19:00:04 +07:00
hathach c29b7643a5
simplify _ff_correct_read_index() 2023-01-07 18:53:00 +07:00
hathach 248025bb6c
reverse idx2ptr() arguments to be consistent 2023-01-07 17:29:43 +07:00
hathach 24bd1c9562
update advance_pointer/backward_pointer to use depth instead of fifo, also rename to advance/backward_index 2023-01-07 17:27:26 +07:00
hathach 507d5b10b0
simplify _tu_fifo_count() and _tu_fifo_remaining(), also rename to _ff_count() and _ff_remaining() 2023-01-07 17:14:17 +07:00
hathach a804a1ac09
simplify and remove _tu_fifo_empty, _tu_fifo_full. Also correct full condition check 2023-01-07 16:48:07 +07:00
hathach 82457519fa minor clean up 2023-01-07 16:12:35 +07:00
hathach 2a1b81e3c5 minimize tu_fifo size to 16
- remove non_used_index_space
- packed overwritable with item_size
2023-01-06 11:51:17 +07:00
hathach 9c73c1a532 minor clean up 2023-01-06 10:56:19 +07:00
hathach b42d298b81 Merge branch 'master' into fix-fifo-memory-overflow 2023-01-06 10:52:25 +07:00
Ha Thach 6e23c596cc
Merge pull request #1837 from pete-pjb/master
Fix typo in audio.h. Specifiy _ctrl_xfer struct in CFG_TUSB_MEM_SECTION in usbh.c
2023-01-06 10:24:55 +07:00
Mengsk 8db462bf6e Add fix to dcd_edpt_iso_activate() 2023-01-05 16:54:42 +01:00
Simon Kueppers d6b612257e Fixed bug where with some devices, the TU_ASSERT inserted with this commit gets triggered for ISOCHRONOUS endpoints. It is necessary for those endpoints to set the NUM_BLOCK and BLSIZE for the receiving buffer in both, USB_COUNTn_TX and USB_COUNTn_RX. Despite the datasheet showing those fields only for the USB_COUNTn_RX register 2023-01-05 16:23:53 +01:00
Mengsk 8c591e2c45 More warning fixes 2023-01-04 12:40:01 +01:00
pete-pjb f5cffeedec Fix typo in audio.h. Specifiy _ctrl_xfer struct in CFG_TUSB_MEM_SECTION
Add NULL check to loop in list_remove_qhd_by_addr() function in ehci.c
2023-01-03 10:33:36 +00:00
Mengsk 82f105e32b Fix IAR warning: Warning[Pe381]: extra ";" ignored 2023-01-02 21:18:10 +01:00
Mengsk 69475cd1bf Remove tu_stm32_sof_cb 2023-01-02 12:06:26 +01:00
Mengsk 7228239eb9 Clean up. 2023-01-02 09:43:48 +01:00
Mengsk 51bb27a131 Optimize descriptor looping. 2022-12-31 13:37:22 +01:00
Mengsk fc32280f42 Fix buffer allocation overflow. 2022-12-30 15:10:00 +01:00
Mengsk 21bdafcfef Add ISO buffer allocation. 2022-12-30 01:08:04 +01:00
Mengsk 07ad64adfe Do not set USB_EP_RX_NAK for ISO EP. 2022-12-29 23:30:24 +01:00
Mengsk db65759b1e Use weak for dcd_edpt_iso_alloc/dcd_edpt_iso_activate 2022-12-29 23:29:50 +01:00
Mengsk 0bd41d5354 Fix CI. 2022-12-29 21:37:44 +01:00
Mengsk e4f07206f8 UAC : Enable fifo based transfer on stm32_fsdev 2022-12-29 19:34:12 +01:00