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