Compare commits

...

2660 commits

Author SHA1 Message Date
PanRe
a2390802f8
Merge pull request #2282 from HiFiPhile/uac_interl
UAC IN transfer improvements
2023-10-19 19:49:19 +02:00
Mengsk
d3fa3cdf48 Adjsut blackout time. 2023-10-18 17:05:35 +02:00
Ha Thach
dd588222c7
Merge pull request #2265 from bencowperthwaite/master
STM32U5 HS Support
2023-10-18 15:25:57 +07:00
HiFiPhile
ade8a19aef Put sw_buf in USB section only if necessary. 2023-10-17 21:21:52 +02:00
HiFiPhile
e9d894fe66 Fix compile. 2023-10-17 21:03:29 +02:00
Ha Thach
0ede159ad0
Merge pull request #2244 from gabChouin/feat-stm32u575_nucleo
Add stm32u575-nucleo support
2023-10-18 00:06:28 +07:00
hathach
a5a77af11e
add board.mk for u575 nucleo 2023-10-17 23:53:09 +07:00
hathach
22aefd6aba
add cmake support for u575 nucleo 2023-10-17 22:48:54 +07:00
Ha Thach
80ee307244
Merge branch 'master' into feat-stm32u575_nucleo 2023-10-17 22:31:33 +07:00
HiFiPhile
d83a210788 Add blackout time. 2023-10-17 15:18:05 +02:00
HiFiPhile
0a1d6cf4d0 Read sample rate directly from control transfer to eliminate callback. 2023-10-17 13:06:55 +02:00
HiFiPhile
656e1e416a Add flow control for IN transfer. 2023-10-17 09:46:01 +02:00
PanRe
118823c254
Merge pull request #2259 from HiFiPhile/uac_interl
Fix UAC encoding, update example.
2023-10-11 19:18:35 +02:00
HiFiPhile
c8430f5f85 Refactor to get rid of CMSIS DSP lib. 2023-10-10 20:00:50 +02:00
HiFiPhile
e2852da668 Update deps. 2023-10-10 18:35:24 +02:00
HiFiPhile
504d29cf7a Update make & cmake file. 2023-10-10 18:25:42 +02:00
HiFiPhile
20699e30dd Enhance plot script. 2023-10-10 18:25:14 +02:00
HiFiPhile
2ba760a1c1 Enhance audio_4_channel_mic example, plot 4 different waves for each channel. 2023-10-10 18:24:47 +02:00
HiFiPhile
8b2cb63da8 Fix naming nBytesPerSample. 2023-10-10 18:22:20 +02:00
HiFiPhile
b5c839f739 Merge branch 'master' of https://github.com/hathach/tinyusb into uac_interl 2023-10-10 15:02:25 +02:00
Ha Thach
513ab37ec6
Merge pull request #2276 from hathach/more-esp32-max3421
More max3421
2023-10-05 17:53:13 +07:00
hathach
cfb683f481
tested with nrf52840 and esp32s2 2023-10-05 17:01:41 +07:00
hathach
67e34267a6 change tuh_max3421_spi_xfer_api() signature
tested working with sam d21 and d51, not tested with nrf52, seem not
working with esp32
2023-10-04 18:00:32 +07:00
hathach
f36e0b7b92
esp32 comment out uart, increase max3421 spi speed to 26mhz 2023-10-03 16:27:35 +07:00
Ha Thach
b394ae1786
Merge pull request #2270 from hathach/add-max3421-esp32
Add max3421 support for esp32
2023-09-28 16:56:20 +07:00
hathach
8348631bf5
improve esp32 ci, build esp32 with -DDMAX3421_HOST=1 for max3421 testing
revert change in hcd.h
2023-09-28 16:15:31 +07:00
hathach
6b8933cfe8
fix build with new freertos host example 2023-09-28 12:55:59 +07:00
hathach
7dc1a66f91
esp32 cdc host with max3421 work well 2023-09-28 11:12:22 +07:00
hathach
277852afc1
fix esp32 msc example 2023-09-28 10:56:38 +07:00
hathach
10abece264
esp32 hid device work well 2023-09-28 10:06:10 +07:00
hathach
3a10b6a3d5
fix esp32 build 2023-09-27 18:09:19 +07:00
hathach
76c43a5bdc
Merge branch 'master' into add-max3421-esp32 2023-09-27 17:52:18 +07:00
Ha Thach
5b08a65ad2
Merge pull request #2268 from HiFiPhile/iar_tmpl
Update IAR template.
2023-09-27 17:41:18 +07:00
Ha Thach
e4058177af
Merge pull request #2269 from hathach/add-in_isr-to-hcd_int_hanlder
Add in isr to hcd int hanlder
2023-09-27 17:40:50 +07:00
Ha Thach
68c4009bba
Merge branch 'master' into add-in_isr-to-hcd_int_hanlder 2023-09-27 17:01:40 +07:00
Mengsk
42eb4e0da0 Fix CI. 2023-09-27 11:46:52 +02:00
Mengsk
b35621fc63 Update IAR template. 2023-09-27 11:43:23 +02:00
hathach
58c49cea5b
remove sct_neopixel from lpc54 (due to warnings and not used) 2023-09-27 16:31:46 +07:00
hathach
0a4fb6963d
fix build with lpc54 2023-09-27 16:19:39 +07:00
hathach
3b0ffd0f48
change hcd_int_handler(rhport, in_isr) signature: add in_isr
change tuh_int_handler() to take in_isr as optional parameter (default =
true)
2023-09-27 15:51:03 +07:00
hathach
6dc64eaa28
max3421 communication work with esp32 up to enumeration, seems still have a bit of issue 2023-09-27 12:34:45 +07:00
hathach
2f6592de7f
update max3421 to have hcd_int_handler_ext() 2023-09-27 11:30:18 +07:00
bac
1168e4e163 Added support for USB2 HS peripheral (with integrated HS PHY) on STM32U59x chips 2023-09-26 15:27:17 +01:00
hathach
f6ca86c3dd
tested cdc_msc_hid_freertos with samd51
add -Wno-error=format for espressif
wrap up cdc_msc_hid_freertos
2023-09-26 19:09:36 +07:00
hathach
a7c136c03f
adding host/cdc_msc_hid_freertos example 2023-09-25 16:53:11 +07:00
HiFiPhile
6be7f354c2 Fix cast-align. 2023-09-19 16:35:05 +02:00
Ha Thach
56c6d2feab
Merge pull request #2258 from hathach/cmake-u5
Cmake u5
2023-09-19 21:26:20 +07:00
HiFiPhile
9d0251f7a6 Fix UAC interleaved copy. 2023-09-19 15:42:52 +02:00
hathach
b73262be3a minor indent 2023-09-19 18:38:47 +07:00
hathach
8cdcd0fa9d fix build and add u5 to ci 2023-09-19 18:35:15 +07:00
hathach
71a2e8a36d addding cmake support for u5 2023-09-19 17:59:38 +07:00
hathach
81cd995108
add default CFG_TUH_MAX3421 = 0, default spi speed for samd21/samd51 to 12Mhz 2023-09-18 22:15:31 +07:00
Ha Thach
46f7cf4da2
Merge pull request #2235 from slark-yuxj/master
fix:Resource leak: fp
2023-09-12 17:43:14 +07:00
Ha Thach
e9ba93315c
Merge pull request #2245 from arduino/fix_msd_extraneus_bytes_on_reading
Fix msd extraneus bytes on reading
2023-09-12 12:53:52 +07:00
Ha Thach
6d922de0cb
Merge pull request #2251 from hathach/add-max3421e-hcd
Add max3421e host driver
2023-09-11 22:22:13 +07:00
hathach
f55052b61f enable max3421 host for feather nrf52840 with makefile 2023-09-11 16:44:06 +07:00
hathach
1eb0cb0c65
update readme to include max3421 support 2023-09-11 15:45:26 +07:00
hathach
ab9585401b
wrap up build cmake & make support for max3421, to enable the Host driver, 'MAX3421_HOST=1' must be added as part of make/cmake command 2023-09-11 11:35:51 +07:00
hathach
e32c1e08bd
both samd21/d51 works perfectly with max3421e 2023-09-09 16:50:16 +07:00
hathach
605ad73ec0
refactor max3421_init() for samd51 to be generic for sercom and eic 2023-09-09 13:04:36 +07:00
hathach
c074488f75
minor rename 2023-09-09 12:20:16 +07:00
maidnl
228acbeac2 wait_pipe_fifo_empty() now returns bool (as expected using TU_ASSERT macro) 2023-09-08 15:48:05 +02:00
hathach
1d68f2a328
metro m4 working with max3421e 2023-09-08 18:39:09 +07:00
hathach
bcc77a60e0
get spi working for metro m4 express 2023-09-08 17:40:00 +07:00
maidnl
7ce4cfa638 renesas: added wait function for IN transaction
This fixes a problem found on MSD class where data read from from disks were sometimes partially overwritten by the status MSD message ("USBS...").
The function introduced wait for the hw fifo pipe to be empty, that prevent that new writing in the fife overwrite data which are not yet be transmitted by hw.
2023-09-08 10:49:05 +02:00
hathach
ed102a7795
Merge branch 'master' into add-max3421e-hcd 2023-09-07 21:42:46 +07:00
Ha Thach
702740a3e2
Merge pull request #2246 from hathach/add-cmake-samd
Add cmake support for samd21 and samd51
2023-09-07 17:55:50 +07:00
hathach
d3c08ecc3a more ci fix 2023-09-07 17:20:07 +07:00
hathach
e8558458c4 fix ci 2023-09-07 17:09:25 +07:00
hathach
2dea4ce6a2 add cmake support for samd21.
update ci cmake
2023-09-07 16:58:40 +07:00
hathach
bb5d43e9c5
add samd51 to cmake 2023-09-07 15:31:43 +07:00
hathach
21ab40bab2
- wrap up hcd max3421, work well with nrf52840
- also add usbh_defer_func()
2023-09-07 12:38:18 +07:00
hathach
1b9108ea0d
minor debug clean up 2023-09-06 17:11:35 +07:00
Gabriel Chouinard
c4566c4d2b Enable instruction cache for stm32u5 boards 2023-09-05 21:39:28 -04:00
Gabriel Chouinard
4fb15f6bb7 Add stm32u575-nucleo support 2023-09-05 19:30:38 -04:00
hathach
ed0a233d48
vastly improve attach/detach device, still have issue where thing is still hanged occasionally. 2023-08-31 21:28:27 +07:00
hathach
3b7d5aa042
improve connection & disconnection detection. But there is still issue when CONDETIRQ occurs but we are disabled interrupt (for osal queue access). 2023-08-31 16:52:09 +07:00
hathach
41493426b3
use ep buf to keep setup packet, work well with hid device 2023-08-30 16:21:43 +07:00
hathach
1ab488eb06
call xfer_complete_isr() when result is not successful (stalled or failed) 2023-08-30 16:04:18 +07:00
hathach
2a814a99af
- hcd_setup_send() also check for busy flag
- xact_inout() to support send setup
2023-08-29 20:27:37 +07:00
hathach
3740a3287a
- correct tuh_max3421e_int_api() for nrf52
- hcd_int_disable/enable is software only to reduce interrupt lag
2023-08-29 18:22:21 +07:00
yuxiaojun
c350616038 fix:Resource leak: fp
Signed-off-by: yuxiaojun <yuxiaojun1011@outlook.com>
2023-08-28 15:24:14 +08:00
hathach
b31924e13e - add xfer_complete_isr()
- merge addr0 ep to pool
- add control status to xact in/out
- use atomic flag busy to ensure only 1 transfer is active at any time
- execute pending transfer after one is complete (or clear busy flag)
- change rtt mode to block if full
2023-08-28 12:41:44 +07:00
hathach
84df3b04db
minor update 2023-08-27 23:54:24 +07:00
hathach
502b1bdda6
more update to transaction 2023-08-27 23:45:34 +07:00
hathach
cd7464a884
try next endpoint when received NAK 2023-08-25 17:37:09 +07:00
hathach
ac00b91472
add xact_out(), xact_in() to manage transfer 2023-08-25 17:26:57 +07:00
hathach
ecf2f91042
use endpoint pool for more flexible multiple devices support 2023-08-25 16:36:28 +07:00
hathach
09ceaa6cf3
add osal mutex for spi 2023-08-25 13:18:47 +07:00
hathach
f5ebc1700f
add spi lock with interrupt enable/disable 2023-08-25 12:12:44 +07:00
hathach
e6cf125e53
save data toggle, always retry NAK. work with msc device 2023-08-24 16:46:20 +07:00
hathach
344932d27e
add tuh_max3421e_int_api(), retry control if received NAK 2023-08-24 16:27:47 +07:00
hathach
3ed5d6c372
complete enumeration 2023-08-24 16:27:12 +07:00
Ha Thach
7bf5923052
Merge pull request #2142 from sjanc/symlinks
Fix documentation symlinks
2023-08-24 00:01:55 +07:00
hathach
2c237b1ae4
able to complete 1st get device descriptor and set address 2023-08-23 17:49:28 +07:00
hathach
e3f3179924
able to get 8 byte descriptor, but read(RCVBC) always return 0
- rename max3421e to max3421
- fix incorrect bitmask for HCTL, fix initial device connect
- fix bus reset cause connect IRQ
2023-08-23 15:08:12 +07:00
hathach
274578ff46
able to send setup packet 2023-08-22 23:17:12 +07:00
hathach
b413439416
able to detect new device and start enumerating 2023-08-22 19:57:59 +07:00
hathach
cacc96b25d
adding connection event handling, add nrf gpio interrupt for max2341e interrupt pin 2023-08-18 17:39:10 +07:00
hathach
824e585e2b
ground works for hcd max3421e 2023-08-18 14:07:38 +07:00
hathach
9257a0f562
- update nrf52 bsp for cmake
- add empty tuh_int_handler/tud_int_handler if corresponidng stack not enabled
- add hcd_template.c
2023-08-18 12:48:12 +07:00
Ha Thach
1fdf29075d
Merge pull request #2221 from hathach/ehci-halted-error
EHCI more fixes
2023-08-16 16:01:16 +07:00
hathach
f4845e4e6c
minor comment 2023-08-16 14:43:58 +07:00
hathach
0109ffbdcb fix abort transfer does not release endpoint, also reset state if it is control transfer 2023-08-16 14:31:14 +07:00
hathach
b3c7fe1023
clear qhd halted bit if not caused by STALL protocol, allow for next transfer 2023-08-16 11:12:00 +07:00
Ha Thach
7537985c08
Merge pull request #2222 from rppicomidi/fix-2188
fix issue 2188: support usbh_app_driver_get_cb()
2023-08-15 23:33:19 +07:00
hathach
67a374d932
more rename 2023-08-15 22:57:05 +07:00
hathach
1b33a31536
more minor clean up
- also rename usbh_classdriver.h to usbh_pvt.h to consitent with usbd
2023-08-15 22:54:07 +07:00
rppicomidi
9d94296741 fix issue 2188: support usbh_app_driver_get_cb() 2023-08-14 15:38:48 -07:00
Ha Thach
d713571cd4
Merge pull request #2217 from hathach/add-lpc43s67
Add lpc43s67
2023-08-14 22:28:53 +07:00
Ha Thach
ba40d667e1
Merge pull request #2219 from tswan-quasi/master
min on cdc r/w
2023-08-14 22:25:44 +07:00
hathach
f2f005cbdf
fix build iar with lpc43 2023-08-14 22:01:30 +07:00
hathach
088180e3d8
add iar support for lpc43, add lpcxpresso43s67 to hil farm 2023-08-14 20:58:00 +07:00
tswan-quasi
b5ba12119d UINT16_MAX stdint macro usage 2023-08-14 09:01:30 -04:00
tswan-quasi
bd51afb091 min on cdc r/w 2023-08-14 08:49:52 -04:00
hathach
78e5b2c6a4
add board_get_unique_id() for lpc43 2023-08-14 16:52:16 +07:00
hathach
202b945f88
add lpcxpresso43s67 2023-08-14 16:38:51 +07:00
Ha Thach
92457ec99f
Merge pull request #2202 from Rocky04/patch-4
Invoke unmounted state on configuration reset
2023-08-09 20:48:26 +07:00
Ha Thach
04f0cd5c80
Merge pull request #2209 from HiFiPhile/hitl
Enhance HITL test
2023-08-09 20:20:46 +07:00
hathach
8e690df1da
rename hitl to hil 2023-08-09 19:03:56 +07:00
hathach
1268d1a093
update hil test and json (remove troublesome lpc54608), run hil test on ci with IAR build 2023-08-09 18:46:23 +07:00
hathach
1abfa9ac75
Merge branch 'hitl' into pr_hitl 2023-08-09 12:48:46 +07:00
hathach
b8b01c1075
update to dcd ip3511 to add work-around for lpc54628 usb hs errata USB.1 and USB.2
msc is mounted, but device couldn't work reliably and got constant reset
due to other errata probably.
2023-08-09 12:47:24 +07:00
HiFiPhile
992e17fb48 Add simple test for hid_boot_interface. 2023-08-08 22:08:59 +02:00
HiFiPhile
bffe321cd2 Update contributor.rst 2023-08-08 18:25:15 +02:00
HiFiPhile
56bed1e581 Flash board_test when done, skip cdc_msc for LPC54. 2023-08-08 17:34:45 +02:00
HiFiPhile
3444c4abe5 Add dummy board_test. 2023-08-08 17:34:07 +02:00
hathach
6d877c3170
added cmake for lpc54, update lpc55 2023-08-08 18:50:24 +07:00
Rocky04
9602c06f8d
Correcting comments 2023-08-07 21:25:50 +02:00
Rocky04
c959e65edd
Fixing wrong callback placement 2023-08-07 21:16:41 +02:00
Rocky04
12ed867b5e
Fixed typo 2023-08-07 20:59:08 +02:00
HiFiPhile
c24f10e4f6 Mount block device in test_cdc_msc. 2023-08-07 20:48:54 +02:00
Ha Thach
51a0889b75
Merge pull request #2211 from hathach/host-usb-reset
Host usb reset
2023-08-07 23:10:47 +07:00
hathach
4938971aad
code format 2023-08-07 20:48:09 +07:00
hathach
18646179d0
fix host msc get maxlun not using aligned section memory 2023-08-07 20:48:08 +07:00
hathach
1f95a417f2
Add tuh_rhport_is_active() and tuh_rhport_reset_bus()
- also improve ehci bus reset
- seperate bus reset delay and contact debouncing delay in enumeration
2023-08-07 20:48:07 +07:00
Rocky04
45af3d6a83 Update examples 2023-08-07 12:04:22 +00:00
Ha Thach
1b92108bc3
Merge pull request #2208 from kkitayam/fix_makefile_for_win
Fix makefile a warning when run on windows command prompt
2023-08-07 16:13:44 +07:00
Ha Thach
accc3fd737
Merge pull request #2151 from kilograham/rp2040_build_fixes
Fix build issues when building for RP2040 from pico-examples/pico-sdk.
2023-08-07 11:14:04 +07:00
HiFiPhile
87150b7770 Add config file as argument. 2023-08-06 22:02:15 +02:00
HiFiPhile
c940a2f362 Fix RTT build. 2023-08-06 21:55:24 +02:00
HiFiPhile
4d1f3f4e9d Add more MCU. 2023-08-06 16:59:25 +02:00
HiFiPhile
b9e614bd39 Fix LPC54 build. 2023-08-06 15:59:25 +02:00
kkitayam
b173c71ffc Change to subst to work on windows command prompt 2023-08-06 22:49:45 +09:00
HiFiPhile
9dd896904c WIP. 2023-08-06 13:41:41 +02:00
HiFiPhile
4f96eebe1b Fix LPC54 build. 2023-08-06 13:41:10 +02:00
Ha Thach
3db945283a
Merge pull request #2185 from abakosh/clean_RA_HCD
Fix typos in HCD rusb file
2023-08-04 21:59:19 +07:00
Ha Thach
c43e7b198d
Merge pull request #2206 from hathach/hw-test-jlink-sn
add usb serial for hw l412 test
2023-08-04 21:56:46 +07:00
hathach
3c746e8bb0
add usb serial for hw l412 test 2023-08-04 21:33:44 +07:00
Aladdin Bakosh
56e52037a8 clean(ra_hcd): fix typos in the hcd library 2023-08-04 12:00:25 +02:00
Ha Thach
363cea7c34
Merge pull request #2121 from ahooper/blackf407VE
Board support for STM32F407VETx
2023-08-04 13:12:38 +07:00
hathach
25bace5e81
add cmake for all board in stm32f4. fix build, also move ci for f4 from makefile to cmake 2023-08-04 12:49:26 +07:00
hathach
81aca17d6e
Merge branch 'master' into blackf407VE 2023-08-04 12:07:39 +07:00
Ha Thach
61f00c0c4d
Merge pull request #2135 from JustAnother1/master
made line ends consistent.
2023-08-04 12:05:07 +07:00
Ha Thach
1b04db2a77
Merge branch 'master' into master 2023-08-04 11:48:04 +07:00
Ha Thach
de4ad2c775
Merge pull request #2204 from hathach/enhance-bsp
Enhance bsp
2023-08-04 11:41:44 +07:00
Ha Thach
bbdc879995
Merge pull request #2133 from greatscottgadgets/cynthion_support
Update support for Cynthion boards
2023-08-04 11:03:25 +07:00
Ha Thach
9a4c76d18d
Merge pull request #2116 from dsugisawa-mixi/master
fix example of bare_api, check empty string
2023-08-04 11:00:09 +07:00
hathach
9697c4df4e
update all examples to use unique ID as serial if avaialble 2023-08-04 10:28:24 +07:00
hathach
67ff3f7845
more clean up 2023-08-04 00:37:01 +07:00
hathach
ef5bd9ee6c
Merge branch 'master' into enhance-bsp 2023-08-04 00:31:12 +07:00
hathach
9360a3bd51
add uid for some stm32 2023-08-04 00:23:10 +07:00
hathach
041f510f90
add board_get_unique_id() for serial number
implemented board_get_unique_id() for rp2040 and L4
2023-08-03 20:42:34 +07:00
Ha Thach
6d03bb9ffc
Merge pull request #2052 from arduino/renesas_ra_hs_rebased
Renesas_RA: add support for board with HS USB port
2023-08-03 20:41:13 +07:00
hathach
1324c2862d
more board_api rename 2023-08-03 17:32:15 +07:00
hathach
a160da1f2b
add lpc43 family 2023-08-03 17:19:47 +07:00
hathach
a5768f52b4
more board_api.h rename 2023-08-03 15:50:52 +07:00
hathach
cf91660cee
rename hw/bsp/board.h to board_api.h 2023-08-03 15:44:05 +07:00
hathach
4493b838d9
rename ch32v307 and tm4c123 to use underscore 2023-08-03 15:35:01 +07:00
hathach
4cb8b513af
ide settings 2023-08-03 15:17:57 +07:00
Ha Thach
d91869a1fa
Merge pull request #2105 from kholia/cdc_uac2_example
Add CDC+UAC2 composite device example for Pico
2023-08-03 15:13:56 +07:00
hathach
d89fc0772b
add makefile, add cdc_uac2 to cmake example list, update descriptor to build with nrf and samg/7x 2023-08-03 14:55:24 +07:00
Ha Thach
e5b171868a
Merge pull request #2091 from DRNadler/master
For FreeRTOS kernel-aware debugging, when queue registry is enabled, …
2023-08-03 14:30:28 +07:00
hathach
6844055dd1
Merge branch 'master' into cdc_uac2_example 2023-08-03 12:15:07 +07:00
hathach
37a7f9f382
configQUEUE_REGISTRY_SIZE=4 for lpc18 2023-08-03 12:07:28 +07:00
hathach
473f37df95
add osal queue name if needed
also mass change configQUEUE_REGISTRY_SIZE = 4
2023-08-03 12:05:21 +07:00
hathach
de8faf8664
Merge branch 'master' into pr2091 2023-08-03 11:09:33 +07:00
hathach
d09604d636
Revert "Name queues for easier FreeRTOS debugging with task- and queue-aware debuggers"
This reverts commit 11fba59319.
2023-08-03 11:07:23 +07:00
Rocky04
9560d0813f
Set unmounted on configuration reset 2023-08-02 15:25:08 +02:00
hathach
2021c62997
fix pre-commit, also skip lto for rp2040 2023-08-02 17:57:28 +07:00
Ha Thach
5cf94234d2
Merge pull request #2200 from hathach/selective-log
default class driver log level to CFG_TUH/TUD_LOG_LEVEL
2023-08-02 16:26:57 +07:00
hathach
868d52f3a8
move codespell folder to tools 2023-08-02 15:52:06 +07:00
hathach
979bf32266
default class driver log level to CFG_TUH/TUD_LOG_LEVEL allow application to selectively disable usbd/usbh or driver log 2023-08-02 15:34:18 +07:00
Ha Thach
2cf869c1a4
Merge pull request #2197 from HiFiPhile/fix_g0
Fix STM32G0 build.
2023-08-02 10:09:49 +07:00
HiFiPhile
07822979aa Fix STM32G0 build. 2023-08-01 18:41:15 +02:00
Martino Facchin
edee46e794 renesas: host: remove attach_attempt logic 2023-08-01 15:21:31 +02:00
Ha Thach
5e1ed9d580
Merge pull request #2187 from 0xCCF4/master
Fixed typo in binary declaration RP2040 hw bspw family.c
2023-08-01 17:55:40 +07:00
hathach
47ae883ba0
fix build with -flto 2023-08-01 17:26:56 +07:00
hathach
f04e5108b2
Merge branch 'arduino-renesas_ra_hs_rebased' into renesas_ra_hs_rebased 2023-08-01 17:08:03 +07:00
hathach
04f1a34c39
add rusb2_common.c for dynami irq 2023-08-01 17:03:07 +07:00
Martino Facchin
965627e81c rusb2: move dynamic irq function to c file 2023-08-01 11:41:33 +02:00
hathach
40833b585b
enable flto for ra makefile
- remove ra from ci make build since it is already in cmake ci
2023-08-01 15:44:54 +07:00
hathach
789e478d4d
add portenta c33 bsp, add flash by dfu-util 2023-08-01 13:16:37 +07:00
hathach
1cccbaf7ec
fix board name with dash 2023-08-01 11:18:00 +07:00
hathach
3f788a4e5a
enable USBMC for uno r4, add board_init_after_tusb() API
add BOARD_UPPERCASE for board detection
2023-07-31 19:09:40 +07:00
hathach
cb47231518
revert out of scope changes 2023-07-31 17:13:37 +07:00
Ha Thach
ce54984556
Merge pull request #2093 from abakosh/no_osal_delay
osal_none: make it possible to override the task delay function
2023-07-31 17:12:28 +07:00
hathach
0d9973ef87
enable_irq since uno bootloader can disable it. systick triggered, however usb still not work with uno 2023-07-31 16:21:19 +07:00
hathach
feb58ebd54
add uno r4 wih FLASH_IMAGE_START=0x4000, running but interrupt (systick) does not seems to work 2023-07-28 19:01:12 +07:00
0xCCF4
8226b046a9
Fixed typo in rp2040 hw bspw family.c 2023-07-28 11:19:08 +02:00
hathach
e56d5443a8
- revert usb address
- more clean up
2023-07-28 12:42:40 +07:00
hathach
6021803d58
fix ci 2023-07-28 11:33:26 +07:00
hathach
ec093bebad
Merge branch 'master' into renesas_ra_hs_rebased 2023-07-27 16:50:34 +07:00
Ha Thach
db59494b1b
Merge pull request #2179 from hathach/enhance-ehci
Enhance EHCI
2023-07-27 16:15:43 +07:00
hathach
5a29db2787
add check for edpt_xfer() with halted, also reset data toggle when clear stall 2023-07-27 15:52:55 +07:00
Ha Thach
d9cc30291f
Merge pull request #2182 from hathach/correct-hcd_edpt_clear_stall-API
correct hcd_edpt_clear_stall() API signature
2023-07-26 21:42:08 +07:00
hathach
10575c1b38
mising ehci 2023-07-26 20:48:18 +07:00
hathach
c37a957174
correct hcd_edpt_clear_stall() API signature 2023-07-26 19:56:48 +07:00
hathach
6b6dcc6c09
refactored multiple ports for hcd rusb2 2023-07-26 19:52:33 +07:00
hathach
1cb3f0e92a
increase stack size for 6 series to 0x1000, 4 series to 0x800 2023-07-26 18:56:13 +07:00
hathach
fbaa148fe0
updating hcd rusb2
- make osal_task_delay() as weak function in usbh
- implement osal_task_delay() in hcd rusb2 (may moved to other places)
2023-07-26 18:55:41 +07:00
hathach
4deea87579
improve processing usb complete and error isr.
also merge them together
2023-07-25 15:07:21 +07:00
hathach
dc74e634f9
fix unaligned hub status_change 2023-07-25 12:35:40 +07:00
hathach
ef69da054e
use standard EHCI USB INT instead of chipidea async/period interrupt to be compatible with other EHCI implementation 2023-07-25 12:03:54 +07:00
Ha Thach
9554283b03
Merge pull request #2175 from hathach/hcd-abort-xfer
Add HCD abort xfer API
2023-07-24 22:08:53 +07:00
Ha Thach
fda92fd34a
Merge branch 'master' into hcd-abort-xfer 2023-07-24 21:38:46 +07:00
Ha Thach
0b38941362
Merge pull request #2173 from hathach/imxrt-dcache-align
change dcache clean/invalidate return type to bool
2023-07-24 21:36:15 +07:00
hathach
f295aaf185
add hcd abort xfer for rp2040 pio usb 2023-07-24 20:58:50 +07:00
hathach
fd29fd923a
clean up 2023-07-24 20:53:44 +07:00
Ha Thach
d685ac689b
Merge pull request #2172 from hathach/cmake-4088
update bsp for 4088
2023-07-24 20:49:20 +07:00
hathach
25225ba792
minor clean up 2023-07-24 18:04:42 +07:00
hathach
d254256047
change dcache clean/invalidate return type to bool
add tu_assert() check for aligned 32byte address for imxrt
2023-07-24 17:54:24 +07:00
hathach
14a7379799
fix ohci warnings, and add freertosconfig for lpc4088 2023-07-24 16:54:02 +07:00
hathach
210fc7d038
add etm trace pinmux for 4088 quickstart 2023-07-24 16:19:45 +07:00
hathach
ef49b93532
rename CFG_TUSB_MEM_SECTION to CFG_TUD_MEM_SECTION in device stack
CFG_TUD_MEM_SECTION is default to CFG_TUSB_MEM_SECTION
2023-07-24 15:46:21 +07:00
hathach
a268e0b7a3
add lpc40 to cmake 2023-07-24 15:18:41 +07:00
Ha Thach
8fa0b74d80
Merge pull request #2155 from jferreir/xmc4700_relax
Board support for XMC4700_RELAX
2023-07-21 19:08:51 +07:00
hathach
c122e9df73
implement hcd_edpt_abort_xfer() for EHCI, also move thing around a bit 2023-07-21 19:06:36 +07:00
hathach
14c98dd863
minor ehci rename, move code around 2023-07-21 16:39:30 +07:00
hathach
0da273ea79
add stub hcd_edpt_abort_xfer() for all ports 2023-07-21 12:52:26 +07:00
hathach
1cc7c5d030
add hcd_edpt_abort_xfer() API 2023-07-21 12:43:48 +07:00
jferreir
34ff7af7c7 Fix trailing spaces issue 2023-07-20 18:12:36 +02:00
jferreir
48101cc294
Merge branch 'hathach:master' into xmc4700_relax 2023-07-20 17:12:57 +02:00
jferreir
6ac7f19640 fix compilation issues for XMC4500_RELAX 2023-07-20 17:01:00 +02:00
hathach
954f0e948d prefer application callback over built-in driver 2023-07-20 17:01:00 +02:00
hathach
eae8678d67 improve logging, allow easier to turn off usbd, driver logging
can be useful when focusing on let's say usbh
2023-07-20 17:01:00 +02:00
Ha Thach
17576a6949
Merge pull request #2156 from hathach/usbh-xfer-user-callback
Usbh xfer user callback
2023-07-20 18:30:09 +07:00
hathach
16ad918d96
prefer application callback over built-in driver 2023-07-20 17:37:06 +07:00
hathach
77495cf119
improve logging, allow easier to turn off usbd, driver logging
can be useful when focusing on let's say usbh
2023-07-20 17:12:00 +07:00
jferreir
2772581c28 Add support for XMC4700_RELAX kit 2023-07-20 10:53:59 +02:00
jferreir
59778664c9 Add UART_DEV support 2023-07-20 10:53:29 +02:00
jferreir
b1e345b6bc Add UART_DEV support 2023-07-20 10:52:16 +02:00
Ha Thach
6c7c9f2ef5
Merge pull request #2152 from kilograham/is_pico_pio_usb_supported
add is_compiler_supported_by_pico_pio_usb() for rp2040
2023-07-18 23:54:33 +07:00
graham sanderson
08a1892801 add is_compiler_supported_by_pico_pio_usb()
previosuly users of TinyUSB (e.g. pico-examples) would have to decide this for themselves. This function couples
the check closer with the actual version of Pico-PIO-USB used (since TinyUSB picks)
2023-07-18 11:04:46 -05:00
Ha Thach
e3d4385280
Merge pull request #2150 from kkitayam/flash-jlink-for-windows
Fix flash-jlink target to work on Windows command prompt
2023-07-18 22:33:57 +07:00
graham sanderson
3678a25baa Fix build issues when building for RP2040 from pico-examples/pico-sdk.
* include_guard requires GLOBAL as family.cmake is included in multiple non child places
* the following recently added check is suprfluous (family_configure_host_example for rp2040 should do this already),
  and breaks if pico_pio_usb is not avaialble, so i have removed
   # Add pico-pio-usb for rp2040 since user can choose to run on bit-banging host
   if(FAMILY STREQUAL "rp2040")
      family_add_pico_pio_usb(${PROJECT})
   endif()
* added new familt_example_missing_dependency functino to print missing dependency warning, so
  pico-examples can override it to be less in your face, and also more contextual to pico-examples
2023-07-18 09:03:01 -05:00
kkitayam
efa8b4a9b8 Change a variable to a target so that it works on windows command prompt
echo command of windows command prompt can't handle line breaks in a variable.
2023-07-18 22:55:55 +09:00
Aladdin Bakosh
3fdd2a40b2 osal_none: make it possible to override the task delay function 2023-07-18 14:14:23 +02:00
Ha Thach
973c7d47eb
Merge pull request #2149 from hathach/fix-etm-trace-h7
fix etm trace clock with stm32h743eval board
2023-07-18 16:40:26 +07:00
Ha Thach
2bab947e38
Merge pull request #2146 from tannewt/host_cache_align
Fix host buffer alignment setting
2023-07-18 16:39:48 +07:00
hathach
2cd0b9ec35
fix etm trace clock with stm32h743eval board 2023-07-18 16:22:05 +07:00
hathach
b56c4fe945
Merge branch 'master' into renesas_ra_hs_rebased 2023-07-18 15:13:58 +07:00
Ha Thach
6798e7e059
Merge pull request #2120 from abakosh/RA_STALL
fix(RA_hcd): STALL status can be also 3 not only 2
2023-07-18 15:11:02 +07:00
Ha Thach
c5e23eaa14
Merge pull request #2148 from hathach/imxrt-bsp
Imxrt bsp
2023-07-18 14:47:21 +07:00
hathach
5723d38087
correct jlink dev for rt1010 2023-07-18 13:28:57 +07:00
Aladdin Bakosh
3230d5b1ea debugging can be configured on renesas dcd 2023-07-17 11:54:09 +02:00
Aladdin Bakosh
41b608562a debugging can be configured on renesas hcd 2023-07-17 11:54:09 +02:00
Aladdin Bakosh
1923b1845d fix(RA_hcd): STALL status can be also 3 not only 2 2023-07-17 11:54:09 +02:00
Scott Shawcroft
8b6d0a166b
Fix host buffer alignment setting 2023-07-14 15:30:22 -07:00
hathach
eb298e2b81
add clock_config.c for imxrt generated by mcuxpresso config 2023-07-14 12:45:54 +07:00
Szymon Janc
4b59cb9a20 Fix documentation symlinks
There were typos in symlinks target names resulting in following
warrning on checkout (at least in Mynewt newt tool):
* Warning: stat mynewt/repos/tinyusb/docs/contributing/code_of_conduct.rst: no such file or directory
* Warning: stat mynewt/repos/tinyusb/docs/info/contributors.rst: no such file or directory
2023-07-10 12:12:26 +02:00
hathach
0f53e746ff move check highspeed to rusb_ra 2023-07-07 18:41:16 +07:00
hathach
f7e7ba92ca
enable host example for ra 2023-07-07 16:27:12 +07:00
hathach
88478a9d05
add PORT selection for makefile 2023-07-07 16:24:22 +07:00
hathach
e0f1ba8b0e
fully work with multiple ports without CFG_TUSB_RHPORT0/1 2023-07-07 16:07:11 +07:00
hathach
4c156100fa
use unaligned access read for hw fifo 2023-07-07 12:27:18 +07:00
hathach
4bbacb1008
correct setting trace clock 2023-07-07 11:07:57 +07:00
hathach
c53acb1455
fix build with rx 2023-07-06 20:10:58 +07:00
hathach
1eefc2b3ef
more multiple ports update 2023-07-06 19:35:42 +07:00
hathach
95b77a0e73
add rusb2_module_start(), more update for multiple ports for dcd rusb2 2023-07-06 15:54:07 +07:00
hathach
f308435b64
update ra type to include usbhs registers 2023-07-06 09:34:33 +07:00
hathach
4f4c93594d
minor pipe clean up 2023-07-05 17:51:36 +07:00
hathach
f79529c09c
usb hs work with ra 6m5 ek 2023-07-05 17:13:01 +07:00
hathach
1d6ca3bc9b
fix ra4m3 ek build 2023-07-04 20:04:54 +07:00
hathach
071c30f381
update fsp to version 4.5, correct RA BSP. Fix ETM Trace with 6m5 by lowering PLL to 128Mhz. 2023-07-04 19:27:37 +07:00
Andrew Hooper
cfc146e18f Add FreeRTOSConfig for family stm32f4 2023-07-04 08:08:05 -04:00
Andrew Hooper
34966304dd Restore RTOS argument for stm32f4 2023-07-03 11:21:47 -04:00
hathach
bb0e688b8e
add jlinkscript for detect rtt 2023-07-03 16:35:22 +07:00
hathach
04b1a67898
Merge branch 'master' into renesas_ra_hs_rebased 2023-07-03 13:09:43 +07:00
Ha Thach
f1e006d09b
Merge pull request #2137 from hathach/cmake-ra
enhance RA family
2023-07-03 12:25:29 +07:00
hathach
d5d1b43eb9
board pin data clean up 2023-07-03 12:07:27 +07:00
hathach
4080ab3d03
wrap up ra update 2023-07-03 11:22:19 +07:00
hathach
960d9fa6f1
move files around 2023-07-03 11:03:50 +07:00
hathach
ad7764b5b2
move vector_data.h and ioport_cfg.h to common family 2023-07-03 10:54:37 +07:00
Ha Thach
942eb0f323
Merge pull request #2129 from dauc/patch-1
Fix minor spelling issues
2023-07-02 23:40:37 +07:00
hathach
787229a35e
add etm trace for 6m5 2023-07-02 23:39:43 +07:00
Lars Pötter
2029ca9536 also fixed pico_trac() log messages. 2023-07-02 10:53:08 +02:00
Lars Pötter
0693462eba made line ends consistent. 2023-07-02 09:02:24 +02:00
hathach
ec02ddf986
initial ra6m5 ek, board_test led + sw works 2023-07-01 21:43:52 +07:00
A. Hooper
9554a354d4
Merge branch 'hathach:master' into blackf407VE 2023-07-01 08:03:16 -04:00
Andrew Hooper
7d45a43f57 Correct loader file 2023-07-01 07:59:39 -04:00
hathach
14f1123bbd
remove left-over build_arm 2023-07-01 17:55:36 +07:00
hathach
e7431f54f2
fix undef with fsp 2023-07-01 17:46:21 +07:00
hathach
54dc699ddd
forgot board.mk for ra6m1 2023-07-01 17:43:06 +07:00
hathach
c5d958d104
add ra6m1 board 2023-07-01 17:27:45 +07:00
hathach
50381f7b4c
refactor to match fsp_cfg 2023-07-01 17:09:09 +07:00
hathach
22fb66436d
update linker 2023-07-01 16:40:47 +07:00
hathach
99e75e6a8a
rework ra build 2023-07-01 12:41:12 +07:00
mndza
14d69e46be
Update support for Cynthion boards
- Rename LUNA to Cynthion
- Add support for newer revisions (>=0.6)
- Bootloader (saturn-v) default size is now 2K
2023-06-30 11:30:33 +02:00
hathach
48738df489
move LTO checked to family_support.cmake 2023-06-30 16:05:59 +07:00
hathach
3cb4d73899
clean up ra makefile 2023-06-30 14:52:04 +07:00
Ha Thach
f5d0510064
Update build badge 2023-06-29 22:57:58 +07:00
Ha Thach
6e1eec908a
Merge pull request #2130 from hathach/hcd-frame-pio-usb
add hcd_frame_number() for pio-usb host
2023-06-29 22:46:24 +07:00
hathach
6284f2d722
add hcd_frame_number() for pio-usb host 2023-06-29 18:58:33 +07:00
Dave Nadler
11fba59319 Name queues for easier FreeRTOS debugging with task- and queue-aware debuggers 2023-06-28 17:25:22 -04:00
Dave Nadler
cca4be6c67
Merge branch 'hathach:master' into master 2023-06-28 17:05:19 -04:00
Devin Auclair
98fb10a724
Fix minor spelling 2023-06-28 14:03:18 -04:00
Ha Thach
fe77b6713b
Merge pull request #2085 from georgeboc/msc-ready-bug-fix
Fixes bug in tuh_msc_ready
2023-06-27 17:57:35 +07:00
Ha Thach
5cea4b2420
Merge pull request #2128 from hathach/cmake-freertos
rework cmake with rtos support add RTOS to family_configure_device/host/dual_example()
2023-06-27 16:18:17 +07:00
hathach
e43387abac
rework cmake with rtos support add RTOS to family_configure_device/host/dual_example() 2023-06-27 15:45:38 +07:00
Ha Thach
bc0d6c7e92
Merge pull request #2127 from hathach/rp2040-cmake-cleanup
Rp2040 cmake cleanup
2023-06-26 23:50:38 +07:00
hathach
a61d0f074f
more rp2040 family clean up 2023-06-26 23:08:59 +07:00
hathach
8aa28e63fb
minor clean up with include_guard() 2023-06-26 17:54:31 +07:00
hathach
3cfb838ba7
fix warnings when enable rtt with rp2040 2023-06-26 17:03:45 +07:00
Ha Thach
7454e45796
Merge pull request #2125 from hathach/cmake-detect-family
auto detect FAMILY based on BOARD
2023-06-26 14:08:17 +07:00
hathach
200e58d11e
auto detect FAMILY based on BOARD 2023-06-26 13:38:24 +07:00
Ha Thach
eb53680a06
Merge pull request #2124 from hathach/refactor-make-build
Refactor make build
2023-06-25 13:48:00 +07:00
hathach
06d93e95d1
update hw test l4 2023-06-25 10:15:05 +07:00
hathach
2ecd7c148d
fix ci with lpc55 and kl, move hw test l4 to cmake iar 2023-06-25 09:55:05 +07:00
hathach
15376397b1
run ci with -DCMAKE_BUILD_TYPE=MinSizeRel 2023-06-25 00:05:23 +07:00
hathach
30ccfe0832
more cmake less make 2023-06-24 23:36:52 +07:00
hathach
9b2b4ce647
move some family ci make to cmake 2023-06-24 23:32:24 +07:00
hathach
a64d5607a7
fix l4 freertos build 2023-06-24 23:17:28 +07:00
hathach
b9cefb1440
fix build with L4 2023-06-24 23:10:01 +07:00
hathach
c81d8b43a1
fix ci build 2023-06-24 22:58:15 +07:00
Dave Nadler
bd897d9c14
Merge branch 'hathach:master' into master 2023-06-24 11:53:24 -04:00
hathach
430f16bf76
move all IAR to cmake 2023-06-24 22:36:53 +07:00
hathach
2a96ef2519
add cmake for f0, f1 2023-06-24 21:47:55 +07:00
hathach
946d3fdd4f
fix iar with make 2023-06-24 21:17:40 +07:00
hathach
38a582634e
fix missing replace 2023-06-24 20:32:18 +07:00
hathach
eb4380fa14
more make update 2023-06-24 20:17:48 +07:00
hathach
2216704db8
rename GCC_CFLAGS to CFLAGS_GCC, GCC_SRC_S to SRC_S_GCC etc .. 2023-06-24 19:31:33 +07:00
hathach
7d0ce5605a
allow to skip CPU_CORE 2023-06-24 19:08:37 +07:00
hathach
086c1d4090
more CPU_CORE 2023-06-24 18:54:14 +07:00
hathach
eb7fcf1b74
add CPU_CORE for all family 2023-06-24 18:38:41 +07:00
hathach
b59b65d2ed
rename to kinetis_k32l2, rename OPT_MCU_KINETIS_K32 to OPT_MCU_KINETIS_K32L 2023-06-24 18:26:51 +07:00
hathach
dbf7534cd4
update all stm32 to use new enhance make 2023-06-24 18:09:05 +07:00
hathach
edbf06aaab
separate iar and gcc build for clean make, also add cpu specific make 2023-06-24 17:35:37 +07:00
Andrew Hooper
3a5f43528e Board support for STM32F407VETx 2023-06-23 11:51:58 -04:00
Ha Thach
50e61e0e16
Merge pull request #2101 from eustas/patch-1
Fix typos
2023-06-21 15:51:03 +07:00
Ha Thach
6cf735031f
Merge pull request #2117 from hathach/etm_trace
Etm trace
2023-06-21 00:24:26 +07:00
hathach
77e01448e2
ide settings 2023-06-20 16:41:51 +07:00
hathach
c789cfe518
use system_nrf5x.c built-in support for ETM with ENABLE_ETM 2023-06-20 16:13:10 +07:00
hathach
19c99d3b42
etm trace for nrf52840 2023-06-20 13:19:08 +07:00
hathach
1b658ae109
add etm trace for mcb1800
clean up other ide setting
2023-06-20 13:12:12 +07:00
Angel Molina
3d685fe7f2 Add CDC+UAC2 composite device example for Pico
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2023-06-19 16:00:03 +05:30
hathach
7dc6829519
enable etm trace support for h743 eval 2023-06-19 16:33:47 +07:00
dsugisawa-mixi
5e78f08a24 fix example of bare_api, check empty string 2023-06-17 20:04:46 +09:00
Ha Thach
13bb132044
Merge pull request #2113 from hathach/correct-iar-build
correct cmake iar build
2023-06-16 19:53:01 +07:00
hathach
268ce0287f
correct cmake iar build 2023-06-16 19:39:03 +07:00
Ha Thach
74624381b3
Merge pull request #2112 from hathach/minor-naming-opt-mcu-imxrt
Minor naming opt mcu imxrt
2023-06-16 18:57:26 +07:00
hathach
1419091923
update h7 to cmake, and move iar build to cmake 2023-06-16 16:47:32 +07:00
hathach
e754795d3a
fix build warnings 2023-06-16 15:29:34 +07:00
hathach
a7f330fa94
fix build, update freertos config for cmake 2023-06-16 14:17:25 +07:00
hathach
65d6acdbfa
fix build warnings 2023-06-16 12:02:42 +07:00
hathach
8af8869d3b
renam OPT_MCU_MIMXRT to OPT_MCU_MIMXRT1XXX
fix build util with makefile
2023-06-16 11:26:38 +07:00
hathach
96f7cd09dc
remove legacy transdimension driver 2023-06-16 10:45:59 +07:00
Ha Thach
433ffe2152
Merge pull request #1985 from kkitayam/uvc_bulk
Add the capability for video class to handle a bulk endpoint in the streaming interface.
2023-06-15 16:28:33 +07:00
Ha Thach
81450bc71d
Merge pull request #2110 from hathach/chipidea-fs
Chipidea fs
2023-06-15 14:18:00 +07:00
hathach
1a37777f59
fix ci with win/mac 2023-06-15 13:11:21 +07:00
hathach
d70403f1f4
refactor khci to chipidea fs driver for device (host is not yet) 2023-06-15 13:06:27 +07:00
hathach
bce282186e
update kinetis kl to use mcx-sdk, also add cmake support
note: cdc_msc_freertos built but does not seems to work with kl
2023-06-14 22:36:44 +07:00
Ha Thach
4e61eb6d9e
Merge pull request #2109 from hathach/typec-rename
Typec rename
2023-06-14 16:47:20 +07:00
hathach
31a66eb5bc
mcx neeed helps to locate rtt control block 2023-06-14 15:33:57 +07:00
hathach
8b8b9690ad
update segger rtt to fix cast align 2023-06-14 12:01:21 +07:00
hathach
05969d2a58
rename typec driver 2023-06-14 11:07:58 +07:00
hathach
a88d7c7c74
ide setting 2023-06-13 17:47:53 +07:00
Ha Thach
365c4169a5
Merge pull request #2107 from hathach/fix-usbh-enum-issue
fix usbh issue when device genreate multiple attach/detach/attach when plugging in
2023-06-13 17:32:55 +07:00
hathach
9593ab7acc
fix usbh issue when device genreate multiple attach/detach/attach when plugging in 2023-06-13 16:40:29 +07:00
Ha Thach
bbc76e7777
Merge pull request #2104 from hathach/g4-pd
Initial support for USB PD stack
2023-06-12 23:14:48 +07:00
hathach
41801c2a6b
add typec example to cmake 2023-06-12 17:12:25 +07:00
hathach
d2d486dced
update docs 2023-06-12 17:06:04 +07:00
hathach
7a1179a4e1
tested with 9V request 2023-06-12 17:01:54 +07:00
hathach
6941a5af81
wrap up initial PD support for G4 2023-06-12 16:42:27 +07:00
hathach
c28503060c
ad pd_types.h 2023-06-12 14:57:50 +07:00
hathach
debde4cc97
response with request safe5v, get passed PS_READY 2023-06-12 12:14:55 +07:00
Ha Thach
39a64334aa
Merge pull request #2100 from kilograham/top_broken
movement of TOP in c0ecf8b5 broke RP2040 SDK build
2023-06-10 17:24:23 +07:00
hathach
bb4fb0543b
able to parse SOURCE_CAP message from dfp 2023-06-09 19:38:50 +07:00
hathach
912802456b
move protocol message to stack, disable battery in PWR's CR3
there is still issue with CC1/CC2 pull down resistor and vstate is not
correct.
2023-06-09 18:15:28 +07:00
Eugene Kliuchnikov
0833806980 Fix typos 2023-06-08 15:38:30 +02:00
hathach
8181d470e5
enable DMA for both pd rx, tx 2023-06-08 18:55:54 +07:00
hathach
9c2a8490af
dma rx works well 2023-06-08 13:37:37 +07:00
hathach
fc761953b3
define tuc_int_handler() to empty if TUC not enabled 2023-06-08 09:34:15 +07:00
hathach
7fd0a17bc3
default CFG_TUC_ENABLED to 0 2023-06-08 09:11:29 +07:00
graham sanderson
0493983a8f movement of TOP in c0ecf8b5 broke RP2040 SDK build 2023-06-07 14:46:14 -05:00
Ha Thach
aaec12a3fb
Merge pull request #2077 from abakosh/renesas_packed
fix(RA Host Portable): git rid of the IAR warnings for packed
2023-06-07 19:00:41 +07:00
hathach
9b7dee563e
able to response with good crc 2023-06-07 18:57:48 +07:00
Aladdin Bakosh
8bb012e50b fix(RA): static assert RUSB2 register 2023-06-07 12:01:59 +02:00
hathach
b893f1d541
inital support for usb typec and pd example 2023-06-07 15:10:40 +07:00
hathach
914e82b25d
able to receive first PD message 2023-06-07 09:36:37 +07:00
hathach
e02eee7477
revert board flash latency to 8 2023-06-07 00:14:22 +07:00
hathach
23f7130ae4
update rtt to rev 25842 2023-06-07 00:07:58 +07:00
hathach
b3fda4a354
able to get usbpd irq handler
- handle cc1, cc2 voltage changes
- get order set, rx message end interrupt
- add  segger rtt support for cmake
2023-06-06 23:55:33 +07:00
hathach
a70978e057
clean up 2023-06-05 19:53:40 +07:00
hathach
f6a45a7aab
clean up 2023-06-05 15:41:45 +07:00
Martino Facchin
2b735ee8f5 renesas_ra: fix wrong ifdef
Since CFG_TUSB_RHPORT1_MODE is always defined now for backwards compatibility
2023-06-05 09:48:06 +02:00
Martino Facchin
cdbd3a0b4e Merge remote-tracking branch 'mainline/master' into HEAD
Update fsp to 4.0.0
2023-06-05 09:12:50 +02:00
Martino Facchin
cdae66c837 renesas_rx: fix compilation on latest GCC
__CCRX__ only applyes to version 4 of RX family compiler http://tool-support.renesas.com/autoupdate/support/onlinehelp/csp/V4.01.00/CS+.chm/Compiler-CCRX.chm/Output/ccrx04c0201y.html

__RX__ is one of the macros exported by latest gcc (gcc_8.3.0.202305_rx_elf)
2023-06-05 09:04:55 +02:00
Aladdin Bakosh
268ab5863a fix(RA Host Portable): git rid of the IAR warnings for packed 2023-06-02 14:14:57 +02:00
Ha Thach
c7686f8d5e
Merge pull request #2092 from hathach/stm32g4
Stm32g4
2023-06-02 17:07:28 +07:00
hathach
2016ad72f3
fix iar ci 2023-06-02 16:21:49 +07:00
hathach
11fb837b51
fix ci 2023-06-02 16:15:26 +07:00
hathach
c2bc363f06
build g0 g4 iar cmake 2023-06-02 16:11:00 +07:00
hathach
bb795e6a5e
update cmake to build with IAR for g0 and g4 2023-06-02 15:26:16 +07:00
hathach
fcf7791454
add IAR support for G0 with cmake 2023-06-02 13:27:18 +07:00
hathach
e7090c7514
cmake refactor 2023-06-02 11:42:17 +07:00
hathach
ba3d71b615
fix usb clock for dpow1 2023-06-02 10:19:46 +07:00
Dave Nadler
e8b7f21af6 For FreeRTOS kernel-aware debugging, when queue registry is enabled, label tinyUSB queue 2023-06-01 12:57:44 -04:00
Ha Thach
002cb9289d
Merge pull request #2089 from DRNadler/master
Fix diagnostic format string (missing %u)
2023-06-01 22:56:18 +07:00
hathach
c3bde520cc
add new b_g474e_dpow1 board 2023-06-01 22:16:30 +07:00
Dave Nadler
70a92291fe Fix diagnostic format string (missing %u) 2023-06-01 10:58:03 -04:00
Ha Thach
cbbd858be4
Merge pull request #1942 from HubertD/feature/STM32G0
STM32G0 support
2023-06-01 21:34:39 +07:00
hathach
dc3afdbf3b
add note for B0 clock variant 2023-06-01 20:52:48 +07:00
hathach
c750030f7a
add freertosconfig for g0, add cmake stlink, add g0 to cmake ci 2023-06-01 17:09:00 +07:00
hathach
6280cba6e8
tested with g0b1 nucleo 2023-06-01 16:52:58 +07:00
hathach
6b44d8fb55
add cmake support for g0, exlicitly call HAL_Init() and also HAL_IncTick() in systick irq, fix button active state. 2023-06-01 15:58:02 +07:00
hathach
af59864ab5
Merge branch 'master' into feature/STM32G0 2023-06-01 13:28:28 +07:00
Ha Thach
77714e02ca
Merge pull request #2088 from hathach/minor-cleanup
add lto for cmake
2023-06-01 13:22:09 +07:00
hathach
62b2d05d34
skip set CMAKE_EXECUTABLE_SUFFIX for espressif port 2023-06-01 12:50:32 +07:00
hathach
19a597bcae
add lto for cmake 2023-06-01 12:36:08 +07:00
Ha Thach
ddc029ce54
Merge pull request #2016 from ipopov/master
Even when we get an empty "status change" interrupt from the hub, schedule another interrupt poll
2023-05-29 13:47:23 +07:00
hathach
20ef6c4ef7
slightly clean up 2023-05-29 13:29:11 +07:00
hathach
5c428d35a6
check status_change is not zero first 2023-05-29 13:27:20 +07:00
Ivo Popov
8ad024e51b
Even when we get an empty "status change" interrupt from the hub, schedule another interrupt poll.
During enumeration, when there are multiple devices attached to the
hub as it's plugged into the Pi Pico, enumeration hangs, because we
get a "status change" callback with value zero. With this patch, we
retry several times on "zero" status change callbacks, until
eventually we succeed.

This is the cheapo hub that exhibits this behavior, but I assume it's
not the only one: https://www.amazon.com/gp/product/B083RQMC7S.

While debugging this, I consulted the implementation in the Linux
kernel. There, hub setup explicitly checks each port individually,
before starting to depend on "status change" interrupts:
https://elixir.bootlin.com/linux/latest/source/drivers/usb/core/hub.c#L1133.
We probably should do something like that here, but it's a much bigger
change.
2023-05-29 13:18:16 +07:00
gitlab
acfaa4494f Fixes bug in tuh_msc_ready 2023-05-28 15:40:01 +01:00
Ha Thach
069e1ef84f
Merge pull request #2084 from hathach/more-build2
More build2
2023-05-26 20:23:25 +07:00
hathach
59ad5c59df
fix artifacts location 2023-05-26 18:58:21 +07:00
hathach
4bd02fb04d
more test 2023-05-26 18:54:14 +07:00
hathach
c88e7481be
retry hw test 2023-05-26 17:15:54 +07:00
hathach
7fb74a33a1
forgot to move hw test 2023-05-26 16:44:29 +07:00
hathach
7ac85d08c7
move lpc18 and rp2040 to cmake workflow since rp2040 often failed randomly with make 2023-05-26 16:37:47 +07:00
hathach
05cc342dfa
update deps, rename kinetis_k32 to k32l 2023-05-26 15:45:55 +07:00
hathach
1d857605b7
use get_deps.py 2023-05-26 15:25:55 +07:00
hathach
b262164a35
fix build with net_lwip_webserver example 2023-05-26 15:16:18 +07:00
hathach
c0ecf8b50f
move set TOP to family_support.cmake 2023-05-26 14:56:22 +07:00
Ha Thach
23c8670e79
Merge pull request #2081 from hathach/more-build-system
More build system
2023-05-25 21:54:31 +07:00
hathach
4c9605910f
update cmake with freertos 2023-05-25 21:27:26 +07:00
hathach
5fea010406
add family_support_configure_common() 2023-05-25 17:27:05 +07:00
hathach
26d05d7fc9
fix issue with ftdi host driver with status bytes
add workflow_dispatch to all ci workflow
2023-05-25 16:53:32 +07:00
hathach
625c27ca58
add workflow_dispatch for manual trigger 2023-05-25 16:20:58 +07:00
hathach
7a3d7a7c23
cmsis_5 missing mcx and imxrt 2023-05-25 16:17:41 +07:00
hathach
5a0c2bd638
update get_deps.py to support geting family as argument 2023-05-25 16:11:57 +07:00
Ha Thach
eedafb23f7
Merge pull request #2063 from abakosh/develop
fix(RA Host Portable): implement missing function __builtin_ctz(x)
2023-05-24 20:11:50 +07:00
Aladdin Bakosh
57d2eb603b fix(RA Host Portable): implement missing function __builtin_ctz(x) for IAR 2023-05-24 11:38:40 +02:00
Ha Thach
1ef820ecfe
Enhance chipidea (#2075)
* update chipidea dcd, remove manual ep_count and use DCCPARAMS to get number of endpoint instead
* add dcd dcache for chipidea
* add cmake for lpc18
* add makefile build for mcx
* use fork of mcu sdk
* fix ci build with nrf
* flash rp2040 with openocd
2023-05-23 21:45:00 +07:00
Ha Thach
c998e9c60b
Merge pull request #2069 from hathach/minor-build-system
Minor build system
2023-05-19 18:39:21 +07:00
hathach
9f0bae4c3f
fix freertos build with nrf 2023-05-19 18:04:08 +07:00
hathach
49d8d27770
improve flash target 2023-05-19 16:27:07 +07:00
hathach
270136e84a
adding cpu core .mk for makefile
fix cortex m33 for nrf5340 dk
2023-05-19 16:02:26 +07:00
hathach
e8dd200fed
move cmake folder to tools/ 2023-05-19 14:46:39 +07:00
Ha Thach
6ecd480006
Merge pull request #2061 from hathach/imx-usbhost
iMX.RT EHCI add dcache support and other fixes + refactor
2023-05-19 14:18:07 +07:00
hathach
7211dd18b4
more dcache fix 2023-05-19 13:42:26 +07:00
hathach
5dae5e1292
ehci fix dcache clean when control endpoint failed 2023-05-19 13:32:49 +07:00
hathach
f26a93908e
only clean/invalidate dcache on imxrt if memory is not in DTCM 2023-05-19 10:56:52 +07:00
hathach
f22d8ee3b9
add rt1060 jlink config 2023-05-18 16:46:02 +07:00
hathach
ec4bd39a92
refactor ehci: add attached_buffer for dcache invalidate for IN transfer 2023-05-18 16:41:06 +07:00
hathach
27acaa013b
refactor ehci, since usbh only queue 1 TD per queue head 2023-05-18 15:44:08 +07:00
hathach
49e2aabc81
EHCI more improvement
- more dcache clean/invalidate
- extract init_periodic_list()
- improve isr list handling
2023-05-18 13:45:38 +07:00
hathach
a0aea52a11
more cache, fix an similar issue with OHCI when removing an queue head 2023-05-18 12:39:53 +07:00
hathach
e4f4ad5bc3
use weak local for dcache function to skip if() 2023-05-18 10:21:11 +07:00
hathach
a3e017bfd2
EHCI adding dcahe support, passing enumertaion 2023-05-18 10:04:48 +07:00
Martino Facchin
32f9f452af renesas: provide default for CFG_TUSB_RHPORT1_MODE
Should fix CI failure for Renesas RX family
2023-05-17 12:13:28 +02:00
hathach
eb89df4115
adding hcd_dcache_clean/hcd_dcache_invalidate 2023-05-17 16:14:35 +07:00
hathach
a9aa0e3a1a
fix error on EHCI causes xfer error in non-queued qhd which cause memory fault 2023-05-16 11:10:44 +07:00
hathach
1e998ce3bd
usbd: fix control transfer issue for chipidea hs when previous status and new setup complete in the same isr frame
change usbd edpt busy/stalled/claimed value to 0/1 instead of
(true/false) since they are 1-bit field.
2023-05-16 11:09:23 +07:00
hathach
2c48050993
add various check for disconncted device, also fix #1511 un-roll recursive hub removal with usbh queue 2023-05-16 11:09:22 +07:00
hathach
1c4f22a54c
EHCI: fix xfer failed with disconnected device as stalled
- change CFG_TUH_ENDPOINT_MAX to 16 (max endpoint pair per device) if
not defined
- change QHD_MAX for EHCI, should be user configurable and more
optimized in the future
2023-05-16 11:09:22 +07:00
hathach
206d63e038
correct EHCI reporting failed xfer (instead of stalled) when device is unplugged 2023-05-16 11:09:21 +07:00
Ha Thach
e2d3c0b2d3
Merge pull request #2065 from hathach/cmake-lpc55
add support for nrf5340 application core with pca10059
2023-05-16 11:04:07 +07:00
hathach
116a258858
fix nrf build 2023-05-16 10:14:00 +07:00
hathach
792cf95f2d
revert ci gcc to 11.2, update nrfx to version 2.11 2023-05-15 23:35:29 +07:00
hathach
d7175ad834
update nrf cmake and make to support nrf5340 (pca10095) 2023-05-15 23:34:24 +07:00
Ha Thach
9f5b08dc93
Update build_arm.yml
try bump up gcc to 12
2023-05-15 14:39:49 +07:00
hathach
9fd0fee458
adding nrf 2023-05-15 14:25:42 +07:00
Ha Thach
a57ba87859
revert family.mk 2023-05-13 13:24:00 +07:00
hathach
dbcef41f95
add support for other lpc55 boards 2023-05-13 13:24:00 +07:00
hathach
2c745d1b1e
able to build lpc55 2023-05-13 13:23:59 +07:00
HiFiPhile
f1bef8d8dd
Merge pull request #2057 from abakosh/develop
fix(iar_template.ipcf): add missing portable links, and delete the us…
2023-05-12 13:15:19 +02:00
HiFiPhile
9c1918fe46
Remove deprecated dcd_synopsys 2023-05-12 13:13:42 +02:00
Ha Thach
aaff27d220
Merge pull request #2058 from hathach/cmake-imxrt
Add Cmake for imxrt and Fix EHCI PortSC issue
2023-05-10 16:06:04 +07:00
hathach
eaa159c0a6 more doc build fix 2023-05-10 15:52:33 +07:00
hathach
137d516882 try to fix build doc 2023-05-10 15:32:39 +07:00
hathach
1e91fc97e2 remove imxrt from makebuild 2023-05-10 14:59:23 +07:00
hathach
c4b2fed8bd forgot sudo 2023-05-10 13:51:45 +07:00
hathach
c3770019cb install ninja 2023-05-10 13:50:24 +07:00
hathach
8e3bdd2391 add python script to help building cmake, build all imxrt boards with ci 2023-05-10 13:09:15 +07:00
hathach
4c796b89d8 try to build with cmake on ci 2023-05-10 11:20:26 +07:00
hathach
c0e4c02b9d allow imxrt build with dual exmaples 2023-05-10 11:15:11 +07:00
hathach
bc579c045e skip link option --print-memory-usage for renesas rx since it does not support this option 2023-05-09 21:39:10 +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
04c759028a simplify cmake target, remove -bsp 2023-05-09 10:02:44 +07:00
Aladdin Bakosh
4be7546372 fix(iar_template.ipcf): add missing portable links, and delete the usbh_control.c from the list 2023-05-08 15:57:34 +02:00
hathach
fd50be2e62 change imxrt board_uart_read() to non-blocking
simple host seems to work
2023-05-08 19:43:48 +07:00
hathach
4fc4f35a8a fix linking missing ivt symbol for imxrt with cmake
changed device port = 0, host port =1 for imxrt 1060 and 1064
2023-05-08 17:25:47 +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
97ee40fd7b add clion files 2023-05-05 16:51:50 +07:00
hathach
8a9d2b4b75 wip 2023-05-04 23:29:37 +07:00
Martino Facchin
161c95f1b7 renesas: update fsp to 4.0.0 2023-05-04 14:42:32 +02:00
hathach
629717cd13 fix cmake build 2023-05-04 16:38:06 +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
a349869906 renesas_ra: fix existing boards support 2023-05-03 10:06:58 +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
Ha Thach
5e023fa2ca
Merge pull request #2051 from hathach/improve-serial-host
Improve serial host
2023-04-28 22:59:57 +07: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
Ha Thach
2afef458be
Merge pull request #2030 from slc-tl/patch-1
Update porting.rst
2023-04-28 11:36:14 +07:00
hathach
090078542f update osal note 2023-04-28 11:34:12 +07:00
Ha Thach
a41ab41b8b
Merge pull request #2047 from jbtheou/master
cdc: fix line_coding aligment
2023-04-28 11:25:53 +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
Ha Thach
e3b3229d61
Merge pull request #2046 from hathach/add-usb2uart-host-driver
Add usb2uart serial host driver
2023-04-28 00:06:08 +07: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
cf95b44001 enable CDC FTDI 2023-04-26 22:36:17 +07:00
hathach
45169d833d hacky, but ftdi work with hard code baudrate = 9600 2023-04-26 22:36:17 +07:00
hathach
1a229f3ce2 fix pio vbus typo 2023-04-26 22:36:17 +07:00
Ha Thach
4c7fd1648e
Merge pull request #2043 from hathach/fix-nxp-build
fix build with nxp since mcux-sdk from 2.13.0 remove CMSIS folder
2023-04-26 22:33:28 +07:00
hathach
ad39833ea4 fix build with nxp since mcux-sdk from 2.13.0 remove CMSIS folder 2023-04-26 22:10:13 +07:00
Ha Thach
908e23d109
Merge pull request #2040 from hathach/update-imxrt-deps
bump up imxrt mcux-sdk to 2.13.1
2023-04-24 16:59:05 +07:00
hathach
841a62170e bump up imxrt mcux-sdk to 2.13.1 commit f357a1150f6cf6c6b844f53f2d426bfb3e649850 2023-04-24 16:54:26 +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
9858d45815 build all freertos, not able to build net lwip due to lack of sio_open() 2023-04-21 22:07:58 +07:00
hathach
11e1aff389 update freeRTOS kernel to latest for library cmake
add per family freeRTOSConfig.h also make changes to build with
freertos_kernel cmake
- hard coded configPRIO_BITS based on family
- change configSUPPORT_STATIC_ALLOCATION to 0,
configSUPPORT_DYNAMIC_ALLOCATION to 1
- enable configRECORD_STACK_HIGH_ADDRESS for tracing
- enable INCLUDE_xTaskGetCurrentTaskHandle which is required to compile
stream_buffer (although we don't use it).
2023-04-21 20:55:44 +07:00
hathach
6daa135201 update most examples cmake to build with imxrt 2023-04-21 18:23:40 +07:00
hathach
0afe1b3684 example run well with cmake for imxrt 2023-04-21 18:10:28 +07:00
Ha Thach
0871238cac
Merge pull request #2024 from jfedor2/sie_ctrl_fix
[rp2040] Make writes to SIE_CTRL aware of concurrent access
2023-04-21 12:17:57 +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
hathach
2ac289685a clean up 2023-04-20 16:55:48 +07:00
hathach
b42d3e431c board test running with cmake 2023-04-20 16:43:00 +07:00
hathach
fab48e5bcc adding cmake build for imxrt1010 2023-04-20 14:09:38 +07:00
Ha Thach
9771c76f25
Merge pull request #2033 from ReimuNotMoe/master
Fix compatibility with the latest Microchip XC16 compiler
2023-04-19 12:53:23 +07: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
slc-tl
8c780a9564
Update porting.rst
Adds more in depth documentation of how tud_task does not need to be polled in implementations that use an RTOS / scheduler.
2023-04-14 17:07:33 -06: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
723e21ad6a
Merge pull request #2025 from dauc/master
Fix spelling configuraiton->configuration
2023-04-14 18:48:03 +02:00
HiFiPhile
71d2ccd78f Fix CI 2023-04-14 17:29:32 +02:00
HiFiPhile
413b0a7da5 Use PLL clock. 2023-04-14 17:12:47 +02:00
HiFiPhile
0ea23904c4 Add stm32g0b1nucleo BSP. 2023-04-14 16:07:04 +02:00
HiFiPhile
152a22f3ee Update lib & template. 2023-04-14 16:05:56 +02:00
Devin Auclair
16ed10a6e4 Fix spelling configuraiton->configuration 2023-04-14 12:48:59 +00:00
HiFiPhile
cbf4b1aec8 Merge branch 'master' of https://github.com/hathach/tinyusb into pr1942 2023-04-14 13:16:52 +02:00
HiFiPhile
28817a7150
Merge pull request #2015 from tyustli/tyustli_uac
fix audio comment error
2023-04-08 16:25:39 +02:00
HiFiPhile
95dec2ac26 Fix case. 2023-04-08 15:39:33 +02:00
tyustli
d4c7c9871e fix audio comment error 2023-04-08 18:14:10 +08:00
Scott Shawcroft
2cda9b60c9
Handle iMX RT 1042 usb naming 2023-04-06 15:45:23 -07:00
Ha Thach
3336fbafe4
Merge pull request #2011 from hathach/add-hid-host-ready
Add hid host send/recieve ready
2023-04-06 12:16:17 +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
5f327dd49f
Merge pull request #2006 from hathach/cmake
Cmake
2023-04-06 00:39:39 +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
Ha Thach
4c5104f6d6
Merge pull request #1989 from epatstarkey/vendor_device_race_condition_fix
Vendor device race condition fix
2023-04-04 12:27:22 +07:00
Ha Thach
8d07f5e733
Merge pull request #1999 from raiden00pl/master
openh743i: initialize USB3300 reset pin
2023-04-04 11:27:19 +07:00
Ha Thach
44fab77c3d
Update bug_report.yml 2023-04-04 11:02:20 +07:00
John Cronin
718bcdb8bc Add STM32L5 support - no OTG similar to some L4s 2023-04-03 13:56:16 +01:00
hathach
4f96a1f3b2 more fix 2023-04-03 18:05:22 +07:00
hathach
5ef260d5fc fix build for esp32 2023-04-03 17:44:05 +07:00
raiden00pl
f2faf72f7f
openh743i: initialize USB3300 reset pin 2023-04-03 12:27:33 +02:00
hathach
1911c613c7 add some .idea configuration 2023-04-03 11:34:00 +07:00
hathach
160e2a8aeb skip .idea 2023-04-03 11:07:48 +07:00
epatstarkey
1372d4e4d5 Remove trailing whitespace 2023-03-31 12:58:51 -05:00
epatstarkey
d7d4e7b527 Update samples 2023-03-30 11:34:39 -05:00
hathach
cf7aad790c more esp32 cmake clean up 2023-03-30 11:37:36 +07:00
hathach
641613c428 update all cmake for esp32 build 2023-03-30 10:41:11 +07:00
hathach
96718b7ca0 merge s2 and s3, update cmake for espressif, add tinyusb_src as component 2023-03-30 00:31:26 +07:00
hathach
99315bcca3 adding more cmake support 2023-03-29 14:36:43 +07: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
5ce60c5d20 Add MJPEG descriptor for bulk transfer 2023-03-26 21:22:52 +09:00
kkitayam
993b8d6686 Add state variable 2023-03-26 21:18:00 +09:00
kkitayam
389babf20b Add descriptor for a bulk endpoint as a streaming endpoint 2023-03-25 21:25:13 +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
Ha Thach
ad7bacbfd8
Merge pull request #1978 from hathach/fix-align-host
separate CFG_TUSB_MEM_SECTION/ALIGN to host and device specific macros
2023-03-24 14:41:01 +07:00
hathach
76dae8d8c1 update host example to use new tuh mem macros 2023-03-24 14:08: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
Ha Thach
7440782afb
Merge pull request #1975 from hathach/update-doc
update doc and generate deps list
2023-03-23 16:39:19 +07:00
hathach
f80d11301e
update doc and generate deps list 2023-03-23 16:33:35 +07:00
Ha Thach
cd0fdc3264
Merge pull request #1974 from hathach/pico-pio-name
rename and change default pio usb pin to adafruit feather usb host
2023-03-23 14:22:39 +07:00
hathach
4cee79af27
rename and change default pio usb pin to adafruit feather usb host 2023-03-23 13:08:09 +07:00
Matt Mills
033627ee41 Remove const from tud_network_mac_address in example and test files 2023-03-22 07:30:46 -06: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
a97f39151e fine tune CFG_TUH_HID value 2023-03-22 08:33:30 +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
Ha Thach
096b6ec462
Merge pull request #1964 from hathach/add-tuh-set-interface
add tuh_set_interface
2023-03-21 13:58:44 +07:00
Mengsk
42decd94e5 UAC2: fix feedback EP buffer alignment. 2023-03-21 07:58:39 +01:00
hathach
ccf17e3cde add -Wreturn-type 2023-03-21 13:21:59 +07:00
hathach
e44e461ce3 add tuh_set_interface 2023-03-21 12:55:52 +07:00
Ha Thach
cbcf5d8c08
Merge pull request #1963 from hathach/rp2040-more-iar
more compatible with IAR
2023-03-20 11:58:51 +07:00
hathach
4520218786
more compatible with IAR 2023-03-20 11:33:39 +07:00
Ha Thach
d4d6f60885
Merge pull request #1962 from hathach/update-bsp
Update bsp
2023-03-19 19:10:54 +07:00
hathach
f58da31145
clean up 2023-03-19 18:12:03 +07:00
hathach
f75a019732
bsp lpc17 2023-03-19 18:10:26 +07:00
hathach
934baae9b8
bsp lpc51 2023-03-19 17:58:20 +07:00
hathach
1154b7a9e7
add mising lpc13 file 2023-03-19 17:40:44 +07:00
hathach
64c6b715ce
bsp lpc13 2023-03-19 17:27:45 +07:00
hathach
80be1aa13d
bsp lpc11 2023-03-19 17:19:33 +07:00
hathach
1867ba0bc1
fix l4 hw testing ci 2023-03-19 16:43:59 +07:00
hathach
aa11e21358
add mising file 2023-03-19 13:15:05 +07:00
hathach
b46632ba07
bsp for f2 f3 2023-03-19 13:11:41 +07:00
hathach
322f58ea85
add CFLAGS_SKIP to improve sam compile time 2023-03-19 12:47:05 +07:00
hathach
ab0da3c30b
group stm32l0 2023-03-19 12:01:33 +07:00
hathach
3944f1c4da
group same5x 2023-03-19 11:28:06 +07:00
Ha Thach
779149ecce
Merge pull request #1858 from bpaddock/FRDM_K32L24AS
Add support for the NXP FRDM-K32L2A4S eval board.
2023-03-18 22:18:39 +07:00
hathach
ec0f25d095
fix ci with kl25z 2023-03-18 20:30:49 +07:00
hathach
bbe550efa0
add kinetis family to ci 2023-03-18 20:19:37 +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
b13b95a670 Document that support for the FRDM-K32L2A4S has been added. 2023-03-18 16:50:51 +07:00
Bob Paddock
f9b8a0667a Add support for NXP FRDM_K32L2A4S eval board. 2023-03-18 16:50:50 +07:00
Ha Thach
f1a859d907
Merge pull request #1639 from bavison/portability
Fixes for building with IAR toolchain
2023-03-18 12:13:08 +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
Ha Thach
65ee11ff63
Merge pull request #1882 from koendv/pitaya_lite
add board: DshanMCU Pitaya Lite
2023-03-17 20:48:39 +07:00
hathach
b2568eb02b
bump up mm32sdk to fix HSE_VALUE not 8Mhz warnings 2023-03-17 20:22:08 +07:00
hathach
1ed04ad05d
update mm32sdk with idndef for SYSCLK_FREQ_XXMHz and SYSCLK_HSI_XXMHz
add HSE_VALUE define for each board with 8mhz, 12mhz accordingly
2023-03-17 19:46:22 +07:00
hathach
b3ecf82196
whitespace 2023-03-17 19:31:45 +07:00
Koen De Vleeschauwer
899e7cc4f9 add board: DshanMCU Pitaya Lite 2023-03-17 19:31:06 +07:00
Ha Thach
bc57358eb0
Update README.rst 2023-03-17 19:29:25 +07:00
Ha Thach
4d273254b6
Merge pull request #1961 from hathach/remove-all-submodules
Remove all submodules
2023-03-17 19:27:47 +07:00
hathach
6683053f48
finalize 2023-03-17 18:44:30 +07:00
hathach
57d23c7a68
update example description 2023-03-17 18:34:56 +07:00
hathach
25d802532c
fix spelling 2023-03-17 18:34:43 +07:00
hathach
f14b4ba30a
use codespell as pre-commit 2023-03-17 17:27:17 +07:00
hathach
0c174c17ad
fix ci with building fuzz 2023-03-17 17:04:11 +07:00
hathach
a4b17483b9
fix ci build with fomu 2023-03-17 17:01:56 +07:00
hathach
2e5f649fd3
fix run unit test with pre-commit 2023-03-17 16:57:30 +07:00
hathach
3623ba1884
fix trailing space and new line
temporarily disable codespell
2023-03-17 16:12:49 +07:00
hathach
2faad42cb1
update ci
- remove submodules init
- pre-commit: forbid new submodule, run in ci
2023-03-17 15:54:25 +07:00
hathach
323a56e309
bump up freeRTOS deps to version 10.5.1 2023-03-17 15:39:59 +07:00
hathach
6763521ec7
remove all submodules 2023-03-17 15:31:41 +07:00
Ha Thach
16daad8164
Merge pull request #1960 from hathach/fix-host-enumerate-mul-device
Fix host enumerate multiple devices from multiple host controllers
2023-03-17 15:27:56 +07:00
Ha Thach
96d064e923
Merge pull request #1860 from howard0su/pico_freertos
Allow config OS for RP2040
2023-03-17 14:57:13 +07:00
hathach
511f5be8b3
bump up pico-pio-usb dependency 2023-03-17 14:46:34 +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
Ha Thach
6b84a29f8c
Merge pull request #1391 from perigoso/renesas-ra
Renesas ra family support
2023-03-17 11:28:54 +07:00
hathach
c12795734c
reduce number of supported RA to only those that is tested 2023-03-17 10:59:08 +07:00
hathach
e7d212f337
more fix 2023-03-16 23:21:15 +07:00
hathach
ffdffc7e06
rename FREERTOS_PORT to FREERTOS_PORTABLE_SRC
also fix trailing spaces
2023-03-16 23:11:11 +07:00
hathach
e0b1de923c
add ra4m1_ek board 2023-03-16 22:43:58 +07:00
Ha Thach
d875e694f8
Merge pull request #1958 from tyustli/tyustli_st
fix HAL_Delay no effect bug on st platform
2023-03-16 12:28:24 +07:00
hathach
2a10d5c20b
rename ra board name 2023-03-16 11:39:53 +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
1117cf5729
update pre-commit yaml 2023-03-16 10:05:46 +07:00
hathach
cd1726c009 Merge branch 'master' into renesas-ra 2023-03-16 09:51:27 +07:00
tyustli
fabe86362b fix HAL_Delay no effect bug on st platform 2023-03-16 08:28:19 +08:00
Ha Thach
b443851980
Merge pull request #1957 from hathach/fix-old-picosdk
Fix old picosdk
2023-03-15 23:24:44 +07:00
hathach
ffa56a1beb
add pre-commit yaml 2023-03-15 19:30:35 +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
Ha Thach
7cf67b2845
Merge pull request #1889 from Tails86/master
Implemented tuh_hid_send_report
2023-03-13 17:03:27 +07:00
James Smith
9247131b1f Avoid spamming out endpoint on connect 2023-03-13 16:31:25 +07:00
James Smith
43770802f9 Removed tabs from host hid_controller example 2023-03-13 16:31:25 +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
e045995407 minor update get_deps 2023-03-11 08:54:51 +07:00
hathach
4065ca3fca Merge branch 'master' into renesas-ra 2023-03-11 08:40:36 +07:00
Ha Thach
a8d7e08cee
Merge pull request #1950 from hathach/update-get-deps
update get-deps.py
2023-03-11 08:37:58 +07:00
hathach
cae05c6593 update get-deps.py 2023-03-11 08:33:08 +07:00
hathach
7428a16d2d remove ra submodules 2023-03-11 08:23:21 +07:00
hathach
fe77976765 Merge branch 'master' into renesas-ra 2023-03-11 08:15:23 +07:00
Ha Thach
6af18dc906
Merge pull request #1947 from hathach/remove-submodules
Remove submodules and use python script to manage repo dependencies
2023-03-11 08:09:25 +07:00
Ha Thach
b5b2fad5fb
Merge pull request #1946 from kasjer/kasjer/nrf5x-fix-iso-memory-corruption
dcd_nrf5x: ISO OUT handling
2023-03-11 08:06:17 +07:00
Dan Halbert
4857abdc6b rp2040: include hardware/sync.h explicitly 2023-03-10 14:01:51 -05:00
hathach
206a9a21e6 fix ci 2023-03-10 23:54:30 +07:00
hathach
704f3ddeb5 add dependencies repo to git ignore 2023-03-10 23:43:07 +07:00
hathach
7e6a6e75bc remove the rest of mcu submodules 2023-03-10 23:41:27 +07:00
hathach
fb9180b6eb remove most of the submodules 2023-03-10 23:36:53 +07:00
hathach
7c9bd81eca update deps script 2023-03-10 22:56:42 +07:00
hathach
d41320a42e adding python script to manage dependencies instead of submodule 2023-03-10 20:49:11 +07:00
hathach
76f43a7a16
starting to remove submodule cmsis5 and nrfx 2023-03-10 19:23:23 +07: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
Ha Thach
990fb6ae5c
Merge pull request #1931 from branalba/master
For STM32H7 BSP boards, initialize RCC_...TypeDef structs as empty
2023-03-09 17:21:58 +07: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
af577d2b6d add G0 to supported platforms in README.rst :) 2023-03-08 14:25:30 +01: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
be66f5f57f
Merge pull request #1941 from hathach/minor-ci
Minor ci
2023-03-08 13:08:25 +07:00
hathach
0957902c40
more ci merge 2023-03-08 12:28:30 +07:00
hathach
9e0ae5f29d
improve ci 2023-03-08 12:15:39 +07: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
Ha Thach
66da95a0ee
Merge pull request #1938 from hathach/update-build
Fix build on windows and macos
2023-03-06 15:10:21 +07:00
hathach
ec8c292bbe
clean up 2023-03-06 14:37:40 +07:00
hathach
02478c57e5
more ci fix 2023-03-06 14:31:18 +07:00
hathach
e62d1a03ac
integrate top.mk into make.mk 2023-03-06 13:25:56 +07:00
hathach
b6404d143e
clean up top 2023-03-06 13:03:55 +07:00
hathach
9930863b41
fix iar ci 2023-03-06 12:45:47 +07:00
hathach
5c537c25f0
change gcc to 10.3 due to freeRTOS warning 2023-03-06 11:16:21 +07:00
hathach
956d1c9c4e
update size to fix macos ci 2023-03-06 10:33:04 +07:00
HiFiPhile
a83cef5e4c
Merge pull request #1937 from silvergasp/fix_wrong_size
fix: Fix wrong destsz used with tu_memcpy_s
2023-03-06 04:25:52 +01:00
Nathaniel Brough
95cfa37bf5 fix: Fix wrong destsz used with tu_memcpy_s
Bug: #1935
2023-03-05 18:47:48 -08:00
hathach
0a1a61bb6c
try gcc 12.2 with macos 2023-03-05 15:42:05 +07:00
hathach
9824981ee8
ignore mkdir in windows ci 2023-03-05 15:35:02 +07:00
hathach
8a493485e8
more ci test 2023-03-05 13:39:38 +07:00
hathach
b4ef98cbdc
fix ci build on windows 2023-03-05 10:57:16 +07:00
hathach
a99ee1b1a2
bump up gcc, test macos uname 2023-03-04 20:08:10 +07:00
hathach
363fcc5b68
only build 1 board on windows/macos 2023-03-03 16:24:33 +07:00
hathach
7089535848
clean up f0 warnings 2023-03-03 16:13:12 +07:00
hathach
9a8a9359e4
use make abspath intead of shell realpath 2023-03-03 15:55:34 +07:00
hathach
e92583ffd7
try adding build for windows and macos 2023-03-03 15:37:17 +07:00
graham sanderson
b7fa90e706 rp2040: Fixup lib and example compile for LLVM Embedded Toolchain for ARM 2023-03-02 14:32:22 -06:00
Ha Thach
34798ff85e
Merge pull request #1932 from hathach/add-usbip-fsdev
add TUP_USBIP_FSDEV and TUP_USBIP_FSDEV_STM32
2023-03-01 21:32:31 +07: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
Brandon Alba
8c8f26f14e In some STM32H7 BSP variants, initialized RCC_PeriphCLKInitStruct instances as empty 2023-02-28 10:31:07 -08:00
Brandon Alba
787afbbcd0 Initialized all RCC init structs for all STM32H7 BSP variants as empty 2023-02-28 10:25:06 -08: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
Ha Thach
b66c2d5f0a
Merge pull request #1796 from Sinitax/master
Fix ifdefs for disabled uart stdio in rp2040 family
2023-02-22 17:40:54 +07:00
Ha Thach
8fadaf01d3
Merge pull request #1919 from hathach/use-tu-static-for-fuzz
use tu_static instead of static _fuzz_thread
2023-02-22 17:35:07 +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
hathach
c01aee6c1a
revert some changes 2023-02-22 15:14:56 +07:00
hathach
78a014ef18
move check LIB_PICO_STDIO_UART to board.h 2023-02-22 15:13:27 +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
bcf5e5f729
missing some files 2023-02-22 12:10:22 +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
PanRe
3342635237
Merge pull request #1825 from HiFiPhile/mic_test
Minor audio_test example fix.
2023-02-16 11:59:44 +01:00
HiFiPhile
9e16e904ed
Merge pull request #1853 from NullMember/master
examples/uac2: Fix mute and volume array lengths
2023-02-16 11:22:52 +01:00
Ha Thach
6b4838cb2f
Merge pull request #1910 from rppicomidi/fix-1909
Fix issue 1909
2023-02-16 17:06:22 +07:00
rppicomidi
fde7577117 Fix issue 1909 2023-02-15 20:02:12 -08:00
Ha Thach
e3be8a0a15
Merge pull request #1906 from hathach/update-pio-pico-usb
update pico-pio-usb to include data pid fix (0.5.1)
2023-02-14 16:51:56 +07:00
hathach
95acf3960d update pico-pio-usb to include data pid fix (0.5.1) 2023-02-14 16:11:33 +07:00
Ha Thach
d87f4da6b1
Merge pull request #1893 from jefftrull/bugfix/bitfields
Adjust reserved bitfields to make SDCC happy
2023-02-13 16:30:01 +07:00
Ha Thach
09e70ebd13
Merge pull request #1885 from kripton/fixDHCPServerDoS
dhserver: Fix a potential DoS vulnerability accidentially introduced by #1712
2023-02-13 15:11:44 +07:00
Ha Thach
ac60a03ea9
Merge pull request #1901 from hathach/add-metro-rt1011
Add metro rt1011
2023-02-13 14:58:42 +07:00
hathach
fbf99b8e53 forget to add metro 1011 linker 2023-02-13 13:33:03 +07:00
hathach
fb5fd22c73
add uf2 linker for metro m7 1011 2023-02-13 12:29:31 +07:00
hathach
49c621d510
fix typo 2023-02-13 12:04:33 +07:00
hathach
3e86f0532a fix release trigger body 2023-02-13 12:03:09 +07:00
hathach
105f108661 add metro m7 1011 board def (not running yet) 2023-02-13 12:03:09 +07:00
Ha Thach
002ca345b8
Merge pull request #1898 from ccrome/fix-imx1011
Turn data cache on
2023-02-13 12:01:39 +07:00
Jeff Trull
7e2c5fcc8a Correct bitfields for cdc_desc_func_telephone_call_state_reporting_capabilities_t 2023-02-12 20:52:17 -08:00
caleb crome
ec26c6163c Turn data cache on
This fixes https://github.com/hathach/tinyusb/issues/1894.  I'm not really
sure if this is the correct way to fix it, and I have not tested on all the
rest of the family members, however, this lets the i.MX1010 work again.

The problem:  the latest SDK update does not enable the data cache by default
This causes an assert in board_init() when attemping to control clock
gating.  I haven't investigated further as to *why* it's a problem, but it
is a problem.
2023-02-12 11:24:21 -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
Ha Thach
86c416d4c0
Merge pull request #1890 from hathach/release-0.15.0
update version to 0.15.0
2023-02-10 17:39:04 +07:00
hathach
f0ab6d824e
increase hw test timeout to 10s since pyocd seems to take longer to flash 2023-02-10 15:41:48 +07:00
hathach
39a37d82ce
change rp2040 hw test to use pyocd for better stability/performance than openocd 2023-02-10 14:56:32 +07:00
hathach
cf162e2c54
fix typo 2023-02-10 13:03:43 +07:00
hathach
7e48da5b44
update version to 0.15.0
add changelog
2023-02-10 12:47:48 +07:00
Graham Sanderson
c0d79457f6
Merge pull request #1887 from hathach/rp2040-build-fixes
RP2040 build fixes
2023-02-06 16:06:36 -06:00
graham sanderson
8d3f0ffb95 * don't force dependency on pico-pio-usb submodule
* suppress compiler warning/errors especially in pico-pio-usb
* disable use of pico-pio-usb on gcc 11.3+ for now as it doesn't compile
2023-02-06 10:07:39 -06:00
Ha Thach
792b552c5c
Merge pull request #1884 from hathach/reapply-uint16-len-tud_hid_report_complete_cb
change length in tud_hid_report_complete_cb() from uint8 to uint16
2023-02-06 09:08:46 +07:00
Jannis Achstetter
830849211d
dhserver: Fix a potential DoS vulnerability accidentially introduced by #1712 2023-02-04 22:37:39 +01: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
4c03a9f855
Merge pull request #1880 from hathach/reduce-selfed-host-iar
Bundle mulitple familes for self-hosted iar to reduce build time
2023-02-01 20:10:01 +07:00
hathach
1727702217
add note for iar workflow 2023-02-01 19:30:32 +07:00
hathach
647fd030ff merge multiple matrix with IAR build 2023-02-01 18:45:50 +07:00
hathach
3846da69d3 run workflow if its yml is updated 2023-02-01 16:37:24 +07:00
hathach
6ec0537408 move hw-stm32l412nucleo-test into build-arm to reduce self-host compile time
reduce IAR build to only f0, h7, l4
2023-02-01 15:14:35 +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
9b6d6a983a fix typo issue #1859 2023-01-31 18:42:02 +07:00
hathach
5f4701bb3e added fuzzing status 2023-01-31 18:40:49 +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
Ha Thach
7166bb3643
Merge pull request #1876 from hathach/support-iar
Support iar build
2023-01-30 22:05:21 +07:00
hathach
25603c7269 iar L4 2023-01-30 20:11:59 +07:00
Gordon McNab
770de31dd9 Merge branch 'port-ft90x' of https://github.com/ftdigdm/tinyusb into port-ft90x 2023-01-30 11:51:51 +00:00
Gordon McNab
06079dcae1
Merge branch 'hathach:master' into port-ft90x 2023-01-30 11:49:05 +00:00
Ha Thach
8681dbb7a2
Merge pull request #1870 from DRNadler/WindowsBuildFix
Windows build fix for some mingw gnu make situations
2023-01-30 17:23:50 +07:00
hathach
39eb1ce70e minor clean up 2023-01-30 17:21:48 +07:00
hathach
63a6fd3689 iar g4 2023-01-30 17:07:06 +07:00
Gordon McNab
c07fb9a71e Merge branch 'port-ft90x' of https://github.com/ftdigdm/tinyusb into port-ft90x 2023-01-30 10:06:55 +00:00
hathach
b464f91a6e iar h7 2023-01-30 17:04:39 +07:00
Gordon McNab
63e6aea5ac Removed unrequired header file from debugging. 2023-01-30 10:04:34 +00: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
Ha Thach
00c007ed68
Merge pull request #1866 from DRNadler/mimxrt1024_evk
Add support for NXP's mimxrt1024_evk evaluation board.
2023-01-30 11:18:10 +07:00
hathach
11384159e1 suppress rt1024 warnings and fix typo 2023-01-30 10:16:57 +07:00
Ha Thach
778b62df81
Merge pull request #1875 from silvergasp/seed_corpus
feat(fuzz): Adds seed corpus for cdc and msc classes
2023-01-30 09:53:28 +07:00
Ha Thach
718e7342b1
Merge pull request #1872 from kasjer/kasjer/nucleoh723
Add support for nucleo-h723zg
2023-01-30 09:50:53 +07:00
Nathaniel Brough
02f1f05697 feat(fuzz): Adds seed corpus for cdc and msc classes 2023-01-29 09:38:05 -08:00
Jerzy Kasenberg
42230df71a Add support for nucleo-h723zg
Mostly copy of stm32h743nucleo.
Linker script generated by STM32CubeIDE.

Since this device has only one HS USB
board.h contains few defines that map on
board HS USB to FS because there is no
ULPI chip mounted on Nucleo board.

For FreeRTOS build:
Set interrupt priority for HS always and for FS if exists.
2023-01-26 12:53:03 +01:00
Jerzy Kasenberg
ba017d0669 boards/stm32h7 update gpio clocks
GPIOE was turned on twice, changed to missing GPIOF.
GPIOI is not present on all boards notably STM32H723
so clock in turned on only if present.
2023-01-26 12:02:07 +01: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
hathach
df2ebe5d1a add iar --fpu option 2023-01-24 12:57:07 +07: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
Dave Nadler
9b6ef4fcbc When tools/top.mk finds it is running on Windows, it expects SHELL set to cmd.exe.
Some Windows development environments invoke a mingw version of gnu make
with SHELL set to /bin/sh or /bin/bash (either explicitly or by default),
in which case tinyUSB make fails when a $(shell...) command feeds DOS syntax to sh.
We can't just use sh, as many Windows environments won't have unix utilities
like realpath (used by this makefile for sh shell commands).

This fix forces SHELL=cmd.exe on Windows and documents the issue.
Also adds additional documentation to help the next person...

With this fix, tinyUSB can be easily built and debugged in environments like
NXP's MCUxpresso (import as a makefile project).
2023-01-22 12:11:50 -05:00
hathach
0a4e611e37 update stm32f7 to build with iar 2023-01-22 12:11:01 +07:00
hathach
db36075721 update f4 to build with iar 2023-01-22 11:56:50 +07:00
hathach
f4c3f0800d add test_common_func.c 2023-01-21 17:47:40 +07:00
hathach
436cd5b9b8 add icf for f1 mini2 2023-01-21 14:26:46 +07: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
Dave Nadler
a6e0b598fa Add support for NXP's mimxrt1024_evk evaluation board.
Tested AOK with device\cdc_msc_freertos example.
2023-01-20 13:15:42 -05:00
Dave Nadler
456a8b208b Add support for NXP's mimxrt1024_evk evaluation board.
Tested AOK with device\cdc_msc_freertos example.
2023-01-20 12:59:45 -05:00
hathach
cb34cb2a93 slightly update rule.mk for IAR 2023-01-20 15:56:32 +07: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
hathach
3fd075b48b fix warning 2023-01-20 15:29:23 +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
hathach
84be70baf5 fix iar build with board_test 2023-01-18 13:17:53 +07:00
hathach
075095554a dont use non-std strncasecmp 2023-01-18 11:47:24 +07:00
hathach
fb7122f07d update iar ci 2023-01-18 10:33:26 +07:00
hathach
ecfd57e6f1 get most examples build with iar 2023-01-18 10:31:00 +07:00
Howard Su
eb7aacb51f Allow config OS for RP2040 2023-01-18 02:30:05 +00:00
hathach
8df2fd1916 update freertos example to build with iar 2023-01-17 23:38:10 +07:00
hathach
c86e628a4c update build script to support iar with CC=iccarm option 2023-01-17 23:37:00 +07:00
hathach
1891802f08 update all f0 board to build with iar 2023-01-17 16:38:02 +07:00
hathach
c414cc650e try running iar build with self-host 2023-01-17 16:30:33 +07:00
hathach
3fee8b402e update makefile to support iar build starting with stm32f070 2023-01-17 16:20:04 +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
Malik Enes Safak
546dd6038c examples/uac2: Fix mute and volume array lengths 2023-01-13 18:28:10 +03: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
160d64b00a minor clean up. ch32v307 has issue with uart LOG=2 (skipping characters) 2023-01-12 15:34:29 +07:00
hathach
3cf21c66b6 add dcd_remote_wakeup() stub 2023-01-12 15:26:48 +07:00
hathach
f05f81e8b3 add button support 2023-01-12 15:19:26 +07:00
hathach
65f7a8006c rename board to lower case ch32v307v-r1-1v0 2023-01-12 13:31:36 +07:00
hathach
e6a3cfb350 rename link file 2023-01-12 13:12:37 +07:00
hathach
658897cf4e fix redundant-decls warnings with USART_Printf_Init() 2023-01-12 12:30:18 +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
4ee4c6f594
Merge pull request #1844 from silvergasp/master
feat(ci): Adds oss-fuzz integration on PRs
2023-01-11 09:20:27 +07:00
Nathaniel Brough
abb95fc4b3 feat(ci): Adds oss-fuzz integration on PRs 2023-01-09 13:07:03 -08: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
hathach
a7e1de1e83
temporarily suppress redundant-decls due to USART_Printf_Init()
fix codespell
2023-01-08 00:02:25 +07: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
Ha Thach
79e5d7aa69
Merge pull request #1789 from hathach/fix-fifo-memory-overflow
Fix fifo memory overflow
2023-01-07 20:42:19 +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
2d7849282a
use TU_FIFO_INIT to replace TU_FIFO_DEF 2023-01-07 16:33:11 +07:00
hathach
e885ced0fe
using clang with ceedling unit-test with -fsanitize=address 2023-01-07 16:24:05 +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
Ha Thach
cde16b802b
Merge pull request #1836 from HiFiPhile/Pe381
Fix IAR warning: Warning[Pe381]: extra ";" ignored
2023-01-06 09:10:11 +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
Ha Thach
18043131d0
Merge pull request #1823 from silvergasp/fix_cluster_fuzz_flags
fix(fuzz): Make sanitizer flags optional
2023-01-04 13:44:33 +07: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
35fa6b660a Fix CI. 2022-12-30 16:10:54 +01:00
Mengsk
fc32280f42 Fix buffer allocation overflow. 2022-12-30 15:10:00 +01:00
Mengsk
7ff2f43bfd Add multi-rate audio test example for new ISO buffer allocation. 2022-12-30 15:09:50 +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
Mengsk
fe8c170c98 Add dcd_edpt_iso_alloc() / dcd_edpt_iso_activate() for ISO EP buffer management. 2022-12-29 19:19:27 +01:00
Mengsk
8a1184e7b3 Minor audio_test example fix.
Fix CFG_TUD_AUDIO_EP_SZ_IN size.
2022-12-29 14:34:37 +01:00
Mengsk
cece59df22 Generally enable ISO xfer. 2022-12-29 12:33:44 +01:00
Mengsk
ef2f17a514 Add hardware endpoint allocator. 2022-12-29 12:33:43 +01:00
Mengsk
b156a8b78c dcd_stm32_fsdev : Implement FIFO transfer correctly. 2022-12-29 12:33:43 +01:00
Mengsk
17990025bb dcd_stm32_fsdev : Fix index out of bound in dcd_write_packet_memory()
If src is odd then src[wNBytes] is accessed.
2022-12-29 12:33:43 +01:00
Simon Kueppers
1d37f5ef9b Added improvements with regards to SOF timing jitter 2022-12-29 12:33:16 +01:00
Simon Kueppers
76413a95d4 Added TU_ATTR_ALWAYS_INLINE to all static inline functions 2022-12-29 12:29:47 +01:00
Simon Kueppers
9ec21248d7 Fixed various small problems and inaccuracies regarding ISOCHRONOUS endpoint 2022-12-29 12:29:47 +01:00
Mengsk
b4b619abd6 SHA-1: 5cb3ed518301e2237ee4e468e97e51ece0ba3838
* Correct handling of SOF interrupt
2022-12-29 12:29:28 +01:00
Mengsk
8327090171 Merge branch 'master' of https://github.com/hathach/tinyusb into stm32_fsdev 2022-12-29 12:14:52 +01:00
Simon Kueppers
d584b07e2c Fixed problem where the transmit byte count was written into the wrong register on ISOCHRONOUS endpoints 2022-12-29 12:13:56 +01:00
Simon Kueppers
510720b396 Renamed pcd_set_ep_rx_cnt because it actually sets the maximum buffer size 2022-12-29 12:13:56 +01:00
Simon Kueppers
9a84390878 Changed comments, added define to fail if ISOCHRONOUS endpoint is not available but requested 2022-12-29 12:13:56 +01:00
Simon Kueppers
ec826732fc Fixed non-aligned allocated memory sizes 2022-12-29 12:13:56 +01:00
Simon Kueppers
abf53f9270 Changed indirection from actual endpoint address to hardware endpoint through lookup table. Allocation of endpoint is now only performed in dcd_edpt_open 2022-12-29 12:13:56 +01:00
Simon Kueppers
8c0388f477 Fixed wrongly enabling RX and TX status simultaneously on ISOCHRONOUS endpoints 2022-12-29 12:13:56 +01:00
Simon Kueppers
d9b2c9934a Implemented an optional callback function that is used instead of tu_edpt_number in the stm32 device driver as a crude tool to control mapping of the endpoint address to actual endpoint register 2022-12-29 12:13:56 +01:00
Simon Kueppers
6d65eaf7a1 Implemented very rudimentary support for isochronous transfer buffer handling 2022-12-29 12:13:55 +01:00
Nathaniel Brough
1dcffc655d fix(fuzz): Make sanitizer flags optional
Currently OSS fuzz expects to have complete control over the
sanitizer flags. As we currently have these set it's causing
problems with the OSS fuzz build. Instead we should use the
provided variables from the OSS fuzz build environment. For
local testing we'll create a set a well defined defaults.
2022-12-28 21:07:29 +00:00
Staacks
95ba158a10 Fix UVC probe and commit on MacOS 2022-12-27 23:02:33 +01:00
Ha Thach
549bee94ad
Merge pull request #1819 from hathach/fix-ncm-warning
fix ncm warning
2022-12-27 19:02:57 +07:00
hathach
d0ca6ca8f7
fix ncm warning 2022-12-27 18:21:56 +07:00
Ha Thach
301b6af6c6
Merge pull request #1801 from tyustli/tyustli_sem_reset
[add] semaphore reset support for rt-thread
2022-12-26 13:09:47 +07:00
Ha Thach
4b5880671c
Merge pull request #1814 from hathach/more-host-cdc
add tuh_cdc_peek()
2022-12-25 00:50:18 +07:00
hathach
48d4a67ec5
add tuh_cdc_peek() 2022-12-24 01:11:13 +07:00
Ha Thach
48f4d8b7f7
Merge pull request #1810 from hathach/fix-cdc-buf
fix incorrect rx buf in cdc
2022-12-22 22:34:20 +07:00
hathach
15a02d04df
fix incorrect rx buf in cdc 2022-12-22 21:35:55 +07:00
Ha Thach
2777df411f
Merge pull request #1809 from hathach/host-cdc
Support Host CDC
2022-12-22 21:29:00 +07:00
hathach
396716cc2c
clean up 2022-12-22 20:26:32 +07:00
hathach
f33883c308
add tuh_cdc_get_local_line_coding() 2022-12-22 19:41:39 +07:00
hathach
14d45b580e
correct host cdc enum 2022-12-22 19:17:09 +07:00
hathach
05c119ce97
cdc host, add set line coding API 2022-12-22 18:28:06 +07:00
hathach
11233e4d3e
minor clean up 2022-12-22 11:43:57 +07:00
hathach
c99af908f1
fix typo 2022-12-22 11:41:27 +07:00
hathach
2d536123c8
finish moving edpt stream to tusb.c 2022-12-22 11:31:37 +07:00
hathach
e3c9d94500
fix stream read count computation 2022-12-22 11:16:39 +07:00
hathach
8323e4b79a
moving edpt_stream API into common tusb.c 2022-12-22 08:52:01 +07:00
hathach
9e8ea44925 add tuh_cdc_write_clear, rename read_flush() to read_clear() 2022-12-21 17:49:50 +07:00
hathach
cd9008e5a9 add tuh_cdc_tx_complete_cb() callback 2022-12-21 13:05:45 +07:00
hathach
84a483f5ea add more host cdc API
tuh_cdc_write_available(), tuh_cdc_read_flush(), tuh_cdc_rx_cb()
callback
2022-12-21 12:47:00 +07:00
hathach
edc559cb4d fix ci 2022-12-21 12:29:51 +07:00
hathach
badb30a6c3 correct cdc host app 2022-12-21 12:25:13 +07:00
hathach
22b62f8712 add tu_edpt_stream_write_zlp_if_needed() 2022-12-21 12:07:12 +07:00
hathach
76021c7359 rename tud_edpt_stream_write_xfer 2022-12-21 11:49:28 +07:00
hathach
b3e63c335a updat cdc host app 2022-12-21 11:47:07 +07:00
hathach
cb2af4c0bc minor debug log 2022-12-21 11:46:58 +07:00
hathach
d1ea3844f7 rename TU_LOG_VAR to TU_LOG_PTR, print out setup of failed control transfer when LOG=1 2022-12-21 11:04:57 +07:00
hathach
37529c41da fix ci 2022-12-21 10:46:47 +07:00
hathach
854e5222ae finalizing cdc host, has a working read/write
TODO: first character seems not to get echoed. set control line state
seems to failed with LOG < 2
2022-12-21 00:26:46 +07:00
Ha Thach
97984b4203
Merge pull request #1803 from jbruneaux31/patch-1
Update osal_freertos.h to fix FreeRTOS wrong task switch
2022-12-20 18:34:04 +07:00
hathach
7004914d8c fix hid host incorrect edpt release if failed to transmit
add CDC_CONTROL_LINE_STATE_DTR/RTS, TUSB_INDEX_INVALID enum
2022-12-20 12:06:59 +07:00
jbruneaux31
a46ad8fcdf
Update osal_freertos.h
Fix FreeRTOS task switch even if not required (unitialized variable usage)
2022-12-19 13:58:54 +01:00
tyustli
e992ff46d2
Update osal_rtthread.h 2022-12-19 17:25:35 +08:00
tyustli
7d76c172db
[add] semaphore reset support for rt-thread
add  semaphore reset support for rt-thread
2022-12-19 17:18:47 +08:00
hathach
fc9321ce26 correct cdc usbh_driver_set_config_complete() 2022-12-16 23:54:21 +07:00
hathach
4811b3463f stub 2022-12-16 17:08:37 +07:00
hathach
bd1f7f86ce add common EPSIZE for bulk/iso in full and highspeed
adding cdc host fifo tx/rx
2022-12-16 17:08:37 +07:00
hathach
f62f973956 minor rename 2022-12-16 17:08:37 +07:00
hathach
f0c51eae44 cdc check for bNumEndpoints before checking for endpoint descriptor 2022-12-16 17:08:37 +07:00
hathach
4f03695084 adding tuh_cdc_mount_cb/tuh_cdc_umount_cb
start adding cdc_app.c to example
2022-12-16 17:08:37 +07:00
Ha Thach
159aa599be
Merge pull request #1799 from hathach/update-osal-mutex
Update osal mutex
2022-12-16 17:05:25 +07:00
hathach
660343d200 update fifo per PanRe review 2022-12-16 16:55:25 +07:00
hathach
1e99480ad2 fix ci with usbh and unit test 2022-12-16 15:19:40 +07:00
hathach
96d2be905b fix build with usbtmc 2022-12-15 18:47:54 +07:00
hathach
88e6da7273 use OSAL_MUTEX_REQUIRED to replace CFG_FIFO_MUTEX/TUSB_OPT_MUTEX
add macro to swallow mutex API in order to simplify code with mutex
2022-12-15 18:03:01 +07:00
Gordon McNab
9f440e5c69 Update SDK for FT9xx to include 3rdparty sources 2022-12-15 10:27:49 +00:00
Ha Thach
ab18b8794f
Merge pull request #1797 from hathach/fix-midi-len
fix midi MS Header wTotalLength computation
2022-12-14 16:24:42 +07:00
hathach
a05adfce86 fix midi MS Header wTotalLength computation 2022-12-14 14:38:40 +07:00
Louis Burda
9e7e8908a3 Fix ifdefs for disabled uart stdio in rp2040 family 2022-12-13 11:00:03 +01:00
hathach
04a5c03ea8 fix int conversion warnings 2022-12-12 11:54:33 +07:00
hathach
ce064de6fd clean up 2022-12-10 00:18:11 +07:00
hathach
82852774a7 add fifo implementation note
- handle/fix double overflowed with write()
- other minor clean upp
2022-12-09 18:20:09 +07:00
hathach
75989673e5 add test_write_double_overflowed for fifo 2022-12-09 15:39:57 +07:00
Ha Thach
f4f85bad54
Merge pull request #1783 from scoudreau/usbtmc-high-speed
usbtmc: correct packet size bug
2022-12-09 09:52:23 +07:00
Ha Thach
ec2902bd3f
Merge pull request #1784 from scoudreau/interrupt-descriptor-polling-interval
Correct interrupt polling interval in descriptor
2022-12-09 09:45:40 +07:00
scoudreau
007ed1f0fe
Added missing typecast to pass build checks 2022-12-08 14:50:34 +01:00
Sebastien COUDREAU
071da47944 Correct interrupt polling interval in descriptor
Use macro argument instead of 0x16 constant value.
At least Linux kernel was complaining about this value:
"config 1 interface 0 altsetting 0 endpoint 0x82 has an invalid bInterval 22, changing to 8"
(warning obtained using usbtmc device config)
2022-12-08 11:44:15 +01:00
Sebastien COUDREAU
15ab35d9b8 usbtmc: correct packet size bug
Code was only reading the first 64 bytes of a 512 bytes packet.
2022-12-08 11:35:32 +01:00
hathach
3e32fa36b8 enhance tu fifo
- rename wr/rd absolute to index, and rel to pointer.
- fix crash with _tu_fifo_remaining()
- change get_relative_pointer() to idx2ptr() and merge with _ff_mod()
2022-12-08 16:39:24 +07:00
hathach
bae7fe5be7 add test fifo overwritable + overflow, that cause buffer overflow 2022-12-08 13:10:24 +07:00
Ha Thach
d4620d99d3
Merge pull request #1716 from silvergasp/master
fuzz: Add support for fuzzing
2022-12-08 12:18:32 +07:00
hathach
c19bffb1d9 clean up 2022-12-08 11:48:53 +07:00
hathach
d0758d0733 correct ci paths filter 2022-12-08 11:47:01 +07:00
hathach
4deec2f4be fix ci 2022-12-08 11:40:43 +07:00
hathach
33ea178cd9 update build fuzzer step 2022-12-08 11:37:13 +07:00
hathach
ffd008dc75 update build fuzzer 2022-12-08 11:36:19 +07:00
hathach
bf8f4f9521 move build Fuzzer into pre-commit 2022-12-08 11:31:39 +07:00
hathach
86a3315bcf update fuzzer ci 2022-12-08 10:42:29 +07:00
hathach
56f846cf74 move fuzz into test/fuzz 2022-12-08 10:39:54 +07:00
hathach
19400c8556 fix typo, add -Wno-error=unreachable-code for fuzz due to latest cdc changes 2022-12-08 10:30:22 +07:00
Nathaniel Brough
6492f4a18d feat(fuzz): Adds net class fuzzer 2022-12-08 10:13:35 +07:00
Nathaniel Brough
9cc93e6d41 .github: Add fuzzer builder 2022-12-08 10:13:35 +07:00
Nathaniel Brough
92b5f2d2e8 fuzz: Add msc fuzz harness 2022-12-08 10:13:35 +07:00
Nathaniel Brough
aedae6201b fuzz: Add support for fuzzing
Adds support for fuzzing with basic cdc fuzzer.
2022-12-08 10:13:35 +07:00
Ha Thach
ab8cfb3d5b
Merge pull request #1781 from hathach/update-unit-test
Update unit test
2022-12-08 10:11:21 +07:00
hathach
a29b3dd690 update .codespell 2022-12-08 10:05:52 +07:00
hathach
34081f6c5c update ci 2022-12-08 10:00:25 +07:00
hathach
be4f4e4f79 move ceedling tests to test/unit-test 2022-12-08 09:59:02 +07:00
hathach
4b50ca2a61 add missing ceedling files 2022-12-08 09:54:15 +07:00
hathach
91d5fa5639 add paths to all workflows 2022-12-08 09:44:26 +07:00
hathach
a3827b87fe test ci paths 2022-12-08 09:30:42 +07:00
hathach
a652212f27 update ceedling to 0.31.1 2022-12-08 09:14:38 +07:00
Ha Thach
d9817ebe17
Merge pull request #1487 from tore-espressif/fix/cdc_autoflush
cdc: Fix autoflush for FIFO < MPS
2022-12-06 14:19:58 +07:00
Tomas Rezucha
603effbb77 cdc: Fix autoflush for FIFO < MPS 2022-12-06 07:49:26 +01:00
Ha Thach
f03c28ec31
Merge pull request #1776 from hathach/hid-fido
Hid fido
2022-12-05 14:32:49 +07:00
hathach
d58120647a rename to match fido sample uf2_hid..h 2022-12-05 13:18:05 +07:00
Ha Thach
71a5906865
Merge pull request #1767 from pete-pjb/master
Allow the use of non-static allocation for FreeRTOS mutexes & queues
2022-12-05 12:45:48 +07:00
hathach
de5a67bf3b clean osal_freertos, update freertos examples to work with configSUPPORT_DYNAMIC_ALLOCATION only
note: for example to build with configSUPPORT_STATIC_ALLOCATION = 0, one
of heap_n.c must be included in makefile/cmake
2022-12-05 12:09:41 +07:00
Ha Thach
279e2d6aeb
Merge pull request #1774 from hathach/add-codespell
Add codespell to ci run
2022-12-04 22:25:54 +07:00
hathach
feed1a83a9 add ignore-words to make it easier to 2022-12-04 21:28:30 +07:00
hathach
b37870c964 test exclude-file.txt, add action concurrency 2022-12-04 21:08:47 +07:00
hathach
b9314bddc5 check exclude file 2022-12-04 20:52:02 +07:00
hathach
e3df3ac5ce add codespell config and ci run 2022-12-04 20:29:24 +07:00
Ha Thach
d6d2499ad6
Merge pull request #1695 from hadess/wip/hadess/fix-typos
Fix typos
2022-12-04 20:26:59 +07:00
hathach
43b255f413 more typos 2022-12-04 19:44:01 +07:00
Bastien Nocera
6a2cf67289 Fix typos 2022-12-04 19:43:23 +07:00
pete-pjb
52261ac02d Back out another of my changes I am still investigating. 2022-12-02 10:13:35 +00:00
pete-pjb
3816869fce Some reverts and changes after discussion. 2022-12-02 10:00:19 +00:00
pete-pjb
c31b95c916 Added CFG_TUSB_MEM_SECTION define to struct _ctrl_xfer in usbh.c 2022-12-01 17:53:35 +00:00
PeterB
ae588d796e Alter tuh_task_ext() function so no need to return when using FreeRTOS 2022-12-01 16:06:15 +00:00
Ha Thach
f24f47d038
Merge pull request #1765 from hathach/rp2040-host-bulk-comment
Rp2040 host bulk comment
2022-12-01 10:10:40 +07:00
Gordon McNab
8cce9385e2 More configurable board options 2022-11-30 16:18:07 +00:00
pete-pjb
25abb10de1 Fix white space issue. 2022-11-30 13:26:59 +00:00
Gordon McNab
d3c4f66d35 Fix script issues with paths including spaces from env variable.
$(FT90X_TOOLCHAIN) or even $(TOP) may have spaces. Quote to fix.
2022-11-30 12:49:15 +00:00
Pete Bone
0ddd5591af
Merge branch 'hathach:master' into master 2022-11-30 13:43:45 +01:00
Gordon McNab
aceab1dcf3
Merge branch 'hathach:master' into port-ft90x 2022-11-30 12:16:52 +00:00
Gordon McNab
1437ad1dfb Add endpoint definitions for more example projects. 2022-11-30 12:15:27 +00:00
hathach
c9c7dfa868
more clean up 2022-11-30 18:59:58 +07:00
hathach
069215c538
white spaces 2022-11-30 18:58:30 +07:00
Gordon McNab
fe63e30a44 Add FT9xx for cdc_dual_ports
Fix handling of interrupt endpoints. i.e. no ZLPs.
Fix the assignation of endpoint types.
Add button support for MM900evx boards.
On board support do not block for UART input.
2022-11-30 11:46:13 +00:00
pete-pjb
d588167a39 Modify FreeRTOS integration to allow non-static allocation. 2022-11-30 11:33:24 +00:00
Ha Thach
2ae6a4d519
Merge pull request #1755 from rppicomidi/fix_1721
Fix RP2040 Issue 1721
2022-11-30 18:00:27 +07:00
Ha Thach
ff26714958
Merge pull request #1756 from benishor/master
Added board description for electro-smith daisy seed
2022-11-30 17:16:19 +07:00
Gordon McNab
7d8d3eca73 Fix transfers issues with FT9xx
Correct USB FIFO use for setup data phases (OUT transfers). We cannot stop traffic on the control endpoint so we set a flag and pull data from host when tinyUSB requests it from the USB FIFO. Extend this for all endpoints although currently not required.
Rename all instances of ft90x which can apply to ft93x as ft9xx.
Add support for the cdc_dual_ports example for ft9xx.
Add LED pin definition for board LED in a simple to access place on the Bridgetek MM900EVx boards.
2022-11-29 18:49:23 +00:00
Gordon McNab
1fce76ad47 Fix issue with the CDC SetLineCoding request
The SetLineCoding would fail as host would send the SETUP OUT phase before tinyUSB had setup a transaction for it. ft9xx port would ignore the transfer since there was no valid transaction setup for it. One SETUP data phase packet is cached now.
2022-11-28 17:41:00 +00:00
Ha Thach
52a9098b31
Merge pull request #1763 from hathach/host-retry-failed-enumeration-request
Retry a few times with transfers in enumeration since device can be unstable when starting up
2022-11-29 00:11:41 +07:00
hathach
be6f6f2c99 increase delay between attempts to 100ms 2022-11-28 23:43:52 +07:00
hathach
b2a3f33046 Retry a few times with transfers in enumeration since device can be unstable when starting up 2022-11-28 23:22:10 +07:00
hathach
5785467016 update pico-pio-usb submodule and its warnings suppress 2022-11-28 23:21:17 +07:00
Gordon McNab
9ccfb384e8 Update to v2.6.0 library 2022-11-24 12:17:55 +00:00
Adrian Scripca
8ef32617ba
Added board description for electro-smith daisy seed 2022-11-24 13:06:25 +02:00
rppicomidi
9825fbe9ac Fix RP2040 Issue 1721 2022-11-23 13:12:31 -08:00
Ha Thach
081e4eecba
Merge pull request #1750 from hathach/rework-host-msc-complete-callback
Rework host msc complete callback
2022-11-23 17:47:52 +07:00
hathach
7298923927 rework tuh_msc_complete_cb_t signature to use new tuh_msc_complete_data_t
add user arg to all scsi command API that support complete callback
2022-11-23 16:01:48 +07:00
hathach
21d552bbdf
allow all host examples to use pico-pio-usb for rp2040 2022-11-23 12:30:10 +07:00
Ha Thach
4a2e424103
Merge pull request #1746 from hathach/host-msc-example
Add host msc explorer example
2022-11-21 17:22:52 +07:00
hathach
a394273ed2
add board_getchar() for non-blocking getchar() 2022-11-21 16:28:54 +07:00
hathach
460bef9dbb
host msc example work well with rp2040 pio-usb 2022-11-21 15:49:38 +07:00
hathach
ba9f88f18c
suppress fatfs cast-qual 2022-11-21 12:33:31 +07:00
hathach
53677d4844
house keeping 2022-11-21 12:28:33 +07:00
hathach
64ecf43663
whitespace 2022-11-21 11:53:15 +07:00
hathach
cab65acc46
add pwd 2022-11-21 11:52:51 +07:00
hathach
51873cd1be
implement rm command 2022-11-21 11:24:58 +07:00
hathach
47bc269b50
fix build with rp2040 and rx65 2022-11-21 11:12:10 +07:00
hathach
2312bfe3c4
implement cp command 2022-11-20 16:40:15 +07:00
hathach
bf69ffb8f7
add mv command 2022-11-19 15:53:55 +07:00
hathach
daeaea9556
add mkdir 2022-11-19 15:37:23 +07:00
hathach
16e1838862
implement cat command 2022-11-19 15:27:07 +07:00
hathach
083ed364ba
add cd command 2022-11-19 13:56:33 +07:00
hathach
bb570e02d6
msc explorer ls work great 2022-11-19 13:44:07 +07:00
hathach
a6001fc8f2
update uart read for lpc18/43 for testing 2022-11-18 21:50:00 +07:00
Ha Thach
95fb11fcff
Merge pull request #1712 from kripton/fixDhserver
dhserver: Support DHCP clients that don't send the MESSAGETYPE as first option
2022-11-18 21:42:39 +07:00
hathach
b00529e287
add msc file explorer example
- add lib/fatfs version 15
- add lib/embedded-cli
2022-11-18 21:39:04 +07:00
Ha Thach
2dc7a62361
Merge pull request #1738 from kaysievers/midi-port-names
MIDI: support port name strings
2022-11-16 16:36:13 +07:00
Ha Thach
67cda9b7f9
Merge pull request #1740 from hathach/add-HiFiPhile-selfhost
Add hifiphile self-hosted
2022-11-16 15:34:05 +07:00
hathach
fc523733c1 more ci warnings 2022-11-16 11:16:40 +07:00
hathach
9b9d841770 fix other ci warnings 2022-11-16 11:11:26 +07:00
hathach
ba0f1a3be5 disable orphan board workflow and minor update to pi4 workflow 2022-11-16 11:01:54 +07:00
hathach
d17eb94e84 only print flash output if failed 2022-11-16 09:36:12 +07:00
hathach
a6d9fda5f9 skip usb msc test 2022-11-16 01:01:03 +07:00
hathach
2f909c284a more flash script 2022-11-15 23:47:24 +07:00
hathach
2fb0cea7e2 more test 2022-11-15 23:37:07 +07:00
hathach
468ec83c1b correct flash.sh creation 2022-11-15 23:07:58 +07:00
hathach
d8badc948f update yml 2022-11-15 18:13:19 +07:00
hathach
931b718289 try running HiFiPhile self-host with stm32l412nucleo 2022-11-15 18:10:41 +07:00
Ha Thach
6c6b7ee2bf
Merge pull request #1727 from HiFiPhile/bsp_412
Add support for STM32L412.
2022-11-15 16:15:09 +07:00
Kay Sievers
abfcdf2cfb MIDI: support port name strings
This allows to set custom descriptive names for virtual MIDI
ports/cables. A MIDI port offers different functionality on
the same physical USB device. The names make it easier to
distinguish one from the other.
2022-11-11 22:48:29 +01:00
Mengsk
da1589f116 Fix FREERTOS USB IRQ priority. 2022-11-08 21:58:51 +01:00
Mengsk
f3f3739073 Fix DCD build. 2022-11-07 13:38:35 +01:00
Mengsk
9d3d8fd5b0 Merge branch 'master' of https://github.com/hathach/tinyusb into bsp_412 2022-11-07 12:47:41 +01:00
Mengsk
1eae139aa9 Add support for STM32L412. 2022-11-07 12:32:36 +01:00
Ha Thach
e434a1dc05
Merge pull request #1718 from hfegran/efm32_freertos_port_fix
Fixed wrong FreeRTOS port for EFM32GG12
2022-11-07 00:05:51 +07:00
Ha Thach
187e57dc81
Merge pull request #1724 from hathach/add-self-host
Add self host
2022-11-07 00:00:44 +07:00
hathach
030b50dce3
final clean up 2022-11-06 23:19:34 +07:00
hathach
a0dc9008a7
remove trigger hardware step 2022-11-06 22:39:09 +07:00
hathach
5d13eb8e7a
move test_hardware into build_arm 2022-11-06 22:33:55 +07:00
hathach
ca4ae61c1c
use gh cli instead of action for workflow dispatch 2022-11-06 22:06:22 +07:00
Ha Thach
a97f6a4945
Merge pull request #1723 from hathach/fix-rp2040-minor
Fix rp2040 minor
2022-11-06 16:02:41 +07:00
hathach
fee90f353f bump up setup python action to v4 2022-11-06 15:17:00 +07:00
hathach
b920155444 minor clean up 2022-11-06 14:56:05 +07:00
hathach
a061bc4173 bump up pico-pio-usb 2022-11-06 14:46:44 +07:00
hathach
44e19aa3c7 rename PIO_USB_PIN_DP to PIO_USB_DP_PIN and change from 2 to 20 & moved to board.h
add support for  PIO_USB_VBUSEN_PIN and its state.
2022-11-06 14:44:56 +07:00
Ha Thach
9e9f331503
Merge pull request #1434 from Skyler84/rp2040-hcd-bulk
Rp2040 hcd bulk
2022-11-05 15:16:36 +07:00
hathach
cb0ca6151b remove CFG_TUSB_DEBUG from tinyusb_common_base 2022-11-04 17:08:02 +07:00
hathach
d2c9b8bcfb fix -wconversion-int and add minor comment 2022-11-04 16:14:35 +07:00
Ha Thach
b554c2ed83
Merge branch 'master' into rp2040-hcd-bulk 2022-11-04 15:42:50 +07:00
Henrik Fegran
38cdeb9e60 Fixed wrong FreeRTOS port for EFM32GG12 2022-11-03 20:23:27 +01:00
Jannis Achstetter
3f3f6eee1c
dhserver: Support DHCP clients that don't send the MESSAGETYPE as first option
Signed-off-by: Jannis Achstetter <kripton@kripserver.net>
2022-11-01 23:42:58 +01:00
Ha Thach
28f49c088b
Merge pull request #1698 from battlesnake/fix-attrs-on-struct-member
do not apply storage attributes to member of struct
2022-10-25 15:23:09 +07:00
Mark K Cowan
815c2cc995 keep alignment spec 2022-10-24 20:36:45 +03:00
Ha Thach
5b1b383d2a
Merge pull request #1676 from tswan-quasi/master
dcd_lpc_ip3511: isochronous support and endpoint accidental write fix
2022-10-24 19:08:58 +07:00
hathach
e3b7ed9ae9 use dummy for all ZLP for ip3511, fix lpc55 build with DEBUG=1 2022-10-24 18:43:21 +07:00
tswan-quasi
35e1a27c95 unused (void) cast 2022-10-21 15:06:30 -04:00
Ha Thach
bfcdef499a
Merge pull request #1690 from tore-espressif/fix/espressif/iso_transfers
esp: Fix Isochronous transfers
2022-10-22 00:34:38 +07:00
Mark K Cowan
4ec1643bdb do not apply storage attributes to member of struct 2022-10-20 22:46:21 +03:00
tswan-quasi
0b55047081 typo fix 2022-10-20 11:04:49 -04:00
tswan-quasi
fe4278554b dummy buffer only on EP0 OUT ZLPs 2022-10-20 11:02:57 -04:00
Ha Thach
55db123a85
Merge pull request #1696 from kasjer/kasjer/fix-stm32u5-submodules
stm32u5: Fix submodules paths
2022-10-20 16:12:28 +07:00
Jerzy Kasenberg
19208cd88d stm32u5: Fix submodules paths
Local paths were commited to submodule definitions
This just removes prefix for submodules path and name
2022-10-20 11:04:49 +02:00
Ha Thach
39be00975c
Merge pull request #1680 from LynnL4/port-stm32u5xx
Port stm32u5xx
2022-10-19 23:10:30 +07:00
Ha Thach
e79325adec
Merge pull request #1668 from kkitayam/add_support_for_mjpeg
Add support for MJPEG on UVC
2022-10-19 23:10:11 +07:00
Ha Thach
2cd4e27e98
Merge pull request #1523 from maddyaby/dcd_edpt_open
Allow more endpoint packet sizes for SAMD
2022-10-19 22:56:36 +07:00
Ha Thach
08a4988e99
Merge pull request #1691 from hadess/wip/hadess/fix-deps-typo
Fix typo in getting_started guide
2022-10-19 09:10:19 +07:00
Bastien Nocera
8f88ff559e Fix typo in getting_started guide
Fixes: 1234111 ("add get-deps target")
2022-10-18 15:14:45 +02:00
Tomas Rezucha
a49ca795af esp: Fix Isochronous transfers
On ESP32-S2/S3 ISO transfers must be configured for even or odd frame.

Closes https://github.com/hathach/tinyusb/issues/1382
2022-10-18 08:05:13 +02:00
hathach
3f45f37672
minor rename 2022-10-17 23:13:24 +07:00
gaoyichuan
3846d5f38c hid: add configurable report size for fido 2022-10-15 19:22:21 +08:00
gaoyichuan
2a520fb921 hid: add fido hid descriptor templates 2022-10-15 19:07:07 +08:00
Ha Thach
154821acc0
Merge pull request #1646 from battlesnake/feedback-prototype-fix
audio_device: prototype added for function referenced before use
2022-10-14 16:28:26 +07:00
tswan-quasi
2c1ff2673b (void) rhport for unused parameter 2022-10-13 11:48:30 -04:00
LynnL4
4238467b2d Add support for STM32U5 mcu 2022-10-13 17:39:42 +08:00
tswan-quasi
930c68278c double cast of pointer to remove error 2022-10-12 11:16:35 -04:00
kkitayam
53dc9d55b5 Fix pointer type to calculate streaming parameter 2022-10-12 20:41:03 +09:00
kkitayam
2c9b5ddff0 Rename descriptor macros for consistency 2022-10-12 20:07:22 +09:00
tswan-quasi
16f1554a03 lpc55s69 isochronous, dummy address for endpoint buffers to prevent accidental writes 2022-10-11 09:59:28 -04:00
LynnL4
8a89365bb2 Add stm32u5xx offical driver. 2022-10-11 13:50:11 +08:00
Ha Thach
a95fb36f72
Merge pull request #1623 from SudoMaker/master
Initial PIC32MM/MX & PIC24 support
2022-10-10 20:18:01 +07:00
Ha Thach
b75d44c3ae
Merge pull request #1664 from mingpepe/master
Fix typo for log in dcd_rp2040.c
2022-10-10 20:15:32 +07:00
kkitayam
aed8051f50 Add motion jpeg 2022-10-08 21:53:32 +09:00
kkitayam
4be7ffd63f Fix max payload size to clip at 1023 2022-10-07 21:30:03 +09:00
kkitayam
3499aa2b21 Fix pointer 2022-10-06 21:10:27 +09:00
ReimuNotMoe
8096afc6de Microchip PIC24/dsPIC33 device mode support 2022-10-06 03:45:51 +08:00
mingpepe
988eeb50c6
Fix typo for log in dcd_rp2040.c 2022-10-05 21:26:22 +08:00
kkitayam
ee832e4e37 Fix descriptor searching 2022-10-03 21:41:58 +09:00
Mark K Cowan
6c3c2df823 audio_device: prototype added for function referenced before use 2022-09-17 21:27:04 +03:00
Ben Avison
73f22e31c7 [rp2040] Wrap GCC pragmas in #ifdef __GNUC__
IAR generates warning Pe161 'unrecognized #pragma'.
2022-09-13 18:00:51 +01:00
Ben Avison
01edbb8af6 IAR doesn't support __attribute__((fallthrough))
IAR generates warning Pa167 'the "fallthrough" attribute is not supported'.
It doesn't generate warnings when one switch case falls through to another,
so simply make TU_ATTR_FALLTHROUGH expand to an empty string.

Also replace one instance of __attribute__ with the macro.
2022-09-13 18:00:51 +01:00
Ben Avison
62d90c8500 Move variable into its own curly-brace scope
IAR generates warning Pe546 'transfer of control bypasses initialization of
variable "invInvTag"'.
2022-09-13 18:00:51 +01:00
Ben Avison
caff3b5c54 Remove unused static data
This affects struct rspMsg in usbtmc_app.c (unconditionally) and uint8_t
termChar in usbtmc_device.c (when NDEBUG is defined). IAR generates warning
Pe550 'variable was set but never used'.
2022-09-13 18:00:51 +01:00
Ben Avison
6a2d01bae4 Don't assume different enum types can be combined
IAR generates warning Pa089 'enumerated type mixed with another enumerated
type'.
2022-09-13 18:00:51 +01:00
Ben Avison
53f0d5538b Don't assume ints automatically convert to enums
IAR generates warning Pe188 'enumerated type mixed with another type'.
2022-09-13 18:00:50 +01:00
Ben Avison
65ba15c37d Remove unreachable code
IAR generates warning Pe111 'statement is unreachable'. In a couple of
cases, replace return statements with TU_ATTR_FALLTHROUGH; because some
compilers apparently can't figure out that the return statements are
unreachable but do whinge about an imagined fall-through without them!
2022-09-13 18:00:50 +01:00
Ben Avison
16518dcbbb Refactor pointer arithmetic on void*
This is a GCC extension, illegal in ISO C. IAR generates errors Pa152
'these operand types cannot be used here' and Pe852 'expression must be a
pointer to a complete object type'.

Replace with uint8_t*.
2022-09-13 18:00:49 +01:00
kkitayam
1debf62707 Fix compile errors 2022-09-13 21:22:02 +09:00
kkitayam
e80714740c Change images to MJPEG 2022-09-13 21:22:02 +09:00
Ha Thach
111515a29c
Merge pull request #1629 from jmark1m/master
Fix bug #1628 by preventing shared irq slots for filling up
2022-09-13 15:08:12 +07:00
Ha Thach
7ba950c006
Merge pull request #1642 from kasjer/kasjer/nrf5x-fix-out-iso-packet-size-report
nrf5x: Fix reception of large ISO packets
2022-09-13 14:57:01 +07:00
Jerzy Kasenberg
3133cacc6a nrf5x: Fix reception of large ISO packets
ISO packet size is up to 1023 for full speed device.
Upon completion of ISO reception, reported length of incoming packet
was truncated to one byte only.
This results in incorrect data stream for higher bit rates
48 samples * 4 bytes per sample * 2 channels = 384 bytes of data
and 128 was reported.

There is no change in logic extending xact_len to uint16_t fixes the issue.
2022-09-13 08:11:56 +02:00
Ha Thach
6393412380
Merge pull request #1641 from hathach/fix-1634
re-added code in pr 1438 to fix compile with h7 with 1 usb otg
2022-09-13 11:46:32 +07:00
hathach
7a48b1f0d1 re-added code in pr 1438 to fix compile with h7 with 1 usb otg 2022-09-13 11:04:48 +07:00
Ben Avison
6dfc857b91 [rp2040] Explicit cast value of hw_set_alias
Some compilers don't support the GNU extension `typeof` so their definitions
of `hw_set_alias` can't inherit their type from their argument, and the best
we can do is have `hw_set_alias` act the same as `hw_set_alias_untyped`.
This requires an explicit cast when the macro is used instead, otherwise
IAR generates error Pe132 'expression must have pointer-to-struct-or-union
type but it has type "void *"'.

The same goes for `hw_clear_alias`.
2022-09-12 18:46:09 +01:00
Ben Avison
e5355d0335 [rp2040] Remove non-portable return statements
IAR generates error Pe118 'a void function may not return a value'.
2022-09-12 18:46:09 +01:00
Ben Avison
d28ff1175d IAR declares strncasecmp in string.h not strings.h
strings.h is not an ISO header file, so IAR generates fatal error Pe1696
'cannot open source file "strings.h"'. Even though strncasecmp isn't an
ISO C library function, IAR's runtime library defines it, though it
declares it in string.h instead.
2022-09-12 18:46:01 +01:00
jmark1m
0931b52b66 Fix bug #1628 by preventing shared irq slots for filling up 2022-09-07 15:10:44 -05:00
ReimuNotMoe
c5992edc7d Initial PIC32MM/MX & PIC24 support 2022-09-03 05:19:50 +08:00
Ha Thach
b624664f52
Merge pull request #1614 from kasjer/kasjer/fix-nrf5x-with-iso
nrf5x: Fix endpoint internal state when closed
2022-08-26 13:47:36 +07:00
Jerzy Kasenberg
5e3cfe7b57 nrf5x: Fix endpoint internal state when closed
Field started (regardind transfer) was only cleaed when transfer
was finished.
For audio devices set interface is called many times.
When there is no audio (silence) set interface requests zero
lenght bandwithd that in turn calls dcd_edpt_close().

When endpoint is closed due to set interface request transfer
should not longer be started since it will block next start transfer
with assert.

This just sets 'started' to false when endpoint is closed.
2022-08-26 08:10:15 +02:00
Ha Thach
101cbf6e31
Merge pull request #1613 from Lan-Hekary/video-descriptors-fix
Remove Hardcoded interface numbers from video descriptors
2022-08-25 18:44:22 +07:00
Ahmed El-Sharnoby
8a537a0092
Remove Hardcoded interface numbers from video descriptors
Removing the Hardcoded interface numbers from the video descriptors allow the user to add other interfaces before or after the Video Control Interface and Video Streaming Interface
2022-08-23 17:18:32 +02:00
Ha Thach
e3b4d3f406
Merge pull request #1611 from hathach/fix-release-body
try to fix release body in tinyusb_src (not tested)
2022-08-23 14:44:02 +07:00
hathach
660e8f50a7
try to fix release body in tinyusb_src (not tested) 2022-08-23 14:43:09 +07:00
Ha Thach
9e91b02ec7
Merge pull request #1609 from hathach/release-0.14.0-p2
update repository.yml
2022-08-23 13:15:11 +07:00
hathach
3e815c709c
update repository.yml 2022-08-23 12:00:20 +07:00
Ha Thach
05e19b7848
Update feature_request.yml 2022-08-19 23:57:39 +07:00
Ha Thach
f6c1ce5b1c
Merge pull request #1569 from hathach/release-0.14.0
increase version to 0.14.0 for release
2022-08-19 21:13:09 +07:00
hathach
961e83e083
more docs update 2022-08-19 17:14:53 +07:00
Ha Thach
792b2fb956
Merge pull request #1603 from Ryzee119/hub_improv
Host hub clear port and device interrupts
2022-08-17 15:03:48 +07:00
Ryzee119
2b2354d302 Hub: Clear other port feature changes 2022-08-16 18:25:46 +09:30
Ryzee119
3c7b5dcaff Hub: Handle hub device status change interrupt 2022-08-16 18:25:43 +09:30
Ha Thach
585f37a797
Merge pull request #1489 from kasjer/kasjer/fix-nrf5x-dma-access
nrf5x: Fix DMA access
2022-08-15 21:30:39 +07:00
Ryzee119
aafea8ef5d Hub: Rename port status callback to be more generic 2022-08-15 17:43:04 +09:30
Ryzee119
5efef4393c Hub: Expand hub helpers to handle device events 2022-08-15 17:42:56 +09:30
Ha Thach
8a28e7cd75
Merge pull request #1597 from kasjer/kasjer/dfu-coexistence
dfu: Allow DFU coexistence with other interfaces (BTH, RNDIS, future one)
2022-08-10 12:45:22 +07:00
Ha Thach
7ade0d0ce4
Merge pull request #1588 from majbthrd/stm32l052
add 'stm32l052dap52' (STM32L052K8 MCU) board target
2022-08-10 12:41:29 +07:00
Jerzy Kasenberg
c7469ce986 dfu: Allow DFU coexistence with other interfaces
dfu_moded_open() only works correct when its called on DFU interface
descriptor. It means that DFU is the only one interface in configuration
or driver is called after all others interface drivers were tried and
gave up.

If other interface is supported and but driver for DFU is called first
(this is the case for BTH and RNDIS).
Code after while loop (that was not entered) has an TU_ASSERT that will
make set_configuration to fail.

Now TU_VERIFY is called first to make sure open code is called for DFU
only and not other interface descriptors like in other drivers.
2022-08-09 10:42:30 +02:00
Peter Lawrence
d1c61e33a6 add 'stm32l052dap52' (STM32L052K8 MCU) board target
'dap52' is Olimex's name of their STM32L052-based fork of 'dap42'
2022-08-03 12:31:37 -05:00
Ha Thach
251ce98990
Merge pull request #1586 from hathach/fix-TUD_OPT_HIGH_SPEED
fix issue with TUD_OPT_HIGH_SPEED
2022-08-01 15:51:54 +07:00
hathach
a219ba86ea
fix issue with TUD_OPT_HIGH_SPEED 2022-08-01 14:52:29 +07:00
hathach
fe7fca7abb
minor clean up 2022-08-01 14:42:58 +07:00
hathach
4a47db97eb
test hw dfu_runtime 2022-07-29 11:32:17 +07:00
hathach
aa8880c681
clean up 2022-07-28 22:13:39 +07:00
hathach
292dea408f
add dfu test 2022-07-28 21:27:38 +07:00
hathach
cbb7c9f313
fix hw test 2022-07-28 13:31:42 +07:00
hathach
d36ea6ddc1
update issue template 2022-07-28 12:23:01 +07:00
hathach
229a1c1458
update hw test 2022-07-28 11:37:09 +07:00
hathach
e01b437af5
more hw test 2022-07-28 11:10:54 +07:00
hathach
2d5be43747
fix typo 2022-07-27 20:31:57 +07:00
hathach
4411579ae0
ci update 2022-07-27 16:34:22 +07:00
hathach
05ccd6c32b
more hw test update 2022-07-27 15:44:21 +07:00
hathach
1ff0c7a52b
sleep 0.2 for new image take affect 2022-07-27 15:20:56 +07:00
hathach
f5f2433c5a
wait for enumeration before test 2022-07-27 12:08:50 +07:00
hathach
95c0262cd6
update test 2022-07-26 23:14:27 +07:00
hathach
d15a86bc69 test flash and hw test with cdc msc 2022-07-26 16:49:51 +07:00
hathach
0be6db50f8 test self-hosted 2022-07-26 16:31:07 +07:00
hathach
23ea8d1e25 update doc 2022-07-25 22:27:33 +07:00
Ha Thach
fd5bb6e5db
Merge pull request #1514 from maddyaby/audiod_typo
Fix typo in audiod_rx_done_cb in audio_device.c
2022-07-19 17:10:45 +07:00
hathach
b0b155c949
increase version for release
along with minor doc update
2022-07-19 12:28:52 +07:00
Ha Thach
ed2e587ace
Merge pull request #1568 from hathach/revert-hid-callback-len-temporarily
temporarily revert len back to uint8_t in tud_hid_report_complete_cb() 0.14.0 release
2022-07-19 12:16:32 +07:00
Ha Thach
2110e27678
Merge pull request #1531 from pigrew/usbtmc_highspeed
USBTMC: Fixes and support for high-speed USB
2022-07-18 22:20:43 +07:00
hathach
b495d6f8ec
temporarily revert len back to uint8_t in tud_hid_report_complete_cb() for up coming release 2022-07-17 22:56:07 +07:00
Ha Thach
868f2bcda0
Merge pull request #1554 from kilograham/rp2040_warning2
Rework CMake example warnings some more
2022-07-14 21:53:34 +07:00
hathach
7e4c0f64cd
abtract attribute fallthrough 2022-07-14 18:39:47 +07:00
graham sanderson
4bd47bcb99 disable bad gcc 6 warning 2022-07-12 13:29:47 -05:00
graham sanderson
fc1a27b6c9 RP@040: rework CMake for compiler warnings 2022-07-12 12:58:30 -05:00
Ha Thach
1a8c3a863b
Merge pull request #1552 from hathach/fix-old-gcc
Fix warnings when compiling rp2040 with older version of gcc
2022-07-12 11:08:19 +07:00
hathach
4ea27acd1d minor update to webusb serial example 2022-07-12 01:55:33 +07:00
hathach
345558307d fix incorrect null-dereference warnings when compiling with gcc7 2022-07-12 00:50:52 +07:00
hathach
bb5dbd2da8 only enable warnings with approriate gcc version for rp2040 2022-07-11 23:57:34 +07:00
Ha Thach
0bfb9d62de
Merge pull request #1543 from robert-hh/1170_0.13.0
mimxrt: Change the definitions for MIMXRT boards.
2022-07-11 15:53:24 +07:00
hathach
6da1e93edd
fix rt1050 evk build with latest mcu-sdk 2022-07-11 14:21:19 +07:00
hathach
19768936ae
bump up mcux-sdk for rt11xx, add back OPT_MCU_MIMXRT11XX 2022-07-11 14:01:18 +07:00
NConrad
54250d7dd5 USBTMC: explicit type conversions fix 2022-07-09 17:50:17 -04:00
Ha Thach
ecb899408b
Merge pull request #1544 from hathach/ci-parallel-build
Ci parallel build
2022-07-01 20:52:46 +07:00
hathach
53db23142a add get-dependencies.py 2022-07-01 17:23:14 +07:00
hathach
5323472afd update get-deps for ci 2022-07-01 16:37:34 +07:00
hathach
12341118e3 add get-deps target
update ci to get-deps first
2022-07-01 16:24:58 +07:00
robert-hh
ec6f56768a mimxrt: Change OPT_MCU_MIMXRT1xXX to OPT_MCU_MIMXRT.
Which fits both MIMXRT10XX and MIMXRT11XX.
2022-07-01 09:04:36 +02:00
robert-hh
60c1750a9b mimxrt: Add/change definitions for MIMXRT11XX boards.
These are mostly identical to the MIMXRT10XX, with one tiny difference.
2022-06-30 22:21:31 +02:00
Ha Thach
68c2012ed1
Merge pull request #1540 from phryniszak/master
Define CFG_BOARD_UART_BAUDRATE in CMake
2022-07-01 01:07:31 +07:00
Ha Thach
2754c641cb
Merge pull request #1542 from hathach/fix-rp2040-remote-wakeup
rp2040 enable SOF as resumed signal when remote wakeup
2022-06-30 16:27:10 +07:00
hathach
9ec92ff97b
rp2040 enable SOF as resumed signal when remote wakeup 2022-06-30 15:45:04 +07:00
Pawel Hryniszak
023191be23
Let to define CFG_BOARD_UART_BAUDRATE in CMake 2022-06-29 20:28:22 +01:00
hathach
8f9ecace4d
update build_board.py to parallel build 2022-06-29 21:06:02 +07:00
hathach
d5d5a6437c
more parallel ci 2022-06-29 18:23:45 +07:00
hathach
8d07ea7ce5
build_family.py in parallel 2022-06-29 16:39:19 +07:00
Ha Thach
19956f070d
Merge pull request #1539 from hathach/improve-ci
Improve ci
2022-06-29 16:27:17 +07:00
hathach
158b3d761d fix xmc4000 build 2022-06-29 15:27:24 +07:00
hathach
4da1a9359d fix build with fomu/fomu 2022-06-29 15:12:01 +07:00
hathach
5a378703fb fix end symbol for samx7x and same5x 2022-06-29 15:05:09 +07:00
hathach
7949a4ec7c skip freertos example for F1C100S 2022-06-29 14:12:58 +07:00
hathach
a62c2640b5 remove redundant rp2040 boards, all boards supported by pico-sdk already supported 2022-06-29 14:08:01 +07:00
hathach
1e00fe78c7 use action gcc 2022-06-29 14:07:00 +07:00
hathach
8fe9022a6e fix buid_board.py script 2022-06-29 14:06:44 +07:00
Ha Thach
39069cf4be
Merge pull request #1538 from kilograham/another_compiler_wawrning
Fix actual compiler warning on gcc 10.3.1
2022-06-29 13:47:42 +07:00
graham sanderson
b12863d27c Fix actual compiler warning on gcc 10.3.1 2022-06-29 07:28:35 +01:00
Ha Thach
3681ad2941
Merge pull request #1521 from kilograham/rp2040_warning
Re-add some warning suppression for rp2040
2022-06-29 11:39:05 +07:00
Ha Thach
c7fce32dff
Merge pull request #1535 from robert-hh/samd_xfer_lockup
samd: Fix a lock-up situation at high traffic.
2022-06-28 20:36:04 +07:00
hathach
898b52be45 update rp2040 warnings
- remove "-Wno-stringop-overflow -Wno-array-bounds"
- skip -Wconversion for gcc 9 and prior
- suppress_tinyusb_warnings only when building with gcc 9 and below
2022-06-28 16:27:44 +07:00
hathach
83602ea123 Merge branch 'master' into rp2040_warning 2022-06-28 13:34:47 +07:00
graham sanderson
4057c2d8d9 rework suppress_tinyusb_warnings
* gcc 9.2.1 has some spurious -Wconversion warnings
* cmake 3.18 and above require set_target_properties to be added from the target directory (so added it to all examples)
* fixed a few warnings in a couple of examples
2022-06-27 22:43:41 +01:00
robert-hh
bc4da2047b samd: Fix a lock-up situation at high traffic.
This PR fixes a transmit lock-up, which happens, when data is received
and sent at the sime time at moderate to high speeds, like code
which just echoes incoming data.

In my case, an issue was reported here:
https://github.com/micropython/micropython/issues/8521
2022-06-27 20:31:44 +02:00
Ha Thach
3ead682af0
Merge pull request #1534 from hathach/add-more-warnings
Add more warnings
2022-06-27 22:27:24 +07:00
hathach
25580b4fe9 use forloop to avoid -Warray-bounds with host setup packet 2022-06-27 21:05:41 +07:00
hathach
9c56f70111 suppress error with net example 2022-06-27 20:30:47 +07:00
hathach
dd7a17c345 prevent error on specific warnings for net lwip & dual example for rp2040 2022-06-27 17:53:42 +07:00
hathach
a0ef489890 fix all warnings with host rp2040 2022-06-27 17:11:24 +07:00
hathach
6522a8150e fix all device examples warnings 2022-06-27 13:48:47 +07:00
hathach
1a1f633922 Merge branch 'master' into add-more-warnings 2022-06-27 12:50:50 +07:00
Ha Thach
bc0f5502e2
Merge pull request #1533 from hathach/hid-report-len-uint16
Hid report len uint16
2022-06-27 12:47:08 +07:00
hathach
556b5d5044 change report len in hid API from uint8_t to uint16_t
since HS interrupt endpoint can be up to 1024, 8-bit is not enough.
affected APIs are:
- tud_hid_n_report() / tud_hid_report()
- tud_hid_report_complete_cb()
2022-06-27 12:22:36 +07:00
hathach
0b3503cb33 clean up usbd log level 2022-06-27 11:56:48 +07:00
hathach
b9dc9dbd78
fix most warnings with rp2040 -wconversion 2022-06-27 11:50:17 +07:00
NConrad
c675debfb2 USBTMC: Handle busy interrupt in. 2022-06-26 14:34:34 -04:00
NConrad
239b5d5279 USBTMC: Manually stall and unstall EP when clear(ENDPOINT_HALT) is received. 2022-06-24 23:06:32 -04:00
NConrad
3d4d37375b USBTMC: Update test python code to use the new pyvisa namespace, and other misc fixes 2022-06-24 21:24:31 -04:00
hathach
0042eccb3b
fix redundant-decls warnings by usbd/usbh 2022-06-24 22:52:11 +07:00
hathach
1d6918ce41
suppress redundant-decls warnings for freertos examples 2022-06-24 21:53:46 +07:00
hathach
835ab01cab
fix stm32 g4 and wb build issue with freertos, also add them to ci build 2022-06-24 21:52:51 +07:00
hathach
4f6e770eda
add more warning option, also fix -Wconversion with rp2040
-Wuninitialized, -Wunused,  -Wredundant-decls
2022-06-24 19:46:19 +07:00
Ha Thach
4639cac85c
Merge pull request #1526 from ccrome/chc-add-teensy-41
Added The Teensy 4.1 board
2022-06-22 11:22:44 +07:00
NConrad
4a9fe813a8 Update USBTMC descriptors to support high speed, set USB version to 2.0.0 for all cases. 2022-06-21 22:31:09 -04:00
NConrad
e9c29e6a2d Update USBTMC driver to support dynamic packet sizes (based on descriptor). 2022-06-21 21:27:52 -04:00
caleb crome
742b99f689 Added The Teensy 4.1 board
The Teensy 4.1 board has an 8MB W25Q64JV as opposed to the 2MB flash
on the Teensy 4.0.  This largely doensn't matter for TinyUsb, except
when you attempt to access any memory in the flash above the 2MB
boundary, when it fails with a hard fault.
2022-06-21 11:12:39 -07:00
Ha Thach
070382d599
Merge pull request #1509 from liamfraser/rp2040_hcd_improvements
RP2040 HCD Improvements (Hub + Keyboard + Mouse working)
2022-06-21 15:55:02 +07:00
Ha Thach
ae8b8f0c93
Merge pull request #1515 from maddyaby/dcd_edpt_close
Stub out dcd_edpt_close for samd
2022-06-18 12:40:39 +07:00
Ha Thach
b4e62d1cda
Merge pull request #1518 from mingpepe/master
Fix typo for log format
2022-06-18 12:39:16 +07:00
maddyaby
2cc2a90215 Allow more endpoint packet sizes for SAMD
Tested on SAMD51 - we can allow more packet sizes by checking that the set size value is greater than the requested packet size instead of exactly the same.
2022-06-17 16:07:32 -07:00
graham sanderson
2f7f3e604e Re-add some warning suppression for rp2040 2022-06-17 12:54:28 -05:00
Ha Thach
d09d0b3147
Merge pull request #1519 from kilograham/rp2040_shared_handler
rp2040: use shared IRQ handlers, so user can also hook the USB IRQ
2022-06-17 22:17:42 +07:00
graham sanderson
c45118dacf rp2040: use shared IRQ handlers, so user can also hook the USB IRQ 2022-06-17 09:13:40 -05:00
mingpepe
1001d2da40
Fix typo for log format 2022-06-17 16:50:24 +08:00
Ha Thach
e0d7c16788
Merge pull request #1516 from hathach/fix-example-with-highspeed
correct bulk size for highspeed endpoint in dynamic_configuration and usbtmc exmaples
2022-06-17 15:11:55 +07:00
hathach
905a0b2457 correct bulk size for highspeed endpoint in dynamic_configuration and usbtmc exmaples 2022-06-17 14:37:35 +07:00
maddyaby
05fc2fa7a6 Stub out dcd_edpt_close for samd
Not having this prevents the device from finishing the mounting process.

Tested on a SAMD51 and didn't seem to need to actually do anything in the close function.
2022-06-16 16:57:20 -07:00
Maddy
e9089b993f Fix typo in audiod_rx_done_cb in audio_device.c 2022-06-16 16:22:55 -07:00
Ha Thach
80121303eb
Merge pull request #1512 from kilograham/make_ram_code_optional
rp2040: make moving 1K of code into RAM optional - and off by default
2022-06-16 23:30:29 +07:00
graham sanderson
c5ba4af25b rp2040: make moving 1K of code into RAM optional - and off by default 2022-06-16 11:04:48 -05:00
Ha Thach
d7b579a978
Merge pull request #1480 from Ryzee119/multihub_rebase
Host: Add support for multi-level usb hubs
2022-06-16 16:33:48 +07:00
hathach
2036a0b62a update readme 2022-06-16 14:41:10 +07:00
hathach
f4a7b5b80c add note for recursive calls of process_device_unplugged() in case of hub 2022-06-16 14:37:57 +07:00
Liam Fraser
19d054f789 hcd_rp2040 improvements:
- Stall now has priority over other interrupt responses
 - Delete eunused hcd_edpt_busy
 - Assert !ep->active when trying to start a new xfer
 - Assert !ep->active when handling buff_status bits
 - Set ep->xferred_len to 8 once a setup packet is finished so the data
structure is accurate
2022-06-13 16:19:11 +01:00
Ha Thach
eb7d359efc
Merge pull request #1506 from hathach/more-dynamic-rhport
more dynamic controller for host
2022-06-10 15:24:26 +07:00
hathach
040ef0640d more dynamic controller for host 2022-06-10 14:53:03 +07:00
Ha Thach
96fecedabe
Merge pull request #1505 from hathach/revert-sof-rename
revert sof_isr driver rename since it cause issue with existing code
2022-06-10 12:00:42 +07:00
hathach
8451d05c50 revert sof_isr driver rename since it cause issue with existing code
also removed commented tud_sof_isr_set() API
2022-06-10 01:45:48 +07:00
Ha Thach
806806d61b
Merge pull request #1501 from hathach/more-rp2040-ramfunc
make all hcd/dcd function used in isr into ram
2022-06-08 17:29:19 +07:00
hathach
dd035b0eb2 make all hcd/dcd function used in isr into ram with __no_inline_not_in_flash_func() for faster irq handling
result is 1KB of code moved from rom -> ram
2022-06-08 16:08:53 +07:00
Ha Thach
8c4b142b9e
Merge pull request #1498 from hathach/add-tuh_config-port-specific-setup
add tuh_configure() for port/dynamic host behavior config
2022-06-08 15:36:37 +07:00
hathach
8cbc34de11 add tuh_configure() for port/dynamic host behavior config 2022-06-08 01:17:01 +07:00
Ha Thach
896c707cd4
Merge pull request #1496 from hathach/rp2040-sof-fastfunc
add TU_ATTR_FAST_FUNC for audio sof isr call chain
2022-06-07 13:38:26 +07:00
hathach
06392247eb add TU_ATTR_FAST_FUNC for audio sof isr call chain 2022-06-07 11:50:50 +07:00
Ha Thach
a03a03d74e
Merge pull request #1495 from hathach/enhance-tusb-config
Better support multiple controllers configuration
2022-06-07 01:13:08 +07:00
hathach
7c8278303b update all host examples 2022-06-06 23:16:49 +07:00
hathach
9794a2b865 more example update 2022-06-06 22:41:04 +07:00
hathach
f4c80dd218 clean up example to use CFG_TUD_ENABLED + CFG_TUD_MAX_SPEED instead of CFG_TUSB_RHPORT0_MODE 2022-06-06 17:35:17 +07:00
Ha Thach
afd9b1883d
Merge pull request #1481 from cr1901/msp430-misopt-fix
msp430x5xx: Add fix for possible bug in msp430-elf-gcc 9.3.0.
2022-06-06 15:37:45 +07:00
hathach
1b08672945 more ci fix 2022-06-06 13:25:48 +07:00
hathach
7187cd9a85 fix ci, remove use of CFG_TUSB_RHPORT0_MODE in bsp 2022-06-06 12:51:10 +07:00
hathach
f626916a57 update all dwc2 ports to support new dynamic controller support 2022-06-04 23:52:12 +07:00
Ryzee119
7df7590f7f Hub: Remove multi-level hub bypass 2022-06-04 18:58:20 +09:30
hathach
31134f41a1 make dwc2 stm32 rhport support dynamic 2022-06-03 17:24:28 +07:00
hathach
2571211957 remove static port defined for device/host 2022-06-03 11:32:09 +07:00
Jerzy Kasenberg
8b37aa1579 nrf5x: Fix DMA access
There were two problems:
- dma_running flag could be checked in USB interrupt (not set yet) then higher priority
  interrupt could start transfer, check dma_running (not set yet) set it to true start
  DMA; then when USB interrupt continues it starts another DMA that is not allowed
- when DMA is started some registers can't be safely accessed, read can yield invalid
  values (SIZE.EPOUT, SIZE.EPISO)
  current implementation could start DMA for one OUT endpoint then check that another
  endpoint also has data and while DMA was not started right away, SIZE.EPOUT was copied
  already to MAXCNT register. Later on when DMA was started not all data was read from
  endpoint due to incorrect DMA size previously set.

To prevent both cases dma_running is changed in atomic way.
Only code that actually set this value to true starts DMA, code that tried and
had dma_running flag already set simply defers DMA start to USB task.
This eliminates also need to have mutex that was there to limit access to dma_running flag
to one task only.
transfer also now has started flag that is set only after dcd_edpt_xfer() sets up total_len
and actua_len. Previously USB interrupt was disabled when total_len and actual_len were
setup to prevent race condition when data arrived to ednpoint before transfer was setup
was finished.
2022-06-02 17:23:35 +02:00
hathach
8b9cf152a0 rhport argument in usbd_ API() is not used (always use the initialized port)
remove the usage of TUD_OPT_RHPORT in class driver
2022-06-02 16:51:17 +07:00
Rafael Silva
ea81d22f18 add __evenaccess keyword for CCRX compiler compatibility
Signed-off-by: Rafael Silva <rafaelsilva@ajtec.pt>
2022-06-02 09:35:30 +01:00
Rafael Silva
fbc2979428 fix iso int register typo
druing the renaming int and iso endpoint configurations were swapped

Co-authored-by: Koji KITAYAMA <45088311+kkitayam@users.noreply.github.com>
2022-06-02 09:35:30 +01:00
Rafael Silva
79fd23974c fix host preprocessor flag typo
Co-authored-by: Koji KITAYAMA <45088311+kkitayam@users.noreply.github.com>
2022-06-02 09:35:30 +01:00
Rafael Silva
60aae59eeb style code for consistency with existing codebase 2022-06-02 09:35:30 +01:00
Rafael Silva
e0220c6594 fix int handling for host in ek_ra4m3 port 2022-06-02 09:35:30 +01:00
Rafael Silva
c529d0b440 remove duplicate link register bit macros
Signed-off-by: Rafael Silva <rafaelsilva@ajtec.pt>
2022-06-02 09:35:30 +01:00
Rafael Silva
e7027efe7a add contributions to docs
Signed-off-by: Rafael Silva <rafaelsilva@ajtec.pt>
2022-06-02 09:35:30 +01:00
Rafael Silva
4c89776a27 add renesas ek-ra4m3 board port
Signed-off-by: Rafael Silva <rafaelsilva@ajtec.pt>
2022-06-02 09:35:30 +01:00
Rafael Silva
0bf0e0b35f add renesas ra mcu family to supported devices docs
Signed-off-by: Rafael Silva <rafaelsilva@ajtec.pt>
2022-06-02 09:35:30 +01:00
Rafael Silva
a936bafb8c add support for renesas ra family of mcus
Signed-off-by: Rafael Silva <rafaelsilva@ajtec.pt>
2022-06-02 09:35:30 +01:00
Rafael Silva
2a17a7e8f8 rework make freertos port handling
this allows ports to specify a freertos port outside the FreeRTOS-Kernel lib directory, which would otherwise not be possible

Signed-off-by: Rafael Silva <rafaelsilva@ajtec.pt>
2022-06-02 09:35:30 +01:00
Rafael Silva
03777f4a46 generalize renesas LINK core driver
create local register access struct and move mcu specific code
	in preparation of support for other mcu families that use the LINK usb core

Signed-off-by: Rafael Silva <rafaelsilva@ajtec.pt>
2022-06-02 09:35:30 +01:00
Rafael Silva
dcadbf3364 rename renesas driver to link
link was chosen according to the name for the usb core on datasheets, LINK core

Signed-off-by: Rafael Silva <rafaelsilva@ajtec.pt>
2022-06-02 09:35:30 +01:00
Rafael Silva
f2e8a60e6d add .vscode to gitignore
Signed-off-by: Rafael Silva <rafaelsilva@ajtec.pt>
2022-06-02 09:35:30 +01:00
Rafael Silva
0ee74a71e2 add renesas fsp submodule
Signed-off-by: Rafael Silva <rafaelsilva@ajtec.pt>
2022-06-02 09:35:28 +01:00
hathach
99c1585ed2 rename board specific macro for example
- BOARD_DEVICE/HOST_RHPORT_NUM to  BOARD_TUD/H_RHPORT
- BOARD_DEVICE/HOST_RHPORT_SPEED to  BOARD_TUD/H_MAX_SPEED
2022-06-01 23:53:40 +07:00
Ha Thach
b6a8d0dd71
Merge pull request #1485 from tfx2001/patch-1
Fix compile error
2022-06-01 23:26:57 +07:00
tfx2001
54d7790e8b
fix compile error 2022-06-01 21:37:26 +08:00
Ha Thach
d1d6bd2831
Merge pull request #1483 from hathach/clean-rp2040-net-example
remove cmake compile macro for net example (use lwipopts.h instead)
2022-06-01 16:17:46 +07:00
hathach
ea8a9e0249 remove cmake compile macro for net example (use lwipopts.h instead) 2022-06-01 15:10:05 +07:00
Ha Thach
fd8afc7e3b
Merge pull request #1454 from Iktek/bugfix_1453
overwrite grstctl on edpt_disable
2022-06-01 14:36:36 +07:00
hathach
6e7cd220dc grstctl set fifo + flush in one assign 2022-06-01 13:18:24 +07:00
Ha Thach
9352f75220
Merge pull request #1438 from Nikitarc/master
Update dwc2_stm32.h
2022-06-01 12:23:32 +07:00
Ha Thach
fdeac8508b
Merge pull request #1381 from hathach/add-sof-isr
Add SOF IRQ Handler
2022-05-31 22:25:14 +07:00
Ha Thach
ab7c23a787
Merge pull request #1479 from M3gaFr3ak/master
Fix printf long int compiler error
2022-05-31 21:53:29 +07:00
hathach
e384d16d57 clean up tud_audio_set_itf_cb() invocation 2022-05-31 21:52:54 +07:00
Ha Thach
223aaeaecd
Merge pull request #1463 from hathach/sof-isr-update
changes proposal to audio feedback computation
2022-05-31 20:57:07 +07:00
hathach
f2926670cc comment out fifo count method for now 2022-05-31 20:26:37 +07:00
William D. Jones
731ac3d3d6 msp430x5xx: Add fix for possible bug in msp430-elf-gcc 9.3.0. 2022-05-30 14:28:30 -04:00
Ryzee119
b7c8cb3c41 Hub: Unplug downstream devices on non-root hub disconnect 2022-05-29 14:15:57 +09:30
Ryzee119
9e30ec4f16 Hub: Retry port status transfer if failed 2022-05-29 14:15:23 +09:30
Ryzee119
688a3a0cc2 Fix non-trivial designated initializers compile error 2022-05-29 14:15:18 +09:30
Leon Loeser
a87ccee743 Fix printf long int compiler error 2022-05-28 19:48:20 +02:00
Ha Thach
f4efb51fe2
Merge pull request #1477 from cr1901/fix-subm
Remove lib/Pico-PIO-USB, which has moved to hw/mcu/raspberry_pi/Pico-PIO-USB. Fixes #1475.
2022-05-28 00:11:43 +07:00
hathach
dce2ad4ffb
adding feedback fifo count (WIP) 2022-05-27 23:11:25 +07:00
William D. Jones
f76c7526c9 Remove lib/Pico-PIO-USB, which has moved to hw/mcu/raspberry_pi/Pico-PIO-USB. 2022-05-27 11:54:28 -04:00
hathach
15aa593790
wrap feedback and compute to its own struct/union 2022-05-27 12:27:31 +07:00
Ha Thach
7b1344fe69
Merge pull request #1467 from kilograham/rp2040_cleanup
Minor cleanup of RP2040 code post addition of Pico-PIO-USB
2022-05-26 23:54:20 +07:00
Ha Thach
c1ae13b997
Merge pull request #1473 from sknebel/patch-1
fix links in docs
2022-05-25 22:55:33 +07:00
Sven
16c0eb0d2f
fix links in docs
changed markdown formatting to rst formatting
2022-05-24 21:45:35 +02:00
Ha Thach
0a4a28a90c
Merge pull request #1451 from kasjer/kasjer/pic32-sanity-fixes
pic32 sanity fixes
2022-05-24 20:42:06 +07:00
Ha Thach
2683deb0dd
Merge branch 'master' into ch32v307 2022-05-21 13:54:25 +07:00
graham sanderson
26c4d4b328 Minor cleanup of RP2040 code post addition of Pico-PIO_USB
* Removed some compiler warnings, and cleaned out unnecessary warning suppression from CMake suppress_tinyusb_warnings()
* Made explicit family_configure_dual_usb_example() for DUAL mode examples as family_configure_target() may not generally be called multiple times for the same target

* Renamed library pico_pio_usb to tinyusb_picio_pio_usb to be clearer and avoid conflict if someone already has a pico_pio_usb in their project
* Added family_add_pico_pio_usb() method for adding Pico-PIO_SUB support to an existing example
* Allowed tinyusb_pico_pio_usb to be added to regular apps using the Pico SDK
2022-05-20 17:25:30 -05:00
hathach
e5113a1cfc prototype for feedback method 2022-05-19 16:05:55 +07:00
hathach
5766c9ac4e rename tud_audio_sof_isr() to tud_audio_feedback_interval_isr()
- also add interval_log2 to isr callback
- also rename other variables
2022-05-19 13:44:10 +07:00
Ha Thach
c2bcda86e2
Merge pull request #1412 from hathach/pio-host
PIO USB support
2022-05-16 16:29:20 +07:00
hathach
e0e9426c2a print addres of mouse input 2022-05-16 16:00:15 +07:00
hathach
4586d8f119 add upstream Pico-PIO-USB 2022-05-16 13:44:06 +07:00
hathach
be2a51316c remove pico-usb fork 2022-05-16 13:29:12 +07:00
hathach
20b810d25b
fix ci build 2022-05-13 23:01:06 +07:00
hathach
c5ba1ea8c1
changes proposal to audio feedback computation 2022-05-13 22:54:47 +07:00
hathach
f09df55ab9
clean up example 2022-05-11 15:40:02 +07:00
hathach
8bd923f5f1 sync with pio usb 2022-05-11 00:37:45 +07:00
hathach
8473ca16fb clean up 2022-05-10 22:56:06 +07:00
hathach
35b77a4a81 cmake lib rename 2022-05-10 22:14:00 +07:00
hathach
717a474125 move pio-usb init to family_configure_pio_usb_example() to stay compatible 2022-05-10 21:56:47 +07:00
hathach
993f7b6a2c include dual examples to ci 2022-05-10 13:15:07 +07:00
hathach
e3b57cea05 rename host/hid_to_cdc to dual/host_hid_to_device_cdc 2022-05-10 13:01:28 +07:00
hathach
26ee622222 move pio usb files to src 2022-05-10 12:51:48 +07:00
hathach
79b5ab822e fix incorrect total number of interface 2022-05-06 17:22:52 +07:00
Ha Thach
d23c9b7cd6
Merge pull request #1460 from ccrome/chc-fix-freertos-irq-imx
set irq priority for freertos
2022-05-06 13:04:41 +07:00
caleb crome
f19d913b5d set irq priority for freertos 2022-05-05 22:29:12 -07:00
Pascal Speck
f452ab745e overwrite grstctl on edpt_disable 2022-05-03 09:52:10 +02:00
Jerzy Kasenberg
e49cad84e2 dcd_pic32: Fix memory overwrite in incoming data
When transfer was finished rx_fifo_read() read all that
was to read RXPKTRDY was cleared allowing next packet to
be received.
Then xfer_complete was called.
Interrupt for OUT endpoint was left enable, that would not
be a problem if data was handled fast and new transfer was
scheduled.
For MSC when host sends a lot of data this interrupt that was
enabled could cause epn_handle_rx_int() to be called after
transfer was completed and next was not scheduled yet.
Without TU_ASSERT that was added to detect this, incoming
data was written past buffer provided by user code resulting
in random memory corruption.

This just blocks RX interrupt when transfer is finished,
and also only unmasked rx interrupts are handled.
2022-05-01 14:26:24 +02:00
Jerzy Kasenberg
c145777e0e dcd_pic32: Add asserts transfer sanity check
TU_ASSERTS added to detect transfer inconsistency.
2022-05-01 14:14:42 +02:00
Jerzy Kasenberg
d51743a21c Add TU_BREAKPOINT for mips architecture
_mips is provided by xc32-gcc
2022-05-01 14:05:49 +02:00
hathach
c289438b75 fix ci build 2022-04-29 23:03:52 +07:00
hathach
0b30a10ab3 configure hid_to_cdc example to build with rp2040 with pio usb as host 2022-04-29 22:24:36 +07:00
hathach
608577e05c update pio 2022-04-29 18:05:50 +07:00
hathach
85dcb73774 more clean up 2022-04-28 18:00:30 +07:00
hathach
a72d4e2462 make hcd_event_handler() fastfunc, and force inline other helper 2022-04-27 20:54:21 +07:00
hathach
ae5490e5a5 clean up 2022-04-27 20:52:56 +07:00
hathach
4a661dead0 add TU_ATTR_FAST_FUNC for rp2040 __not_in_flash() section 2022-04-27 17:57:52 +07:00
hathach
fd827a80a9
everything work great 2022-04-27 01:09:30 +07:00
hathach
455bddddcd
minor clean up 2022-04-26 18:47:09 +07:00
hathach
4d11c658ff
improve pio usb endpoint handler 2022-04-26 13:08:03 +07:00
Ha Thach
6ec5174d8b
Merge pull request #1444 from Firefishy/gh-action-use-replacement-ruby
Gh action use replacement ruby
2022-04-26 01:05:33 +07:00
hathach
26a25279bc
follow pio usb changes 2022-04-26 00:35:16 +07:00
Nikitarc
15c01f20ec Update tusb_option.h
Makes ISO compiler happy
2022-04-25 14:06:15 +02:00
Grant Slater
35d1a71ed7 GH Update to actions/checkout@v3 2022-04-24 16:49:29 +01:00
Grant Slater
3a1c7339cd Replace actions/setup-ruby with replacement ruby/setup-ruby 2022-04-24 16:48:49 +01:00
hathach
2f9b9a31be
more with pio usb 2022-04-22 18:26:58 +07:00
hathach
12debd7763
keep up with pio usb 2022-04-22 01:06:17 +07:00
hathach
98bbb0d402
Merge branch 'master' into pio-host 2022-04-21 12:05:22 +07:00
hathach
328039058e
update lib pio 2022-04-21 01:45:03 +07:00
Ha Thach
55a5fd59d7
Merge pull request #1440 from hathach/osal-queue-timeout
Osal queue timeout
2022-04-20 23:32:50 +07:00
hathach
87572871d5
update example for better cdc echo 2022-04-20 18:52:15 +07:00
hathach
6a022c73db
add note for tud_task() behavior in freertos example 2022-04-20 18:35:38 +07:00
hathach
b034c18077
add tud_task_ext(), tuh_task_ext() as exteneded version that take timeout and in_isr
also allow exit tud_task,tuh_task after processing all events for
running other background task for user
2022-04-20 18:29:41 +07:00
Nikitarc
c422b9ef41 Update dwc2_stm32.h
Add missing #endif
2022-04-20 11:29:03 +02:00
hathach
ccafb42c82
disable blank issues, add online docs link 2022-04-20 14:40:55 +07:00
hathach
669e36d674
fix freertos issue when 1 tick > 1 ms 2022-04-20 14:37:42 +07:00
hathach
a90839688c
add msec timeout to osal_queue_receive(), tud_task() and tuh_task() both pending for event queue with timeout of 1 ms 2022-04-20 13:25:38 +07:00
Nikitarc
52190e7308 Update dwc2_stm32.h
Support STM32H7 with only 1 USB port: H72x / H73x / H7Ax / H7Bx
2022-04-19 21:53:00 +02:00
hathach
a32cb1bb93 clean up pio driver 2022-04-18 17:49:21 +07:00
Skyler Mansfield
35668fc523 hcd_rp2040: Add bulk in/out+interrupt out support.
Added support for allocating hw_endpoints for non-interrupt endpoints.
Allow endpoints to be used in either direction by updating bit checks.
2022-04-17 01:30:03 +01:00
Skyler Mansfield
16c13bc110 tusb_types:
Added descriptive strings for edpt_dir and edpt_type
2022-04-17 01:16:49 +01:00
Reinhard Panhuber
11f0ffd9a8 Generalize feedback value min and max 2022-04-16 14:47:42 +02:00
hathach
b5a9537eea
support pio dcd endpiont stall 2022-04-16 01:19:51 +07:00
hathach
00a0e3f21b
update lib pio 2022-04-15 20:14:47 +07:00
hathach
05bfc1a9eb pio device works well 2022-04-15 01:04:12 +07:00
hathach
cc5a4720e5 catch up with pio lib 2022-04-14 22:00:47 +07:00
Reinhard Panhuber
7094ff7125 Introduce 3 fb calc options: NO_SOF_BY_USER, SOF_BY_AUDIO_D, SOF_BY_USER 2022-04-09 16:36:26 +02:00
hathach
d5d4909c20 proof of concpet that device pio-usb work with host pio-usb 2022-04-08 13:36:05 +07:00
hathach
d97c154695 add need_pre for pio usb, but not work out well 2022-04-05 00:04:47 +07:00
hathach
d7d7e61f34 correct pio usb speed, and close device 2022-04-03 22:48:08 +07:00
hathach
7ea75d3c09 use pio usb host init 2022-04-03 20:44:16 +07:00
hathach
f6851cf187 clean up hcd pio 2022-04-03 00:17:58 +07:00
hathach
f881e77e66 extracting hw root port 2022-04-02 19:19:00 +07:00
hathach
c25f835aea update to use pio hw endpoint 2022-04-01 23:31:43 +07:00
hathach
db6cba6a7b rename pio to pio_usb 2022-04-01 16:38:41 +07:00
hathach
e6e3dfedc8 hid example work well 2022-04-01 16:34:36 +07:00
Rafael Silva
817227a850
Add WCH CH32V307 to readme supported list 2022-04-01 10:05:14 +01:00
hathach
75bca96bc6 pio usb control work well including stall response 2022-04-01 16:01:24 +07:00
hathach
e94d11a5b3 implement pio_usb_irq_handler 2022-03-31 12:56:53 +07:00
Ha Thach
9c8c5c1c53
Merge pull request #1413 from perigoso/perigoso-patch-1
Fix docs
2022-03-30 22:38:30 +07:00
Rafael Silva
95801bf5cc
Update requirements.txt 2022-03-30 14:15:34 +01:00
hathach
e2f0aef93b make use pio_usb_port_reset_start/end 2022-03-30 16:41:55 +07:00
hathach
65b6b79e99
clean up and comment out tud_sof_isr_set 2022-03-29 16:53:45 +07:00
Ha Thach
edd8eb3279
Merge pull request #1409 from hathach/remove-pycache
remove cxd56 __pycache__ folder
2022-03-28 14:47:41 +07:00
hathach
735300b53c
remove cxd56 __pycache-_ folder 2022-03-28 12:47:32 +07:00
Greg Davill
7d395c674c Update supported table 2022-03-23 00:46:44 +10:30
Greg Davill
46fb850e02 Update support table 2022-03-23 00:06:51 +10:30
Greg Davill
cdb8a1a2a1 Clean up driver 2022-03-23 00:00:06 +10:30
Greg Davill
325923b6c6 Update comments about endpoint buffer modes 2022-03-22 23:40:54 +10:30
Greg Davill
a09c1648f5 Fix typo 2022-03-22 23:31:20 +10:30
Greg Davill
d828d203fc Skip freertos for ch32v307 2022-03-22 23:29:09 +10:30
Greg Davill
ac058a4c45 Add ch32v307 to build workflow 2022-03-22 22:32:53 +10:30
Greg Davill
1d254be1a4 Increase stack size to 4096 bytes 2022-03-22 16:03:53 +10:30
Greg Davill
fccbcfc889 Add WCH CH32V307 port
Add WCH mcu submodule
Add CH32V307V-R1-1v0 bsp
2022-03-22 00:30:46 +10:30
Reinhard Panhuber
5cd67baf15 Disable SOF ISR feedback calcuation by default s.t. examples still work 2022-03-20 12:57:53 +01:00
Reinhard Panhuber
8ffdbfebce Streamline call of tud_audio_set_itf_cb() within audiod_set_interface() 2022-03-20 12:08:27 +01:00
Reinhard Panhuber
5aba464270 Add magic checks 2022-03-20 12:04:10 +01:00
Reinhard Panhuber
ff2dc0a547 Streamline feedback calc, find fb interval from descriptors, inc. checks 2022-03-20 11:21:33 +01:00
hathach
45052c625e
Merge branch 'master' into pio-host 2022-03-20 00:51:00 +07:00
Ha Thach
ae531a79f6
Merge pull request #1403 from hathach/host-edpt-xfer
Host edpt xfer
2022-03-20 00:17:39 +07:00
Reinhard Panhuber
fdfde8883f Implement power of two, shift, and float calculation 2022-03-19 13:37:54 +01:00
hathach
a270d8d623
move code around 2022-03-19 15:06:12 +07:00
hathach
821be65b03
rename usbh_edpt_open() to tuh_edpt_open() 2022-03-19 14:59:31 +07:00
hathach
a4b976f095
get bare example working with hid device 2022-03-19 14:57:43 +07:00
hathach
4795cca04a
add parse config descriptor to example
move usbh_edpt_open() to public API, remove rhport from its signature
2022-03-19 00:43:31 +07:00
hathach
ba1185bf28
implement tuh_edpt_xfer() for non-control 2022-03-18 22:22:21 +07:00
hathach
9ae0304b1e
move code around 2022-03-18 18:04:25 +07:00
hathach
8750e3b577
move daddr into xfer struct 2022-03-18 16:39:35 +07:00
hathach
2ff8978dde
update sync API, move timeout into xfer struct
remove tuh_control_xfer_sync()
2022-03-18 13:38:30 +07:00
hathach
85c6d6d37d
minor update for control xfer 2022-03-18 12:51:12 +07:00
hathach
c063ab4944
try to fix ci 2022-03-18 00:56:51 +07:00
hathach
f89ff939d8
rename user_arg to user_data 2022-03-17 22:37:51 +07:00
hathach
9dd2f11f4a
add CFG_TUH_API_EDPT_XFER to enable generic edpt xfer 2022-03-17 21:20:20 +07:00
hathach
55428d7dd2
rename tuh_control_xfer_t to tuh_xfer_t 2022-03-17 20:52:16 +07:00
hathach
102b99a0e8
add actual_len supported 2022-03-17 20:48:32 +07:00
hathach
8aedb2ff37
slightly change the signature of tuh_control_xfer 2022-03-17 17:25:53 +07:00
hathach
1ee699d49d
update example 2022-03-17 16:56:56 +07:00
hathach
66942b814b
change return type of callback to void 2022-03-17 16:55:29 +07:00
hathach
deab8c276a
remove const in xfer callback 2022-03-17 16:53:54 +07:00
hathach
6df420f7f3
move result into transfer struct 2022-03-17 16:24:43 +07:00
hathach
68bfd048a5
change tuh_control_xfer_t struct 2022-03-17 12:53:52 +07:00
hathach
98d4ed0584
update hid host to use new control xfer for set config 2022-03-16 18:44:41 +07:00
Reinhard Panhuber
ceac9d64c0 Disable CFG_TUD_AUDIO_ENABLE_FEEDBACK_DETERMINATION_WITHIN_SOF_ISR
By default disable
CFG_TUD_AUDIO_ENABLE_FEEDBACK_DETERMINATION_WITHIN_SOF_ISR such that
current examples still work.
2022-03-16 08:05:31 +01:00
Reinhard Panhuber
9fde8f2d9e Fix DSTS_FNSOF in dwc2.c 2022-03-16 07:53:47 +01:00
Reinhard Panhuber
92ac041869 Add todos and comments 2022-03-16 07:13:38 +01:00
hathach
fd2ea2605e fix -Wnull-dereference warnings 2022-03-16 10:55:18 +07:00
Reinhard Panhuber
90502739c3 Fix cycle count calculation 2022-03-15 20:45:06 +01:00
Reinhard Panhuber
c9b444e771 Implement 16.16 fixed point feedback value calculation 2022-03-15 20:30:31 +01:00
Ha Thach
1915d69cb8
Merge pull request #1397 from hathach/rework-host-control-xfer
Rework host control xfer
2022-03-15 14:47:13 +07:00
Reinhard Panhuber
26339e694f Merge remote-tracking branch 'upstream/add-sof-isr' into add-sof-isr 2022-03-14 20:40:57 +01:00
Reinhard Panhuber
f212899b54 Add SOF callback function for feedback value determination in uac - wip! 2022-03-14 20:40:33 +01:00
Ha Thach
41ffd54fa0
Merge branch 'master' into add-sof-isr 2022-03-14 11:57:01 +07:00
hathach
2929afe2fa add synchronous (blocking) support for usbh control transfer
- add synchronous version of all get descriptor API
- update bare example to use sync API for string descriptor
- change order of index, language_id in tuh_descriptor_get_string() to
match similar API of libusb
- add index to tuh_descriptor_get_hid_report()
2022-03-13 17:45:46 +07:00
Ha Thach
228e185a15
Update bug_report.yml 2022-03-12 16:58:37 +07:00
hathach
56695569e7 minor changes 2022-03-12 14:28:24 +07:00
hathach
ac4483a7c5 misplace fallthrough 2022-03-12 14:26:48 +07:00
hathach
a5a565f7eb rework usbh enumeration process using user arg from control transfer as state 2022-03-12 14:20:57 +07:00
hathach
ec28593ce5 update hid,msc to new usbh control API 2022-03-11 22:13:57 +07:00
hathach
bcdeb386cc rework usbh control xfer
- change API of tuh_control_xfer and its callback
- rename tuh_control_complete_cb_t to tuh_control_xfer_cb_t
- add user argument to control callback
- migrate usbh and hub
2022-03-11 21:57:55 +07:00
Ha Thach
d3c7d7b09e
Merge pull request #1394 from hathach/merge-host-example
merge device_info into bare_api example
2022-03-11 14:02:10 +07:00
hathach
6b5490ced6 merge device_info into bare_api example 2022-03-11 13:12:36 +07:00
Ha Thach
69ef918021
Merge pull request #1393 from hathach/more-host-bare-api
More host enhancement
2022-03-11 10:33:50 +07:00
Ha Thach
ec6a8f00ad
Merge pull request #1392 from tannewt/host_string_example
Add host example that prints out info of connected devices
2022-03-11 10:06:12 +07:00
hathach
a715077b10 remove usbh_control.c 2022-03-11 09:57:35 +07:00
Scott Shawcroft
37960990a5
Print speed. Don't crash if string get fails 2022-03-10 11:01:44 -08:00
hathach
951ece17e1 fix build warning 2022-03-10 23:20:12 +07:00
hathach
66c933fb61 fix enumeration issue when plugging hub with multiple devices attached 2022-03-10 23:16:59 +07:00
hathach
171d021ab5 refactor and integrate usbh control xfer back to usbh.c
fix enumeration with hub when reset port before set address
2022-03-10 22:22:05 +07:00
hathach
b9ca301527 remove obsolete device state 2022-03-10 13:19:15 +07:00
hathach
5e9f522b9a refactor host control xfer 2022-03-10 12:56:15 +07:00
hathach
b05401a5ab merge control stage host and device value 2022-03-10 11:59:51 +07:00
Scott Shawcroft
22f682c378
Add host example that prints out info of connected devices 2022-03-09 15:22:31 -08:00
hathach
97636eff8e more clean up 2022-03-10 00:36:49 +07:00
hathach
0e5e644d27 minor clean up 2022-03-09 17:51:35 +07:00
hathach
d56cde33ef refactor usbd to also use common endpoint claim/release 2022-03-09 17:34:12 +07:00
hathach
110879074f implement tu_edpt_release() 2022-03-09 17:26:55 +07:00
hathach
a5fb20533c adding tusb_private.h to implement common edpt claim 2022-03-09 17:17:36 +07:00
hathach
708f05668d add tusb_debug.h remove tusb_error.h
move debug utils to new header
2022-03-09 16:44:19 +07:00
hathach
2f593e767c update use of mutex for host 2022-03-09 12:26:56 +07:00
hathach
f920e1c171 rename host descriptor function 2022-03-09 11:21:13 +07:00
hathach
db9d97c947 add tuh_descriptor_hid_report_get() 2022-03-09 11:03:29 +07:00
Ha Thach
0d8be7fd3a
Merge pull request #1360 from ccrome/uac2_headset_descriptor_update
in TUD_AUDIO_HEADSET_STEREO_DESCRIPTOR, _nitfs should be 3.
2022-03-09 09:31:05 +07:00
Ha Thach
8bf18430b8
Merge pull request #1389 from hathach/fix-1359
fix issue 1359
2022-03-08 14:24:22 +07:00
hathach
6b2ea2bd1d fix issue 1359 2022-03-08 13:53:33 +07:00
hathach
606f932d92 added dcd_sof_enable() stubs for all other ports 2022-03-07 23:05:05 +07:00
hathach
85dbcf5473 implement dcd_sof_enable() for rp2040 2022-03-07 23:04:47 +07:00
hathach
707a633de3 added dcd_sof_enable(), tud_sof_isr_set()
make number of interface configurable (default to 8)
CFG_TUD_INTERFACE_MAX
2022-03-07 23:03:51 +07:00
hathach
ce60e98f6d remove broadcom/synopssy (repalced by synopsys/dwc2) 2022-03-07 23:00:11 +07:00
Ha Thach
73896a3b71
Merge pull request #1380 from sjanc/mynewt
Add missing releases to Mynewt repository.yml
2022-03-07 22:08:26 +07:00
Szymon Janc
61615203fd Add missing releases to Mynewt repository.yml
This make it possible to setup Mynewt project with latest releases.
2022-03-07 15:33:27 +01:00
Ha Thach
7180883fae
Merge pull request #1379 from Qianhao2579/master
Modify the wrong macro definition code
2022-03-07 16:09:16 +07:00
Ha Thach
1bd31c22e1
Merge pull request #1374 from kasjer/kasjer/stm32wb55
stm32wb55 support
2022-03-07 16:09:06 +07:00
Jerzy Kasenberg
76c8d4d95b Add support for nucleo-wb55rg 2022-03-07 09:35:12 +01:00
Jerzy Kasenberg
a18ac84229 Add support for STM32WB mcu 2022-03-07 09:35:12 +01:00
QianHao
65bf5ddb1b Modify the wrong macro definition code 2022-03-07 08:04:49 +00:00
Ha Thach
4c6bb161e2
Merge pull request #1289 from kasjer/kasjer/vendor-update
vendor: Write improvements
2022-03-06 11:16:35 +07:00
Ha Thach
f2c276d45e
Merge pull request #1372 from tannewt/fix_string_desc
Fix string descriptor fetch
2022-03-06 10:46:52 +07:00
Jerzy Kasenberg
2bef4410f9 Add stm32wb cmsis and hal driver submodules from ST 2022-03-05 17:53:57 +01:00
Scott Shawcroft
f291243121
Fix string descriptor fetch 2022-03-04 11:38:02 -08:00
Rafael Silva
144ce092f0
Merge pull request #1371 from hathach/perigoso-patch-1
documentatio: fix bad supported dev table format
2022-03-04 16:18:26 +00:00
Ha Thach
8e0b8c15ea
Merge pull request #1369 from tannewt/host_string_desc
Add host string descriptor functions
2022-03-04 22:59:16 +07:00
Rafael Silva
4642cb8d0a
documentatio: fix bad supported dev table format 2022-03-04 15:35:32 +00:00
hathach
56c2d4b666 fix naming, and build 2022-03-04 22:31:48 +07:00
hathach
b9a6cd8b61 rename example 2022-03-04 22:25:50 +07:00
hathach
271f905521 add tuh_descriptor_string_manufacturer/produce/serial_get 2022-03-04 22:23:56 +07:00
hathach
15ced09bb2 add tuh_configuration_set() 2022-03-04 21:41:27 +07:00
hathach
2bdf4d811a add tuh_descriptor_configuration_get() 2022-03-04 21:14:59 +07:00
hathach
7480c2e46b correct qhd and qtd count for ehci/ohci 2022-03-04 21:04:52 +07:00
hathach
032e2c2929 add CFG_TUH_INTERFACE_MAX config 2022-03-04 19:28:53 +07:00
hathach
e08a875d52 add tuh_descriptor_get() and tuh_descriptor_device_get() 2022-03-04 19:26:54 +07:00
hathach
3a7d1cfead minor cleanup 2022-03-04 17:26:21 +07:00
hathach
039b235ca4 adding new libusb api example 2022-03-04 17:16:14 +07:00
hathach
96165a1950 rename HCD_MAX_XFER to CFG_TUH_ENDPOINT_MAX
minor clean up
2022-03-04 17:07:04 +07:00
Ha Thach
5453c7e97f
Merge pull request #1370 from hathach/fix-esp-idf
fix build with esp32s2, also use dwc2 for esp example
2022-03-04 15:20:51 +07:00
hathach
c0195fc627 skip pyocd reset after flash 2022-03-04 14:48:29 +07:00
hathach
f72da8ee7d fix build with esp32s2, also use dwc2 for esp example 2022-03-04 14:45:26 +07:00
Scott Shawcroft
eb6b5d1219
Unused ok 2022-03-03 21:57:44 -08:00
Scott Shawcroft
2cd73ca602
Add host string descriptor functions
Plus typo fixes, GCC11 array bounds fix, snprintf for malloc-free
debug and pragmas for alignment checks.
2022-03-03 21:53:12 -08:00
hathach
fa62d5abc9 got interrupt endpoint working 2022-03-03 21:57:29 +07:00
hathach
d4d7d35afb checkout pio-usb 2022-03-02 13:24:51 +07:00
hathach
635fb9dcdd try to fix ci 2022-03-02 12:33:47 +07:00
hathach
918f3e9cae minor rename 2022-03-02 12:22:20 +07:00
caleb crome
1b338b288c in TUD_AUDIO_HEADSET_STEREO_DESCRIPTOR, _nitfs should be 3.
I believe that there is a mistake in the definition of TUD_AUDIO_HEADSET_STEREO_DESCRIPTOR.  The nitfs in the audio descriptor is always 3 regardless of ITF_NUM_TOTAL.
2022-03-01 17:24:28 -08:00
hathach
d3ed76902e clean up 2022-03-02 00:06:13 +07:00
hathach
df4c614597 update pio usb submodule 2022-03-02 00:04:42 +07:00
hathach
1d29817139 start to add pio usb (host) support
run as proof of concept
2022-03-01 23:55:53 +07:00
Ha Thach
7c627f58d7
Merge pull request #1343 from Daft-Freak/patch-1
Open OUT endpoint for HID host
2022-02-28 20:00:40 +07:00
Ha Thach
8e84529c8d
Merge pull request #1345 from alexandre-perrin/iar-cpp-verify-static
Fix CPP compilation with IAR
2022-02-28 17:02:33 +07:00
Ha Thach
c9b0fbc907
Merge pull request #1354 from hathach/mcu-specific
Mcu specific
2022-02-26 21:30:07 +07:00
Ha Thach
6dd4d50213
Merge pull request #1352 from ETCLabs/fix-ehci-isr-status-clear-error
Updated the clearing of the status register bits to use a straight '=…
2022-02-26 18:05:59 +07:00
Ha Thach
f392054e70
Merge pull request #1353 from ETCLabs/iar-compiler-error-on-src-host-usbh.c
The IAR compilier does not resolve references to fields in the anonym…
2022-02-26 18:05:35 +07:00
hathach
2fe3a925fb add highspeed detect for f723/730/733 2022-02-26 17:34:29 +07:00
hathach
a4ba3f2891 add TUP_USBIP_DWC2 2022-02-26 17:13:06 +07:00
hathach
11c89d43ab more internal rename 2022-02-26 17:06:50 +07:00
hathach
bc63f59af2 mcu specific rename 2022-02-26 15:23:29 +07:00
Ha Thach
244154e087
Merge pull request #1311 from Wini-Buh/CCRX_Ext
Solve problems with CCRX toolchain
2022-02-26 14:34:18 +07:00
Tom Peterson
c06ecbef0c The IAR compilier does not resolve references to fields in the anonymous structs defined within the usbh_dev0_t and usbh_device_t structs as they are defined. The problem seems to relate to the placement of the 'volatile' keyword at the struct level. I fixed the problem by removing the 'volatile' from the struct level, and instead placing it on each of the field declarations within the structs. 2022-02-25 16:49:55 -06:00
Tom Peterson
39fdbc8ffc Updated the clearing of the status register bits to use a straight '=', rather than an '|='. Use of the latter caused an extra, unwanted read of the status register before the write-to-clear operation, which, in some cases, allowed new status bits to assert (relative to the initial read of the status register two statements earlier), and then be cleared blindly and unconditionally during the write-back. This had the potential (and, in my case, observed) effect of dropping the handling of an enabled interrupt. Ultimately, the system would lock up in a busy state, with no hope of clearing the condition. See Issue #1339 for more information. 2022-02-25 12:39:09 -06:00
Ha Thach
5b7a01ba79
Merge pull request #1350 from hathach/enhance-multipl-ports
Enhance rhports management
2022-02-26 01:00:07 +07:00
Ha Thach
13a4582ce2
Merge pull request #1349 from iabdalkader/fix_inquiry_data
Set the standard inquiry response additional length field.
2022-02-26 00:22:55 +07:00
iabdalkader
8eeda60bd0 Set the standard inquiry response additional length field.
* The standard inquiry response additional length field needs to be set to
the length in bytes of the remaining standard inquiry data (i.e. N - 5),
otherwise the kernel driver issues a warning about short inquiry response..
2022-02-25 18:42:23 +02:00
hathach
1482a41524 fix uac2_headset build 2022-02-25 23:16:40 +07:00
hathach
0997589c45 more symbol rename 2022-02-25 23:05:15 +07:00
hathach
89115253da internal symbol rename 2022-02-25 22:45:05 +07:00
hathach
309540473b minor house keeping 2022-02-25 22:26:35 +07:00
hathach
99ad3ae2ca rename and move dcd_attr.h to tusb_mcu_attr.h 2022-02-25 18:35:21 +07:00
hathach
a8af609dfe auto detect max rhport speed based on mcu 2022-02-25 18:35:21 +07:00
hathach
31aa077cb0 rename TUSB_OPT_HOST_ENABLED to CFG_TUH_ENABLED 2022-02-25 18:35:21 +07:00
hathach
d10326cb4e rename TUSB_OPT_DEVICE_ENABLED to CFG_TUD_ENABLED
TUSB_OPT_DEVICE_ENABLED still usable for backward compatible
2022-02-25 18:35:21 +07:00
hathach
4a5a53b3b8 improve rphort management for usbd 2022-02-25 18:35:21 +07:00
Ha Thach
b797d1aa50
Merge pull request #1340 from tannewt/hid_to_cdc
Add concurrent host and device example
2022-02-25 18:21:37 +07:00
hathach
a8d6e82395 enhance dual role examples 2022-02-25 17:36:05 +07:00
Alexandre Perrin
81e33477ea Fix CPP compilation with IAR
IAR defines __STDC_VERSION__ in cpp as well.
Which causes TU_VERIFY_STATIC to be defined as _Static_assert
instead of cpp's static_assert.

This reorders __cplusplus__ to be first, then to fallback to
__STDC_VERSION__ if not CPP.
2022-02-23 18:27:52 +01:00
Charlie Birks
83b638f230
Open OUT endpoint for HID host 2022-02-23 13:03:20 +00:00
Charlie Birks
c0a65ba0f6
Support interrupt OUT in RP2040 HCD 2022-02-23 12:25:01 +00:00
Ha Thach
fa895ed3dc
Merge pull request #1341 from hathach/release-0.13.0
increase version, update doc for release
2022-02-23 13:07:29 +07:00
hathach
566e3abcea increase version, update doc for release 2022-02-23 11:55:57 +07:00
Scott Shawcroft
9ba1ba8fa1
Guard clock setup for USB2 2022-02-22 18:39:02 -08:00
Scott Shawcroft
d749597591
Add dual role (concurrent) example
This reads HID devices over host and then translates that to ASCII
and sends it over CDC device.
2022-02-22 18:13:22 -08:00
Scott Shawcroft
8a6fe8a8f3
Merge pull request #1300 from sharpie7/master
Some platforms require SDKs and use of cmake
2022-02-22 15:03:59 -08:00
Ha Thach
e04f15ff3d
Merge pull request #1280 from kasjer/kasjer/nrf5x-dma-race
nrf5x: Fix DMA access race condition
2022-02-22 21:00:51 +07:00
hathach
e188117823 more esp build fix 2022-02-18 16:30:21 +07:00
Ha Thach
4612332af7
Merge pull request #1331 from hathach/fix-esp-build
fix build with latest esp idf
2022-02-18 16:22:50 +07:00
hathach
52645fcc1b fix build with latest esp idf 2022-02-18 13:07:21 +07:00
Ha Thach
553767cc8a
Merge pull request #1330 from hathach/fix-HID_REPORT_ID_N
fix HID_REPORT_ID_N()
2022-02-17 14:07:59 +07:00
hathach
a53e83665e fix HID_REPORT_ID_N() 2022-02-17 12:12:42 +07:00
Ha Thach
358866cd0f
Merge pull request #1328 from NexusXe/patch-1
Fix link to supported boards in Getting Started page
2022-02-17 11:58:41 +07:00
NexusXe
ada7a23ddc
Fix capitalization 2022-02-16 08:33:06 -06:00
NexusXe
a72d0245fa
Fix link to supported boards
It used to point to `boards.md`, which doesn't exist.
2022-02-16 08:29:20 -06:00
Ha Thach
fcca8bb4ca
Merge pull request #1327 from hathach/msc-request-sense
Add msc request sense callback
2022-02-15 23:17:58 +07:00
hathach
46f4f7ff49 minor rename set sense function 2022-02-15 22:53:23 +07:00
hathach
391edc7afb msc example response PREVENT_ALLOW_MEDIUM_REMOVAL command as unsupported command
LUN1 of msc_disk_dual will be set to not ready to simulate medium not
present (e.g SD card removed)
2022-02-15 22:40:08 +07:00
Ha Thach
de4932d9c5
Merge pull request #1318 from JayToltTech/master
Nit spelling correction
2022-02-15 12:28:26 +07:00
Ha Thach
01684f71fb
Merge pull request #1322 from ZenithalHourlyRate/ZenithalHourlyRate-readme-typo
readme: fix typo
2022-02-15 12:20:29 +07:00
hathach
456c06aa5e add tud_msc_request_sense_cb() as weak callback
set default error sense to NOT READY, Medium not present
2022-02-14 18:17:49 +07:00
Zenithal
678c415bea
readme: fix typo 2022-02-10 22:30:31 +08:00
Jay Beavers
2df57d2be0 Nit spelling correction 2022-02-09 08:19:01 -08:00
Ha Thach
63cb3cdc74
Merge pull request #1304 from kkitayam/add_hcd_for_frdm_kl25z
Add hcd driver for frdm kl25z
2022-02-09 16:14:50 +07:00
Wini-Buh
5414cf275b
Merge branch 'hathach:master' into CCRX_Ext 2022-02-02 21:06:37 +01:00
Ha Thach
d6fb1859a4
Merge pull request #1291 from kasjer/kasjer/da1469x-fix-resume
da1469x: fix resume
2022-02-02 20:20:39 +07:00
Roland
7beb92864e Merge branch 'CCRX_Ext' of https://github.com/Wini-Buh/tinyusb into CCRX_Ext 2022-02-01 23:49:20 +01:00
Roland
e1f0c484c6 Modifications for CCRX toolchain 2022-02-01 23:45:52 +01:00
Ha Thach
c6cde724f6
Merge pull request #1305 from Ryzee119/patch-1
OHCI: Fix array out of bounds issue
2022-02-01 23:00:10 +07:00
Ha Thach
d56bbbb5a7
Merge pull request #1303 from mysterywolf/master
add rt-thread's tinyusb repo address
2022-02-01 22:35:21 +07:00
Ryzee119
453ba529a6
OHCI: Fix array out of bounds issue
If using a USB hub, a request outside the array size can occur

Original line:
ffb257ac17/src/portable/ohci/ohci.h (L162)

It can happen in a few places but one such example is here:
ffb257ac17/src/portable/ohci/ohci.c (L460)

ie. if HUB address is 5, this would be an array index out of bounds on control endpoints as `CFG_TUH_DEVICE_MAX+1` is only 5.

This fix just includes num of hubs in the reserve array size.

Fixing locally fixed this issue.
2022-01-28 14:02:34 +10:30
kkitayam
ce7a8fed36 Add a partial support mark to KL25 2022-01-28 01:18:44 +09:00
kkitayam
03d2e32dc1 Fix handling for pending transfers 2022-01-27 23:38:19 +09:00
kkitayam
d7cbfaaa0a Add hcd into source list 2022-01-27 22:26:51 +09:00
kkitayam
60a0be82da Change hcd_edpt_xfer to send at the next SOF 2022-01-27 22:25:36 +09:00
kkitayam
cc06a3585e Add handling for NAK response 2022-01-27 20:57:41 +09:00
kkitayam
cdab869472 Fix handling control transfer 2022-01-27 20:57:41 +09:00
kkitayam
a4bc6075ce Add HCD functions for KL25Z 2022-01-27 20:57:40 +09:00
Man, Jianting (Meco)
6085999e2b
add rt-thread's tinyusb repo address 2022-01-26 20:08:34 -05:00
Ha Thach
ffb257ac17
Merge pull request #1301 from hathach/fix-mynewt-sunxi
fix mynewt build sunxi
2022-01-26 17:02:52 +07:00
hathach
578a123282 fix mynewt build sunxi 2022-01-26 12:59:53 +07:00
Ha Thach
eea19daac6
Merge pull request #1220 from t123yh/master
Add support for Allwinner F1C100s family
2022-01-26 12:52:46 +07:00
Ha Thach
7de166390e
Merge branch 'master' into master 2022-01-25 22:29:05 +07:00
Iain Sharp
a80f23711e
Some platforms require SDKs and use of cmake 2022-01-24 20:56:13 +00:00
Jerzy Kasenberg
7b078367e8 dcd_da1469x: Re-enable RX after resume
Going to suspend states disable reception on non-0 RX endpoints.

Now when USB resume condition is detected, all RX endpoints
with pending transfers are resumed.
2022-01-20 16:28:09 +01:00
Jerzy Kasenberg
ae4d901d83 dcd_da1469x: Fix over-run/under-run mask
Bit mask enabling/disabling over-run/unde-run was shifted
by one nibble, so interrupt was never enabled.
It did not force any issue as this situation could only
happen on ISO endpoints without DMA.
2022-01-20 10:01:18 +01:00
Jerzy Kasenberg
4ca2215684 vendor: Add tx flush functionality
So far tud_vendor_n_write() always flushed data.
It requires to have whole vendor packed constructed
before in one buffer.

With this change data do get flushed when endpoint size
is filled on write, when there is no enough data to
fill endpoint data is not sent and subsequent calls to
write functions can add more bytes.

Vendor code needs to call tud_vendor_n_flush() when packet is
ready to be sent.
2022-01-19 15:08:12 +01:00
Ha Thach
a592282079
Merge pull request #1288 from hathach/rx-host-example-ci
enable ci build for RX65X host example
2022-01-19 20:46:23 +07:00
Jerzy Kasenberg
d069ea1421 vendor: Add tx callback
Other drivers already have notification about data sent.
It allows batter control in application on vendor
protocol level.
2022-01-19 14:06:00 +01:00
hathach
3b66bbf6d5
enable ci build for RX65X host example
update comment for unit not ready 3a-00 additional sense
2022-01-19 19:12:21 +07:00
Ha Thach
e40547ada1
Merge pull request #1265 from kkitayam/add_hcd_for_renesas_rx
Add HCD driver for Renesas RX
2022-01-19 19:07:21 +07:00
Ha Thach
9e99269875
Merge pull request #1287 from alisitsyn/bugfix/fix_idfgh6508
fix idfgh-6508: return type in tu_fifo_peek_n()
2022-01-19 17:50:33 +07:00
Jerzy Kasenberg
36b6ed8ff9 nrf5x: Fix EP OUT race conditions in OS build
When two tasks entered dcd_edpt_xfer() it was possible that
first disabled interrupt to setup total_len and actual_len
but second task for another endpoint enabled interrupt
between total_len and actual_len resulting in race
condition with interrupt, hence mutex is added on top of interrupt being blocked.
2022-01-19 09:48:04 +01:00
Jerzy Kasenberg
980ffe3b4e nrf5x: Fix DMA access race condition
In multi-thread mode starting DMA in thread mode was
prone to race condition resulting in infinite loop.
It may happen on single core CPU with strict priority based
tasks scheduler where ready high prio task never yields to
ready low prio task (Mynewt).

Sequence that failed (T1 - low priority task, T2 - high priority task)
- T1 called start_dma()
- T1 set _dcd.dma_running (DMA not started yet, context switch happens)
- T2 took CPU and saw that _dcd.dma_running is set, so waits for _dcd.dma_running to be 0
- T1 never gets CPU again, DMA is not started T2 waits forever

OSAL mutex resolves problem of DMA starting from thread-context.
2022-01-19 09:06:43 +01:00
email
af9a3f646c fix idfgh-6508: return type in tu_fifo_peek_n()
https://github.com/espressif/esp-idf/issues/8161
2022-01-19 09:00:43 +01:00
Ha Thach
0b6b4f2441
Merge pull request #1286 from hathach/fix-fifo-mutex-when-full
fix locked mutex when fifo is full
2022-01-19 10:45:33 +07:00
Ha Thach
983abfd6d8
Merge pull request #1279 from kasjer/kasjer/nrf5x-int-race
nrf5x: Fix EP OUT race conditions
2022-01-19 10:33:37 +07:00
hathach
161ba73c8b
fix locked mutex when fifo is full 2022-01-19 10:17:39 +07:00
Ha Thach
84f2ca77f7
Merge pull request #1283 from kasjer/kasjer/olimex-pic32-board-fixes
olimex pic32 board fixes
2022-01-19 09:55:18 +07:00
Ha Thach
92c36f187d
Merge pull request #1274 from kasjer/kasjer/nrf5x-request-clock-in-mynewt
nrf5x: Request HFXO via OS
2022-01-18 20:00:23 +07:00
Jerzy Kasenberg
f4725120a4 nrf5x: Request HFXO via OS
Mynewt (similar to Soft Device) has its own reference counting for
HFXO oscillator.
So far TinyUSB requested HFXO when VBUS was detected and stopped when
VBUS was removed.
But with Mynewt running HFXO can be stopped when other interested parties
don't require HFXO anymore. This results in very difficult to track
USB transmission errors.

This change enables Mynewt specific HFXO management in Soft Device fashion.
2022-01-18 08:12:49 +01:00
Jerzy Kasenberg
45d56915d1 pic32/olimex boards: Fix active state of button
Buttons for olimex_emz64 and olimex_hmz144 should be set
to active low in board configuration.
2022-01-17 18:00:58 +01:00
Jerzy Kasenberg
168c7095e8 pic32mz: Fix remote_wakeup without OS
Remote wakeup requires 10ms of delay when RESUME bit
is toggled.
It was covered for OS build.
For non-OS build simple delay based on board_millis() is
used to wait required amount of time.
Without this remote wakup may not work.
2022-01-17 17:59:51 +01:00
Ha Thach
6972a4f5cf
Merge pull request #1276 from kkitayam/fix_video_capture_frame_interval
Fix video_capture example fails enumeration when 8FPS
2022-01-17 23:57:42 +07:00
Ha Thach
11aa4b9bba
Merge pull request #1284 from kasjer/kasjer/ft9xx-mynewt
ft9xx: Fix Mynewt build
2022-01-17 16:28:07 +07:00
Jerzy Kasenberg
ec01428820 ft9xx: Fix Mynewt build
Includes were moved few lines down to restore build with Mynewt build system.
2022-01-17 09:14:41 +01:00
Ha Thach
58b8bdc2e4
Merge pull request #1277 from liamfraser/fix-cmake-skip
Fix family_support.cmake to use new skip.txt and only.txt files
2022-01-17 14:36:51 +07:00
Ha Thach
61d392fad4
Merge pull request #1238 from ftdigdm/port-ft90x
Port ft90x
2022-01-17 13:18:30 +07:00
Ha Thach
0780fd3d1e
Merge pull request #1269 from mysterywolf/master
[rt-thread] add rt-thread os in readme
2022-01-17 12:37:53 +07:00
Ha Thach
efc29baead
Merge branch 'master' into port-ft90x 2022-01-17 12:36:39 +07:00
hathach
1a7de71e79 correct link in rst 2022-01-17 12:15:54 +07:00
Ha Thach
976405dea3
Merge pull request #1270 from kasjer/kasjer/pic32mz
Driver for Microchip PIC32MZ family
2022-01-16 20:24:14 +07:00
hathach
c722133671 change OPT_MCU_PIC32MZ to value of 1900 2022-01-16 15:38:23 +07:00
Ha Thach
5dab0e8aed
Merge pull request #1282 from hathach/fix-esp-ci
Fix esp ci
2022-01-16 14:20:41 +07:00
hathach
cb57f047e7 update for s3 2022-01-16 13:26:50 +07:00
hathach
e1e4577616 more ci fix 2022-01-16 13:24:36 +07:00
hathach
e635c16de0 fix esp ci build with IDF version 5 2022-01-16 13:12:27 +07:00
Ha Thach
76987fb357
Merge pull request #1235 from vmilea/feature/feedback_format
Support disabling feedback format correction #1234
2022-01-16 12:54:50 +07:00
hathach
45fb60e883 update format correction with actual bus speed 2022-01-16 12:12:57 +07:00
Jerzy Kasenberg
da44fe3fc9 nrf5x: Fix EP OUT race conditions
When dcd_edpt_xfer() starts new transfer two separate problems were observed.
For both problems stream of OUT packets was pouring from host.

First problem was that total_len and actual_len were not atomic.
In case where incoming OUT packets are less (63) than MPS (64), actual_len and total_len
are set 63.
Then transfer complete from USBD is called that will schedule next 64 bytes transfer.
At that point incoming packet would start DMA if there is place in RAM, normally
it does not happen since actual_len == total_len.
If packets arrives and interrupt is raised after total_len is set (64) but actual_len is still 63 from
previous transfer, interrupt code sees that there is place in ram (1 byte) and transfer this 1 byte
to buffer that was already filled with previous packet.
To remedy this USB interrupt is blocked during transfer setup.

Second problem can happen when dcd_edpt_xfer setups xfer->total_len and actual_len correctly
but then context switch happens before xfer->data_received is checked.
If during this time two packets arrive one will be copied to RAM second will stay in endpoint with
data_received set to 1.
Then when xfer_edpt_xfer() checks data_receive flag it starts DMA again overwriting data.
To remedy this, data_received is checked together with check if data was already transferred.
If transfer was complete, there is no need to start DMA yet.
In such case data_received will be handled in same place by next xfer_edpt_xfer() correctly.
2022-01-14 09:46:39 +01:00
Liam Fraser
3db9cf3547 Fix family_support.cmake to use new skip.txt and only.txt files for skipping mcus 2022-01-13 16:39:55 +00:00
kkitayam
c5d825450a Fix dwFrameIntervalStep and dwMaxFrameInterval
dwMaxFrameInterval minus dwMinFrameInterval should be evenly divisible by
dwFrameIntervalStep.
2022-01-13 00:24:56 +09:00
Jerzy Kasenberg
fff4a248be Add BSPs for Microchip PIC32MZ MCUs
Two boards from Olimex are added:
olimex_hmz144  with PIC32MZ2048EFM144
olimex_emz64.c with PIC32MZ2048EFH064

Both can be programmed with Segger JLINK probe using ICSP
interface. (JTAG not tested but could also work but header
is not mounted).
2022-01-07 14:12:42 +01:00
Jerzy Kasenberg
340309561d Add driver for PIC32MZ MCUs
Device-only driver for PIC32MZ MCUs.
2022-01-07 14:12:42 +01:00
Valentin Milea
c2533a45bd Merge branch 'master' into feature/feedback_format 2022-01-07 15:12:07 +02:00
Valentin Milea
a284e438f1 Disable feedback format correction by default #1234 2022-01-07 15:02:52 +02:00
Man, Jianting (Meco)
13015a17a4
Update README.rst 2022-01-06 12:40:08 -05:00
Ha Thach
3b09b82123
Merge pull request #1272 from EmergReanimator/cortex-m33
Enable breakpoints for ARM8M (e.g. cortex-m33)
2022-01-06 18:17:12 +07:00
EmergReanimator
44406a8940 Enable breakpoints for ARM8M (e.g. cortex-m33) 2022-01-06 09:56:45 +01:00
Ha Thach
77b42344ac
Merge pull request #1271 from tannewt/rpi_zero
Add Raspberry Pi Zero W and Zero 2 W
2022-01-06 10:42:25 +07:00
Scott Shawcroft
bed8913107
Skip dfu and usbtmc on pi zero 2022-01-05 16:17:19 -08:00
Scott Shawcroft
47218eeb67
No exceptions on broadcom. Add parens to if 2022-01-05 16:07:17 -08:00
Scott Shawcroft
7b27b8f498
Unify skip and only logic for build scripts
And switch to a single file that can include mcu, family or board.
2022-01-05 15:44:23 -08:00
Scott Shawcroft
4fe0a30ec7
Skip net and freertos examples 2022-01-05 14:33:24 -08:00
Scott Shawcroft
84e2df51be
Split by compiler for testing 2022-01-05 14:11:39 -08:00
Scott Shawcroft
a79ffeb764
Add Raspberry Pi Zero W and Zero 2 W
These are different Broadcom chips. The peripherals are essentially
the same. The main differences are:
* The CPU(s)
* The interrupt controller
* The peripheral base address (but not the peripherals that we use)
2022-01-05 13:47:01 -08:00
Meco Man
5f9e361f5c [rt-thread] add rt-thread os in readme 2022-01-02 02:06:53 -05:00
Jerzy Kasenberg
2f69649bb6 Add register file for Microchip PIC32MZ 2021-12-31 22:53:27 +01:00
Ha Thach
868948f67c
Merge pull request #1264 from kasjer/kasjer/make-files-for-xc32
build system: Changes for xc32 compiler
2021-12-31 19:22:52 +07:00
Ha Thach
c8641ee940
Merge pull request #1263 from kasjer/kasjer/mynewt-eptri
Fix Mynewt build for Microchip PIC32MZ devices.
2021-12-30 22:48:11 +07:00
hathach
c5d2c82cbb
fix unreachable warnings with keil 2021-12-30 20:59:53 +07:00
hathach
adb848f754
update docs 2021-12-29 19:42:34 +07:00
hathach
5f280b3029
add license to dcd file, slightly update readme 2021-12-29 19:25:32 +07:00
hathach
84e2f6e0e1
skip freertos example for f1c100s 2021-12-29 19:12:41 +07:00
hathach
b943a53b10
update allwinner submodule 2021-12-29 19:04:08 +07:00
hathach
2d13ecde1b add allwinnner driver as submodule 2021-12-29 18:59:47 +07:00
hathach
30aba24ddc Merge branch 'master' of https://github.com/t123yh/tinyusb into t123yh-master 2021-12-29 18:27:29 +07:00
kkitayam
2b8b8a3a97 Fix hcd_edpt_clear_stall 2021-12-27 22:55:28 +09:00
kkitayam
745607357b Update Renesas RX status 2021-12-27 21:51:23 +09:00
kkitayam
2c0fcc2fa7 Add statements for control VBUS 2021-12-27 21:36:49 +09:00
kkitayam
a750c9c902 Increase stack size 2021-12-27 21:28:46 +09:00
kkitayam
a76799b085 Add hcd for Renesas RX 2021-12-27 21:19:02 +09:00
Jerzy Kasenberg
7a596b9e55 Fix Mynewt build for Microchip PIC32MZ devices.
definition of DEBUG breaks Microchip pic32 builds for Mynewt.
When MCU is not VALENTYUSB_EPTRI there is no need to have any
preprocessor definitions.
It may not look like a big deal but for xc32 builds, compiler
automatically force-includes some file that have structure with field name
DEBUG that result in build error in dcd_eptri.c when this file
is not really needed.

Moving DEBUG and LOG_USB few lines down should not break eptri builds.
2021-12-27 10:14:38 +01:00
Jerzy Kasenberg
5c5ecea6f1 build system: Changes for xc32 compiler
Three changes are needed to accommodate xc32 compiler build:
- optimized build flag other than -Os
   added CFLAGS_OPTIMIZED that defaults to -Os but can be overridden in boards
- build without -lnosys
   added LIBS_GCC with default libraries that can be changed in boards
- build without LD_FILE specification
   if LD_FILE is empty -Wl,-T options is not added to LDFLAGS
2021-12-27 10:11:56 +01:00
Ha Thach
a6789b5d5a
Merge pull request #1260 from leptun/patch-1
Fix typo
2021-12-23 11:30:15 +07:00
Alex Voinea
103817b8b6
Fix typo
Oops. Made a typo in 6de423606f
2021-12-22 22:56:53 +02:00
Ha Thach
557eb51405
Merge pull request #1258 from leptun/nucleo-f439zi
nucleo-f439zi support
2021-12-22 13:25:16 +07:00
Alex Voinea
6de423606f nucleo-f439zi support 2021-12-21 18:24:05 +01:00
Ha Thach
a4cfd1c69a
Merge pull request #1255 from hathach/add-s3-devkitm
Add s3 devkitm & devkitc
2021-12-21 01:07:54 +07:00
hathach
311248c8b0 add s3 devkitc 2021-12-21 00:10:38 +07:00
hathach
63310d72e1 skip ci for s3 2021-12-21 00:04:50 +07:00
hathach
a442679459 change ci to s3 to espressif_s3_devkitm 2021-12-20 23:55:04 +07:00
hathach
2ab3988d9f add s3 devkitm 2021-12-20 23:54:28 +07:00
Ha Thach
693b6886b1
Merge pull request #1252 from mkj/staticuart
samd21: make uart_init() static
2021-12-20 20:05:08 +07:00
Matt Johnston
9b2e78c915 samd21: make uart_init() static
Avoids a linker conflict if programs are using the same function name.
2021-12-20 15:43:16 +08:00
Ha Thach
cadfcd153e
Merge pull request #1244 from nxf58843/feature-kuiic
Feature kuiic
2021-12-16 17:57:06 +07:00
Greg Steiert
14ea32a117 Merge branch 'feature-kuiic' of https://github.com/nxf58843/tinyusb into feature-kuiic 2021-12-15 14:21:09 -08:00
Greg Steiert
469ecdd28c added KUIIC to supported boards list 2021-12-15 14:18:27 -08:00
Gordon McNab
8d373b0887 Update midi_test endpoints and FT9xx code 2021-12-15 12:23:58 +00:00
nxf58843
51e24dd4f8
Merge branch 'hathach:master' into feature-kuiic 2021-12-13 08:59:17 -08:00
Greg Steiert
04fd8673cd Merge branch 'master' of https://github.com/hathach/tinyusb into feature-kuiic 2021-12-13 08:56:58 -08:00
Ha Thach
dd30f2c648
Merge pull request #1243 from hathach/g4-nucleo
Add G4 support
2021-12-13 23:56:13 +07:00
Greg Steiert
c5416aa6aa Merge branch 'master' of https://github.com/hathach/tinyusb into feature-kuiic 2021-12-13 08:56:01 -08:00
hathach
d097178ab0
correct wiring note 2021-12-13 17:59:43 +07:00
hathach
69bdd703c2
update doc to include g4 2021-12-13 17:53:38 +07:00
Ha Thach
bfb5e32e1f
Merge pull request #1233 from vmilea/rp2040_bugfix/ep_close
Handle the closing of endpoints on RP2040
2021-12-09 23:38:17 +07:00
hathach
51acc3e1b9 update g4 bsp 2021-12-09 12:42:08 +07:00
Greg Steiert
e72a6e90b9 added support for building uf2 file 2021-12-08 15:24:14 -08:00
Greg Steiert
59dcf2062f adding support for KUIIC board 2021-12-08 14:31:44 -08:00
Ha Thach
6bf7fba2a4
Merge pull request #1221 from kasjer/kasjer/fix-nrf5x-vbus-race-condition
nrf5x: Fix race condition during startup
2021-12-09 00:44:44 +07:00
Gordon McNab
21fa7ea468 Correct path for using the ft90x-sdk submodule (BRTSG-FOSS / ft90x-sdk). Default to ft90x-sdk instead of pre-built library. 2021-12-08 13:56:23 +00:00
Gordon McNab
bcbcdf87de Fix spelling mistakes and verify endpoint numbering. 2021-12-08 11:24:39 +00:00
Gordon McNab
79f1f4e171 Revert "Merge in upstream changes"
This reverts commit fa06bd01c9.
2021-12-08 11:17:05 +00:00
Valentin Milea
ae970ba2e2 Handle xfer events before closing EP 2021-12-08 12:34:00 +02:00
Gordon McNab
fa06bd01c9 Merge in upstream changes
Merge upstream changes and expand example support to hid examples.
2021-12-08 10:05:32 +00:00
Gordon McNab
45869958f6 Add FT9xx to more examples which support High-Speed 2021-12-08 10:03:33 +00:00
Gordon McNab
5039a5e54c Update code to implement changes from upstream master 2021-12-08 09:34:29 +00:00
Gordon McNab
9a7db98593 Merge branch 'master' into port-ft90x 2021-12-08 08:36:43 +00:00
Jerzy Kasenberg
21db2351fd nrf5x: Fix race condition during startup
When NRF5x device is reset by software (after DFU for example),
power event is ready from the beginning.
When power interrupt is triggered before tud_init() finished
USBD_IRQn is enabled before it would be enabled in tud_init().
This in turn may result in BUS RESET event being sent from
USB interrupt to USB task when queue is not initialized yet.
This scenario often happens in Mynewt build where queue creation
takes more time.

To prevent this scenario USBD_IRQn is not enabled in power event
interrupt handler before dcd_init() was called.
2021-12-08 08:27:27 +01:00
Yunhao Tian
527036b1f5 Initialize MMU if we are executing from DDR 2021-12-08 13:39:27 +08:00
hathach
cd76193f3c try updating clock configure for g4 nucleo (not work yet) 2021-12-08 10:37:46 +07:00
Yunhao Tian
43621ab9ed Update README 2021-12-07 22:58:19 +08:00
Yunhao Tian
75f7fb3d9d Add mksunxi tool to make flashable image 2021-12-07 22:53:52 +08:00
Valentin Milea
36e69b86bf Remove buffer reclaim logs 2021-12-07 15:35:30 +02:00
Ha Thach
cde824f17f
Merge pull request #1222 from scoudreau/swo_logger
Remove unused-parameter errors when LOGGER=swo
2021-12-07 19:53:27 +07:00
Ha Thach
c157837878
Merge pull request #1213 from kkitayam/add_hcd_for_msp_exp432e401y
Add a HCD driver for MSP-EXP432E401Y
2021-12-07 19:24:41 +07:00
hathach
a5251cb86b skip host ci for tm4c due to sram overflow 2021-12-07 17:14:20 +07:00
hathach
8e0400d531 change uart baudrate for tm4c123 to 115200 2021-12-07 16:28:24 +07:00
hathach
03835c8183 move hcd_musb.c include to family.mk 2021-12-07 16:27:48 +07:00
Valentin Milea
ef879e8a8a Support disabling feedback format correction #1234 2021-12-06 18:49:58 +02:00
Yunhao Tian
96979a2c4a Fix handling of RXRDY bit 2021-12-06 19:56:27 +08:00
Ha Thach
f8288be03f
Merge pull request #1227 from kkitayam/fix_dcd_musb_buffer_overrun
Fix buffer overrun in dcd_musb driver
2021-12-06 00:43:25 +07:00
Yunhao Tian
1ffc366aa9 Change FIFO size to 4KB (not sure)
The datasheet says 2KB FIFO, but accroding to many
code examples, the F1C100s has at least 4KB of FIFO memory.
This is working with cdc_msc example,
but I'm not sure, this should be checked.
2021-12-05 22:40:05 +08:00
Yunhao Tian
f308603a3a Fix a typo that leads to incorrect RX handling 2021-12-05 22:31:09 +08:00
Yunhao Tian
702698ee29 Add FIFO size check 2021-12-05 18:18:41 +08:00
Yunhao Tian
64b81fd4d3 Close all EPs upon reset 2021-12-05 18:08:01 +08:00
Yunhao Tian
fa0e4d91f9 Save current EP before querying other EPs 2021-12-05 18:07:35 +08:00
Valentin Milea
48e1f6d899 Handle the closing of endpoints on RP2040 2021-12-04 16:04:48 +02:00
Yunhao Tian
28fb51c180 Add TODO to README 2021-12-04 18:08:23 +08:00
Yunhao Tian
68ca62dfd7 Add BSP support for F1C100s 2021-12-04 18:02:07 +08:00
Yunhao Tian
dff54d854d Modify sunxi_musb code 2021-12-04 17:18:39 +08:00
kkitayam
7137a0a92f Fix buffer overrun at pipe_read_packet() 2021-12-04 01:25:34 +09:00
kkitayam
81285273a6 Fix memory overrun at pipe_read_packet() 2021-12-04 01:18:42 +09:00
Ha Thach
6ecd93eb60
Merge branch 'master' into add_hcd_for_msp_exp432e401y 2021-12-03 00:30:09 +07:00
Ha Thach
3e9bb3bee1
Merge pull request #1225 from perigoso/doc-requirements
after commit: eae4132 this dependency is no longer required
2021-12-03 00:27:37 +07:00
Rafael Silva
c52c9cda91 after commit: eae4132 this dependency is no longer required
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2021-12-02 10:24:19 +00:00
Ha Thach
6f0c2cf0d8
Merge pull request #1224 from hathach/chipidea-controller
rename transdimension to chipidea
2021-12-02 14:10:24 +07:00
hathach
94c35de0d2 minor doc update 2021-12-02 13:19:27 +07:00
Ha Thach
821c0a9f38
Merge pull request #1223 from hathach/fix-s3-ci
temporarily skip s3 build on ci
2021-12-02 12:48:31 +07:00
hathach
1d1e75236c temporarily skip s3 build on ci 2021-12-02 12:02:25 +07:00
hathach
369f11fe5c fix ci 2021-12-02 11:50:28 +07:00
hathach
eae4132fbb update supported doc 2021-12-02 11:31:27 +07:00
hathach
207c60d055 more chipidea 2021-12-02 00:03:44 +07:00
hathach
83dc3e25f0 more work to abstract chipidea driver 2021-12-01 23:30:09 +07:00
hathach
61a9e125db more ci abstract 2021-12-01 23:19:17 +07:00
Sebastien COUDREAU
c9d9bfab92 Remove unused-parameter errors when LOGGER=SWO 2021-12-01 17:10:31 +01:00
Yunhao Tian
bb7d1fa3ba Add support for Allwinner F1Cx00s family
Allwinner F1Cx00s family is a series of SoCs
with Mentor MUSB controller and HS phy. It comes
with a slightly different register space layout,
and some quirks, so it's not multiplexed with
the existing musb support library.

This library currently requires to be compiled
with https://github.com/hongxuyao/F1C100s_with_Keil_RTX4_emWin5
2021-12-01 15:35:48 +08:00
hathach
0612433eef add chipidea highspeed controller
add warning to transdimension for the rename
2021-12-01 12:14:44 +07:00
Ha Thach
6af58e3385
Merge pull request #1193 from rppicomidi/implement_usbh_replug_on_pico
Implement usbh replug on pico
2021-11-30 21:53:28 +07:00
kkitayam
9bccc8068b Add register settings to handle a HUB 2021-11-30 23:13:20 +09:00
hathach
3e3fe1e429 improve hcd_device_close() for rp2040 2021-11-30 17:36:52 +07:00
rppicomidi
006522e437 on unplug release device endpoints 2021-11-30 17:17:06 +07:00
rppicomidi
06f99c220e implement hcd device close 2021-11-30 17:17:06 +07:00
Yunhao Tian
a6929cf03e Add support for Keil RTX4 OS abstraction layer 2021-11-30 17:19:11 +08:00
Yunhao Tian
ac20605e3f Ignore certain compiler options on ARMCC
ARMCC also sets __GNU__ macro, but doesn't support
GCC diagnostic pragmas.
2021-11-30 17:19:11 +08:00
Yunhao Tian
dba59217da usbd: supress "statement is unreachable" warning on ARMCC 2021-11-30 17:19:10 +08:00
Ha Thach
9775e76910
Merge pull request #1216 from hathach/update-doc
Update doc
2021-11-30 12:02:05 +07:00
hathach
4678a4142e
remove warnings 2021-11-30 00:35:39 +07:00
hathach
33506675c5
update supported doc 2021-11-30 00:33:55 +07:00
Ha Thach
ae5b1bab14
Merge pull request #1215 from hathach/fix-esp-stack
use 4k stack for example with esp32sx
2021-11-29 16:17:37 +07:00
Ha Thach
aae57cd3fd
Merge pull request #1214 from hathach/fix-gamepad-comment
correct 32 button in gamepad hid descriptor template
2021-11-29 15:40:56 +07:00
hathach
7ad0af64cc
use 4k stack for example with esp32sx 2021-11-29 13:24:10 +07:00
hathach
ab223eb1df
correct 32 button in gamepad hid descriptor template 2021-11-29 13:07:46 +07:00
kkitayam
24614de419 Fix build errors 2021-11-29 00:45:57 +09:00
kkitayam
ae9a39ec1f Add musb driver 2021-11-29 00:42:18 +09:00
kkitayam
b3dddc77eb Add initialization sequence as a HOST 2021-11-29 00:40:23 +09:00
kkitayam
b50cf856b3 Add hcd_musb.c 2021-11-29 00:28:22 +09:00
kkitayam
7413b6b020 Add a compile condition for dcd 2021-11-27 10:26:32 +09:00
Ha Thach
44b131e8cf
Merge pull request #1209 from HiFiPhile/iar_update
Update iar project template.
2021-11-26 18:35:37 +07:00
Ha Thach
79de83183f
Merge pull request #1208 from hathach/fix-nrf-easydma-race
fix nrf easy dma race condition
2021-11-26 13:31:25 +07:00
Mengsk
225e718270 Update iar project template. 2021-11-25 17:27:33 +01:00
hathach
c9e9f4785f more clean up 2021-11-23 09:52:11 +07:00
hathach
0fc11746c0 clean up 2021-11-23 09:46:45 +07:00
hathach
a994540860 fix nrf easy dma race condition 2021-11-23 09:36:28 +07:00
Gordon McNab
edf3f35016 Update ft90x-sdk
Update submodule for FT90X SDK to point to the v2.5.0 release code currently in main.
2021-11-22 12:38:04 +00:00
Gordon McNab
ba76b2e339 Add submodule for ft90x SDK
Add Bridgetek FT90x SDK as submodule.
2021-11-22 10:33:07 +00:00
Ha Thach
ae73873b5c
Merge pull request #1207 from hathach/update-issue-tempate
Update bug_report.yml
2021-11-22 12:18:36 +07:00
Ha Thach
b8d66e4d19
Merge pull request #1206 from hathach/bcm-dwc2-address
Bcm dwc2 address
2021-11-22 12:07:07 +07:00
Ha Thach
e5adc46805
Update bug_report.yml 2021-11-22 11:27:37 +07:00
Ha Thach
64e6170224
Update bug_report.yml 2021-11-22 11:26:23 +07:00
hathach
8a18c22c2f
add BCM_VERSION 2021-11-22 10:59:22 +07:00
hathach
21787ecdd3
update bcm prph 2021-11-22 10:52:53 +07:00
hathach
dac7574c98
use USB_OTG_GLOBAL_BASE instead of hard code value 2021-11-22 10:52:28 +07:00
Ha Thach
5d7e26d620
Merge pull request #1195 from hathach/fix-dwc2-XCVRDLY
set DCFG_XCVRDLY when using external ULPI highspeed phy
2021-11-19 20:49:41 +07:00
hathach
301d6b4133
clean up 2021-11-17 09:48:08 +07:00
hathach
12e96ce571
set DCFG_XCVRDLY when using external ULPI highspeed phy 2021-11-15 12:18:28 +07:00
Ha Thach
6f59a2ce6e
Merge pull request #1183 from kkitayam/add_msp_exp432e401y
Add support for TI MSP-EXP432E401Y
2021-11-08 23:33:45 +07:00
hathach
1c77f9f669
msp432e4 ci typo, skip dfu example for tm4c123 2021-11-08 20:03:47 +07:00
hathach
1e308dd6c0
reduce CFG_TUD_DFU_XFER_BUFSIZE for max compatible 2021-11-08 19:18:52 +07:00
hathach
d415bd4d7b
add missing musb type file 2021-11-08 17:39:37 +07:00
hathach
17ef1503c8
move tm4c132 into bsp family, add it into ci 2021-11-08 17:37:21 +07:00
hathach
f65917f51a
rename to simply OPT_MCU_MSP432E4, add msp432e to ci 2021-11-08 17:29:26 +07:00
hathach
6fea50f735 musb work well with tm4c123 2021-11-08 16:41:29 +07:00
hathach
91646d039c add flash-openocd target. correct ek-tm4c123 button state 2021-11-08 16:41:29 +07:00
hathach
23e6e0ef33 merge pull request 670 for tm4c123gxl bsp 2021-11-08 16:41:29 +07:00
kkitayam
26461d1efe Fix DCD_EVENT_XFER_COMPLETE was signaled, even after EP is closed 2021-11-07 18:25:11 +09:00
kkitayam
dd7eb36830 Remove unnecessary lines 2021-11-06 23:10:11 +09:00
kkitayam
30d3bf8bec Update TI driver 2021-11-06 23:05:27 +09:00
kkitayam
23ef8b2c64 Change the variables for a switch and a LED to symbols defined by the macros 2021-11-06 19:32:15 +09:00
kkitayam
e4520e7aa7 Add statements for FreeRTOS 2021-11-06 00:06:27 +09:00
kkitayam
0b3c8c4a59 Implement dcd_edpt_xfer_fifo for dcd_musb 2021-11-06 00:06:27 +09:00
kkitayam
50ca0dda2c Add dcd_musb.c 2021-11-06 00:06:26 +09:00
kkitayam
f183d0810b Add files for msp432e4 2021-11-06 00:06:26 +09:00
Ha Thach
ab760290a5
Merge pull request #1181 from liamfraser/rp2040-hcd-assert-fix
Fix invalid assert in RP2040 host mode when compiled in debug mode
2021-11-05 21:40:42 +07:00
Ha Thach
a9ce2dbcb4
Merge pull request #1182 from kasjer/kasjer/update-bth-iad
Update bth for IAD support
2021-11-05 20:48:18 +07:00
Jerzy Kasenberg
d20a5b3a09 bth: Add IAD to BT descriptor
Bluetooth's specification defines IAD for primary controller.
While it seems that Windows and Linux can leave without this,
there is no reason TinyUSB should not provide it.
2021-11-05 13:03:31 +01:00
Jerzy Kasenberg
ec8ece2c9d bth: Update driver to interface association changes
Two interfaces that are required by Bluetooth Primary Controller
do not have IAD according to Bluetooth specification.
Those two interfaces were opened separately in process_set_config().

Later interface association was inferred for BTH (along with other
drivers), since then only one call to open() is place for BTH driver
that should prepare both interfaces at once.

To make it work again btd_open() parses two interfaces at once.
2021-11-05 12:33:15 +01:00
Liam Fraser
e692fa9ae4 RP2040 HCD: Move invalid ep->active assert in hw_trans_complete. The check for ep->active should only happen if a setup packet was just sent. Otherwise the transaction is handled in hw_handle_buff_status. 2021-11-05 09:39:31 +00:00
Ha Thach
c04006bc13
Merge pull request #1180 from hathach/add-xmc4500
Add xmc4500
2021-11-05 14:38:23 +07:00
hathach
3fc3e400b0
add xmc4000 to ci build 2021-11-05 13:23:31 +07:00
hathach
422f439bf7
update docs 2021-11-05 13:18:54 +07:00
hathach
d87a897a7b
xmc4500 ported, cdc msc example run fine 2021-11-05 13:13:21 +07:00
hathach
d9cf49cbfd
add xmclib as submodule 2021-11-05 12:00:27 +07:00
Ha Thach
5fcd0e284b
Merge pull request #1178 from kasjer/kasjer/fix-mynwet-build
broadcom/dcd: Fix mynewt build
2021-11-05 11:58:21 +07:00
hathach
a3fc107d94
xmc4500 led blinky, button ok 2021-11-05 11:57:36 +07:00
Ha Thach
19f0fd90d3
Merge pull request #1179 from hathach/perigoso-patch-1
docs: update supported device table
2021-11-05 08:57:45 +07:00
Rafael Silva
ec99bec8cb
docs: update supported device table
remove known issue #750 from silabs EFM32GG table entry
2021-11-04 23:00:05 +00:00
Jerzy Kasenberg
e35bb6341c broadcom/dcd: Fix mynewt build
dcd_synopsys.c included broadcom/interrupts.h before
preprocessor check whether file should be used.

Since mynewt build does not include all folders it resulted in build
error.

Now offending include is moved few lines after preprocessor check.
2021-11-04 21:46:17 +01:00
hathach
310f287f44 couldn't get g4 usb clock and pin setup just yet. Leave it as it is for now 2021-11-04 17:52:55 +07:00
hathach
f90f5ea369 adding g4 family with g474nucleo, able to blink led and button 2021-11-04 16:16:51 +07:00
hathach
8b3708b44f rename l4 board to match other convention 2021-11-04 13:57:03 +07:00
Ha Thach
fc59515bfd
Merge pull request #1163 from hathach/generalize-synopsys-dwc2
Generalize synopsys dwc2
2021-11-04 13:41:25 +07:00
hathach
6cfdf697eb add hint/question with ISB 2021-11-04 12:42:28 +07:00
hathach
4a8ac71711 Add timer1 on pi4 for blinky
this get usb irq triggered even without ISB() in previous commit
2021-11-04 12:31:16 +07:00
hathach
b51d038b65 fix issue with bcm2711 caching issue by ading ISB() after dwc2_dcd_int_enable90
also add hwcfg_list for reference
2021-11-04 12:30:11 +07:00
hathach
0faff5a859 update broadcom peripherals to latest 2021-11-03 13:13:08 +07:00
hathach
e16506cb52 clean up 2021-11-03 12:24:10 +07:00
hathach
28b177484d
skip net example for pi4 due to ssize_t conflict 2021-11-02 22:27:00 +07:00
hathach
0e733ae14b
add pi4 to ci build in build_aarch64 2021-11-02 21:46:23 +07:00
hathach
1046786acf change broadcom submodule path from git to http 2021-11-02 18:17:59 +07:00
hathach
4431ced598 add L4 to ci, update doc 2021-11-02 16:20:39 +07:00
hathach
7e68894726 grouping stm32L4 family in bsp 2021-11-02 16:10:40 +07:00
hathach
b809429873 minor clean up 2021-11-02 14:51:15 +07:00
hathach
aa682d7301 add fix for stm32l4 (version 3.10a) which generate transfer complete when setup recieved and control out data complete 2021-11-02 13:52:30 +07:00
Ha Thach
b4a0f0b273
Merge pull request #1176 from jgressmann/bugfix/samd21-systick
samd21: enable SysTick only if running w/o OS
2021-11-02 10:49:41 +07:00
Jean Gressmann
5fb16a8f2c samd21: enable SysTick only if running w/o OS 2021-11-01 18:01:18 +01:00
Ha Thach
9245b8f89f
Merge pull request #1164 from suda-morris/refactor/update_include_header_esp32xx_dcd
update dcd_esp32sx with correct include list
2021-11-01 15:24:51 +07:00
Ha Thach
fa3ed606b4
Merge pull request #1172 from jgressmann/feat/trinket_m0
Adds support for Adafruit's Trinket M0
2021-10-31 19:10:20 +07:00
Jean Gressmann
ba34f420db Adds support for Adafruit Trinket M0 2021-10-31 12:34:53 +01:00
hathach
4ea8f1441d correct freertos port for efm32gg 2021-10-31 00:19:17 +07:00
hathach
215e0595ab change F207 to use new dwc2 2021-10-31 00:09:40 +07:00
hathach
b85a6898af remove dcd_efm32 2021-10-30 20:45:58 +07:00
hathach
9cd5a87c64 add support for EFM32GG
merge GG12 GG12 to simply OPT_MCU_EFM32GG
2021-10-30 20:42:55 +07:00
Ha Thach
2019c8ad7e
Merge pull request #1171 from mkj/qtpy
Add Adafruit QT Py board
2021-10-30 12:57:51 +07:00
Matt Johnston
19a26729b0 Add Adafruit QT Py board
Straight copy of itsybitsy_m0/ with MCU changed to
ATSAMD21E18

LED and button are disabled.
LED is a neopixel so could be added later.
2021-10-29 18:00:23 +08:00
hathach
660e8b8c88 skip snpsid check for gd32, abstract phyfs turnaround, set max timeout calibration.
still has issue with gd32 with msc (does work with running with rtt as
log).
2021-10-29 16:08:19 +07:00
Matt Johnston
8e95b807f7 samd21: Make LED_PIN and BUTTON_PIN optional
Some boards don't have them, just ignore
2021-10-29 13:49:15 +08:00
hathach
6c67fc4125 correctly init hs phy for bcm 2021-10-29 00:53:30 +07:00
hathach
7def380058 support bcm2711 on pi4, enhance dcd init with utmi and ulpi hs phy 2021-10-28 12:52:18 +07:00
Gordon McNab
6a658007a5 Changes to use ft90x-sdk as submodule or installed SDK from toolchain. 2021-10-27 12:30:51 +01:00
hathach
49aa69a301 update bcm dcd 2021-10-26 23:57:48 +07:00
hathach
07829510e7 Merge branch 'tannewt-rpi' into generalize-synopsys-dwc2 2021-10-26 23:43:35 +07:00
hathach
9f1cd1a753 add synopsys id check, rename GCCFG_* to STM32_GCCFG-* 2021-10-26 23:10:26 +07:00
hathach
bb5dab5c2e add hw config struct 2021-10-26 22:48:01 +07:00
hathach
68fa9d4064
enhance fifo read/write 2021-10-26 13:56:56 +07:00
hathach
5d05f8758f
more clean up 2021-10-26 13:36:43 +07:00
hathach
4ebfd00d67
clean up 2021-10-26 13:33:40 +07:00
hathach
de413183d4
use dwc2->epin 2021-10-26 13:07:00 +07:00
hathach
e7655a7567
update the access epout 2021-10-26 13:02:26 +07:00
hathach
34844c9061
use dwc2->fifo[] 2021-10-26 12:53:29 +07:00
hathach
5e1a031800
complete dwc2 regs struct 2021-10-26 12:22:41 +07:00
hathach
3755814f57
add epin, epout to dwc2 regs 2021-10-26 11:49:59 +07:00
hathach
8df078dc9e
more rename 2021-10-26 11:11:46 +07:00
hathach
7369d2441d
update dwc2_type 2021-10-26 00:55:24 +07:00
Ha Thach
39c7fa1596
Merge pull request #1162 from todbot/master
Properly handle Program Change and Channel Aftertouch messages
2021-10-25 23:49:30 +07:00
hathach
460052c8a0
spacing 2021-10-25 21:20:58 +07:00
suda-morris
7d0d6f85f2 update dcd_esp32sx with correct include list 2021-10-25 21:53:14 +08:00
hathach
dbd31895bc
change usage of TU_CHECK_MCU() to prevent macro conflict 2021-10-25 17:04:03 +07:00
hathach
85e18b9172
house keeping 2021-10-25 15:58:12 +07:00
hathach
4ccf60954d
moving esp32s2 to dwc2, abstract dwc2_set_turnaround() 2021-10-25 15:51:41 +07:00
Tod Kurt
9f014b059a properly handle Program Change and Channel Aftertouch messages 2021-10-25 00:07:59 -07:00
hathach
a0202df920
add TU_ARGS_APPLY(), TU_CHECK_MCU() now could check list of mcus 2021-10-25 13:49:59 +07:00
hathach
61c80840c3
update dwc int enable/disable 2021-10-25 00:40:21 +07:00
hathach
4ab931a361
more clean up 2021-10-25 00:23:18 +07:00
hathach
0e7c103e98
minor rename 2021-10-25 00:11:17 +07:00
hathach
32742571da
switch gd32 and stm32f4 to use new dwc2 driver 2021-10-25 00:06:57 +07:00
hathach
06de6b725c
adding generalized dwc2 driver 2021-10-24 23:24:46 +07:00
Ha Thach
55e0b5882a
Merge pull request #1160 from cr1901/msp-fix
msp430x5xx: Set base of transmit_packet buffer earlier to avoid incre…
2021-10-24 17:28:11 +07:00
Ha Thach
54bcc9f145
Merge pull request #1161 from hathach/rm-ep-size-bitfield
Remove ep descriptor wMaxPacketSize bitfield due to endian issue
2021-10-24 15:37:05 +07:00
hathach
109b7a6661 more wMaxPacketSize 2021-10-24 14:39:02 +07:00
hathach
5af989384b remove ep descriptor wMaxPacketSize bitfield due to endian issue 2021-10-24 13:11:21 +07:00
hathach
6f5b197a98 indent 2021-10-24 08:44:58 +07:00
William D. Jones
07c74c76d0 msp430x5xx: Set base of transmit_packet buffer earlier to avoid incrementing past unsent data. 2021-10-23 14:04:44 -04:00
Ha Thach
ffde3bd33d
Merge pull request #1159 from hathach/fix-warnings
Increase compiler warnings flags
2021-10-24 00:19:19 +07:00
Ha Thach
311c05b401
Merge branch 'master' into fix-warnings 2021-10-23 21:23:56 +07:00
Ha Thach
b541c0f5e0
Merge pull request #1150 from kkitayam/change_input_terminal_type_to_camera
UVC example: change input terminal type to camera from external
2021-10-23 20:48:52 +07:00
Scott Shawcroft
2ef200003d
Update broadcom library 2021-10-22 09:31:24 -07:00
Scott Shawcroft
35b62810c3
Update submodule 2021-10-22 09:00:42 -07:00
Scott Shawcroft
4279ad7d6e
Merge pull request #1 from hathach/tannewt-rpi
pi cm4 enumerated as full speed device
2021-10-22 08:55:10 -07:00
hathach
5e437ee186
pi cm4 enumerated as full speed device 2021-10-22 21:55:15 +07:00
Ha Thach
5079d47ff5
Merge pull request #1153 from majbthrd/ipv4
net_lwip_webserver: allow users to enable LWIP_IP6 if desired
2021-10-20 15:58:18 +07:00
Peter Lawrence
d42b5604ce net_lwip_webserver: allow users to enable LWIP_IP6 if desired 2021-10-19 11:29:51 -05:00
kkitayam
b3b6b4f785 Update _negotiate_streaming_parameters() to handle some requests 2021-10-19 21:49:00 +09:00
Ha Thach
4bfab30c02
Merge pull request #1139 from hathach/release-0.12.0
update changelog and increase version for 0.12.0
2021-10-19 13:27:53 +07:00
hathach
3485c82246 update changelog 2021-10-19 12:35:35 +07:00
kkitayam
4fd0ee4eef Implement GET_DEF and GET_LEN handling on Probe/Commit entities of streaming interface 2021-10-18 21:53:38 +09:00
hathach
6fcf4bee8c suppress null-dereference by usbh and lwip 2021-10-18 11:42:00 +07:00
hathach
a7dd5b616c fix -Wnull-dereference in midi_device 2021-10-18 01:11:27 +07:00
Ha Thach
e927359d9c
Merge pull request #1147 from kasjer/kasjer/msc-examples-serial-number
msc examples: Extend serial number to 12 digits
2021-10-18 00:49:22 +07:00
hathach
826b34a8ac enable -Wnull-dereference 2021-10-18 00:13:40 +07:00
Ha Thach
4cecd4e6e3
Merge pull request #1146 from kasjer/kasjer/da146xx-usb-complience
da146xx usb complience
2021-10-17 23:48:04 +07:00
Ha Thach
38f02f0f3d
Merge pull request #1145 from kilograham/release-0.12.0
Address compiler warnings
2021-10-17 17:47:11 +07:00
hathach
099d3b377f add volatile to EPx_REGS for -Wcast-qual
since gcc does difference between volatile struct and member when
casting pointer
2021-10-17 17:33:14 +07:00
hathach
31cd366935 more -Wcast-qual 2021-10-17 17:32:03 +07:00
hathach
a5f516893b more with -Wcast-qual 2021-10-17 16:36:53 +07:00
kkitayam
7325dd6335 Change input terminal type to camera 2021-10-16 12:06:13 +09:00
hathach
0b249618b0 fix -Wcast-qual 2021-10-15 23:54:31 +07:00
Jerzy Kasenberg
9a688224d0 msc examples: Extend serial number to 12 digits
USB3CV tool complains about too short serial number being used
in MSC device.

This just extends serial number to 12 characters, it makes it
easier to analyze USB3CV logs where this unnecessary warning
made output red.

Offending warning:
Serial Number string for MSC device : iSerialNumber = 0x3
Checking iSerialNumber String Descriptor: index = 0x03.
String Descriptor : "123456". (ENGLISH_US)
Using Language ID 0x409
MSC Serial Number length = 14
Invalid MSC Serial Number length : should be >= 26
*************************
Invalid MSC Serial Number length
*************************
*************************
(MSC: 5.1.2) Serial number must be a string, 12 characters or longer
(if the device supports a BOT interface, bInterfaceProtocol = 0x50),
or exactly 12 characters long (if the device supports a CBI interface,
bInterfaceProtocol = 0x00 or 0x01, and has a serial number).
2021-10-15 14:07:40 +02:00
Jerzy Kasenberg
bf4b133084 dcd_da146xx: Drop unexpected data
USB3CV tool verifies MSC device by sending too short or
too long packets.
In case of too long packets (msc_device requested 31 bytes
but incoming data had 32 bytes) extra byte(s) were left in
FIFO resulting in some data mismatch later on.

Now if more data is received in packet that expected extra
bytes are just dropped.
2021-10-15 12:02:15 +02:00
Jerzy Kasenberg
49aa0b72a8 dcd_da146xx: Fix EPIN stall notification handling
Normal TX handler for IN non-0 endpoints is called during
outgoing transfer or just after it was finished.
It may need to fill TX fifo with same data if TX_DONE is present
but ACK_STAT is not.
It may need to fill more data when called during transfer.
But it may also be called when STALL was sent.
In this case TX_DONE is set ACK_STAT is not, just like for packets
that were sent but no ACK was received.
Code was trying to send something again. There was nothing to send
so empty ZLP was scheduled for stalled endpoint.
This ZLP was later send to host where valid response was required.

This change checks if notification was for STALL endpoint and
does not try to fill TX FIFO in that case.
2021-10-15 12:02:15 +02:00
hathach
7596cb3079 update some sense warning from -Wconversion 2021-10-15 15:54:32 +07:00
graham sanderson
06d9555389 More warning cleanup
- physically suppress warnings in TinyUSB headers using pragmas so they don't break -Werror compilation of external files that include them
 - fix compiler warnings in rp2040 port
 - add cmake method to rp2040 port to allow an external project to suppress warnings in TinyUSB itself
2021-10-14 15:23:26 -05:00
Ha Thach
d94a5aa044
Merge pull request #1144 from kilograham/release-0.12.0
Fix compiler warning
2021-10-15 01:59:06 +07:00
Ha Thach
4d0cf6135a
Merge pull request #1143 from kkitayam/fix_video_format_guid
Fix GUID of video compression formats
2021-10-15 01:55:42 +07:00
graham sanderson
7667299b48 Remove compiler warning 2021-10-14 12:13:39 -05:00
kkitayam
2a795d5fd0 Fix GUID of video compression formats 2021-10-14 23:15:35 +09:00
hathach
5cfe293001 update changelog and increase version for 0.12.0 2021-10-13 17:32:34 +07:00
Ha Thach
9da234cd7c
Merge pull request #1101 from kasjer/kasjer/da146xx-bus-reset-sleep
da146xx bus reset and sleep reworked
2021-10-13 16:33:54 +07:00
Scott Shawcroft
4ab14867da
Trying to get USB init 2021-10-12 16:47:53 -07:00
Ha Thach
b26cc2cc46
Add linkermap for size analysis (#1136)
* add NO_LTO option to make
* add linkermap submodule and linkermap target
* add linkermap to ci build
* linkermap doesn't work with esp32sx map file yet
* add note for linkermap target
2021-10-13 00:57:45 +07:00
Ha Thach
2ba690d31d
Merge pull request #1118 from kkitayam/add_uvc
Add Video class
2021-10-12 22:47:52 +07:00
Ha Thach
379537cb6d
Merge branch 'master' into add_uvc 2021-10-12 22:01:02 +07:00
hathach
557fa3900a update docs 2021-10-12 21:57:34 +07:00
kkitayam
67f1603833 Fix a typo 2021-10-12 23:35:19 +09:00
Koji KITAYAMA
ef04dee52a
Merge pull request #1 from hathach/kkitayam-add_uvc
minor code clean up without functional changes
2021-10-12 23:20:55 +09:00
hathach
4d9e44e09c more rename 2021-10-12 01:12:26 +07:00
hathach
7afcb1e5d5 minor code clean up without functionality changes 2021-10-12 00:56:20 +07:00
hathach
4d170614dc rename some video constants 2021-10-11 23:18:24 +07:00
hathach
b3bfce2cb7 update the descriptor endpoint ISO for nrf5x 2021-10-11 16:07:34 +07:00
Ha Thach
ecec0370ca
Merge pull request #1107 from majbthrd/add_ncm
add NCM driver in a compatible manner : hathach/tinyusb#550
2021-10-11 15:57:46 +07:00
hathach
a6723f556d add ncm.h for magic number
mostly clean up magic number
2021-10-11 12:36:03 +07:00
kkitayam
b6d09ca761 Add compile option to allocate video data into flash in video_capture example 2021-10-09 23:02:18 +09:00
kkitayam
a3a18c9ed3 Change the video image to scrolling color bars. 2021-10-09 19:51:51 +09:00
hathach
a8eea9f6a5
add backward compatible with warnings for CFG_TUD_NET 2021-10-09 11:28:55 +07:00
Gordon McNab
5e6edecaa3 Streamline settings for board. 2021-10-07 17:00:28 +01:00
Gordon McNab
8c40a74f29 Sort out board settings. 2021-10-06 17:13:44 +01:00
Gordon McNab
9966b8a5d6 Change author in header to Bridgetek Pte Ltd. 2021-10-06 16:54:52 +01:00
Gordon McNab
37c5eeb51d Rename directories to indicate that FT930 and FT900 devices are both covered by the same SDK and src/portable code. Board makefile includes __FT900__ macro for FT90x and __FT930__ macro for boards with FT93x. 2021-10-06 16:50:55 +01:00
Ha Thach
9660a5821f
Merge pull request #1123 from Daft-Freak/patch-1
Handle HID devices with OUT endpoint listed first
2021-10-06 16:55:33 +07:00
Gordon McNab
bcecbfdc29 Modify cdc_msc example for Bridgetek FT90x/FT93x
Add in endpoint definitions for the Bridgetek devices in usb_descriptors.c and allow high speed in tusb_config.h.
2021-10-06 09:15:33 +01:00
Scott Shawcroft
98ab8117d6
USB seems to init ok 2021-10-05 18:20:44 -07:00
Gordon McNab
62c613f6d2 Add initial port for FT9xx series from Bridgetek.
Add FT90X and FT93X to the list of devices in tusb_option.h. 1700 for FT90x and 1701 for FT93x.
Set endpoint attributes for FT90x and FT93x in dcd_attr.h.
Add FT90x routines for USB device in src/portable/bridgetek/ft90x/dcd_ft90x.c
The location for hardware header files and libraries is hw/mcu/bridgetek/ft90x/hardware. There are no files in the repository, but files will be linked as a submodule in the future. The required files can be copied from or linked to the location "C:/Program Files(x86)/Bridgetek/FT9xx Toolchain/Toolchain/hardware" once the toolchain is installed.
Makefile for the MM900EV1B board for developing with an FT900 device is present. Use "BOARD=mm900ev1b".
2021-10-05 13:54:47 +01:00
hathach
431650fb7d
Merge branch 'j4cbo-ncm' into majbthrd-add_ncm 2021-10-05 16:32:37 +07:00
hathach
6fd62c8902
update docs 2021-10-05 16:06:54 +07:00
hathach
a867d87072
rename CFG_TUD_NET to CFG_TUD_ECM_RNDIS 2021-10-05 16:00:07 +07:00
hathach
31cfd5a684 Merge branch 'add_ncm' of https://github.com/majbthrd/tinyusb into majbthrd-add_ncm 2021-10-05 11:39:32 +07:00
Charlie Birks
aa97b419b2
Handle HID devices with OUT endpoint listed first
This happens on my PowerA wired Switch pro controller
2021-10-04 11:43:12 +01:00
Ha Thach
d9bda631d4
Merge pull request #1120 from hathach/enhance
house keeping update
2021-10-01 23:31:21 +07:00
hathach
fec2d15989
clean up vendor open 2021-10-01 23:00:09 +07:00
hathach
75ad0c7d31
clean up 2021-10-01 22:53:14 +07:00
hathach
fdd1e4fbf0
more usbd clean up 2021-10-01 21:52:29 +07:00
Scott Shawcroft
0932d502c7
remove bcm files 2021-09-30 14:50:38 -07:00
Ha Thach
c851229eea
Merge pull request #1063 from HiFiPhile/uac_fifo
UAC2: Add xfer_fifo support for dcd_transdimension.
2021-10-01 00:17:51 +07:00
Ha Thach
e7ef322268
Merge pull request #1113 from szymonh/master
Assure msc device block size is not zero
2021-10-01 00:08:32 +07:00
kkitayam
a1788da410 Add video class entry to rp2040 building scripts 2021-09-30 22:14:29 +09:00
hathach
7708997a67
change scsis status to phase error when total_bytes < block_count 2021-09-30 20:14:23 +07:00
hathach
14514d7087 Merge branch 'master' of https://github.com/szymonh/tinyusb into szymonh-master 2021-09-30 20:02:32 +07:00
kkitayam
2800a6a583 Add a file to skip bluepill 2021-09-30 21:46:16 +09:00
kkitayam
98e6a93a78 Add a list file for rp2040 2021-09-30 21:38:27 +09:00
kkitayam
889e4103d9 Add files to skip building for small ROM 2021-09-30 21:27:09 +09:00
kkitayam
9a7795464e Add cast operations to unused parameters 2021-09-30 21:08:57 +09:00
kkitayam
831443a2dc Move frame settings to usb_descriptors.h 2021-09-30 01:13:33 +09:00
kkitayam
4ca466b00b Update comments 2021-09-29 22:59:46 +09:00
kkitayam
9bcab53c2c Implement frame rate settings 2021-09-29 22:53:26 +09:00
kkitayam
dba5e7b17d Implement negotiation process for streaming parameters 2021-09-29 21:23:19 +09:00
kkitayam
0c89292a8d Fix transfer failure when reconnecting 2021-09-29 21:23:19 +09:00
kkitayam
319db9573c Change video frames to project logo 2021-09-29 21:23:18 +09:00
kkitayam
a15c354329 Fix typo 2021-09-29 21:23:18 +09:00
kkitayam
f7bbdea0b8 Refactor application API parameters 2021-09-29 21:23:17 +09:00
kkitayam
0d6496886c Change frame buffer management 2021-09-29 21:23:17 +09:00
kkitayam
d88cc23ca5 Refactor packet handling 2021-09-29 21:23:17 +09:00
kkitayam
a978828c3a Add green plain 2021-09-29 21:23:16 +09:00
kkitayam
cd3f6eac2f Fix streaming payload handling 2021-09-29 21:23:16 +09:00
kkitayam
3cb4bb391d Separate a handling resource into controller and streaming 2021-09-29 21:23:16 +09:00
kkitayam
2b4e02f192 Implement some mandatory requests on streaming interface 2021-09-29 21:23:16 +09:00
kkitayam
4995d9cbd2 Fix handling for set_interface 2021-09-29 21:23:15 +09:00
kkitayam
20572a6ed2 Fix regarding standard video stream request 2021-09-29 21:23:15 +09:00
kkitayam
c52cf9c8a5 fix: endpoint descriptor has incorrectly settings 2021-09-29 21:23:15 +09:00
kkitayam
d026f17457 fix: configuration descriptor has incorrectly sizes
update some descriptors
2021-09-29 21:23:15 +09:00
kkitayam
019c1ab09e add tentative example 2021-09-29 21:23:14 +09:00
kkitayam
033d6b28ff moved ISO attributes from audio to common 2021-09-29 21:23:14 +09:00
kkitayam
e8de411322 cleanup open() 2021-09-29 21:23:14 +09:00
kkitayam
97d5d1e491 add files for video class device 2021-09-29 21:23:14 +09:00
hathach
1d5bdf7d39
add same7x to board list 2021-09-29 16:29:15 +07:00
hathach
0b31c40b9f Merge branch 'master' into enhance 2021-09-29 16:18:17 +07:00
hathach
2f2fb3d8d9
clean up 2021-09-29 16:18:11 +07:00
Ha Thach
5b55b0d259
Merge pull request #1117 from hathach/zhangslice-master
add mm32 bsp (repalce #897)
2021-09-29 15:51:22 +07:00
hathach
b5b03e6c7f
add mm32 to ci build, also re-enable esp32s3 2021-09-29 15:33:44 +07:00
hathach
f3c1b2a60d
clean up 2021-09-29 15:31:03 +07:00
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
3eeb79be4f
update mm32sdk submodule 2021-09-29 15:20:14 +07:00
hathach
7af57e41b5
add submodule hathach/mm32sdk 2021-09-29 14:58:47 +07:00
hathach
bbb68ffefb
remove official mm32sdk submodule 2021-09-29 14:55:20 +07:00
szymonh
db862ae725 Assure msc device block size is not zero 2021-09-27 21:11:44 +02:00
Ha Thach
32bdf3b79d
Merge pull request #1110 from hansfbaier/master
add support for the QMTech ATMSAME70N19A board
2021-09-27 12:41:07 +07:00
Hans Baier
196a0da813 add support for the QMTech ATMSAME70N19A board 2021-09-27 06:13:07 +07:00
Ha Thach
8f0cfc8d44
Merge pull request #1108 from hathach/minor-changes
make freertos header include in examples more explicit
2021-09-26 13:12:05 +07:00
hathach
fba5ec8134 make freertos header include in examples more explicit 2021-09-26 12:23:08 +07:00
Peter Lawrence
03d7988df3 add NCM driver in a compatible manner : hathach/tinyusb#550 2021-09-25 17:05:58 -05:00
Ha Thach
958cf2cfba
Merge pull request #1102 from kasjer/kasjer/usbd-small-ep0-enumeration-workaround
usbd: Workaround for non standard device descriptor request
2021-09-25 18:37:24 +07:00
Ha Thach
45ae409e3f
Merge pull request #1104 from hathach/fix-esp32-ci
add CFG_TUSB_OS_INC_PATH for os include path
2021-09-25 16:44:22 +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
Scott Shawcroft
0a6ca65e3f
MMU works 2021-09-24 16:14:01 -07:00
Ha Thach
1c17cb1c45
Merge pull request #1103 from kasjer/kasjer/da146xx-close-cleanup
dcd_da146xx: Remove registers pointer from xfer_ctl_t
2021-09-24 20:55:16 +07:00
Ha Thach
cd865f896b
Merge pull request #1096 from kasjer/kasjer/da146xx-close-all
dcd_da146xx: Implement dcd_edpt_close_all()
2021-09-24 20:53:06 +07:00
Jerzy Kasenberg
c62c1433e7 usbd: Workaround for non standard device descriptor request
Windows and Linux host during enumeration requests device
descriptor with request size set to 64 bytes when device
was in default state (no address).
Those systems do not want 64 bytes though since usb descriptors is
only 18 bytes long so they silently expect that only one packet
will be received possibly 18 bytes for EPS > 16 or 8 or 16 bytes
for smaller EP0.

For devices with CFG_TUD_ENDPOINT0_SIZE size 8 or 16 there was
workaround that reduced request size to CFG_TUD_ENDPOINT0_SIZE
and that was enough to satisfy Windows and Linux hosts.

However USBCV testing application also requests device descriptor
but with size set to 18 bytes. Workaround for Window/Linux
prevented USBVC to tests devices with 8 bytes EP0 size since it
send only 8 bytes while application did wanted 18 bytes.

Solution that satisfies both cases it to check if in default state device
descriptor request wants more bytes than descriptor size (18).
If so host is expecting to receive less bytes then requested
and workaround would be applied since Linux/Windows only try
to read one packet.
If 18 bytes was requested as is the case for USBCV, core returns
descriptor in 2 or 3 packets as application expects.
2021-09-24 14:19:04 +02:00
Jerzy Kasenberg
fbac58e3e4 dcd_da146xx: Implement dcd_edpt_close_all()
Unconditionally disables all endpoints except EP0.
2021-09-24 10:46:16 +02:00
Jerzy Kasenberg
1503955860 dcd_da146xx: Clear transfer data on dcd_edpt_close
Closing endpoint clears data in affected xfer_ctl_t
2021-09-24 09:28:51 +02:00
Jerzy Kasenberg
f172c5ee13 dcd_da146xx: Remove registers pointer from xfer_ctl_t
Note: this commit does not change any logic.

xfer_ctl_t structure keeps all dynamic data connected with transfer.
It used to have pointer to register set that was constant and was there
for convenience only.
Removing register pointer from structure makes cleanup easier as whole
structure can be erased with memset like function.

In many cases functions were using local variable regs and xfer->regs which
were same, that could be confusing so this part is unified.

Few macros were added for easy conversion between epnum, xfer, and regs.
2021-09-24 09:28:51 +02:00
Jerzy Kasenberg
428eedcd04 dcd_da146xx: Update bus handling
So far bus reset was handled (with some holes in it).
Sleep and remote wakeup were not really tested and did not work.

With this change:
- bus reset is reworked
- remote wakeup works
- bus signal sleep is handled
2021-09-23 14:12:50 +02:00
Jerzy Kasenberg
c427712449 dcd_da146xx: Handle only enabled interrupts
Not much of an improvement but handle only interrupts
that were enabled and are expected.
2021-09-23 14:12:50 +02:00
Ha Thach
2eaf99e0aa
Merge pull request #1100 from kasjer/kasjer/da1469b_dk_usb-fix-button-config
da14695_dk_usb: Fix button configuration
2021-09-23 18:45:02 +07:00
Jerzy Kasenberg
417677aae4 da14695_dk_usb: Fix button configuration
Unlike da1469x_dk_pro, K1 pin (6) is connected to VCC when
active.
This adds required pull down and reverses active logic state.
2021-09-23 12:52:32 +02:00
Ha Thach
040300540c
Merge pull request #1099 from kasjer/kasjer/da1469x_dk_pro-fix-pin-pullup
da1469x_dk_pro: Fix button setup
2021-09-23 17:10:57 +07:00
Jerzy Kasenberg
dd2a518881 da1469x_dk_pro: Fix button setup
Button on board has 1k resistor to ground when pressed.
When not pressed pin 6 is floating.

This forces MCU pull-up for this pin for correct behavior.
2021-09-23 12:00:28 +02:00
Ha Thach
4766e7f348
Merge pull request #1093 from szymonh/master
Enforced buffer boundaries for hid devices
2021-09-23 13:31:46 +07:00
Scott Shawcroft
829f92d00f
Trying to setup the mmu 2021-09-22 15:19:02 -07:00
Ha Thach
3e569f8e79
Merge pull request #1094 from kasjer/kasjer/da146xx-vbus-handling
dcd_da146xx: Add VBUS handling
2021-09-18 23:12:40 +07:00
hathach
ea595d3161 update dcd attr for mm32 2021-09-18 16:53:16 +07:00
hathach
3333703d25 Merge branch 'master' into zhangslice-master 2021-09-18 13:35:26 +07:00
Scott Shawcroft
2499c9382d
rpi start. doesn't work 2021-09-17 16:51:34 -07:00
Ha Thach
90465299b4
Merge pull request #1086 from kkitayam/impl_close_all_for_khci
Implement dcd_edpt_close_all() and fix dcd_edpt_clear_stall() for frdm_kl25z
2021-09-17 21:40:40 +07:00
Jerzy Kasenberg
a71ac71d7f da1469x_dk_xxx: Add VBUS handling
Two BSPs with DA146xx MCUs are now adopted to
VBUS handling changed introduced to dcd_da146xx driver.

da14695_dk_usb as bus-powered devices informs driver that
VBUS is present at startup.

da1469x-dk-pro has VBUS change interrupt handler that
informs driver about VBUS changes.
2021-09-17 12:20:57 +02:00
Jerzy Kasenberg
6d8677a78a dcd_da146xx: Add VBUS handling
DA146xx are Bluetooth devices that may be battery
powered and when not connected to USB host there
is no need for USB peripheral to be running.

This change allows to enable USB peripheral when
VBUS is present otherwise USB is down reducing
power consumption.

tud_vsub_changed() function must be called
whenever VBUS change was detected.
For bus-powered devices this function should be called
at startup since VBUS must be present while device
is working.
2021-09-17 12:10:17 +02:00
hathach
b363afc091 minor clean up 2021-09-17 00:46:29 +07:00
hathach
c65cc75c6b use correct resume detection for kl25z 2021-09-17 00:44:39 +07:00
hathach
8dfe0898e7 minor update to dcd khci 2021-09-17 00:43:10 +07:00
kkitayam
fbe1bf375c Fix stall interrupt handling 2021-09-15 21:39:02 +09:00
kkitayam
46bb821753 Add J1-19 pin setting as a button 2021-09-15 21:32:53 +09:00
kkitayam
ecbe8c3376 Change default LED state to off 2021-09-15 21:32:53 +09:00
hathach
93ed3034c0 merge master and minor clean up 2021-09-15 18:35:52 +07:00
hathach
f39656b6d7 Merge branch 'master' of github.com:hathach/tinyusb into kkitayam-impl_close_all_for_khci 2021-09-15 18:29:28 +07:00
Ha Thach
03866ddf9b
Merge pull request #1062 from HiFiPhile/fifo_dcd_transdimension
Improvements for dcd_transdimension
2021-09-15 16:07:06 +07:00
MasterPhi
0ded1c5bac Reset EP flags on close. 2021-09-14 21:08:12 +02:00
hathach
a23944035d correct assoc_itf_count for bth driver 2021-09-15 00:51:01 +07:00
hathach
b474522245 make vendor driver more flexible
- skip additional custom descriptor between interface and endpoints
- can have up to 2 bulk endpoint ( 1 in & 1 out)
2021-09-14 21:30:38 +07:00
hathach
25ea8f9c9e update configuration parser 2021-09-14 21:02:38 +07:00
MasterPhi
3639168066 Fix warning. 2021-09-14 11:58:22 +02:00
hathach
5404d6d8ae usbd pre-compute total interface length without replying on driver open 2021-09-14 12:47:20 +07:00
hathach
103a11d449 add host hid_controller to cmake all list
fix 1067
2021-09-14 12:25:08 +07:00
Ha Thach
6d3fb7eb98
Merge pull request #1087 from HiFiPhile/nuc_wkp
NUC126: fix remote_wakeup
2021-09-14 11:40:55 +07:00
szymonh
2d6407e7a5 Enforced buffer boundaries for hid devices 2021-09-13 22:56:25 +02:00
Ha Thach
43aac7074b
Update supported.rst 2021-09-13 22:16:34 +07:00
Ha Thach
d640d59f99
Merge pull request #1092 from szymonh/master
Add support for Nucleo F412ZG
2021-09-13 22:14:23 +07:00
Ha Thach
1c3215257e
Merge pull request #1091 from hathach/esp32sx-compliance
Esp32sx compliance
2021-09-13 21:26:29 +07:00
szymonh
1a87b605bd Add support for Nucleo F412ZG 2021-09-13 13:21:25 +02:00
hathach
cdc63459eb esp32sx implement dcd_remote_wakeup(), fully compliance to chapter9 test suite 2021-09-13 16:49:38 +07:00
hathach
e64bfb9ff5 implement dcd_edpt_close_all(), pass chapter9 test suite (without remote wakeup) 2021-09-13 16:16:37 +07:00
Ha Thach
7e6f954ffe
Merge pull request #1090 from szymonh/master
Prevent buffer overflow in bth_device.c
2021-09-13 16:01:56 +07:00
szymonh
50e3c0054f Add size check to tud_bt_hci_cmd_cb call in bth_device.c 2021-09-13 10:23:03 +02:00
hathach
43e6555fd0 clean up 2021-09-13 13:09:38 +07:00
hathach
ce5db06ba0 clear PID along with clear stall 2021-09-13 12:05:49 +07:00
hathach
6feda5ae8f Merge branch 'nuc_wkp' of https://github.com/HiFiPhile/tinyusb into HiFiPhile-nuc_wkp 2021-09-13 11:52:16 +07:00
szymonh
d5f2c34eaa Prevent buffer overflow in bth_device.c 2021-09-12 20:24:54 +02:00
hathach
9bed4e2e21 refactor nxp TDI dcd_edpt_xfer_fifo 2021-09-13 00:45:15 +07:00
hathach
038ec341f8 Merge branch 'fifo_dcd_transdimension' of https://github.com/HiFiPhile/tinyusb 2021-09-12 17:39:32 +07:00
Ha Thach
5013788989
Merge pull request #1089 from hathach/imxrt-compliance
Imxrt compliance
2021-09-12 13:37:49 +07:00
hathach
dd60ce784c nxp tdi: implement dcd edpt close all 2021-09-11 21:29:04 +07:00
hathach
1f7ade2b75 nxp tdi: fix error td prevent further transfer 2021-09-11 19:27:37 +07:00
MasterPhi
22571ec98e reset PID to DATA0 on clear_stall. 2021-09-10 16:04:47 +02:00
MasterPhi
8886de0d8a Fix remote_wakeup 2021-09-10 13:05:15 +02:00
MasterPhi
580893b3fe Shorter expr. 2021-09-10 11:17:33 +02:00
kkitayam
2998f67eac Fix dcd_edpt_clear_stall to reset data toggle 2021-09-10 00:18:43 +09:00
kkitayam
d7238d9a86 Remove heap memory area 2021-09-10 00:13:29 +09:00
Mengsk
283783c082 dcd_edpt_xfer_fifo: use qtd_init if restriction not met. 2021-09-09 16:45:18 +02:00
hathach
ad8c0ee818
nxp tdi: enhance qhd using DCD_ATTR_ENDPOINT_MAX 2021-09-09 20:26:03 +07:00
hathach
f948cbe471
nxp tdi implement remote wakeup
enhance bus reset, unplugged, suspend, resume detection
2021-09-09 17:04:04 +07:00
hathach
27800f7e4f
remove connected check for DCD_EVENT_UNPLUGGED since previous bus reset can clear this
implement unplugged detection for trans dimension dcd
2021-09-09 16:01:05 +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
kkitayam
780852efb3 Fix stall handling 2021-09-09 00:55:02 +09:00
kkitayam
22b5b47045 Implement dcd_edpt_close_all for NXP khci 2021-09-08 21:52:27 +09:00
Ha Thach
d66d817c38
Merge pull request #1080 from hathach/rx-msc-compliance
Renesas RX reset PID to DATA0 when open endpoint
2021-09-08 18:31:42 +07:00
Ha Thach
5f141a4c13
Merge pull request #1077 from hathach/st-synopsy-compliance
St synopsy compliance
2021-09-08 18:00:44 +07:00
hathach
d077574097 reset PID to DATA0 when open endpoint 2021-09-08 17:56:22 +07:00
Ha Thach
c5e6e87d13
Merge pull request #1076 from kkitayam/impl_close_all_for_rx
Implement dcd_edpt_close_all() for Renesas RX family
2021-09-08 17:53:42 +07:00
hathach
67e80f60e3 fix build with gd32vf103 2021-09-08 13:35:11 +07:00
Ha Thach
f878f892ad
Merge pull request #1071 from HiFiPhile/iar
More IAR support
2021-09-08 13:15:00 +07:00
Ha Thach
4a63326ed9
Merge pull request #1078 from dshadoff/more_ps4_controllers
Add PS4-compatible controllers
2021-09-08 12:25:36 +07:00
David Shadoff
185bb21bdd Add PS4-compatible controllers 2021-09-07 21:13:34 -04:00
hathach
4ac136d81d implement remote wakeup for stm synopsys 2021-09-08 00:57:07 +07:00
hathach
a54a974fa5 make synopsys usbcv compliance
- implement dcd_edpt_close_all()
- reset dtoggle when open endpoint
- correct dev interrupt mask on bus reset
2021-09-07 23:02:57 +07:00
kkitayam
f3da48d46a Implement dcd_edpt_close_all() for Renesas RX family 2021-09-07 23:28:54 +09:00
kkitayam
e06a632b72 Update Renesas RX 2021-09-07 23:28:54 +09:00
Ha Thach
582e5dbac5
Merge pull request #1075 from hathach/fix-cxd56-msc
Fix cxd56 msc
2021-09-07 18:06:40 +07:00
hathach
785cdf67f0 default PYTHON to python3 on linux, and python on windows 2021-09-07 17:43:45 +07:00
MasterPhi
b6cda41daf Add doc for IAR. 2021-09-07 12:32:27 +02:00
MasterPhi
a754205acb Rename iar.ipcf to iar_template.ipcf 2021-09-07 12:32:17 +02:00
MasterPhi
f735ee4f36 Remove ipcf of examples. 2021-09-07 11:25:35 +02:00
hathach
f47e5402fa add msc workaround for cxd56 2021-09-07 13:30:51 +07:00
Ha Thach
78f88cf5c4
Merge pull request #1074 from unlimitedcodeworks/tusb_host_gamepad_add_additional_ps4_compatible_vid_pid_combos
Tusb host gamepad add additional ps4 compatible vid pid combos
2021-09-07 11:39:47 +07:00
Christian Arlt
cc08bb6f99 Added Arc System Works GG Xrd Limited Edition controller VID PID 2021-09-06 19:41:09 +02:00
Christian Arlt
a0646f20ba Added Hori Fighting Commander 4 VID PID 2021-09-06 19:40:14 +02:00
Christian Arlt
c53ce53058 Added Sony DualShock4 CUH-ZCT1E pid 2021-09-06 19:38:31 +02:00
hathach
fa030075c2 Revert "Fix for MSC during stage STATUS"
This reverts commit 2e23f3dd72.
2021-09-06 19:26:28 +07:00
Ha Thach
cbb6dfd6a5
Merge pull request #1070 from kamtom480/msc_stage_status_fix
Fix for MSC during stage STATUS
2021-09-06 13:08:29 +07:00
MasterPhi
51dddf63fa Add IAR project connections. 2021-09-03 18:26:39 +02:00
Kamil Tomaszewski
2e23f3dd72 Fix for MSC during stage STATUS 2021-09-03 18:13:45 +02:00
Ha Thach
831a45f14b
Merge pull request #1065 from hathach/rp2040-compliance
Rp2040 compliance test
2021-09-01 20:18:01 +07:00
hathach
d4c56c70a8
minor clean up 2021-09-01 20:01:40 +07:00
hathach
d6e9fe38be
rp2040 implement dcd_edpt_close_all()
aslo rename reset_ep0_pid() and clean up. We only need to reset pid when
setup packet received
2021-09-01 19:44:12 +07:00
hathach
1398226bb5
only attempt to clear if stalled, and stall if cleared 2021-09-01 16:54:03 +07:00
hathach
15fa2f447b
add back edpt check before cbw, since bot reset can occurred any time 2021-09-01 16:53:12 +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
90dc9bc289
revert previous changes, edpt stall also clear any pending (not complete) transfer 2021-09-01 12:42:45 +07:00
hathach
ab0c3e8dd0
fix rp2040 chapter 9 TD 9.6 test 2021-08-31 17:41:08 +07:00
hathach
d047b28aa2
remove set/clear busy flag in set/clear stall since they are different status
note: dcd should resume to prio-stalled queued transfer when unstall
2021-08-31 17:39:54 +07:00
MasterPhi
e3bf4c069b UAC2: Add ring buffer support for dcd_transdimension.
Add ring buffer ON/OFF switch.
2021-08-31 12:29:22 +02:00
MasterPhi
16b802d50c add dcd_edpt_close and iso xfer. 2021-08-31 12:02:19 +02:00
Ha Thach
e2175f6ed1
Merge pull request #1061 from hathach/samd-compliance
Update SAMD to pass USBCV
2021-08-31 17:00:42 +07:00
MasterPhi
864d8381a7 dcd_transmission xfer_fifo support. 2021-08-31 11:59:51 +02:00
hathach
76345ea3a1
clear stall and reset data toggle when open edpt
required to pass one of msc test.
2021-08-31 16:41:45 +07:00
Ha Thach
1a1bcd816c
Merge pull request #1060 from HiFiPhile/cv_hid
USBCV: fix HID_LOGICAL_MAX overflow.
2021-08-31 16:41:30 +07:00
MasterPhi
8305766afe fix HID_LOGICAL_MAX overflow. 2021-08-31 11:27:43 +02:00
Ha Thach
38f5aee9c3
Merge pull request #1058 from hathach/usbcv-compliant-test
nrf5x USB Compliance Verification Test suite
2021-08-30 17:31:50 +07:00
hathach
36dc25a22d changelog 2021-08-30 15:01:12 +07:00
Ha Thach
e72d48ee29
Update changelog.rst 2021-08-30 13:40:01 +07:00
Ha Thach
8029fb16cd
Merge pull request #1056 from hathach/release-0.11.0
increase version and update changelog
2021-08-30 13:37:50 +07:00
Ha Thach
4874afb272
Merge pull request #1049 from mws-rmain/master
Added support for Microchip Curiosity Nano SAMD21 board (DM320119)
2021-08-30 12:45:02 +07:00
hathach
6fadf530e0 increase version and update changelog 2021-08-30 12:44:38 +07:00
hathach
a05ea0d83b add CFG_EXAMPLE_MSC_READONLY for curiosity
allow family/board to exclude specific example. exclude
net_lwip_webserver from curiosity.
2021-08-29 22:53:16 +07:00
mainr
b169db3fd6 Add PYOCD_OPTION
Added PYOCD_OPTION to pass board-specific options to build
2021-08-29 22:51:46 +07:00
mainr
90af8562b1 Added support for Microchip Curiosity Nano SAMD21 board (DM320119)
Added support for Microchip Curiosity Nano SAMD21 board (DM320119) under hw/bsp/samd21/boards/curiosity_nano
The nEDBG on this board requires dap_protocol be specified as SWD (changed in examples/rules.mk)

NOTE: requires entry (03eb:2175) for VID:PID of nEDBG be added to /etc/udev/rules for pyocd
2021-08-29 22:51:46 +07:00
Ha Thach
bc4145fcb4
Merge pull request #1033 from hathach/merge-waveshare-h7
merge waveshare to h7 family
2021-08-29 22:14:46 +07:00
Ha Thach
4492a7021c
Merge branch 'master' into merge-waveshare-h7 2021-08-29 21:49:10 +07:00
hathach
6159252692 disable systick when running freertos on other stm families 2021-08-29 21:34:10 +07:00
hathach
00e66cf2e0 remove old openh743i, explicitly disable systick when using freertos for H7 2021-08-29 21:26:47 +07:00
Ha Thach
3195929596
Merge pull request #1055 from xcguang/bugfix/bth_stridx_error
fix: bth stridx error
2021-08-29 20:48:42 +07:00
Ha Thach
d1ccb9b86b
Merge pull request #1054 from a-h/master
Minor grammar updates
2021-08-29 16:07:28 +07:00
hathach
fdf1ff545f responding with status per-spec in test case 4 2021-08-29 15:44:27 +07:00
hathach
4e3ed8159e passed all USBCV bot complaince test 2021-08-29 13:34:47 +07:00
hathach
ee18cc42f2 msc handle more test, passed Command Self Test compliant 2021-08-29 12:06:10 +07:00
hathach
ad21b69277 fix nrf clear data toggle sequence when clearing stall 2021-08-29 12:05:34 +07:00
hathach
66c292e2ec fix a couple of nrf dcd issue
- limit out xact dma to prevent usbd overflow in certain situation after
stalled
- drained already acked data when stalling an OUT endpoint
2021-08-29 00:34:21 +07:00
hathach
be98cd56c7 update msc to be more robuse
add more log, pass more complaint test
2021-08-29 00:29:29 +07:00
hathach
54013737d5 fix msc example with out of bound lba (due to compliant test) 2021-08-28 20:26:56 +07:00
hathach
a53839ef44 correct msc example return type of tud_msc_scsi_cb() 2021-08-28 01:23:20 +07:00
hathach
53ea1e1324 fix msc test case 8 and 10 2021-08-27 23:52:59 +07:00
hathach
c6b9f8a530 fix msc case 3 complaint test 2021-08-27 23:33:11 +07:00
hathach
8bad0af849 explicitly clear stall and data toggle for edpoint upon open() 2021-08-27 22:31:08 +07:00
hathach
81c73c235f implement dcd_edpt_close_all() for nrf52840 2021-08-27 22:30:30 +07:00
hathach
e01239ccc9 more msc refactoring 2021-08-27 20:05:56 +07:00
hathach
2667ce6981 fix BOT case 2 test compliant 2021-08-27 17:50:02 +07:00
hathach
893dceb198 refactor msc device 2021-08-27 17:30:02 +07:00
hathach
032770682e minor clean up 2021-08-27 13:18:51 +07:00
hathach
9394de6ae7 update msc driver to pass MSC BOT error recovery compliant test 2021-08-27 12:38:41 +07:00
Xu Chun Guang
2202845507 fix: bth stridx error 2021-08-27 10:58:38 +08:00
Adrian Hesketh
138e77f3b5
Merge branch 'hathach:master' into master 2021-08-26 15:44:50 +01:00
hathach
629da937f8
slightly change the keyboard descriptor template to pass usb compliant test 2021-08-26 17:55:31 +07:00
hathach
ed4602158b
TD 9.12 remote wakeup test
remove TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP attribute from non-hid
examples
2021-08-26 17:08:22 +07:00
hathach
71e77e47fa
add dcd_edpt_close_all() for clear existing configured state
correctly responded to TD 9.13 Set Configuration Test
2021-08-26 17:07:03 +07:00
hathach
07adc26ce3
fix usbcv TD 9.4 Interface Descriptor test 2021-08-26 13:07:10 +07:00
Ha Thach
8d97f0e81f
Merge pull request #1041 from HiFiPhile/vdc
Fix vendor fifo deadlock, add tud_vendor_n_read_flush
2021-08-25 23:22:15 +07:00
Ha Thach
155c186b17
Merge pull request #1047 from hathach/host-hid-controller
Add host hid controller example
2021-08-25 12:39:51 +07:00
hathach
3debeb637a
test hid controller with rp2040 2021-08-24 21:34:51 +07:00
hathach
3c0c051df1
add tuh_vid_pid_get()
complete Sony PS4 dualshock controller example
2021-08-24 19:10:23 +07:00
hathach
88bb8fac3d
rename host API to be consistent with naming on device stack
- tuh_device_get_speed() to tuh_speed_get()
- tuh_device_configured() to tuh_mounted()
- tuh_device_ready() to tuh_ready()
2021-08-24 12:37:04 +07:00
Ha Thach
9c3fdb8135
Merge pull request #1043 from hathach/more-host-improvement
More host improvement
2021-08-24 12:28:41 +07:00
Ha Thach
fc2ffed5c6
Merge pull request #1044 from nxf58843/feature-k32l2b
Feature k32l2b
2021-08-24 12:20:07 +07:00
hathach
5d152503ee fix dev0 out of bound array due to leftover 2021-08-24 12:16:23 +07:00
Greg Steiert
5bd7788950 cleaned up unused code, only enalbing port clocks as needed 2021-08-23 16:36:58 -07:00
Greg Steiert
86201f77be initial commit of support for K32L2B 2021-08-23 16:17:57 -07:00
hathach
8dc16dd3a7 fix rp2040 build 2021-08-24 01:19:06 +07:00
hathach
353c070d00 exclude dev0 from usbh devices pool 2021-08-24 01:06:05 +07:00
nxf58843
fb16e80e57
Merge pull request #2 from hathach/master
Pulling latest from source
2021-08-23 09:55:04 -07:00
hathach
3309425211 sepearate CFG_TUH_DEVICE_MAX and CFG_TUH_HUB
separate dev0 from _usbh_devices pool to save sram
2021-08-23 19:56:53 +07:00
Adrian Hesketh
49bcbf0f5d
Update README.rst 2021-08-23 11:32:12 +01:00
Adrian Hesketh
a893e6d2a2
Update README.rst 2021-08-23 11:31:11 +01:00
Adrian Hesketh
49278a4a9b
Minor README grammar updates 2021-08-23 11:29:56 +01:00
hathach
75cd593b60 add hcd_devtree_get_info()
remove usbh_hcd.h
2021-08-23 17:00:41 +07:00
hathach
a490a3fe61 add hcd attr, add note for ehci framelist on NXP derivative 2021-08-23 15:40:57 +07:00
hathach
4ca176c291 refactor ehci init api 2021-08-23 12:37:54 +07:00
hathach
6a16f6ccdd rename CFG_TUSB_HOST_DEVICE_MAX to CFG_TUH_DEVICE_MAX 2021-08-23 11:01:40 +07:00
hathach
800f85329e add tuh_hid_receive_report() for applicaiton to explicitly request report 2021-08-23 11:00:21 +07:00
Ha Thach
ea902493db
Merge pull request #1038 from HiFiPhile/nuc
nuc126: fix set_address & disable sof
2021-08-23 10:57:59 +07:00
MasterPhi
4941cde175 Fix vendor fifo deadlock, add tud_vendor_n_read_flush 2021-08-22 13:26:50 +02:00
MasterPhi
69e539fda4 Fix CI. 2021-08-21 12:11:35 +02:00
MasterPhi
e20755442a nuc126: fix set_address & disable sof 2021-08-21 12:04:02 +02:00
Ha Thach
58477b71f2
Merge pull request #1035 from hathach/improve-host-stack
Improve host stack
2021-08-20 22:21:30 +07:00
hathach
beb1a5c678 minor clean up 2021-08-20 19:39:33 +07:00
hathach
22a5b1608c change host driver open return type to bool
the descriptor len used by driver will be calculated by usbh
2021-08-20 19:31:38 +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
62f2efbe8c hid host skip get report descriptor if too large instead of assert 2021-08-20 18:26:56 +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
Ha Thach
aab133ac69
Merge pull request #1027 from kkitayam/remove_redundant_from_renesas
Remove redundant SOF processing from the Renesas RX family.
2021-08-20 01:07:57 +07:00
kkitayam
ff59e98a6a Add compile switch to enable SOF during suspend only 2021-08-19 23:57:34 +09:00
kkitayam
351581537f Removes redundant SOF processing from the Renesas RX family.
The same logic regarding the resume signal was implemented by usbd.

See also: #1023
2021-08-19 22:51:10 +09:00
Ha Thach
219d186c4d
Merge pull request #1034 from hathach/group-f1
Group f1
2021-08-19 19:44:01 +07:00
hathach
eda5b92e92 whitespace 2021-08-19 19:13:47 +07:00
hathach
4b72ad9b9f add f1 to ci build 2021-08-19 18:54:53 +07:00
hathach
175a6fbc5f rename to stm32f103_bluepill 2021-08-19 18:53:55 +07:00
hathach
ebfd65a9ca add stm32f103 mini v2.0 board 2021-08-19 18:51:51 +07:00
hathach
1992f49343 group stm32f1 board 2021-08-19 18:02:16 +07:00
hathach
a9279ece33 merge waveshare to h7 family 2021-08-19 17:27:53 +07:00
Ha Thach
c4a9a04d67
Merge pull request #1025 from hathach/add-hid-boot-example
add hid_boot_interface example
2021-08-19 11:24:10 +07:00
Ha Thach
3a248951e2
Merge pull request #1024 from HiFiPhile/nuc
Fix nuc126 buffer copy with IAR
2021-08-18 19:14:03 +07:00
Ha Thach
830757d9ce
Merge pull request #1020 from hathach/rp2040-disconnect-suspend
Add Rp2040 suspend & resume support
2021-08-18 16:45:35 +07:00
hathach
3e8276846e correct usb memcpy for nuc120 as well 2021-08-18 16:38:13 +07:00
Ha Thach
0411810bc0
Merge pull request #1026 from hathach/suspend-resume-followup
skipped suspend/resume if not connected
2021-08-17 17:29:13 +07:00
hathach
9b869463dd skipped suspend/resume if not connected 2021-08-17 17:00:53 +07:00
hathach
c050612142 fix ci build 2021-08-17 13:33:15 +07:00
hathach
a6d18c400d fix keyboard report reserved is always 0 2021-08-17 13:29:26 +07:00
hathach
5f6418ccd7 add hid_boot_interface example 2021-08-17 13:21:24 +07:00
Ha Thach
7cbb11a86c
Merge pull request #992 from majbthrd/net_example_pbuf
net_lwip_webserver: utilize pbuf_copy_partial()
2021-08-17 11:56:54 +07:00
Mengsk
7aff4b178e use USBD_MemCopy. 2021-08-17 00:53:12 +02:00
Peter Lawrence
5a8ea0e0e2 net_lwip_webserver: further simplify pbuf_copy_partial() usage 2021-08-16 17:04:57 -05:00
Ha Thach
02277133ae
Merge pull request #1023 from hathach/nrf-suspend-resume
nRF52 Implement suspend, resume, remote wakeup
2021-08-16 20:40:56 +07:00
hathach
26d347be17 add note for renesas rx remote wakeup 2021-08-16 20:24:07 +07:00
hathach
ab2eec77d4 complete suspend, resume, remote wakeup for nrf52 2021-08-16 20:22:14 +07:00
Ha Thach
2bb63406e9
Merge pull request #959 from KarlK90/gd32vf103-support-tiny-usb
[PORT] Add GD32VF103 support and Sipeed Longan Nano Board support
2021-08-15 18:50:00 +07:00
hathach
c4a6a5ccb7 skip freertos example for gd32vf103 2021-08-15 17:56:04 +07:00
hathach
73f8fae036 change toolchain to riscv-none-embed-gcc-xpack for ci 2021-08-15 17:28:14 +07:00
hathach
37d9f940ee add gd32vf103 to riscv ci 2021-08-15 17:21:31 +07:00
hathach
09e4348adc move gd32vf103 to its own family 2021-08-15 17:19:25 +07:00
Ha Thach
48f17efa77
Merge pull request #1021 from tringis/fix-synopsys-change-addr
Fix dcd_set_address bug when called more than once
2021-08-14 01:59:38 +07:00
hathach
6af1950c8d
synopsys clear DAD on bus_reset 2021-08-14 01:51:13 +07:00
Tobias Ringström
0ec794376b Fix dcd_set_address bug when called more than once with different
addresses (e.g. after plugging the device into a different port).
2021-08-13 14:11:14 +02:00
Ha Thach
89e4586653
Merge pull request #1019 from kasjer/kasjer/da1469x-fix-no-vbus-startup
da1469x: Fix no VBUS startup
2021-08-13 17:02:21 +07:00
Ha Thach
ea1dfc1fd5
Merge pull request #956 from kkitayam/fix_audio_format_for_renesas_rx
add settings for Renesas RX family
2021-08-13 14:36:45 +07:00
hathach
d52b981c3a
revert ready() check in claim (do it later in separated PR) 2021-08-12 17:07:39 +07:00
hathach
17ef9f4843
add ready check for edpt claim 2021-08-12 15:54:04 +07:00
hathach
4ad47d9e26
bus_reset will reset all endpoints
allow for dynamic configuration as well as state-less enumeration
2021-08-12 15:40:26 +07:00
Jerzy Kasenberg
cde607338d da1469x: Fix no VBUS startup
For self powered device if device started without VBUS present
it would not be correctly attached to USB bus even if tusb_vbus_changed()
was later called.

This modifies dcd_init() so it starts USB state machine without checking
if VBUS is present or not, like all others drivers do.
tusb_vbus_changed() function is also removed its content was moved to dcd_init.
2021-08-12 09:12:25 +02:00
hathach
4f2999bc04
white space 2021-08-12 00:31:26 +07:00
hathach
88d4cb402d
simplify hw_endpoint_init() 2021-08-12 00:11:04 +07:00
hathach
a2baf9427d
more dcd clean up 2021-08-11 20:36:23 +07:00
hathach
979af6c2a8
clean up endpoint set/clear stall 2021-08-11 20:29:39 +07:00
hathach
f3a6e564ee
rp2040 enable suspend and resume interrupt 2021-08-11 20:06:57 +07:00
Ha Thach
63f7dfeb8e
Merge pull request #1013 from kasjer/kasjer/da1469x-fix-register-file-dependency
dcd_da1469x: Use mcu.h instead of MCU specific header
2021-08-11 19:38:46 +07:00
Jerzy Kasenberg
2c7bb540b4 dcd_da1469x: Use mcu.h instead of MCU specific header
dcd_da1469x can work with broader range of MCUs that
share same USB core.
Specific header file that was used DA1469xAB.h now it is changed
to mcu/mcu.h which includes actual MCU specific register file.
2021-08-10 20:26:51 +02:00
Ha Thach
a5b464c5ca
Merge pull request #1012 from hathach/fix-newline-keycode-usage
correct newline usage keycode (ENTER 0x28)
2021-08-10 17:09:09 +07:00
hathach
2ea0ef4543
correct newline usage keycode (ENTER 0x28) 2021-08-10 16:40:43 +07:00
Ha Thach
70b26b561a
Merge pull request #1011 from hathach/correct-hid-inout-example
Correct hid inout example
2021-08-10 16:06:50 +07:00
hathach
40afc8c5de
update node script to always shift dummy reportID like python
allow specify all product id with 0xFFFF in boards.js
2021-08-10 15:40:25 +07:00
Stefan Kerkmann
1b6540a61c Update systick reload value
The systick timer is driven by the AHB bus divided by 4, set the correct
reload value to generate a timer irq every ms.
2021-08-09 21:37:06 +02:00
hathach
312fd5f839 fix hid_test.py for hid inout to correctly preceeded with dummy reportID
add note for install hidapi on windows
2021-08-09 22:57:11 +07:00
Ha Thach
d2257db87f
Merge pull request #1004 from ctag-fh-kiel/master
STM32L151 portable driver adaptations
2021-08-09 16:07:42 +07:00
Robert Manzke
ea72d64992 STM32L151 portable driver adaptations 2021-08-08 08:30:52 +02:00
Stefan Kerkmann
27f147f421 Minor style changes 2021-08-07 14:08:18 +02:00
Stefan Kerkmann
8b78067cc1 Use linear buffer for GD32VF103
As the peripheral is the same as on the STM32F1 and STM32F4 lines we do the same.
2021-08-07 12:06:54 +02:00
Stefan Kerkmann
4cebde65ec Remove unnecessary define guard
The GD32VF103 family only has USB-OTG peripherals.
2021-08-07 12:00:13 +02:00
Stefan Kerkmann
0399996ee5 Code style changes 2021-08-07 11:33:36 +02:00
Stefan Kerkmann
66d566f8c0 Use functions provided by the nuclei-sdk hal 2021-08-07 11:33:36 +02:00
Stefan Kerkmann
60d03110f7 Correctly initialize and handle the system tick
Forgot to reload the systick timer in the irq handler
2021-08-07 11:33:36 +02:00
Stefan Kerkmann
1d2a57a9e1 Remove unsuitable clock configurations from init code
Only 48MHz, 72MHz, 96MHz and 120 MHz system clocks derived from an
external crystal are suitable for the usb peripheral, as the internal
oscillator is not stable enough. Also the usb-prescaler only supports
division by 1 (48MHZ), 1.5(72MHz), 2(96MHz) and 2.5(120Mhz).
120Mhz is also out of spec and not added here.
2021-08-07 11:33:36 +02:00
Stefan Kerkmann
733a362436 Use nuclei-sdk functions for init code
Instead of using the HAL functions we can just use the defines from the
board support for the longan nano that comes with the nuclei-sdk. Also
we move some includes and defines to the header file.
2021-08-07 11:32:06 +02:00
Stefan Kerkmann
6e287a7c5e Cleanup include paths and use linker files from nuclei-sdk 2021-08-07 09:51:56 +02:00
Stefan Kerkmann
b473923f42 Remove redundant linker files
We use the linker files provided by nuclei-sdk instead
2021-08-07 09:51:16 +02:00
Stefan Kerkmann
7682829820 Add correct endpoint count for GD32VF103
This controller family only supports USB FS with four endpoints
2021-08-07 09:01:01 +02:00
Stefan Kerkmann
c6d495d643 Remove dependencies to external libraries for the dcd driver
The core of tinyusb must be as independent as possible, we previously
relied on nuclei-sdk or the GD32VF103 firmware library for the synopsys
driver to work with the GD32VF103. Fortunatly we needed very few parts
from them so we implement them here.
2021-08-07 08:55:25 +02:00
Ha Thach
88f5c04fe0
Merge pull request #985 from HiFiPhile/same70
SAMx7x improvements
2021-08-06 11:32:57 +07:00
Ha Thach
b8055aeccf
Merge pull request #1000 from hathach/more-doc
More doc
2021-08-06 01:06:22 +07:00
hathach
6be2d46b53
update link to docs.tinyusb.org 2021-08-05 18:32:44 +07:00
hathach
188bc0e991
change webusb-serial landing page
- to example.tinyusb.org/webusb-serial/
- remove landing page from doc
2021-08-05 18:00:41 +07:00
MasterPhi
a698dda67e Minor fix. 2021-08-05 09:56:24 +02:00
hathach
b5d218e684
add html extra for webusb example 2021-08-05 14:06:08 +07:00
hathach
2b521e0c10
rename to .readthedocs.yaml
exclude all submodules for docs
2021-08-05 12:29:32 +07:00
Rafael Silva
82d73d3350
Merge pull request #997 from hathach/perigoso-readme-patch
readme: fix link to online documentation
2021-08-04 16:31:57 +01:00
Rafael Silva
546d869ffb
readme: fix link to online documentation 2021-08-04 16:25:01 +01:00
Ha Thach
623a775f78
Merge pull request #983 from perigoso/docs
Docs
2021-08-04 22:20:22 +07:00
Stefan Kerkmann
3eb54d878a Add stm32 license header 2021-08-03 20:21:06 +02:00
Stefan Kerkmann
ab1979e2d3 Revert "Disable -Werror for now"
This reverts commit 5e0c2e122300e7a6289b3bd08044f9cf1dbdef05.
2021-08-03 20:01:10 +02:00
Stefan Kerkmann
e5bd6bdeff Update nuclei-sdk with __riscv_flen fix 2021-08-03 20:01:10 +02:00
Stefan Kerkmann
790d90bf26 Set FreeRTOS to RISC-V (doesn't compile) 2021-08-03 20:01:10 +02:00
Stefan Kerkmann
23e3b1680b Use JTAG for jlink flashing 2021-08-03 20:01:10 +02:00
Stefan Kerkmann
3db2089aa9 Minor clean ups 2021-08-03 20:00:39 +02:00
Stefan Kerkmann
771bbe8af7 Use https github as submodule 2021-08-03 20:00:39 +02:00
Stefan Kerkmann
ddb83787a0 Disable -Werror for now
Without having __riscv_flen defined we get multiple warinings. But
defining it causes the startup code to contain floating point instructions.
This results in a exception right after booting.

See startup_gd32vf103.S lines 289-294 should open a PR at nuclei sdk
2021-08-03 20:00:39 +02:00
Stefan Kerkmann
19b971cb24 Add board support for gd32vf103 longan nano 2021-08-03 20:00:39 +02:00
Stefan Kerkmann
2657560b63 Add hacky GD32VF103 support 2021-08-03 20:00:35 +02:00
hathach
6805c9d734 add back info to readme, use stack.svg 2021-08-03 18:25:02 +01:00
Peter Lawrence
b682ce916a net_lwip_webserver: utilize pbuf_copy_partial() 2021-08-02 20:52:45 -05:00
HiFiPhile
bece3bca08
Add @HiFiPhile in CONTRIBUTORS.rst 2021-08-02 20:20:23 +02:00
Ha Thach
af8e5a90f4
Merge pull request #991 from hathach/fix-midi-available
correct midi available with already stream read
2021-08-02 19:25:24 +07:00
hathach
794bbd7177 fix warning 2021-08-02 18:58:27 +07:00
hathach
98e4ba6a12 correct midi available with already stream read 2021-08-02 18:55:12 +07:00
Ha Thach
8a48e994b6
Merge pull request #874 from kkitayam/add_xfer_fifo_for_rx63
Add dcd_edpt_xfer_fifo() for RX63N
2021-08-02 17:12:20 +07:00
kkitayam
45e55a8ea0 fix: D0FIFOSEL setting was incorrectly when big-endian is selected.
In pipe_xfer_in(), the endianness setting of D0FIFOSEL was lacking due to refactoring.
And add type cast operation to avoid warnings by CCRX.
2021-07-31 12:20:19 +09:00
MasterPhi
383290a634 Move register define to separate header. 2021-07-30 21:15:58 +02:00
perigoso
1a27dad7bb docs/supported: add Waveshare OpenH743I-C to board support list
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:48:08 +01:00
perigoso
0e6e137f5d readme: add local links to documentation
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
a6ae310f5f readme: convert md readme to rst
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
83d72cc1d5 docs/contributors: add credit for docs
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
0da08031ea readme: added docs status badge
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
f900a3ba7f docs: remove doxygen files
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
37e2342086 readme: remove redundant info, and point to new docs
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
358d781162 docs: update main index
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
37c56d677a docs: add local copy of stackup image, with added backround
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
8e791c118c docs: add info section index
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
21e3fca4be docs: add list of projects that use Tusb
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
42f551ec54 docs: add supported devices list
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
ff3c01ecc2 docs: move contributors to info section
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
a183e5a72b docs: add structure doc
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
e2d05bff93 docs: add contributing section index
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
f4f1e1f06f docs: port porting doc to rst
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
62049089ba docs: add reference section index
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
106924be9a docs: port getting started doc to rst
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
9d3e1aaafc docs: port concurrency doc to rst
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
1bbac1c818 changelog: move from root to docs subdirectory
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
4fde6a81d9 docs: symbolic link to changelog file for use in documentation
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
883040e88e changelog: create changelog file and import from release
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
d9518eb337 docs: symbolic link to code of conduct file for use in documentation
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
a8c9d999c7 code_of_conduct: refactor file from markdown to restructuredtext
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
c4c0c987e8 docs: symbolic link contributors file for use in documentation
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
f424765514 contributors: refactor contributors file from markdown to restructuredtext
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
27a9a7d7f1 readme: use new svg logo
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:30 +01:00
perigoso
51c2240efa docs: add readthedocs config
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:29 +01:00
perigoso
665c9c996a docs: add new svg logo
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:29 +01:00
perigoso
bf99adc3c9 docs: setup sphinx docs
Signed-off-by: perigoso <perigoso@riseup.net>
2021-07-30 12:46:15 +01:00
MasterPhi
c4cd36980d Add cache clean/invalidate. 2021-07-30 12:07:23 +02:00
MasterPhi
8b5625bf4e Move clock enable to BSP. 2021-07-30 12:07:23 +02:00
kkitayam
ff20e4d6bc add the entry for RX72N 2021-07-29 20:45:51 +09:00
kkitayam
3c3563288d add RX65N 2021-07-29 20:24:12 +09:00
kkitayam
6b9f8e454e add a condition regarding OPT_MCU_RX63N 2021-07-29 20:24:12 +09:00
kkitayam
e7c9cf4aea Change the accessing method of TU_FIFO from read/write_n_const_addr_full_words to get_write/read_info and advance_write/read_pointer pairs. 2021-07-29 20:24:11 +09:00
kkitayam
3f49380b37 added support for dcd_edpt_xfer_fifo 2021-07-29 20:22:33 +09:00
kkitayam
1c2e353193 Refactor and clean up 2021-07-29 20:22:33 +09:00
Ha Thach
c552677a52
Merge pull request #980 from BennyEvans/master
Waveshare OpenH743I-C BSP
2021-07-29 17:12:42 +07:00
Ha Thach
fa00377d93
Merge pull request #859 from Wini-Buh/CCRX_Port
Adaptations for Renesas CCRX toolchain and Rx72N controller performed
2021-07-29 16:13:13 +07:00
Ha Thach
aca24ed481
Merge pull request #982 from HiFiPhile/dfu_warning
Fix IAR warning
2021-07-29 13:50:13 +07:00
MasterPhi
0ba4315ae5 Fix IAR warning 2021-07-27 18:08:52 +02:00
Ben Evans
0953be9d7f Small tidy up for waveshare openh743i BSP. 2021-07-27 12:07:19 +10:00
Ben Evans
d058645f97 Updated docs to add Wavehsare OpenH743I-C to STM32 boards list. 2021-07-27 12:02:13 +10:00
Ben Evans
f01074681a Added BSP for waveshare openh743i. 2021-07-27 11:58:20 +10:00
Ha Thach
b6b5a33806
Merge pull request #976 from hathach/readme
Quick Readme update
2021-07-23 18:15:36 +07:00
HiFiPhile
ef63037f1a
Update README.md
Use SAME7x
2021-07-23 11:21:51 +02:00
HiFiPhile
a9726aad0c
Quick Readme update 2021-07-22 20:39:55 +02:00
hathach
15112fdbba clean up compiler 2021-07-22 22:10:48 +07:00
hathach
8cd23489d5 update endian 2021-07-22 17:49:39 +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
b35ad6edcb clean up max packet size endian 2021-07-22 17:04:55 +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
9542fcdbcd rename CFG_TUD_DFU_TRANSFER_BUFSIZE to CFG_TUD_DFU_XFER_BUFSIZE 2021-07-22 01:00:06 +07:00
Ha Thach
e971a4332d
Merge pull request #975 from hathach/max-endpoint
Add DCD Attribute for Max endpoint
2021-07-22 00:49:45 +07:00
hathach
aff7b100ca update dcd attr for samx7x 2021-07-22 00:28:37 +07:00
hathach
8ee1141a70 correct check 2021-07-22 00:12:01 +07:00
hathach
a9f3532252 more ci 2021-07-22 00:12:01 +07:00
hathach
37cac414f8 fix ci 2021-07-22 00:12:01 +07:00
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
Ha Thach
c737aa6fbb
Merge pull request #693 from HiFiPhile/dcd_same70
SAMx7x (E70, S70, V70, V71) DCD Support
2021-07-22 00:07:33 +07:00
MasterPhi
b192dc0738 Update EPNUM in usb_descriptors.c 2021-07-21 14:18:47 +02:00
MasterPhi
8c6cd5396c Fix non-DMA IN irq. 2021-07-21 10:50:07 +02:00
MasterPhi
5492d9148c Re-enable SETUP irq on EP0 stall. 2021-07-21 10:29:47 +02:00
MasterPhi
9c26c0c01e Remove redundant TX irq. 2021-07-21 09:42:26 +02:00
MasterPhi
eec927ea95 Fix EP0 issue (again) 2021-07-21 00:28:51 +02:00
MasterPhi
fa9a327a71 Workaround of EP0 issue, clean up. 2021-07-20 13:24:39 +02:00
MasterPhi
895c913aa9 Merge branch 'dcd_same70' of https://github.com/HiFiPhile/tinyusb into dcd_same70 2021-07-19 22:04:34 +02:00
MasterPhi
75f61328ea Remove clock init. 2021-07-19 22:03:47 +02:00
Ha Thach
ecd217d163
Merge pull request #969 from BennyEvans/master
Fix for dcd_synopsys driver integer overflow in HS mode (issue #968).
2021-07-19 16:22:53 +07:00
Ben Evans
cee980c598 Fix for dcd_synopsys driver integer overflow in HS mode (issue #968). 2021-07-19 17:45:12 +10:00
hathach
05f59fb8ed clean up warning 2021-07-19 12:08:01 +07:00
MasterPhi
8cae17bfc8 Fixing NAKed OUT xfer 2021-07-19 01:07:33 +02:00
MasterPhi
d0dd3c77ff Use USBHS_Handler 2021-07-18 22:03:45 +02:00
MasterPhi
f52e1889c7 Fix merge error. 2021-07-17 20:44:44 +02:00
MasterPhi
bae0d3b7bb Fix build error. 2021-07-17 14:42:23 +02:00
MasterPhi
7e3e41952f Fix ISO support. 2021-07-17 13:48:21 +02:00
HiFiPhile
b194aa240b
Merge branch 'master' into dcd_same70 2021-07-17 12:10:35 +02:00
MasterPhi
475742984f Change OPT_MCU_SAMX7X value. 2021-07-17 12:09:20 +02:00
Ha Thach
21bfd11683
Merge pull request #967 from perigoso/used-in-project
Add openinput to the 'Uses' section (aka projects that use Tusb)
2021-07-17 13:35:34 +07:00
Rafael Silva
392e16af4d readme: add openinput to the 'Uses' section
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2021-07-16 23:03:17 +01:00
hathach
4e817ae6d4 revert unrelated midi exmample 2021-07-16 21:11:43 +07:00
hathach
84bd863cf5 revert debug midi changes 2021-07-15 21:13:44 +07:00
hathach
6acaa94b32 fix warnings 2021-07-15 21:09:05 +07:00
hathach
406832158d skip lto for samd11 build 2021-07-15 21:08:10 +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
b4fde90b55 update clear status and get state 2021-07-14 17:03:20 +07:00
hathach
6a68fc6997 update dfu abort 2021-07-14 16:51:28 +07:00
hathach
95ded08e3b simplify upload request 2021-07-14 16:42:12 +07:00
hathach
5b965a3888 more rename and update 2021-07-14 15:52:38 +07:00
hathach
27676f738d rename tud_dfu_reboot_cb() to tud_dfu_detach_cb() 2021-07-14 15:31:20 +07:00
hathach
57d9f696a2 clean up 2021-07-14 15:24:09 +07:00
hathach
ac8d0abecf rename dfu API
- tud_dfu_dnload_complete() -> tud_dfu_download_complete()
- tud_dfu_req_dnload_data_cb() -> tud_dfu_download_cb()
- tud_dfu_req_upload_data_cb() -> tud_dfu_upload_cb()
2021-07-14 15:04:38 +07:00
Ha Thach
184f1b723f
Merge pull request #965 from hathach/fix-midi-data
Fix midi data
2021-07-13 21:43:04 +07:00
hathach
ebd98e1a18 fix midi stream write return value (off by 1) 2021-07-13 21:09:23 +07:00
hathach
137dff620b add option to silent a driver log 2021-07-13 20:41:28 +07:00
hathach
86d511f244 rename tud_dfu_set_timeout_cb() to tud_dfu_get_status_cb()
also add state as argument
2021-07-12 21:08:13 +07:00
hathach
8c48a4a288 clean up 2021-07-12 20:23:19 +07:00
hathach
389d340678 clean up 2021-07-12 20:17:44 +07:00
hathach
680b000bd1 simplify TUD_DFU_DESCRIPTOR with alternate count
remove CFG_TUD_DFU_ALT_COUNT since there is only one DFU functional
descriptor
2021-07-12 20:15:59 +07:00
hathach
2916cd4575 rename TUD_DFU_MODE_DESCRIPTOR to TUD_DFU_DESCRIPTOR 2021-07-12 18:51:57 +07:00
hathach
134ed995c8 add alt to tud_dfu_abort_cb() 2021-07-12 18:50:19 +07:00
hathach
a0691a4fd4 update dfu_moded_open 2021-07-12 18:48:33 +07:00
hathach
10a7e0502a Merge branch 'dfu' of https://github.com/HiFiPhile/tinyusb into HiFiPhile-dfu 2021-07-12 17:50:11 +07:00
kkitayam
2e0d7e87d0 add settings for Renesas RX family 2021-07-08 21:57:28 +09:00
Mengsk
2147a31f25 Fix wrong blocknum and length 2021-07-08 01:10:02 +02:00
Mengsk
5b4b5ca533 Add bwPollTimeout set callback, postpone download callback after GETSTATUS 2021-07-08 00:25:12 +02:00
HiFiPhile
7e883e0f41 Refactor with one DFU functionnal descriptor 2021-07-07 19:01:00 +02:00
Mengsk
941b02c6a9 Reactor to one functional descriptor. 2021-07-07 18:02:04 +02:00
Mengsk
71c0043261 TU_ASSERT return 0. 2021-07-07 12:18:25 +02:00
Mengsk
3949fb9e8c Add DFU_DETACH support 2021-07-07 12:12:52 +02:00
Mengsk
88478594bc Update comment 2021-07-07 12:06:41 +02:00
Mengsk
bc49ee7f2f Better alt settings support 2021-07-07 11:55:36 +02:00
MasterPhi
cf4220a9fb Update 2021-07-06 18:04:24 +02:00
Ha Thach
ecb100a62f
Merge pull request #938 from HiFiPhile/uac_example
Bug fix and Enhancements of UAC2
2021-07-06 22:57:48 +07:00
MasterPhi
72f916423e Fix copy byte count 2021-07-06 10:56:13 +02:00
MasterPhi
82d355aefe - Remove alt_setting alignment 2021-07-06 00:25:00 +02:00
MasterPhi
05a1b854ff ENCODE -> DECODE 2021-07-05 21:00:37 +02:00
Mengsk
c2b9ac9dd4 Fix ATTR_MANIFESTATION_TOLERANT logic. 2021-07-05 17:57:23 +02:00
Mengsk
c2d8ed3fd1 Add alt settings support in DFU class. 2021-07-05 17:56:21 +02:00
Ha Thach
4468b14580
Merge pull request #949 from kkitayam/add_suspend_and_resume_for_rx_family
Add SUSPEND/RESUME handling for Renesas RX family.
2021-07-05 20:46:11 +07:00
kkitayam
1ff3b76451 remove unnecessary blocking operation.
add comments why resume event is sent manually.
2021-07-05 21:27:08 +09:00
Ha Thach
2ae19ce40d
Merge pull request #913 from xmos-jmccarthy/master
Add dfu function memory access protection
2021-07-05 12:51:07 +07:00
hathach
dfe410ea8b fix ci build, address review comment 2021-07-05 12:38:15 +07:00
hathach
227dd2d40a Merge branch 'master' of https://github.com/xmos-jmccarthy/tinyusb into xmos-jmccarthy-master 2021-07-05 12:33:11 +07:00
MasterPhi
b68c65faee Skip MCU 2021-07-04 20:47:51 +02:00
MasterPhi
03f9028e9e Merge branch 'uac_example' of https://github.com/HiFiPhile/tinyusb into uac_example 2021-07-04 19:56:35 +02:00
MasterPhi
e2617dc91a Skip MCU 2021-07-04 19:56:13 +02:00
Ha Thach
0a230d57ee
Merge pull request #931 from hathach/more-hid-host
More hid host update
2021-07-05 00:23:56 +07:00
MasterPhi
98d921c4b3 Better handling tud_audio_set_itf_cb with FB. 2021-07-04 15:46:13 +02:00
MasterPhi
1c8b685457 Move audio_control_request_t to audio.h 2021-07-04 15:46:12 +02:00
MasterPhi
61fd0e2c1c Delay tud_audio_set_itf_cb call with feedback EP. 2021-07-04 15:46:12 +02:00
MasterPhi
090859bf42 Fix speed detection 2021-07-04 15:46:12 +02:00
MasterPhi
449936c0f1 more uac fixes, 2021-07-04 15:46:12 +02:00
MasterPhi
8a42cb3661 Prevent overflow noise 2021-07-04 15:46:12 +02:00
MasterPhi
3cc2227810 Partially revert "skip uac2_headset for mcu that does not have enough sram"
This reverts commit 6e1f812e35.
2021-07-04 15:46:12 +02:00
MasterPhi
5f67e5c1e9 Clear FIFO only if enabled...
Add buffer align
2021-07-04 15:46:11 +02:00
hathach
8d1a88cab6 skip uac2_headset for mcu that does not have enough sram 2021-07-04 15:46:11 +02:00
MasterPhi
5b7795be4b Add 24bit loopback in example. 2021-07-04 15:46:11 +02:00
MasterPhi
204f3152cb audio_device : clear fifo on intf change. 2021-07-04 15:46:11 +02:00
MasterPhi
a1639b0279 Refactor descriptor, add alt settings support. 2021-07-04 15:46:11 +02:00
MasterPhi
325742acb4 Fix typo 2021-07-04 15:46:11 +02:00
MasterPhi
6e9da70c18 Fix audiod_get_AS_interface_index in audio class.
Enhance uac2_headset example with multiple sample rates.
Add macro to calculate EP size.
2021-07-04 15:46:10 +02:00
MasterPhi
fa2320d837 Better handling tud_audio_set_itf_cb with FB. 2021-07-04 15:13:19 +02:00
MasterPhi
e4ae81abd8 Move audio_control_request_t to audio.h 2021-07-04 00:19:33 +02:00
kkitayam
3019c6eb40 Add SUSPEND/RESUME handling for Renesas RX family. 2021-07-03 23:35:58 +09:00
MasterPhi
12747b61d5 Delay tud_audio_set_itf_cb call with feedback EP. 2021-07-03 10:54:20 +02:00
MasterPhi
fdbbe5df3f Fix speed detection 2021-07-02 23:44:46 +02:00
MasterPhi
01fe67be2d more uac fixes, 2021-07-02 21:51:54 +02:00
Ha Thach
681a61d479
Merge pull request #941 from kkitayam/fix_rtt_for_rx_family
Add support for RTT logging by NEWLIB on Renesas RX family.
2021-07-02 14:43:49 +07:00
hathach
8de33ca557 Merge branch 'master' into kkitayam-fix_rtt_for_rx_family 2021-07-02 14:10:31 +07:00
Ha Thach
896388d796
Merge pull request #942 from hathach/hid-set-report
Better Support Hid Get/Set report
2021-07-02 13:02:29 +07:00
kkitayam
ea9ec1fb43 extend stack areas to enable logging
add dummy functions to avoid warnings when logging is enable
remove codes regarding OPTLIB
2021-07-02 11:37:23 +09:00
MasterPhi
eb02b406d8 Prevent overflow noise 2021-07-01 21:41:19 +02:00
hathach
2b3d547b7b clean up 2021-07-01 23:05:21 +07:00
hathach
6de023d54b update hid_composite freertos with capslock as well 2021-07-01 22:54:57 +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
MasterPhi
8571508b3f Partially revert "skip uac2_headset for mcu that does not have enough sram"
This reverts commit 6e1f812e35.
2021-07-01 12:59:26 +02:00
MasterPhi
0e7abfcf17 Clear FIFO only if enabled...
Add buffer align
2021-07-01 12:02:57 +02:00
MasterPhi
6c9a976604 Merge branch 'uac_example' of https://github.com/HiFiPhile/tinyusb into uac_example 2021-07-01 11:39:27 +02:00
MasterPhi
e0a7752fc3 Add 24bit loopback in example. 2021-07-01 11:39:15 +02:00
MasterPhi
ee6cf744eb audio_device : clear fifo on intf change. 2021-07-01 11:38:06 +02:00
hathach
6e1f812e35 skip uac2_headset for mcu that does not have enough sram 2021-07-01 14:09:17 +07:00
MasterPhi
f7519d805e Refactor descriptor, add alt settings support. 2021-07-01 00:35:27 +02:00
MasterPhi
9b93145a79 Fix typo 2021-07-01 00:35:26 +02:00
MasterPhi
4ec96c02a6 Fix audiod_get_AS_interface_index in audio class.
Enhance uac2_headset example with multiple sample rates.
Add macro to calculate EP size.
2021-07-01 00:35:26 +02:00
Ha Thach
9b3ec69b27
Merge pull request #940 from HiFiPhile/fifo_fix
Fix fifo overflow correction.
2021-07-01 02:25:23 +07:00
MasterPhi
74b51d43e1 Add test CI. 2021-06-30 20:30:03 +02: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
Wini-Buh
4c0cce4b1d Make toolchain dependency more consistent 2021-06-29 21:45:18 +02:00
Ha Thach
3b539fdd8d
Merge pull request #905 from HiFiPhile/uac_fix
UAC fixes
2021-06-29 22:34:57 +07:00
Ha Thach
dc25a5fb97
Merge pull request #934 from hathach/poison-obsolete-callback
add tud_vendor_control_request_cb() to poisoned list
2021-06-29 18:00:09 +07:00
hathach
3eec011a7c add tud_vendor_control_request_cb() to poisoned list 2021-06-29 17:28:35 +07:00
Ha Thach
f1af90d8eb
Merge pull request #933 from hathach/update-rx65n-bsp
rename rx65n cloud kit to target
2021-06-29 16:52:16 +07:00
hathach
b2fa7358cf fix typo 2021-06-29 16:38:38 +07:00
hathach
2d423514ee rename rx65n cloud kit to target
adding note for adding jlink support for rx65n_target board
2021-06-29 16:33:32 +07:00
MasterPhi
5877f20d4b Fix IAR compile error on pointer type.
Clean up warnings.

Signed-off-by: MasterPhi <admin@hifiphile.com>
2021-06-29 10:57:26 +02:00
Wini-Buh
36ba9608bd Merge from current master. Fixed a compilation error with the GNUC toolchain 2021-06-29 00:43:41 +02: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
hathach
36d2214e39 fix warnings 2021-06-29 00:14:01 +07:00
hathach
c172caa288 clean up 2021-06-29 00:03:34 +07:00
hathach
efc12ae7d4 fix SET_PROTOCOl, update hid host behavior for default boot interface 2021-06-28 23:57:57 +07:00
hathach
268dcc8d20 fix issue with weird msc device with 3 endpoints 2021-06-28 17:39:57 +07:00
hathach
58d3e8c08b update func comment 2021-06-28 17:39:57 +07:00
hathach
c99b70c08c force boot protocol for keyboard/mouse 2021-06-28 17:39:57 +07:00
hathach
5811122cfd change usbh open driver to have max_len and return driver len 2021-06-28 17:39:57 +07: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
Ha Thach
e3cca973ec
Merge pull request #928 from hathach/house-keeping
House keeping
2021-06-28 17:02:02 +07:00
hathach
3a2317b7dc bug form update 2021-06-28 16:40:30 +07:00
hathach
e6d6299706 more bug form template 2021-06-28 16:39:31 +07:00
hathach
3465cbd839 more bug form update 2021-06-28 16:37:13 +07:00
hathach
ddcd657e40 more fixing 2021-06-28 16:33:21 +07:00
hathach
903e699273 fixing bug form 2021-06-28 16:30:38 +07:00
hathach
b6f226dbaa comment out esp32s3 ci due to USB0 not defined in IDF linker 2021-06-28 16:25:28 +07:00
hathach
35eaa4a4e3 Use bug report form 2021-06-28 16:25:22 +07:00
hathach
01987ef86c merge saml21 + saml22 = saml2x 2021-06-28 14:37:41 +07:00
hathach
7e449b710e rename bsp saml22 to saml2x 2021-06-28 14:06:13 +07:00
Ha Thach
b2feae15e4
Merge pull request #927 from hathach/add-rx65n-board
Add rx65n board
2021-06-28 13:53:42 +07:00
hathach
07e6a0e870 reduce esp32s2 board to ci 2021-06-28 13:13:00 +07:00
hathach
856dc0bab9 update doc and clean up 2021-06-28 12:59:53 +07:00
hathach
e3b1110cce rename rx63n to simply rx 2021-06-28 12:51:11 +07:00
hathach
8c4641fc05 refactor rx6x bsp 2021-06-28 12:49:30 +07:00
hathach
17137bbfff fix rx65n with freertos build 2021-06-28 12:35:12 +07:00
hathach
ec9bfe0333 update renesas rx submodule 2021-06-28 12:27:20 +07:00
Ha Thach
807231d184
Merge pull request #922 from kkitayam/add-rx65n-board
Update some settings for rx65n board
2021-06-28 01:12:25 +07:00
kkitayam
239ecadeca add options for e2l 2021-06-27 23:39:50 +09:00
Ha Thach
d5c9de03a2
Merge pull request #923 from DuMaM/patch-1
GCC 11 build fix for nrf5x
2021-06-27 11:30:12 +07:00
DuMaM
b5ce269675
GCC 11 build fix
During Adafruit Bootloader compilation, I spotted bellow error which do not allow me build project.

``` c
    inlined from 'hfclk_running' at lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c:785:13:
lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c:792:31: error: 'is_running' may be used uninitialized [-Werror=maybe-uninitialized]
  792 |     return (is_running ? true : false);
      |            ~~~~~~~~~~~~~~~~~~~^~~~~~~~
```
2021-06-26 17:03:46 +02:00
kkitayam
393a9120ac add the entry for RX65N 2021-06-26 23:09:18 +09:00
kkitayam
511b2d47d1 add handling for software configurable interrupts. 2021-06-26 22:42:27 +09:00
kkitayam
60fedaa050 fix baudrate setting 2021-06-26 21:13:35 +09:00
MasterPhi
64f53c304c Merge branch 'local' of https://github.com/HiFiPhile/tinyusb into dcd_same70 2021-06-24 21:35:06 +02:00
Mengsk
b9e9773d04 fix warning 2021-06-24 12:58:18 +02:00
Mengsk
9d6fd78b63 Add fifo helper function to CDC class for DMA transfer. 2021-06-24 11:34:29 +02:00
Jeremiah McCarthy
f5f087b2f8 Add dfu function memory access protection
Adds TU_VERIFY to dfu internal buffer access from host.

Adds TU_ASSERT to dfu internal buffer access by application.
2021-06-23 10:58:18 -04:00
Wini-Buh
970da35fb3 Merge branch 'CCRX_Port' of https://github.com/Wini-Buh/tinyusb into CCRX_Port 2021-06-23 00:07:56 +02: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
Wini-Buh
8911638075
Merge branch 'hathach:master' into CCRX_Port 2021-06-22 23:17:23 +02:00
kkitayam
dccb3b1a46 change stdio channel to SCI5 from SCI0.
change ports settings for LED and button.
add PLL setting for 240MHz based on HOCO into HardwareSetup().
2021-06-22 00:20:08 +09:00
Ha Thach
5a4fc1151a
Merge pull request #907 from salkinium/fix/tuh_config_typo
Fix typo in TUH configuration define
2021-06-21 12:23:52 +07:00
Niklas Hauser
264dc35b95 Fix typo in TUH configuration define 2021-06-21 05:32:43 +02:00
Ha Thach
e45b6dbc1c
Merge pull request #906 from hathach/fix-midi
fix issue when calling midi API when not enumerated yet
2021-06-21 00:14:58 +07:00
hathach
9323a9d094 fix issue when calling midi API when not enumerated yet 2021-06-21 00:00:46 +07:00
MasterPhi
8433f638e6 Add bracket to switch case, fix warning. 2021-06-20 15:39:47 +02:00
hathach
fbda7d5837 adding rx65n 2021-06-20 15:04:39 +07:00
Ha Thach
81fa9966de
Merge pull request #895 from ElectronicCats/master
add support SAML21
2021-06-20 01:01:00 +07:00
hathach
7dce27c732 fix build with saml21, update microchip driver submodule 2021-06-19 16:21:14 +07:00
Ha Thach
03643d551d
Merge pull request #899 from Product-Creation-Studio/ned-pcs/fix-initializer
Changed order of struct initializer to avoid compiler error
2021-06-19 14:32:42 +07:00
Ned Konz
76336a67a0 Changed order of struct initializer to avoid compiler error 2021-06-18 14:50:55 -07:00
Ha Thach
df0cda2d7a
Merge pull request #898 from hathach/fix-nrf-control-bulk-race-condition
fix nrf52 race condition with TASKS_EP0RCVOUT
2021-06-19 02:23:09 +07:00
hathach
6b621baeb3 fix race condition with control since TASKS_EP0RCVOUT also require EasyDMA 2021-06-19 01:58:27 +07:00
sabas1080
1b33504e14 add saml21 to CI 2021-06-18 11:11:26 -05:00
hathach
82618d2d5f fix build with mm32 board 2021-06-18 17:18:11 +07:00
hathach
5006b1065a remove duplicate mm32 dcd 2021-06-18 12:49:41 +07:00
zhangslice
0ae83458d5 dsp updata
Signed-off-by: zhangslice <1304224508@qq.com>
2021-06-18 12:46:27 +07:00
hathach
85f8047ac4 remove the keil zip 2021-06-18 12:46:27 +07:00
zhangslice
7b27607f1a mit license
Signed-off-by: zhangslice <1304224508@qq.com>
2021-06-18 12:46:27 +07:00
hathach
b8ac5f1287 add mindmotion mm32sdk as submodule
remove the local copy of mm32
2021-06-18 12:46:27 +07:00
zhangslice
373b977cc3 add keil projrct
Signed-off-by: zhangslice <1304224508@qq.com>
2021-06-18 12:46:27 +07:00
zhangslice
3ba72b53d8 Add MM32 SDK and USB driver
Signed-off-by: zhangslice <1304224508@qq.com>
2021-06-18 12:46:27 +07:00
hathach
832d22d7ad force single buffered for device mode, out endpoint 2021-06-17 01:55:35 +07:00
MasterPhi
30fff56aa4 Revert "Use byte copy.", add barrier after buffer write.
Signed-off-by: MasterPhi <admin@hifiphile.com>
2021-06-16 00:18:38 +02:00
MasterPhi
67a6560ec9 Default use dual bank for FS, use dcd irq switch. 2021-06-15 21:52:14 +02:00
MasterPhi
6cc702e9ec Prevent buffer overflow.
Signed-off-by: MasterPhi <admin@hifiphile.com>
2021-06-15 21:16:51 +02:00
MasterPhi
54dc694be4 Use byte copy. 2021-06-15 19:11:53 +02:00
MasterPhi
ca8e8041ef Fix resume, always init FS clock.
Signed-off-by: MasterPhi <admin@hifiphile.com>
2021-06-15 17:53:09 +02:00
sabas1080
7bed7d70f0 add support SAML21 2021-06-15 00:01:28 -05:00
hathach
5c567129ea fix calculating xferred bytes with double buffer with short packet on buffer0 2021-06-13 18:30:26 +07:00
hathach
f38c460433 fix ep tx with double buffered 2021-06-13 17:19:14 +07:00
hathach
bd039c8d37 fix build with log for device 2021-06-13 16:16:25 +07:00
hathach
1af64f9729 remove sent_setup from hw endpoint 2021-06-13 15:31:00 +07:00
hathach
289ccf3c93 remove dev_ep_map 2021-06-13 13:19:20 +07:00
Ha Thach
2b5bad7362
Merge pull request #889 from kilograham/master
Make examples standalone buildable via CMake
2021-06-12 23:16:57 +07:00
hathach
e4da606164 set TOP to build with esp32sx 2021-06-12 23:02:41 +07:00
MasterPhi
85fc423569 Rename SAM7X to SAMX7X
Signed-off-by: MasterPhi <admin@hifiphile.com>
2021-06-12 12:36:59 +02:00
MasterPhi
f039607afc Fix indent.
Signed-off-by: MasterPhi <admin@hifiphile.com>
2021-06-12 11:19:08 +02:00
hathach
a4ad064e63 increase example CFG_TUH_HID from 2 to 4 2021-06-12 14:20:09 +07:00
Rafael Silva
0066e2b344 examples: freertos: add skip for same70
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2021-06-12 00:18:26 +01:00
Rafael Silva
776a770947 dcd: sam7x: rename family dcd to include the whole family
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2021-06-12 00:09:24 +01: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
Rafael Silva
2196991df3 dcd: same70: trim trailling spaces
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2021-06-11 21:03:36 +01:00
Rafael Silva
28875c431b bsp: same70_xplained: replace template vars from make
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2021-06-11 21:02:23 +01:00
Rafael Silva
71aae2743c bsp: same70_xplained: fix unused variable warning
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2021-06-11 21:01:12 +01:00
Rafael Silva
bcd3e31bd6 dcd: same70: fix unused variable warning
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2021-06-11 20:59:48 +01:00
Rafael Silva
9a03ab9dfa dcd: same70: change cmsis deprecated macros
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2021-06-11 20:52:22 +01:00
hathach
910e11a8ab fix ci build 2021-06-11 19:04:16 +07:00
hathach
dfe5a727c6 log clean up 2021-06-11 18:54:09 +07:00
hathach
b39faa15ef map pico_info to log2, pico_trace to log3 2021-06-11 18:44:08 +07:00
hathach
a6d22f5a68 replace pico_warn by log level 1 2021-06-11 18:40:01 +07:00
hathach
66c8a13f13 remove unused variable in hw endpoint
last_buf, buf_sel, transfer_size
2021-06-11 18:26:41 +07:00
hathach
93cb2ff4cf more refactor double buffered rp2040 2021-06-11 18:16:13 +07:00
hathach
1d48320d8a rename hw endpoint
- total_len to remaining_len
- len to xferred_len
2021-06-11 17:58:29 +07:00
hathach
5d6e381ef6 refactor rp2040 usb
- make _hw_endpoint_xfer_sync and _hw_endpoint_start_next_buffer private
- drop prefix _ from _hw_endpoint_xfer_continue and
_hw_endpoint_reset_transfer
2021-06-11 17:34:51 +07:00
MasterPhi
c291deccfa Add fifo & DMA linked list mode support. 2021-06-11 12:17:11 +02:00
HiFiPhile
24de9d39af Format. 2021-06-11 12:17:11 +02:00
HiFiPhile
1dafcd1132 - Add Full Speed switch
- Add DMA support
- Add Dual bank support

Signed-off-by: HiFiPhile <admin@hifiphile.com>
2021-06-11 12:17:11 +02:00
HiFiPhile
4f4a33b378 Seems like fixed ep0 issues, code format.
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2021-06-11 12:17:11 +02:00
HiFiPhile
e7bee80948 Add OPT_MCU_SAME70 option value. 2021-06-11 12:17:11 +02:00
HiFiPhile
f8aa4b3ff3 Add sketchy SAME70 DCD driver. 2021-06-11 12:17:10 +02:00
hathach
572d986a02 improve usbh 2021-06-11 17:14:22 +07:00
hathach
a1a03c92f6 double buffered work with host 2021-06-11 17:05:49 +07:00
hathach
43656dc0a7 more clean up 2021-06-10 23:29:02 +07:00
graham sanderson
fd7b18a4f6 Make examples standalone buildable via CMake 2021-06-10 10:11:20 -05:00
hathach
cf0a475a2e clean up 2021-06-10 22:00:59 +07:00
Ha Thach
b34724215b
Merge pull request #887 from hathach/host-update
Host API clean up
2021-06-10 17:42:43 +07:00
hathach
c9d66dcd5f remove BOARD from output name 2021-06-10 17:24:36 +07:00
hathach
c7f51cde40 implement usbh_edpt_busy (WIP), remove hcd_edpt_busy 2021-06-10 17:19:21 +07:00
hathach
7e6cba7359 remove hcd_edpt_stalled() 2021-06-10 16:55:12 +07:00
hathach
13cb016042 add usbh_classdriver.h 2021-06-10 16:48:20 +07:00
Ha Thach
3c4ab6bd8a
Merge pull request #883 from hathach/fix-rp2040-host-transferred-bytes
fix computing transferred bytes with E4
2021-06-10 11:35:51 +07:00
Ha Thach
14fc0987ac
Update bug_report.md 2021-06-10 11:03:58 +07:00
Ha Thach
c98a95c276
Merge pull request #882 from mmosca/master
Add support for 32 button gamepads
2021-06-09 18:05:14 +07:00
hathach
cffa666bd1 use alias for button naming 2021-06-09 17:45:14 +07:00
Marcelo Bezerra
a8abbcc34d Change buttons to start from 0 2021-06-09 12:14:04 +02:00
Marcelo Bezerra
9e4ecfde69 Merge branch 'master' of github.com:mmosca/tinyusb 2021-06-09 10:01:17 +02:00
hathach
d81a37d1be fix enum overflow with msp430 2021-06-09 12:10:44 +07:00
hathach
dca9bc97d6 miss a helper 2021-06-09 10:45:37 +07:00
hathach
2c0947ebb6 update gamepad helper 2021-06-09 10:33:57 +07:00
Marcelo Bezerra
e393fb32a0 re-adding ifdef removed accidentally 2021-06-09 10:33:57 +07:00
Marcelo Bezerra
d3b6e28387 indent fix 2021-06-09 10:33:57 +07:00
Marcelo Bezerra
de71e72e31 Fix comment in hid.h 2021-06-09 10:33:57 +07:00
Marcelo Bezerra
e12195705c Pull request changes
Remove configuration options and just bump number of buttons to 32
Fix button numbereing and comments in
2021-06-09 10:33:57 +07:00
Marcelo Bezerra
f37c8ed749 Add CFG_TUD_MAX_BUTTONS to the example 2021-06-09 10:33:57 +07:00
Marcelo Bezerra
ce634f226e remove excess empty lines 2021-06-09 10:33:57 +07:00
Marcelo Bezerra
3842c806a6 clean up 2021-06-09 10:33:57 +07:00
Marcelo Bezerra
d5f8da44d1 Add optional support for 32 gamepad buttons 2021-06-09 10:33:57 +07:00
Marcelo Bezerra
95481d4c7f re-adding ifdef removed accidentally 2021-06-08 09:39:53 +02:00
Marcelo Bezerra
b18769fe8e indent fix 2021-06-08 09:31:40 +02:00
Marcelo Bezerra
05b39aac5f Fix comment in hid.h 2021-06-08 09:26:17 +02:00
Marcelo Bezerra
05d30b0c37 Pull request changes
Remove configuration options and just bump number of buttons to 32
Fix button numbereing and comments in
2021-06-08 09:24:50 +02:00
hathach
501de2a5e8 fix computing transferred bytes with E4 2021-06-08 10:29:22 +07:00
Marcelo Bezerra
89a53457d4 Add CFG_TUD_MAX_BUTTONS to the example 2021-06-07 21:29:24 +02:00
Marcelo Bezerra
8915e6be92 remove excess empty lines 2021-06-07 20:44:53 +02:00
Marcelo Bezerra
10fca2371c clean up 2021-06-07 20:16:05 +02:00
Marcelo Bezerra
fee323e42b Add optional support for 32 gamepad buttons 2021-06-07 19:04:21 +02:00
Ha Thach
1b8473902f
Merge pull request #881 from hathach/mindmotion-followup
follow up to pr869
2021-06-07 19:18:37 +07:00
hathach
c2b85c8d6d add OPT_MCU_MM32F327X
move dcd_mm32f into mindmotion folder
2021-06-07 18:51:44 +07:00
zhangslice
26b9fc38ed
Add MM32 SDK and USB driver (#869)
* Add MM32 SDK and USB driver
* add mindmotion mm32sdk as submodule
remove the local copy of mm32
* mit  license
Signed-off-by: zhangslice <1304224508@qq.com>
Co-authored-by: hathach <thach@tinyusb.org>
2021-06-07 17:32:46 +07:00
Wini-Buh
5a554508ca Merge remote-tracking branch 'upstream/master' into CCRX_Port 2021-06-03 22:17:30 +02:00
Ha Thach
ce30109b5b
Merge pull request #873 from kilograham/fix_log_warning
Add __unused to variables that are only used if TU_LOG does something
2021-06-03 22:53:49 +07:00
graham sanderson
c81bc38d42 Add __unused to variables that are only used if TU_LOG does something 2021-06-03 10:10:44 -05:00
Wini-Buh
e26cf6b26c Missing RX device dependency corrected 2021-06-02 21:33:32 +02:00
Wini-Buh
b4f092ec74 Adaptations for Renesas CCRX toolchain and Rx72N controller performed 2021-05-29 21:23:39 +02:00
Jacob Potter
3158b323d8 Adapt to new control xfer callback 2021-01-03 15:16:54 -07:00
Jacob Potter
57058e33fc Merge branch 'master' into ncm 2021-01-03 15:12:02 -07:00
Jacob Potter
226efdcec0 Reduce excessive poll rate on interrupt endpoint 2020-11-05 18:14:56 -07:00
Jacob Potter
377f8ce76f Log on full NTBs 2020-11-05 10:18:29 -07:00
Jacob Potter
a3fdcbdf16 Just leave the endpoints open, instead of closing/reopening 2020-11-04 23:53:03 -07:00
Jacob Potter
a3d6e8fc52 Add default for CFG_TUD_NCM 2020-11-04 21:18:44 -07:00
Jacob Potter
bb0df2740e Add CDC NCM driver 2020-11-04 20:51:57 -07:00
gsnxp
616562a48a
Merge pull request #1 from hathach/master
syncing to source repo
2020-02-17 13:06:44 -08:00
1711 changed files with 162529 additions and 38248 deletions

10
.codespellrc Normal file
View file

@ -0,0 +1,10 @@
# See: https://github.com/codespell-project/codespell#using-a-config-file
[codespell]
# In the event of a false positive, add the problematic word, in all lowercase, to 'ignore-words.txt' (one word per line).
# Or copy & paste the whole problematic line to 'exclude-file.txt'
ignore-words = tools/codespell/ignore-words.txt
exclude-file = tools/codespell/exclude-file.txt
check-filenames =
check-hidden =
count =
skip = *.rb,.cproject,.git,./lib,./examples/*/*/_build,./examples/*/*/ses,./examples/*/*/ozone,./hw/mcu,./tests_obsolete

View file

@ -1,36 +0,0 @@
---
name: Bug Report
about: Create a report to help us improve
title: 'Please provide all details at least for Setup/Describe/Reproduce'
labels: Bug 🐞
assignees: ''
---
**Set Up**
- **PC OS** e.g Ubuntu 20.04 / Windows 10/ macOS 10.15
- **Board** e.g Feather nRF52840 Express (if custom specify your MCUs)
- **TinyUSB version** relase version or git hash (preferrably running with master for lastest code)
- **Firmware** e.g examples/device/cdc_msc
**Describe The Bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. See error
**Screenshots**
If applicable, add screenshots, bus capture to help explain your problem.
**Log**
If applicable, provide the stack's log (uart/rtt/swo) where the issue occurred, best with comments to explain the actual events. If the log is too long, attach it as txt file instead.
Note: To enable logging, add `LOG=2` to to the make command if building with stock examples or set `CFG_TUSB_DEBUG=2` in your tusb_config.h. More information can be found at [example's readme](/docs/getting_started.md)

86
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View file

@ -0,0 +1,86 @@
name: Bug Report
description: Report a problem with TinyUSB
labels: 'Bug 🐞'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
It's okay to leave some blank if it doesn't apply to your problem.
- type: dropdown
attributes:
label: Operating System
options:
- Linux
- MacOS
- RaspberryPi OS
- Windows 7
- Windows 10
- Windows 11
- Others
validations:
required: true
- type: input
attributes:
label: Board
placeholder: e.g Feather nRF52840 Express
validations:
required: true
- type: textarea
attributes:
label: Firmware
placeholder: |
e.g examples/device/cdc_msc. If it is custom firmware, it is preferably compiled like one in example folder and reviewable for people to comment on. The easiest way is
- Fork this repo, checkout a new branch
- Add your-own-example based on stock one
- Push and post it here.
validations:
required: true
- type: textarea
attributes:
label: What happened ?
placeholder: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
attributes:
label: How to reproduce ?
placeholder: |
Exact steps in chronological order, details should be specific e.g if you use a command/script to test with, please post it as well.
1. Go to '...'
2. Click on '....'
3. See error
validations:
required: true
- type: textarea
attributes:
label: Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2)
placeholder: |
Attach your debug log txt file here, where the issue occurred, best with comments to explain the actual events.
Note1: Please DO NOT paste your lengthy log contents here since it hurts the readability.
Note2: To enable logging, add `LOG=2` to to the make command if building with stock examples or set `CFG_TUSB_DEBUG=2` in your tusb_config.h.
More information can be found at [example's readme](https://github.com/hathach/tinyusb/blob/master/docs/getting_started.md)
validations:
required: true
- type: textarea
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
validations:
required: false
- type: checkboxes
attributes:
label: I have checked existing issues, dicussion and documentation
description: You agree to check all the resources above before opening a new issue.
options:
- label: I confirm I have checked existing issues, dicussion and documentation.
required: true

View file

@ -1,4 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: TinyUSB Discussion
url: https://github.com/hathach/tinyusb/discussions
about: If you have other questions or need help, post it here.
- name: TinyUSB Docs
url: https://docs.tinyusb.org/
about: Online documentation

View file

@ -1,14 +0,0 @@
---
name: Feature Request
about: Suggest an idea for this project
title: ''
labels: Feature 💡
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.

View file

@ -0,0 +1,49 @@
name: Feature Request
description: Suggest an idea for this project
labels: 'Feature 💡'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this request!
It's okay to leave some blank if it doesn't apply to your request.
- type: input
attributes:
label: Related area
description: Please briefly explain the area of your Feature Request.
placeholder: eg. new port support, device stack, class driver ...
validations:
required: true
- type: input
attributes:
label: Hardware specification
description: Please provide if your proposal depends on specific Hardware.
placeholder: eg. rp2040, samd51 ...
validations:
required: true
- type: textarea
attributes:
label: Is your feature request related to a problem?
description: Please provide a clear and concise description of what the problem is. Add relevant issue link.
placeholder: ex. I'm facing the issue/missing function...
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like
description: Please provide a clear and concise description of what you want to happen.
placeholder: ex. When using this function...
validations:
required: true
- type: checkboxes
attributes:
label: I have checked existing issues, dicussion and documentation
description: You agree to check all the resources above before opening a new issue.
options:
- label: I confirm I have checked existing issues, dicussion and documentation.
required: true

View file

@ -1,143 +0,0 @@
name: Build ARM
on:
pull_request:
push:
release:
types:
- created
jobs:
# ---------------------------------------
# Unit testing with Ceedling
# ---------------------------------------
unit-test:
runs-on: ubuntu-latest
steps:
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: '2.7'
- name: Checkout TinyUSB
uses: actions/checkout@v2
- name: Unit Tests
run: |
# Install Ceedling
gem install ceedling
cd test
ceedling test:all
# ---------------------------------------
# Build ARM family
# ---------------------------------------
build-arm:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
family:
# Alphabetical order
- 'imxrt'
- 'lpc15'
- 'lpc18'
- 'lpc54'
- 'lpc55'
- 'nrf'
- 'rp2040'
- 'samd11'
- 'samd21'
- 'samd51'
- 'saml22'
- 'stm32f0'
- 'stm32f4'
- 'stm32f7'
- 'stm32h7'
steps:
- name: Setup Python
uses: actions/setup-python@v2
- name: Checkout TinyUSB
uses: actions/checkout@v2
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip lib/sct_neopixel
- name: Checkout pico-sdk
if: matrix.family == 'rp2040'
run: |
git clone --depth 1 -b develop https://github.com/raspberrypi/pico-sdk ~/pico-sdk
echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk
- name: Set Toolchain URL
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.2.1-1.1/xpack-arm-none-eabi-gcc-10.2.1-1.1-linux-x64.tar.gz
- name: Cache Toolchain
uses: actions/cache@v2
id: cache-toolchain
with:
path: ~/cache/
key: ${{ runner.os }}-21-03-04-${{ env.TOOLCHAIN_URL }}
- name: Install Toolchain
if: steps.cache-toolchain.outputs.cache-hit != 'true'
run: |
mkdir -p ~/cache/toolchain
wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.gz
tar -C ~/cache/toolchain -xaf toolchain.tar.gz
- name: Set Toolchain Path
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
# ---------------------------------------
# Build all no-family (opharned) boards
# ---------------------------------------
build-board:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example:
# Alphabetical order, a group of 4
- 'device/audio_test device/board_test device/cdc_dual_ports device/cdc_msc'
- 'device/cdc_msc_freertos device/dfu_runtime device/hid_composite device/hid_composite_freertos'
- 'device/hid_generic_inout device/hid_multiple_interface device/midi_test device/msc_dual_lun'
- 'device/net_lwip_webserver'
- 'device/uac2_headset device/usbtmc device/webusb_serial host/cdc_msc_hid'
steps:
- name: Setup Python
uses: actions/setup-python@v2
- name: Checkout TinyUSB
uses: actions/checkout@v2
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
- name: Set Toolchain URL
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.2.1-1.1/xpack-arm-none-eabi-gcc-10.2.1-1.1-linux-x64.tar.gz
- name: Cache Toolchain
uses: actions/cache@v2
id: cache-toolchain
with:
path: ~/cache/
key: ${{ runner.os }}-21-03-04-${{ env.TOOLCHAIN_URL }}
- name: Install Toolchain
if: steps.cache-toolchain.outputs.cache-hit != 'true'
run: |
mkdir -p ~/cache/toolchain
wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.gz
tar -C ~/cache/toolchain -xaf toolchain.tar.gz
- name: Set Toolchain Path
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
- name: Build
run: python3 tools/build_board.py ${{ matrix.example }}

84
.github/workflows/build_aarch64.yml vendored Normal file
View file

@ -0,0 +1,84 @@
name: Build AArch64
on:
workflow_dispatch:
push:
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/build_aarch64.yml'
pull_request:
branches: [ master ]
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/build_aarch64.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
# ---------------------------------------
# Build AARCH64 family
# ---------------------------------------
build-arm:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
family:
# Alphabetical order
- 'broadcom_64bit'
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Checkout TinyUSB
uses: actions/checkout@v3
- name: Checkout hathach/linkermap
uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
- name: Set Toolchain URL
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
- name: Cache Toolchain
uses: actions/cache@v3
id: cache-toolchain
with:
path: ~/cache/
key: ${{ runner.os }}-21-11-02-${{ env.TOOLCHAIN_URL }}
- name: Install Toolchain
if: steps.cache-toolchain.outputs.cache-hit != 'true'
run: |
mkdir -p ~/cache/toolchain
wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.gz
tar -C ~/cache/toolchain -xaf toolchain.tar.gz
- name: Set Toolchain Path
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
- name: Get Dependencies
run: python3 tools/get_deps.py ${{ matrix.family }}
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
- name: Linker Map
run: |
pip install linkermap/
for ex in `ls -d examples/device/*/`; do \
find ${ex} -name *.map -print -quit | \
xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
done

78
.github/workflows/build_arm.yml vendored Normal file
View file

@ -0,0 +1,78 @@
name: Build ARM
on:
workflow_dispatch:
push:
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/build_arm.yml'
pull_request:
branches: [ master ]
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/build_arm.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
# ---------------------------------------
# Build ARM family
# ---------------------------------------
build-arm:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
family:
# Alphabetical order
- 'broadcom_32bit'
- 'kinetis_k32l2'
- 'lpc11 lpc13 lpc15 lpc17'
- 'lpc51'
- 'mm32 msp432e4'
- 'samd11 same5x saml2x'
- 'stm32f2 stm32f3'
- 'stm32l0 stm32wb'
- 'tm4c123 xmc4000'
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install ARM GCC
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '11.2-2022.02'
- name: Checkout TinyUSB
uses: actions/checkout@v3
- name: Checkout hathach/linkermap
uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
- name: Get Dependencies
run: python3 tools/get_deps.py ${{ matrix.family }}
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
- name: Linker Map
run: |
pip install linkermap/
# find -quit to only print linkermap of 1 board per example
for ex in `ls -d examples/*/*/`
do
find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
done

View file

@ -1,11 +1,26 @@
name: Build ESP
on:
pull_request:
workflow_dispatch:
push:
release:
types:
- created
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/build_esp.yml'
pull_request:
branches: [ master ]
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/build_esp.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-esp:
@ -14,22 +29,22 @@ jobs:
fail-fast: false
matrix:
board:
# Alphabetical order
# ESP32-S2
- 'adafruit_metro_esp32s2'
- 'espressif_saola_1'
- 'espressif_kaluga_1'
# ESP32-S3
- 'espressif_addax_1'
- 'espressif_s3_devkitm'
steps:
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Pull ESP-IDF docker
run: docker pull espressif/idf:latest
- name: Checkout TinyUSB
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Build
run: docker run --rm -v $PWD:/project -w /project espressif/idf:latest python3 tools/build_esp32sx.py ${{ matrix.board }}
run: docker run --rm -v $PWD:/project -w /project espressif/idf:latest python3 tools/build_esp32.py ${{ matrix.board }}

54
.github/workflows/build_iar.yml vendored Normal file
View file

@ -0,0 +1,54 @@
name: Build IAR
on:
workflow_dispatch:
push:
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/build_iar.yml'
pull_request:
branches: [ master ]
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/build_iar.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
cmake:
runs-on: [self-hosted, Linux, X64, hifiphile]
strategy:
fail-fast: false
matrix:
family:
# Alphabetical order
# Note: bundle multiple families into a matrix since there is only one self-hosted instance can
# run IAR build. Too many matrix can hurt due to setup/teardown overhead.
- 'lpc43 stm32f0 stm32f1 stm32f4 stm32f7 stm32g0 stm32g4 stm32h7 stm32l4'
steps:
- name: Clean workspace
run: |
echo "Cleaning up previous run"
rm -rf "${{ github.workspace }}"
mkdir -p "${{ github.workspace }}"
- name: Checkout TinyUSB
uses: actions/checkout@v3
- name: Get Dependencies
run: python3 tools/get_deps.py ${{ matrix.family }}
- name: Build
run: python3 tools/build_cmake.py ${{ matrix.family }} -DTOOLCHAIN=iar -DCMAKE_BUILD_TYPE=MinSizeRel
- name: Test on actual hardware (hardware in the loop)
run: |
python3 test/hil/hil_test.py hil_hfp.json

View file

@ -1,11 +1,26 @@
name: Build MSP430
on:
pull_request:
workflow_dispatch:
push:
release:
types:
- created
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/build_msp430.yml'
pull_request:
branches: [ master ]
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/build_msp430.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-msp430:
@ -16,21 +31,27 @@ jobs:
family:
# Alphabetical order
- 'msp430'
steps:
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Checkout TinyUSB
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
- name: Checkout hathach/linkermap
uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
- name: Set Toolchain URL
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2
- name: Cache Toolchain
uses: actions/cache@v2
uses: actions/cache@v3
id: cache-toolchain
with:
path: ~/cache/
@ -46,5 +67,17 @@ jobs:
- name: Set Toolchain Path
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
- name: Get Dependencies
run: python3 tools/get_deps.py ${{ matrix.family }}
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
- name: Linker Map
run: |
pip install linkermap/
# find -quit to only print linkermap of 1 board per example
for ex in `ls -d examples/device/*/`
do
find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
done

View file

@ -1,11 +1,26 @@
name: Build Renesas
on:
pull_request:
workflow_dispatch:
push:
release:
types:
- created
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/build_renesas.yml'
pull_request:
branches: [ master ]
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/build_renesas.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-rx:
@ -15,22 +30,27 @@ jobs:
matrix:
family:
# Alphabetical order
- 'rx63n'
- 'rx'
steps:
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Checkout TinyUSB
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
- name: Checkout hathach/linkermap
uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
- name: Set Toolchain URL
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=http://gcc-renesas.com/downloads/get.php?f=rx/8.3.0.202004-gnurx/gcc-8.3.0.202004-GNURX-ELF.run
- name: Cache Toolchain
uses: actions/cache@v2
uses: actions/cache@v3
id: cache-toolchain
with:
path: ~/cache/
@ -47,5 +67,17 @@ jobs:
- name: Set Toolchain Path
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
- name: Get Dependencies
run: python3 tools/get_deps.py ${{ matrix.family }}
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
- name: Linker Map
run: |
pip install linkermap/
# find -quit to only print linkermap of 1 board per example
for ex in `ls -d examples/device/*/`
do
find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
done

View file

@ -1,11 +1,26 @@
name: Build RISC-V
on:
pull_request:
workflow_dispatch:
push:
release:
types:
- created
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/build_riscv.yml'
pull_request:
branches: [ master ]
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/build_riscv.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-riscv:
@ -15,22 +30,29 @@ jobs:
matrix:
family:
# Alphabetical order
- 'ch32v307'
- 'fomu'
- 'gd32vf103'
steps:
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Checkout TinyUSB
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
- name: Checkout hathach/linkermap
uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
- name: Set Toolchain URL
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases/download/v10.1.0-1.1/xpack-riscv-none-embed-gcc-10.1.0-1.1-linux-x64.tar.gz
- name: Cache Toolchain
uses: actions/cache@v2
uses: actions/cache@v3
id: cache-toolchain
with:
path: ~/cache/
@ -46,5 +68,17 @@ jobs:
- name: Set Toolchain Path
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
- name: Get Dependencies
run: python3 tools/get_deps.py ${{ matrix.family }}
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
- name: Linker Map
run: |
pip install linkermap/
# find -quit to only print linkermap of 1 board per example
for ex in `ls -d examples/device/*/`
do
find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
done

54
.github/workflows/build_win_mac.yml vendored Normal file
View file

@ -0,0 +1,54 @@
name: Build Windows/MacOS
on:
workflow_dispatch:
push:
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/build_win_mac.yml'
pull_request:
branches: [ master ]
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/build_win_mac.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
# ---------------------------------------
# Build ARM family
# ---------------------------------------
build-arm:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install ARM GCC
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '10.3-2021.10'
- name: Checkout TinyUSB
uses: actions/checkout@v3
- name: Get Dependencies
run: python3 tools/get_deps.py stm32f4
- name: Build
run: python3 tools/build_family.py stm32f4 stm32f411disco

34
.github/workflows/cifuzz.yml vendored Normal file
View file

@ -0,0 +1,34 @@
name: CIFuzz
on:
workflow_dispatch:
pull_request:
branches:
- master
paths:
- '**.c'
- '**.cc'
- '**.cpp'
- '**.cxx'
- '**.h'
jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'tinyusb'
language: c++
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'tinyusb'
language: c++
fuzz-seconds: 600
- name: Upload Crash
uses: actions/upload-artifact@v3
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts

164
.github/workflows/cmake_arm.yml vendored Normal file
View file

@ -0,0 +1,164 @@
name: CMake ARM
on:
workflow_dispatch:
push:
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/cmake_arm.yml'
pull_request:
branches: [ master ]
paths:
- 'src/**'
- 'examples/**'
- 'lib/**'
- 'hw/**'
- '.github/workflows/cmake_arm.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
# ---------------------------------------
# Build ARM family
# ---------------------------------------
build-arm:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
family:
# Alphabetical order
- 'imxrt'
- 'kinetis_kl'
- 'lpc18 lpc40 lpc43'
- 'lpc54 lpc55'
- 'mcx'
- 'nrf'
- 'ra'
- 'rp2040'
- 'samd21'
- 'samd51'
- 'stm32f0'
- 'stm32f1'
- 'stm32f4'
- 'stm32f7'
- 'stm32g0'
- 'stm32g4'
- 'stm32h7'
- 'stm32l4'
- 'stm32u5'
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install ARM GCC
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '11.2-2022.02'
- name: Install Ninja
run: sudo apt install -y ninja-build
- name: Checkout TinyUSB
uses: actions/checkout@v3
- name: Checkout pico-sdk for rp2040
if: matrix.family == 'rp2040'
uses: actions/checkout@v3
with:
repository: raspberrypi/pico-sdk
ref: develop
path: pico-sdk
- name: Get Dependencies
run: python3 tools/get_deps.py ${{ matrix.family }}
- name: Build
run: python tools/build_cmake.py ${{ matrix.family }} -DCMAKE_BUILD_TYPE=MinSizeRel
env:
# for rp2040, there is no harm if defined for other families
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
# Upload binaries for hardware test with self-hosted
- name: Prepare rp2040 Artifacts
if: contains(matrix.family, 'rp2040') && github.repository_owner == 'hathach'
working-directory: ${{github.workspace}}/cmake-build/cmake-build-raspberry_pi_pico
run: |
find device/ -name "*.elf" -exec mv {} ../../ \;
# find host/ -name "*.elf" -exec mv {} ../../ \;
# find dual/ -name "*.elf" -exec mv {} ../../ \;
- name: Upload Artifacts for rp2040
if: contains(matrix.family,'rp2040') && github.repository_owner == 'hathach'
uses: actions/upload-artifact@v3
with:
name: rp2040
path: |
*.elf
# ---------------------------------------
# Hardware in the loop (HIL)
# Current self-hosted instance is running on an RPI4 with
# - pico + pico-probe connected via USB
# - pico-probe is /dev/ttyACM0
# ---------------------------------------
hw-rp2040-test:
# run only with hathach's commit due to limited resource on RPI4
if: github.repository_owner == 'hathach'
needs: build-arm
runs-on: [self-hosted, Linux, ARM64, rp2040]
steps:
- name: Clean workspace
run: |
echo "Cleaning up previous run"
rm -rf "${{ github.workspace }}"
mkdir -p "${{ github.workspace }}"
- name: Download rp2040 Artifacts
uses: actions/download-artifact@v3
with:
name: rp2040
- name: Create flash.sh
run: |
echo > flash.sh 'cmdout=$(openocd -f "interface/cmsis-dap.cfg" -f "target/rp2040.cfg" -c "adapter speed 5000" -c "program $1 reset exit")'
echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
chmod +x flash.sh
- name: Test cdc_dual_ports
run: |
./flash.sh cdc_dual_ports.elf
while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 10 ]; do :; done
test -e /dev/ttyACM1 && echo "ttyACM1 exists"
test -e /dev/ttyACM2 && echo "ttyACM2 exists"
- name: Test cdc_msc
run: |
./flash.sh cdc_msc.elf
readme='/media/pi/TinyUSB MSC/README.TXT'
while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 10 ]; do :; done
test -e /dev/ttyACM1 && echo "ttyACM1 exists"
test -f "$readme" && echo "$readme exists"
cat "$readme"
- name: Test dfu
run: |
./flash.sh dfu.elf
while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 10 ]; do :; done
dfu-util -d cafe -a 0 -U dfu0
dfu-util -d cafe -a 1 -U dfu1
grep "TinyUSB DFU! - Partition 0" dfu0
grep "TinyUSB DFU! - Partition 1" dfu1
- name: Test dfu_runtime
run: |
./flash.sh dfu_runtime.elf
while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done

48
.github/workflows/pre-commit.yml vendored Normal file
View file

@ -0,0 +1,48 @@
name: pre-commit
on:
workflow_dispatch:
push:
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: Checkout TinyUSB
uses: actions/checkout@v3
- name: Get Dependencies
run: |
gem install ceedling
#cd test/unit-test
#ceedling test:all
- name: Run pre-commit
uses: pre-commit/action@v3.0.0
- name: Build Fuzzer
run: |
export CC=clang
export CXX=clang++
fuzz_harness=$(ls -d test/fuzz/device/*/)
for h in $fuzz_harness
do
make -C $h get-deps
make -C $h all
done

View file

@ -1,6 +1,7 @@
name: Trigger Repos
on:
workflow_dispatch:
push:
branches: master
release:
@ -22,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Push to tinyusb_src
run: |
@ -55,4 +56,5 @@ jobs:
git push origin ${{ github.event.release.tag_name }}
# Send POST reqwuest to release https://docs.github.com/en/rest/reference/repos#create-a-release
curl -X POST -H "Authorization: token ${{ secrets.API_TOKEN_GITHUB }}" -H "Accept: application/vnd.github.v3+json" --data '{"tag_name": "${{ github.event.release.tag_name }}", "name": "${{ github.event.release.name }}", "body": "${{ github.event.release.body }}", "draft": ${{ github.event.release.draft }}, "prerelease": ${{ github.event.release.prerelease }}}' https://api.github.com/repos/hathach/tinyusb_src/releases
bb="For release note, please checkout https://github.com/hathach/tinyusb/releases/tag/${{ github.event.release.tag_name }}"
curl -X POST -H "Authorization: token ${{ secrets.API_TOKEN_GITHUB }}" -H "Accept: application/vnd.github.v3+json" --data '{"tag_name": "${{ github.event.release.tag_name }}", "name": "${{ github.event.release.name }}", "body": "$bb", "draft": ${{ github.event.release.draft }}, "prerelease": ${{ github.event.release.prerelease }}}' https://api.github.com/repos/hathach/tinyusb_src/releases

62
.gitignore vendored
View file

@ -12,7 +12,7 @@ latex
*.ind
.env
.settings/
.idea/
.vscode/
.gdb_history
/examples/*/*/build*
test_old/
@ -21,8 +21,68 @@ _build
/examples/*/*/ses
/examples/*/*/ozone
/examples/obsolete
hw/bsp/**/cubemx/*/
.mxproject
# coverity intermediate files
cov-int
# cppcheck build directories
*-build-dir
/_bin/
__pycache__
cmake-build-*
sdkconfig
# submodules
hw/mcu/allwinner
hw/mcu/bridgetek/ft9xx/ft90x-sdk
hw/mcu/broadcom
hw/mcu/gd/nuclei-sdk
hw/mcu/infineon/mtb-xmclib-cat3
hw/mcu/microchip
hw/mcu/mindmotion/mm32sdk
hw/mcu/nordic/nrfx
hw/mcu/nuvoton
hw/mcu/nxp/lpcopen
hw/mcu/nxp/mcux-sdk
hw/mcu/nxp/nxp_sdk
hw/mcu/raspberry_pi/Pico-PIO-USB
hw/mcu/renesas/rx
hw/mcu/silabs/cmsis-dfp-efm32gg12b
hw/mcu/sony/cxd56/spresense-exported-sdk
hw/mcu/st/cmsis_device_f0
hw/mcu/st/cmsis_device_f1
hw/mcu/st/cmsis_device_f2
hw/mcu/st/cmsis_device_f3
hw/mcu/st/cmsis_device_f4
hw/mcu/st/cmsis_device_f7
hw/mcu/st/cmsis_device_g0
hw/mcu/st/cmsis_device_g4
hw/mcu/st/cmsis_device_h7
hw/mcu/st/cmsis_device_l0
hw/mcu/st/cmsis_device_l1
hw/mcu/st/cmsis_device_l4
hw/mcu/st/cmsis_device_l5
hw/mcu/st/cmsis_device_u5
hw/mcu/st/cmsis_device_wb
hw/mcu/st/stm32f0xx_hal_driver
hw/mcu/st/stm32f1xx_hal_driver
hw/mcu/st/stm32f2xx_hal_driver
hw/mcu/st/stm32f3xx_hal_driver
hw/mcu/st/stm32f4xx_hal_driver
hw/mcu/st/stm32f7xx_hal_driver
hw/mcu/st/stm32g0xx_hal_driver
hw/mcu/st/stm32g4xx_hal_driver
hw/mcu/st/stm32h7xx_hal_driver
hw/mcu/st/stm32l0xx_hal_driver
hw/mcu/st/stm32l1xx_hal_driver
hw/mcu/st/stm32l4xx_hal_driver
hw/mcu/st/stm32l5xx_hal_driver
hw/mcu/st/stm32u5xx_hal_driver
hw/mcu/st/stm32wbxx_hal_driver
hw/mcu/ti
hw/mcu/wch/ch32v307
lib/CMSIS_5
lib/FreeRTOS-Kernel
lib/lwip
lib/sct_neopixel
tools/uf2

123
.gitmodules vendored
View file

@ -1,123 +0,0 @@
[submodule "hw/mcu/nordic/nrfx"]
path = hw/mcu/nordic/nrfx
url = https://github.com/NordicSemiconductor/nrfx.git
[submodule "tools/uf2"]
path = tools/uf2
url = https://github.com/microsoft/uf2.git
[submodule "hw/mcu/sony/cxd56/spresense-exported-sdk"]
path = hw/mcu/sony/cxd56/spresense-exported-sdk
url = https://github.com/sonydevworld/spresense-exported-sdk.git
[submodule "hw/mcu/ti"]
path = hw/mcu/ti
url = https://github.com/hathach/ti_driver.git
[submodule "hw/mcu/microchip"]
path = hw/mcu/microchip
url = https://github.com/hathach/microchip_driver.git
[submodule "hw/mcu/nuvoton"]
path = hw/mcu/nuvoton
url = https://github.com/majbthrd/nuc_driver.git
[submodule "lib/lwip"]
path = lib/lwip
url = https://github.com/lwip-tcpip/lwip.git
[submodule "hw/mcu/st/cmsis_device_f4"]
path = hw/mcu/st/cmsis_device_f4
url = https://github.com/STMicroelectronics/cmsis_device_f4.git
[submodule "hw/mcu/st/stm32f4xx_hal_driver"]
path = hw/mcu/st/stm32f4xx_hal_driver
url = https://github.com/STMicroelectronics/stm32f4xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_f0"]
path = hw/mcu/st/cmsis_device_f0
url = https://github.com/STMicroelectronics/cmsis_device_f0.git
[submodule "hw/mcu/st/stm32f0xx_hal_driver"]
path = hw/mcu/st/stm32f0xx_hal_driver
url = https://github.com/STMicroelectronics/stm32f0xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_f1"]
path = hw/mcu/st/cmsis_device_f1
url = https://github.com/STMicroelectronics/cmsis_device_f1.git
[submodule "hw/mcu/st/stm32f1xx_hal_driver"]
path = hw/mcu/st/stm32f1xx_hal_driver
url = https://github.com/STMicroelectronics/stm32f1xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_f2"]
path = hw/mcu/st/cmsis_device_f2
url = https://github.com/STMicroelectronics/cmsis_device_f2.git
[submodule "hw/mcu/st/stm32f2xx_hal_driver"]
path = hw/mcu/st/stm32f2xx_hal_driver
url = https://github.com/STMicroelectronics/stm32f2xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_f3"]
path = hw/mcu/st/cmsis_device_f3
url = https://github.com/STMicroelectronics/cmsis_device_f3.git
[submodule "hw/mcu/st/stm32f3xx_hal_driver"]
path = hw/mcu/st/stm32f3xx_hal_driver
url = https://github.com/STMicroelectronics/stm32f3xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_f7"]
path = hw/mcu/st/cmsis_device_f7
url = https://github.com/STMicroelectronics/cmsis_device_f7.git
[submodule "hw/mcu/st/stm32f7xx_hal_driver"]
path = hw/mcu/st/stm32f7xx_hal_driver
url = https://github.com/STMicroelectronics/stm32f7xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_h7"]
path = hw/mcu/st/cmsis_device_h7
url = https://github.com/STMicroelectronics/cmsis_device_h7.git
[submodule "hw/mcu/st/stm32h7xx_hal_driver"]
path = hw/mcu/st/stm32h7xx_hal_driver
url = https://github.com/STMicroelectronics/stm32h7xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_l0"]
path = hw/mcu/st/cmsis_device_l0
url = https://github.com/STMicroelectronics/cmsis_device_l0.git
[submodule "hw/mcu/st/stm32l0xx_hal_driver"]
path = hw/mcu/st/stm32l0xx_hal_driver
url = https://github.com/STMicroelectronics/stm32l0xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_l1"]
path = hw/mcu/st/cmsis_device_l1
url = https://github.com/STMicroelectronics/cmsis_device_l1.git
[submodule "hw/mcu/st/stm32l1xx_hal_driver"]
path = hw/mcu/st/stm32l1xx_hal_driver
url = https://github.com/STMicroelectronics/stm32l1xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_l4"]
path = hw/mcu/st/cmsis_device_l4
url = https://github.com/STMicroelectronics/cmsis_device_l4.git
[submodule "hw/mcu/st/stm32l4xx_hal_driver"]
path = hw/mcu/st/stm32l4xx_hal_driver
url = https://github.com/STMicroelectronics/stm32l4xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_g0"]
path = hw/mcu/st/cmsis_device_g0
url = https://github.com/STMicroelectronics/cmsis_device_g0.git
[submodule "hw/mcu/st/stm32g0xx_hal_driver"]
path = hw/mcu/st/stm32g0xx_hal_driver
url = https://github.com/STMicroelectronics/stm32g0xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_g4"]
path = hw/mcu/st/cmsis_device_g4
url = https://github.com/STMicroelectronics/cmsis_device_g4.git
[submodule "hw/mcu/st/stm32g4xx_hal_driver"]
path = hw/mcu/st/stm32g4xx_hal_driver
url = https://github.com/STMicroelectronics/stm32g4xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_l5"]
path = hw/mcu/st/cmsis_device_l5
url = https://github.com/STMicroelectronics/cmsis_device_l5.git
[submodule "hw/mcu/st/stm32l5xx_hal_driver"]
path = hw/mcu/st/stm32l5xx_hal_driver
url = https://github.com/STMicroelectronics/stm32l5xx_hal_driver.git
[submodule "lib/sct_neopixel"]
path = lib/sct_neopixel
url = https://github.com/gsteiert/sct_neopixel
[submodule "lib/FreeRTOS-Kernel"]
path = lib/FreeRTOS-Kernel
url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git
[submodule "lib/CMSIS_5"]
path = lib/CMSIS_5
url = https://github.com/ARM-software/CMSIS_5.git
[submodule "hw/mcu/silabs/cmsis-dfp-efm32gg12b"]
path = hw/mcu/silabs/cmsis-dfp-efm32gg12b
url = https://github.com/cmsis-packs/cmsis-dfp-efm32gg12b
[submodule "hw/mcu/renesas/rx"]
path = hw/mcu/renesas/rx
url = https://github.com/kkitayam/rx_device.git
[submodule "hw/mcu/nxp/lpcopen"]
path = hw/mcu/nxp/lpcopen
url = https://github.com/hathach/nxp_lpcopen.git
[submodule "hw/mcu/nxp/mcux-sdk"]
path = hw/mcu/nxp/mcux-sdk
url = https://github.com/NXPmicro/mcux-sdk.git
[submodule "hw/mcu/nxp/nxp_sdk"]
path = hw/mcu/nxp/nxp_sdk
url = https://github.com/hathach/nxp_sdk.git

8
.idea/.gitignore generated vendored Normal file
View file

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

70
.idea/cmake.xml generated Normal file
View file

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeSharedSettings">
<configurations>
<configuration PROFILE_NAME="esp32s2" ENABLED="false" TOOLCHAIN_NAME="ESP-IDF" GENERATION_OPTIONS="-DBOARD=espressif_saola_1">
<ADDITIONAL_GENERATION_ENVIRONMENT>
<envs>
<env name="ESPBAUD" value="1500000" />
</envs>
</ADDITIONAL_GENERATION_ENVIRONMENT>
</configuration>
<configuration PROFILE_NAME="kaluga" ENABLED="false" TOOLCHAIN_NAME="ESP-IDF" GENERATION_OPTIONS="-DBOARD=espressif_kaluga_1 -DMAX3421_HOST=1 -DLOG=2">
<ADDITIONAL_GENERATION_ENVIRONMENT>
<envs>
<env name="ESPBAUD" value="1500000" />
</envs>
</ADDITIONAL_GENERATION_ENVIRONMENT>
</configuration>
<configuration PROFILE_NAME="esp32s3" ENABLED="false" TOOLCHAIN_NAME="ESP-IDF" GENERATION_OPTIONS="-DBOARD=espressif_s3_devkitm">
<ADDITIONAL_GENERATION_ENVIRONMENT>
<envs>
<env name="ESPBAUD" value="1500000" />
</envs>
</ADDITIONAL_GENERATION_ENVIRONMENT>
</configuration>
<configuration PROFILE_NAME="rp2040" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=raspberry_pi_pico -DLOG=2" />
<configuration PROFILE_NAME="feather_rp2040" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=pico_sdk -DPICO_BOARD=adafruit_feather_rp2040" />
<configuration PROFILE_NAME="metro m7 1011" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=metro_m7_1011 -DLOG=3 -DLOGGER=RTT -DTRACE_ETM=1" />
<configuration PROFILE_NAME="rt1010 evk" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=mimxrt1010_evk -DLOG=3 -DLOGGER=RTT" />
<configuration PROFILE_NAME="rt1060 evk" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=mimxrt1060_evk -DLOG=3 -DLOGGER=RTT" />
<configuration PROFILE_NAME="mcb1800" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=mcb1800 -DLOG=3 -DLOGGER=RTT -DTRACE_ETM=1" />
<configuration PROFILE_NAME="ea4088 quickstart" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=ea4088_quickstart -DLOG=3 -DLOGGER=RTT -DTRACE_ETM=1" />
<configuration PROFILE_NAME="ea4357" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=ea4357 -DLOG=3 -DLOGGER=RTT -DTRACE_ETM=1" />
<configuration PROFILE_NAME="lpc54628" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=lpcxpresso54628 -DLOG=4 -DLOGGER=RTT" />
<configuration PROFILE_NAME="lpc55s69" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=lpcxpresso55s69 -DLOG=4 -DLOGGER=RTT" />
<configuration PROFILE_NAME="mcxn947" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=mcxn947brk -DLOG=3 -DLOGGER=RTT" />
<configuration PROFILE_NAME="feather_nrf52840_express" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=feather_nrf52840_express -DLOG=3 -DLOGGER=RTT -DMAX3421_HOST=1" />
<configuration PROFILE_NAME="pca10056" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=pca10056 -DLOG=3 -DLOGGER=RTT -DTRACE_ETM=1" />
<configuration PROFILE_NAME="pca10095" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=pca10095 -DLOG=3 -DLOGGER=RTT -DTRACE_ETM=1" />
<configuration PROFILE_NAME="stm32g0b1nucleo" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32g0b1nucleo" />
<configuration PROFILE_NAME="stm32g474nucleo" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32g474nucleo" />
<configuration PROFILE_NAME="b_g474e_dpow1" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=b_g474e_dpow1 -DLOG=3 -DLOGGER=RTT" />
<configuration PROFILE_NAME="b_g474e_dpow1 iar" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=b_g474e_dpow1 -DTOOLCHAIN=iar" />
<configuration PROFILE_NAME="frdm_kl25z" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=frdm_kl25z -DLOG=3 -DLOGGER=RTT" />
<configuration PROFILE_NAME="stm32f072disco" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32f072disco" />
<configuration PROFILE_NAME="stm32f103_mini_2" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32f103_mini_2" />
<configuration PROFILE_NAME="stm32f411disco" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32f411disco -DLOG=2 -DLOGGER=RTT" />
<configuration PROFILE_NAME="stm32f769disco" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32f769disco -DLOG=3 -DLOGGER=RTT" />
<configuration PROFILE_NAME="stm32h743eval" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32h743eval -DLOG=3 -DLOGGER=RTT -DTRACE_ETM=1" />
<configuration PROFILE_NAME="stm32l476disco" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32l476disco" />
<configuration PROFILE_NAME="ra4m1" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=ra4m1_ek -DLOG=3 -DLOGGER=RTT" />
<configuration PROFILE_NAME="ra6m1" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=ra6m1_ek -DLOG=3 -DLOGGER=RTT" />
<configuration PROFILE_NAME="ra6m5" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=ra6m5_ek -DLOG=3 -DLOGGER=RTT -DTRACE_ETM=1" />
<configuration PROFILE_NAME="ra6m5 PORT0" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=ra6m5_ek -DLOG=3 -DLOGGER=RTT -DTRACE_ETM=1 -DPORT=0" />
<configuration PROFILE_NAME="uno_r4" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=uno_r4 -DLOG=4 -DLOGGER=RTT" />
<configuration PROFILE_NAME="portenta_c33" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=portenta_c33 -DLOG=3" />
<configuration PROFILE_NAME="metro_m4_express" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=metro_m4_express -DLOG=3 -DLOGGER=RTT -DMAX3421_HOST=1" />
<configuration PROFILE_NAME="metro_m0_express" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=metro_m0_express -DLOG=3 -DLOGGER=RTT -DMAX3421_HOST=1" />
<configuration PROFILE_NAME="metro esp32s2" ENABLED="false" TOOLCHAIN_NAME="ESP-IDF" GENERATION_OPTIONS="-DBOARD=adafruit_metro_esp32s2 -DMAX3421_HOST=1 -DLOG=2">
<ADDITIONAL_GENERATION_ENVIRONMENT>
<envs>
<env name="ESPBAUD" value="1500000" />
</envs>
</ADDITIONAL_GENERATION_ENVIRONMENT>
</configuration>
<configuration PROFILE_NAME="stm32u575eval" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32u575eval" />
<configuration PROFILE_NAME="stm32u575nucleo" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32u575nucleo -DLOG=3" />
</configurations>
</component>
</project>

10
.idea/runConfigurations/kl25.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="kl25" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-device &quot;MKL25Z128xxx4&quot; -if swd -speed 50000 -port 25321 -nogui -singlerun" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="UPDATED_ONLY" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/lpc1857.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="lpc1857" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-device &quot;lpc1857&quot; -if swd -speed 50000 -port 25321 -nogui -singlerun" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="UPDATED_ONLY" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/lpc4088.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="lpc4088" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-device &quot;lpc4088&quot; -if swd -speed 50000 -port 25321 -nogui -singlerun" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="UPDATED_ONLY" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/lpc54628.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="lpc54628" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-device &quot;LPC54628J512&quot; -if swd -speed 50000 -port 25321 -nogui -singlerun" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="UPDATED_ONLY" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/lpc55s69.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="lpc55s69" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-device &quot;lpc55s69&quot; -if swd -speed 50000 -port 25321 -nogui -singlerun" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="UPDATED_ONLY" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/mcx947.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="mcx947" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-device &quot;MCXN947_M33_0&quot; -if swd -speed 50000 -port 25321 -nogui -singlerun -jlinkscriptfile $ProjectFileDir$/hw/bsp/mcx/debug.jlinkscript" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="UPDATED_ONLY" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/nrf52840.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="nrf52840" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-select usb=752001685 -device &quot;nrf52840_xxaa&quot; -if swd -speed 8000 -port 25321 -nogui -singlerun" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="UPDATED_ONLY" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/nrf5340.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="nrf5340" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-select usb=752001685 -device &quot;nrf5340_xxaa_app&quot; -if swd -speed 16000 -port 25321 -nogui -singlerun" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="ALWAYS" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/ra4m1.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ra4m1" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-device &quot;R7FA4M1AB&quot; -if swd -speed 50000 -port 25321 -nogui -singlerun -jlinkscriptfile $PROJECT_DIR$/hw/bsp/ra/debug.jlinkscript" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="ALWAYS" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/ra6m1.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ra6m1" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-device &quot;R7FA6M1AD&quot; -if swd -speed 50000 -port 25321 -nogui -singlerun -jlinkscriptfile $PROJECT_DIR$/hw/bsp/ra/debug.jlinkscript" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="ALWAYS" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/ra6m5.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ra6m5" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-device &quot;R7FA6M5BH&quot; -if swd -speed 50000 -port 25321 -nogui -singlerun -jlinkscriptfile $PROJECT_DIR$/hw/bsp/ra/debug.jlinkscript" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="ALWAYS" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/rp2040.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="rp2040" type="com.jetbrains.cidr.embedded.openocd.conf.type" factoryName="com.jetbrains.cidr.embedded.openocd.conf.factory" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="rp2040" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<openocd version="1" gdb-port="3333" telnet-port="4444" board-config="$PROJECT_DIR$/hw/bsp/rp2040/rp2040-openocd.cfg" reset-type="INIT" download-type="UPDATED_ONLY">
<debugger kind="GDB" isBundled="true" />
</openocd>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/rt1010.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="rt1010" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-device &quot;MIMXRT1011xxx5A&quot; -if swd -speed 50000 -port 25321 -nogui -singlerun -jlinkscriptfile $ProjectFileDir$/hw/bsp/imxrt/debug.jlinkscript" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="ALWAYS" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/rt1060.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="rt1060" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-device &quot;MIMXRT1062xxx5A&quot; -if swd -speed 50000 -port 25321 -nogui -singlerun" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="UPDATED_ONLY" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/samd21g18.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="samd21g18" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-device &quot;ATSAMD21G18&quot; -if swd -speed 50000 -port 25321 -nogui -singlerun" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="UPDATED_ONLY" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/samd51j19.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="samd51j19" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-device &quot;ATSAMD51J19A&quot; -if swd -speed 50000 -port 25321 -nogui -singlerun" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="UPDATED_ONLY" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/stlink.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="stlink" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-p 62847 -cp &quot;/opt/st/stm32cubeide_1.12.1/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.linux64_2.0.600.202301161003/tools/bin&quot; --frequency 24000 --swd" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::62847" executable="/opt/st/stm32cubeide_1.12.1/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.linux64_2.0.500.202301161003/tools/bin/ST-LINK_gdbserver" warmup-ms="0" download-type="UPDATED_ONLY" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/stm32g474.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="stm32g474" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-device &quot;stm32g474re&quot; -if swd -speed 50000 -port 25321 -nogui -singlerun" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="UPDATED_ONLY" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/stm32h743.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="stm32h743" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-device &quot;stm32h743xi&quot; -if swd -speed 50000 -port 25321 -nogui -singlerun" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="UPDATED_ONLY" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

10
.idea/runConfigurations/uno_r4.xml generated Normal file
View file

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="uno_r4" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" PROGRAM_PARAMS="-device &quot;R7FA4M1AB&quot; -if swd -speed 20000 -port 25321 -nogui -singlerun -jlinkscriptfile $PROJECT_DIR$/hw/bsp/ra/debug.jlinkscript" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="tinyusb_examples" TARGET_NAME="cdc_msc" CONFIG_NAME="feather_nrf52840_express" version="1" RUN_TARGET_PROJECT_NAME="tinyusb_examples" RUN_TARGET_NAME="cdc_msc">
<custom-gdb-server version="1" gdb-connect="tcp::25321" executable="/usr/bin/JLinkGDBServer" warmup-ms="0" download-type="UPDATED_ONLY" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

6
.idea/vcs.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

42
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,42 @@
# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò
#
# SPDX-License-Identifier: Unlicense
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: trailing-whitespace
exclude: |
(?x)^(
hw/bsp/mcx/sdk/
)
- id: end-of-file-fixer
exclude: |
(?x)^(
.idea/|
hw/bsp/mcx/sdk/
)
- id: forbid-submodules
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
args: [-w]
exclude: |
(?x)^(
lib/|
hw/bsp/mcx/sdk/
)
- repo: local
hooks:
- id: unit-test
name: unit-test
files: ^(src/|test/unit-test/)
entry: sh -c "cd test/unit-test && ceedling test:all"
pass_filenames: false
types_or: [c, header]
language: system

24
.readthedocs.yaml Normal file
View file

@ -0,0 +1,24 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
submodules:
include: []
recursive: false

View file

@ -1,76 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at thach@tinyusb.org. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

88
CODE_OF_CONDUCT.rst Normal file
View file

@ -0,0 +1,88 @@
***************
Code of Conduct
***************
Our Pledge
----------
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our
project and our community a harassment-free experience for everyone,
regardless of age, body size, disability, ethnicity, sex
characteristics, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance,
race, religion, or sexual identity and orientation.
Our Standards
-------------
Examples of behavior that contributes to creating a positive environment
include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual
attention or advances
- Trolling, insulting/derogatory comments, and personal or political
attacks
- Public or private harassment
- Publishing others' private information, such as a physical or
electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
Our Responsibilities
--------------------
Project maintainers are responsible for clarifying the standards of
acceptable behavior and are expected to take appropriate and fair
corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit,
or reject comments, commits, code, wiki edits, issues, and other
contributions that are not aligned to this Code of Conduct, or to ban
temporarily or permanently any contributor for other behaviors that they
deem inappropriate, threatening, offensive, or harmful.
Scope
-----
This Code of Conduct applies both within project spaces and in public
spaces when an individual is representing the project or its community.
Examples of representing a project or community include using an
official project e-mail address, posting via an official social media
account, or acting as an appointed representative at an online or
offline event. Representation of a project may be further defined and
clarified by project maintainers.
Enforcement
-----------
Instances of abusive, harassing, or otherwise unacceptable behavior may
be reported by contacting the project team at thach@tinyusb.org. All
complaints will be reviewed and investigated and will result in a
response that is deemed necessary and appropriate to the circumstances.
The project team is obligated to maintain confidentiality with regard to
the reporter of an incident. Further details of specific enforcement
policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in
good faith may face temporary or permanent repercussions as determined
by other members of the project's leadership.
Attribution
-----------
This Code of Conduct is adapted from the `Contributor
Covenant <https://www.contributor-covenant.org>`__, version 1.4,
available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

View file

@ -1,97 +0,0 @@
# TinyUSB contributors (sorted alphabetically)
- **[Adafruit Team](https://github.com/adafruit)**
- Main supporter and sponsor for hardware boards and kits
- Discussion and suggestion for feature and improvement
- Design the project logo
- **[Ha Thach](https://github.com/hathach)**
- *Author and maintainer*
- Most features development
- **[Hristo Gochkov](https://github.com/me-no-dev)**
- Improve ESP32s2 DCD
- **[Jan Dümpelmann](https://github.com/duempel)**
- Improve transfer performance for Synopsys DCD for STM32 MCUs
- **[Jeff Epler](https://github.com/jepler)**
- Improve MIDI class driver
- **[Jerzy Kasenberg](https://github.com/kasjer)**
- Add new DCD port for **Dialog DA1469x**
- Add new class driver for **Bluetooth HCI**
- Add ISO transfer for STM32 Synopsys, Nordic nRF, Dialog DA1469x
- Improve Audio driver and add uac2_headset example
- Improve STM32 Synopsys DCD with various PRs
- **[J McCarthy](https://github.com/xmos-jmccarthy)**
- Add new DFU 1.1 class driver
- Add new example for dfu
- **[Kamil Tomaszewski](https://github.com/kamtom480)**
- Add new DCD port for **Sony CXD56** (spresnese board)
- **[Kay Sievers](https://github.com/kaysievers)**
- Improve MIDI driver with packet API
- **[Koji KITAYAMA](https://github.com/kkitayam)**
- Add new DCD port for **NXP Kinetis KL25**
- Add new DCD port for **Renesas RX63n** with GR-CITRUS board
- **[Nathan Conrad](https://github.com/pigrew)**
- Add new DCD port for **STM32 fsdev** Fullspeed device for STM32 L0, F0, F1, F3 etc ...
- Add new class driver for **USB Test and Measurement Class (USBTMC)**
- Various improvement e.g Zero-length packet, Lint setup
- Board support for STM32F070RB Nucleo, STM32F303 Discovery
- **[Peter Lawrence](https://github.com/majbthrd)**
- Add new DCD port for **Nuvoton NUC 120, 121, 125, 126, 505**
- Add new class driver for **USBNET RNDIS, CDC-ECM**
- Add *net_lwip_webserver* example for demonstration of usbnet with lwip
- Board support for NuTiny NUC120, NUC121s, NUC125s, NUC126V, NUC505
- Improve multiple cdc interfaces API & add cdc_dual_ports example
- **[Rafael Silva](https://github.com/perigoso)**
- Add new DCD port for **Silabs EFM32GG12** with SLTB009A board
- **[Raspberry Pi Team](https://github.com/raspberrypi)**
- Add new DCD port for **Raspberry Pi RP2040**
- Add new HCD port for **Raspberry Pi RP2040**
- **[Reinhard Panhuber](https://github.com/PanRe)**
- Add new class driver for **USB Audio Class 2.0 (UAC2)**
- Rework tu_fifo with unmasked pointer, add DMA support, and constant address support
- Add new DCD/USBD edpt_xfer_fifo() API for optimizing endpoint transfer
- Add and greatly improve Isochronous transfer
- Add new audio examples: audio_test and audio_4_channel_mic
- **[Scott Shawcroft](https://github.com/tannewt)**
- Add new DCD port for **SAMD21 and SAMD51**
- Add new class driver for **Musical Instrument Digital Interface (MIDI)**
- Improve USBD control transfer, MSC, CDC class driver
- Board support for Metro M0 & M4 express
- Write the excellent porting.md documentation
- Add initial Makefile
- **[Sean Cross](https://github.com/xobs)**
- Add new DCD port for **ValentyUSB eptri** (fomu board)
- **[Sylvain "tnt" Munaut](https://github.com/smunaut)**
- Add new class driver for DFU Runtime
- **[Timon Skerutsch](https://github.com/PTS93)**
- Add hid_test.js script and extensive test for bi-directional raw HID
- **[Tod E. Kurt](https://github.com/todbot)**
- Add hid_test.js script and extensive test for bi-directional raw HID
- **[Uwe Bonnes](https://github.com/UweBonnes)**
- Improve STM32 Synopsys highspeed DCD
- **[William D. Jones](https://github.com/cr1901)**
- Add new DCD port for **Synopsys DesignWare** for STM32 L4, F2, F4, F7, H7 etc ...
- Add new DCD port for **TI MSP430**
- Board support for STM32F407 Discovery, STM32H743 Nucleo, pyboard v1.1, msp_exp430f5529lp etc ...
**[Full contributors list](https://github.com/hathach/tinyusb/contributors).**

208
CONTRIBUTORS.rst Normal file
View file

@ -0,0 +1,208 @@
************
Contributors
************
Special thanks to all the people who spent their precious time and effort to help this project so far.
list contributors and their awesome work for the stack:
Notable contributors
====================
(sorted alphabetically)
`Adafruit Team <https://github.com/adafruit>`__
-----------------------------------------------
- Main supporter and sponsor for hardware boards and kits
- Discussion and suggestion for feature and improvement
- Design the project logo
`Gordon McNab <https://github.com/ftdigdm>`__
---------------------------------------------
- Add new DCD port for Bridgetek FT90x and FT93x
`Ha Thach <https://github.com/hathach>`__
-----------------------------------------
- *Author and maintainer*
- Most features development
`Hristo Gochkov <https://github.com/me-no-dev>`__
-------------------------------------------------
- Improve ESP32s2 DCD
`Jacob Berg Potter <https://github.com/j4cbo>`__
------------------------------------------------
- Add new class driver for network CDC-NCM
`Jan Dümpelmann <https://github.com/duempel>`__
-----------------------------------------------
- Improve transfer performance for Synopsys DCD for STM32 MCUs
`Jeff Epler <https://github.com/jepler>`__
------------------------------------------
- Improve MIDI class driver
`Jerzy Kasenberg <https://github.com/kasjer>`__
-----------------------------------------------
- Add new DCD port for Dialog DA1469x
- Add new DCD port for PIC32MZ
- Add new class driver for Bluetooth HCI
- Add ISO transfer for STM32 Synopsys, Nordic nRF, Dialog DA1469x
- Improve Audio driver and add uac2\_headset example
- Improve STM32 Synopsys DCD with various PRs
`J McCarthy <https://github.com/xmos-jmccarthy>`__
--------------------------------------------------
- Add new DFU 1.1 class driver
- Add new example for dfu
`Kamil Tomaszewski <https://github.com/kamtom480>`__
----------------------------------------------------
- Add new DCD port for Sony CXD56 (spresnese board)
`Kay Sievers <https://github.com/kaysievers>`__
-----------------------------------------------
- Improve MIDI driver with packet API
`Koji KITAYAMA <https://github.com/kkitayam>`__
-----------------------------------------------
- Add new DCD and HCD port for NXP Kinetis KL25
- Add new DCD and HCD port for Renesas RX family (RX600, RX700 ..) with GR-CITRUS, RX65n target board
- Add new DCD and HCD port for Mentor musb with MSP432E4
- Add new class driver for USB Video Class (UVC 1.5)
`Nathan Conrad <https://github.com/pigrew>`__
---------------------------------------------
- Add new DCD port for STM32 fsdev Fullspeed device for STM32 L0,
F0, F1, F3 etc ...
- Add new class driver for USB Test and Measurement Class (USBTMC)
- Various improvement e.g Zero-length packet, Lint setup
- Board support for STM32F070RB Nucleo, STM32F303 Discovery
`Peter Lawrence <https://github.com/majbthrd>`__
------------------------------------------------
- Add new DCD port for Nuvoton NUC 120, 121, 125, 126, 505
- Add new class driver for network RNDIS, CDC-ECM
- Enhance CDC-NCM network driver to compatible with RNDIS/ECM
- Add *net\_lwip\_webserver* example for demonstration of usbnet with lwip
- Board support for NuTiny NUC120, NUC121s, NUC125s, NUC126V, NUC505
- Improve multiple cdc interfaces API & add cdc\_dual\_ports example
`Rafael Silva <https://github.com/perigoso>`__
----------------------------------------------
- Port DCD Synopsys to support Silabs EFM32GG12 with SLTB009A board
- Rewrite documentation in rst and setup for readthedocs
- Generalize Renesas driver and support RA family with EK-RA4M3 board
`Raspberry Pi Team <https://github.com/raspberrypi>`__
------------------------------------------------------
- Add new DCD port for Raspberry Pi RP2040
- Add new HCD port for Raspberry Pi RP2040
`Reinhard Panhuber <https://github.com/PanRe>`__
------------------------------------------------
- Add new class driver for USB Audio Class 2.0 (UAC2)
- Rework tu\_fifo with unmasked pointer, add DMA support, and constant address support
- Add new DCD/USBD edpt\_xfer\_fifo() API for optimizing endpoint transfer
- Add and greatly improve Isochronous transfer
- Add new audio examples: audio\_test and audio\_4\_channel\_mic
`Scott Shawcroft <https://github.com/tannewt>`__
------------------------------------------------
- Add new DCD port for SAMD21 and SAMD51
- Add new class driver for Musical Instrument Digital Interface (MIDI)
- Improve USBD control transfer, MSC, CDC class driver
- Board support for Metro M0 & M4 express
- Write the excellent porting.md documentation
- Add initial Makefile
`Sean Cross <https://github.com/xobs>`__
----------------------------------------
- Add new DCD port for ValentyUSB eptri (fomu board)
`Sylvain "tnt" Munaut <https://github.com/smunaut>`__
-----------------------------------------------------
- Add new class driver for DFU Runtime
`Tian Yunhao <https://github.com/t123yh>`__
-------------------------------------------
- Add new DCD port for Allwinner F1C100S/F1C200S
- Add support for osal_rtx4
`Timon Skerutsch <https://github.com/PTS93>`__
----------------------------------------------
- Add hid\_test.js script and extensive test for bi-directional raw HID
`Tod E. Kurt <https://github.com/todbot>`__
-------------------------------------------
- Add hid\_test.js script and extensive test for bi-directional raw HID
`Uwe Bonnes <https://github.com/UweBonnes>`__
---------------------------------------------
- Improve STM32 Synopsys highspeed DCD
`William D. Jones <https://github.com/cr1901>`__
------------------------------------------------
- Add new DCD port for Synopsys DesignWare for STM32 L4, F2, F4,
F7, H7 etc ...
- Add new DCD port for TI MSP430
- Board support for STM32F407 Discovery, STM32H743 Nucleo, pyboard v1.1, msp\_exp430f5529lp etc ...
`Zixun Li <https://github.com/HiFiPhile>`__
-------------------------------------------
- Add new DCD port for Microchip SAMx7x
- Add IAR compiler support
- Improve UAC2, CDC, DFU class driver
- Improve stm32_fsdev, chipidea_ci_hs, lpc_ip3511 DCD
- Host IAR Build CI & hardware in the loop (HITL) test
`Full contributors list <https://github.com/hathach/tinyusb/contributors>`__
============================================================================

111
README.md
View file

@ -1,111 +0,0 @@
# TinyUSB
![TinyUSB](https://user-images.githubusercontent.com/2847802/108847382-a0a6a580-75ad-11eb-96d9-280c79389281.png)
[![Build Status](https://github.com/hathach/tinyusb/workflows/Build/badge.svg)](https://github.com/hathach/tinyusb/actions) [![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)
TinyUSB is an open-source cross-platform USB Host/Device stack for embedded system, designed to be memory-safe with no dynamic allocation and thread-safe with all interrupt events are deferred then handled in the non-ISR task function.
![tinyusb](https://user-images.githubusercontent.com/249515/49858616-f60c9700-fe27-11e8-8627-e76936352ff7.png)
```
.
├── docs # Documentation
├── examples # Sample with Makefile build support
├── hw
│   ├── bsp # Supported boards source files
│   └── mcu # Low level mcu core & peripheral drivers
├── lib # Sources from 3rd party such as freeRTOS, fatfs ...
├── src # All sources files for TinyUSB stack itself.
├── test # Unit tests for the stack
└── tools # Files used internally
```
## Contributors
Special thanks to all the people who spent their precious time and effort to help this project so far. Check out the
[CONTRIBUTORS.md](CONTRIBUTORS.md) file for the list of all contributors and their awesome work for the stack.
## Supported MCUs
The stack supports the following MCUs:
- **Dialog:** DA1469x
- **Espressif:** ESP32-S2, ESP32-S3
- **MicroChip:** SAMD11, SAMD21, SAMD51, SAME5x, SAMG55
- **NordicSemi:** nRF52833, nRF52840
- **Nuvoton:** NUC120, NUC121/NUC125, NUC126, NUC505
- **NXP:**
- iMX RT Series: RT1011, RT1015, RT1021, RT1052, RT1062, RT1064
- Kinetis: KL25
- LPC Series: 11u, 13, 15, 17, 18, 40, 43, 51u, 54, 55
- **Raspberry Pi:** RP2040
- **Renesas:** RX63N
- **Silabs:** EFM32GG12
- **Sony:** CXD56
- **ST:** STM32 series: L0, F0, F1, F2, F3, F4, F7, H7 both FullSpeed and HighSpeed
- **TI:** MSP430
- **[ValentyUSB](https://github.com/im-tomu/valentyusb)** eptri
[Here is the list of supported Boards](docs/boards.md) that can be used with provided examples.
## Device Stack
Supports multiple device configurations by dynamically changing usb descriptors. Low power functions such like suspend, resume, and remote wakeup. Following device classes are supported:
- Audio Class 2.0 (UAC2) still work in progress
- Bluetooth Host Controller Interface (BTH HCI)
- Communication Class (CDC)
- Device Firmware Update (DFU): DFU mode (WIP) and Runtinme
- Human Interface Device (HID): Generic (In & Out), Keyboard, Mouse, Gamepad etc ...
- Mass Storage Class (MSC): with multiple LUNs
- Musical Instrument Digital Interface (MIDI)
- Network with RNDIS, CDC-ECM (work in progress)
- USB Test and Measurement Class (USBTMC)
- Vendor-specific class support with generic In & Out endpoints. Can be used with MS OS 2.0 compatible descriptor to load winUSB driver without INF file.
- [WebUSB](https://github.com/WICG/webusb) with vendor-specific class
If you have special need, `usbd_app_driver_get_cb()` can be used to write your own class driver without modifying the stack. Here is how RPi team add their reset interface [raspberrypi/pico-sdk#197](https://github.com/raspberrypi/pico-sdk/pull/197)
## Host Stack
**Most active development is on the Device stack. The Host stack is under rework and largely untested.**
- Human Interface Device (HID): Keyboard, Mouse, Generic
- Mass Storage Class (MSC)
- Hub currently only supports 1 level of hub (due to my laziness)
## OS Abstraction layer
TinyUSB is completely thread-safe by pushing all ISR events into a central queue, then process it later in the non-ISR context task function. It also uses semaphore/mutex to access shared resources such as CDC FIFO. Therefore the stack needs to use some of OS's basic APIs. Following OSes are already supported out of the box.
- **No OS**
- **FreeRTOS**
- **Mynewt** Due to the newt package build system, Mynewt examples are better to be on its [own repo](https://github.com/hathach/mynewt-tinyusb-example)
## Getting Started
[Here are the details for getting started](docs/getting_started.md) with the stack.
## Porting
Want to help add TinyUSB support for a new MCU? Read [here](docs/porting.md) for an explanation on the low-level API needed by TinyUSB.
## License
MIT license for all TinyUSB sources `src` folder, [Full license is here](LICENSE). However, each file is individually licensed especially those in `lib` and `hw/mcu` folder. Please make sure you understand all the license term for files you use in your project.
## Uses
TinyUSB is currently used by these other projects:
- [Adafruit nRF52 Arduino](https://github.com/adafruit/Adafruit_nRF52_Arduino)
- [Adafruit nRF52 Bootloader](https://github.com/adafruit/Adafruit_nRF52_Bootloader)
- [Adafruit SAMD Arduino](https://github.com/adafruit/ArduinoCore-samd)
- [CircuitPython](https://github.com/adafruit/circuitpython)
- [Espressif IDF](https://github.com/espressif/esp-idf)
- [MicroPython](https://github.com/micropython/micropython)
- [mynewt](https://mynewt.apache.org)
- [Raspberry Pi Pico SDK](https://github.com/raspberrypi/pico-sdk)
- [TinyUF2 Bootloader](https://github.com/adafruit/tinyuf2)
- [TinyUSB Arduino Library](https://github.com/adafruit/Adafruit_TinyUSB_Arduino)

168
README.rst Normal file
View file

@ -0,0 +1,168 @@
.. figure:: docs/assets/logo.svg
:alt: TinyUSB
|Build Status| |Documentation Status| |Fuzzing Status| |License|
TinyUSB is an open-source cross-platform USB Host/Device stack for
embedded system, designed to be memory-safe with no dynamic allocation
and thread-safe with all interrupt events are deferred then handled in
the non-ISR task function.
Please take a look at the online `documentation <https://docs.tinyusb.org/>`__.
.. figure:: docs/assets/stack.svg
:width: 500px
:alt: stackup
::
.
├── docs # Documentation
├── examples # Sample with Makefile build support
├── hw
│ ├── bsp # Supported boards source files
│ └── mcu # Low level mcu core & peripheral drivers
├── lib # Sources from 3rd party such as freeRTOS, fatfs ...
├── src # All sources files for TinyUSB stack itself.
├── test # Unit tests for the stack
└── tools # Files used internally
Supported MCUs
==============
The stack supports the following MCUs:
- **Allwinner:** F1C100s/F1C200s
- **Analog:** MAX3421e (aka Arduino usb host shield)
- **Broadcom:** BCM2837, BCM2711
- **Dialog:** DA1469x
- **Espressif:** ESP32-S2, ESP32-S3
- **GigaDevice:** GD32VF103
- **Infineon:** XMC4500
- **MicroChip:** SAMD11, SAMD21, SAMD51, SAME5x, SAMG55, SAML21, SAML22, SAME7x
- **NordicSemi:** nRF52833, nRF52840, nRF5340
- **Nuvoton:** NUC120, NUC121/NUC125, NUC126, NUC505
- **NXP:**
- iMX RT Series: RT10xx, RT11xx
- Kinetis: KL25, K32L2
- LPC Series: 11u, 13, 15, 17, 18, 40, 43, 51u, 54, 55
- MCX: N9x
- **Raspberry Pi:** RP2040
- **Renesas:**
- RX Series: 63n, 65n, 72n
- RA Series: 4m1, 4m3, 6m1, 6m5
- **Silabs:** EFM32GG
- **Sony:** CXD56
- **ST:** STM32 series: F0, F1, F2, F3, F4, F7, H7, G0, G4, L0, L1, L4, L4+, WB
- **TI:** MSP430, MSP432E4, TM4C123
- **ValentyUSB:** eptri
- **WCH:** CH32V307
Here is the list of `Supported Devices`_ that can be used with provided examples.
Device Stack
============
Supports multiple device configurations by dynamically changing USB descriptors, low power functions such like suspend, resume, and remote wakeup. The following device classes are supported:
- Audio Class 2.0 (UAC2)
- Bluetooth Host Controller Interface (BTH HCI)
- Communication Device Class (CDC)
- Device Firmware Update (DFU): DFU mode (WIP) and Runtime
- Human Interface Device (HID): Generic (In & Out), Keyboard, Mouse, Gamepad etc ...
- Mass Storage Class (MSC): with multiple LUNs
- Musical Instrument Digital Interface (MIDI)
- Network with RNDIS, Ethernet Control Model (ECM), Network Control Model (NCM)
- Test and Measurement Class (USBTMC)
- Video class 1.5 (UVC): work in progress
- Vendor-specific class support with generic In & Out endpoints. Can be used with MS OS 2.0 compatible descriptor to load winUSB driver without INF file.
- `WebUSB <https://github.com/WICG/webusb>`__ with vendor-specific class
If you have a special requirement, `usbd_app_driver_get_cb()` can be used to write your own class driver without modifying the stack. Here is how the RPi team added their reset interface `raspberrypi/pico-sdk#197 <https://github.com/raspberrypi/pico-sdk/pull/197>`_
Host Stack
==========
- Human Interface Device (HID): Keyboard, Mouse, Generic
- Mass Storage Class (MSC)
- Communication Device Class: CDC-ACM
- Vendor serial over USB: FTDI, CP210x
- Hub with multiple-level support
Similar to the Device Stack, if you have a special requirement, `usbh_app_driver_get_cb()` can be used to write your own class driver without modifying the stack.
TypeC PD Stack
==============
- Power Delivery 3.0 (PD3.0) with USB Type-C support (WIP)
- Super early stage, only for testing purpose
- Only support STM32 G4
OS Abstraction layer
====================
TinyUSB is completely thread-safe by pushing all Interrupt Service Request (ISR) events into a central queue, then processing them later in the non-ISR context task function. It also uses semaphore/mutex to access shared resources such as Communication Device Class (CDC) FIFO. Therefore the stack needs to use some of the OS's basic APIs. Following OSes are already supported out of the box.
- **No OS**
- **FreeRTOS**
- `RT-Thread <https://github.com/RT-Thread/rt-thread>`_: `repo <https://github.com/RT-Thread-packages/tinyusb>`_
- **Mynewt** Due to the newt package build system, Mynewt examples are better to be on its `own repo <https://github.com/hathach/mynewt-tinyusb-example>`_
Docs
====
- Info
- `Uses`_
- `Changelog`_
- `Contributors`_
- `Reference`_
- `Supported Devices`_
- `Getting Started`_
- `Dependencies`_
- `Concurrency`_
- `Contributing`_
- `Code of Conduct`_
- `Structure`_
- `Porting`_
License
=======
All TinyUSB sources in the ``src`` folder are licensed under MIT
license, the `Full license is here <LICENSE>`__. However, each file can be
individually licensed especially those in ``lib`` and ``hw/mcu`` folder.
Please make sure you understand all the license term for files you use
in your project.
.. |Build Status| image:: https://github.com/hathach/tinyusb/actions/workflows/cmake_arm.yml/badge.svg
:target: https://github.com/hathach/tinyusb/actions
.. |Documentation Status| image:: https://readthedocs.org/projects/tinyusb/badge/?version=latest
:target: https://docs.tinyusb.org/en/latest/?badge=latest
.. |Fuzzing Status| image:: https://oss-fuzz-build-logs.storage.googleapis.com/badges/tinyusb.svg
:target: https://oss-fuzz-build-logs.storage.googleapis.com/index.html#tinyusb
.. |License| image:: https://img.shields.io/badge/license-MIT-brightgreen.svg
:target: https://opensource.org/licenses/MIT
.. _Uses: docs/info/uses.rst
.. _Changelog: docs/info/changelog.rst
.. _Contributors: CONTRIBUTORS.rst
.. _Reference: docs/reference/index.rst
.. _Supported Devices: docs/reference/supported.rst
.. _Getting Started: docs/reference/getting_started.rst
.. _Dependencies: docs/reference/dependencies.rst
.. _Concurrency: docs/reference/concurrency.rst
.. _Contributing: docs/contributing/index.rst
.. _Code of Conduct: CODE_OF_CONDUCT.rst
.. _Structure: docs/contributing/structure.rst
.. _Porting: docs/contributing/porting.rst

18
docs/assets/logo.svg Normal file
View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="280" height="140" version="1.1" viewBox="0 0 74.083 37.042" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(-60.931 -79.245)">
<g transform="matrix(1.0442 0 0 1.1531 -27.105 33.588)" fill="#fff">
<path d="m86.972 39.594c-1.4683 3.2e-5 -2.6588 1.181-2.66 2.6384v26.844c3.3e-5 1.4583 1.1909 2.6404 2.66 2.6404h65.63c1.469-3.2e-5 2.66-1.1822 2.66-2.6404v-26.844c-1e-3 -1.4575-1.1917-2.6384-2.66-2.6384z" color="#000000" fill="#fff" style="-inkscape-stroke:none"/>
</g>
<g transform="matrix(.35278 0 0 -.35278 -160.36 421.93)" fill="#231f20">
<path transform="translate(672.09 955.48)" d="m0 0h-21.484v-12.601h-5.349v-6.436h5.349v-25.383c0-11.331 7.252-13.87 17.223-13.87 4.352 0 8.613 0.272 12.873 0.907v6.073c-0.816-0.09-2.266-0.362-3.535-0.362-3.807 0-5.077 0.816-5.077 4.896v27.739h8.612v6.436h-8.612z"/>
<path transform="translate(693.61 925.33)" d="m0 0h-0.049c-1.518 0-2.165-0.896-2.165-2.24v-0.05h4.504v0.05c0 1.344-0.771 2.24-2.29 2.24"/>
<path transform="translate(700.92 925.5)" d="m0 0h-0.124c-1.443 0-2.265-0.995-2.265-2.389v-0.074h4.654v0.074c0 1.394-0.822 2.389-2.265 2.389"/>
<path transform="translate(750.09 943.78)" d="m0 0c-6.165 0-11.876-2.267-14.505-5.893v4.986h-20.578v-45.326h21.484v36.533c1.27 0.272 2.449 0.453 3.717 0.453 4.715 0 5.44-2.538 5.44-6.436v-30.55h21.484v30.278c0 11.694-7.523 15.955-17.042 15.955"/>
<path transform="translate(811.83 942.88)" d="m0 0-10.516-23.57-11.784 23.57h-23.388l24.204-48.046-6.799-15.411h8.249l28.193 63.457z"/>
<path transform="translate(706 920)" d="m0 0h-17.421v2.637c0 2.938 1.194 5.675 4.43 5.675h0.124c2.24 0 3.335-1.269 3.932-2.514 0.647 1.469 1.667 2.738 3.883 2.738h0.224c3.086 0 4.828-2.39 4.828-5.774zm-0.598-9.412h-3.16c0.622 1.07 0.971 1.917 0.971 2.737 0 0.871-0.424 1.618-1.493 1.618h-0.05c-0.797 0-1.394-0.249-3.037-1.692-2.339-2.065-3.459-2.912-5.574-2.912h-0.05c-2.787 0-4.555 1.816-4.555 4.231 0 1.219 0.175 1.941 0.548 2.687h3.161c-0.548-0.945-0.797-1.518-0.797-2.314 0-0.845 0.548-1.568 1.493-1.568h0.05c0.821 0 1.12 0.25 2.788 1.692 2.762 2.39 3.832 2.912 5.824 2.912h0.048c2.739 0 4.555-1.917 4.555-4.305 0-1.195-0.298-2.215-0.722-3.086m-4.479-10.93h-12.344v3.011h12.643c1.567 0 2.189 0.548 2.189 1.319 0 0.772-0.622 1.32-2.189 1.32h-12.643v3.01h12.344c3.658 0 5.301-1.841 5.301-4.33 0-2.488-1.643-4.33-5.301-4.33m-9.641 53.817h12.114v-10.601h-12.114zm14.114 2h-16.114v-12.601h-2.685v-45.326h21.484v45.326h-2.685z"/>
<path d="m692.79 947.02h2.827v2.319h-2.827z"/>
<path d="m699.06 947.02h2.826v2.319h-2.826z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

1
docs/assets/stack.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 84 KiB

View file

@ -1,213 +0,0 @@
# Boards
The board support code is only used for self-contained examples and testing. It is not used when TinyUSB is part of a larger project. It is responsible for getting the MCU started and the USB peripheral clocked with minimal of on-board devices
- One LED : for status
- One Button : to get input from user
- One UART : optional for device, but required for host examples
## Supported Boards
This code base already had supported for a handful of following boards (sorted alphabetically)
### Dialog DA146xx
- [DA14695 Development Kit USB](https://www.dialog-semiconductor.com/products/da14695-development-kit-usb)
- [DA1469x Development Kit Pro](https://www.dialog-semiconductor.com/products/da14695-development-kit-pro)
### Espressif ESP32-S2
- Adafruit Feather ESP32-S2
- [Adafruit Magtag 2.9" E-Ink WiFi Display](https://www.adafruit.com/product/4800)
- [Adafruit Metro ESP32-S2](https://www.adafruit.com/product/4775)
- [ESP32-S2-Kaluga-1](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-esp32-s2-kaluga-1-kit.html)
- [ESP32-S2-Saola-1](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-saola-1-v1.2.html)
### MicroChip SAMD11 & SAMD21
- [Adafruit Circuit Playground Express](https://www.adafruit.com/product/3333)
- [Adafruit Feather M0 Express](https://www.adafruit.com/product/3403)
- [Adafruit ItsyBitsy M0 Express](https://www.adafruit.com/product/3727)
- [Adafruit Metro M0 Express](https://www.adafruit.com/product/3505)
- [Great Scott Gadgets LUNA](https://greatscottgadgets.com/luna/)
- [Microchip SAMD11 Xplained Pro](https://www.microchip.com/developmenttools/ProductDetails/atsamd11-xpro)
- [Microchip SAMD21 Xplained Pro](https://www.microchip.com/DevelopmentTools/ProductDetails/ATSAMD21-XPRO)
- [Seeeduino Xiao](https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html)
### MicroChip SAMD51 & SAME54
- [Adafruit Feather M4 Express](https://www.adafruit.com/product/3857)
- [Adafruit ItsyBitsy M4 Express](https://www.adafruit.com/product/3800)
- [Adafruit PyBadge](https://www.adafruit.com/product/4200)
- [Adafruit PyPortal](https://www.adafruit.com/product/4116)
- [Adafruit Metro M4 Express](https://www.adafruit.com/product/3382)
- [D5035-01](https://github.com/RudolphRiedel/USB_CAN-FD)
- [Microchip SAME54 Xplained Pro](https://www.microchip.com/developmenttools/productdetails/atsame54-xpro)
### MicroChip SAMG
- [Microchip SAMG55 Xplained Pro](https://www.microchip.com/DevelopmentTools/ProductDetails/PartNO/ATSAMG55-XPRO)
### MicroChip SAML22
- [SAML22 Feather](https://github.com/joeycastillo/Feather-Projects/tree/main/SAML22%20Feather)
- [Sensor Watch](https://github.com/joeycastillo/Sensor-Watch)
### Nordic nRF5x
- [Adafruit Circuit Playground Bluefruit](https://www.adafruit.com/product/4333)
- [Adafruit CLUE](https://www.adafruit.com/product/4500)
- [Adafruit Feather nRF52840 Express](https://www.adafruit.com/product/4062)
- [Adafruit Feather nRF52840 Sense](https://www.adafruit.com/product/4516)
- [Adafruit ItsyBitsy nRF52840 Express](https://www.adafruit.com/product/4481)
- [Arduino Nano 33 BLE](https://store.arduino.cc/usa/nano-33-ble)
- [Arduino Nano 33 BLE Sense](https://store.arduino.cc/usa/nano-33-ble-sense)
- [Maker Diary nRF52840 MDK Dongle](https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle)
- [Nordic nRF52840 Development Kit (aka pca10056)](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK)
- [Nordic nRF52840 Dongle (aka pca10059)](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-Dongle)
- [Nordic nRF52833 Development Kit (aka pca10100)](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52833-DK)
- [Raytac MDBT50Q-RX Dongle](https://www.raytac.com/product/ins.php?index_id=89)
### Nuvoton
- NuTiny SDK NUC120
- [NuTiny NUC121S](https://direct.nuvoton.com/en/nutiny-nuc121s)
- [NuTiny NUC125S](https://direct.nuvoton.com/en/nutiny-nuc125s)
- [NuTiny NUC126V](https://direct.nuvoton.com/en/nutiny-nuc126v)
- [NuTiny SDK NUC505Y](https://direct.nuvoton.com/en/nutiny-nuc505y)
### NXP iMX RT
- [MIMX RT1010 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1010-evaluation-kit:MIMXRT1010-EVK)
- [MIMX RT1015 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1015-evaluation-kit:MIMXRT1015-EVK)
- [MIMX RT1020 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1020-evaluation-kit:MIMXRT1020-EVK)
- [MIMX RT1050 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1050-evaluation-kit:MIMXRT1050-EVK)
- [MIMX RT1060 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/mimxrt1060-evk-i.mx-rt1060-evaluation-kit:MIMXRT1060-EVK)
- [MIMX RT1064 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/mimxrt1064-evk-i.mx-rt1064-evaluation-kit:MIMXRT1064-EVK)
- [Teensy 4.0 Development Board](https://www.pjrc.com/store/teensy40.html)
### NXP Kinetis
- [FRDM-KL25Z](https://www.nxp.com/design/development-boards/freedom-development-boards/mcu-boards/freedom-development-platform-for-kinetis-kl14-kl15-kl24-kl25-mcus:FRDM-KL25Z)
### NXP LPC 11-13-15
- [LPCXpresso 11u37](https://www.nxp.com/design/microcontrollers-developer-resources/lpcxpresso-boards/lpcxpresso-board-for-lpc11u37h:OM13074)
- [LPCXpresso 11u68](https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc11u68:OM13058)
- [LPCXpresso 1347](https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc1347:OM13045)
- [LPCXpresso 1549](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1500-cortex-m3/lpcxpresso-board-for-lpc1549:OM13056)
### NXP LPC 17-40
- [ARM mbed LPC1768](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1700-cortex-m3/arm-mbed-lpc1768-board:OM11043)
- [Embedded Artists LPC4088 Quick Start board](https://www.embeddedartists.com/products/lpc4088-quickstart-board)
- [LPCXpresso 1769](https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc1769:OM13000)
### NXP LPC 18-43
- [Embedded Artists LPC4357 Developer Kit](http://www.embeddedartists.com/products/kits/lpc4357_kit.php)
- [Keil MCB1800 Evaluation Board](http://www.keil.com/mcb1800)
- [LPCXpresso18S37 Development Board](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc4000-cortex-m4/lpcxpresso18s37-development-board:OM13076)
- [NGX LPC4330-Xplorer](https://www.nxp.com/design/designs/lpc4330-xplorer-board:OM13027)
### NXP LPC 51
- [LPCXpresso 51U68](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpcxpresso51u68-for-the-lpc51u68-mcus:OM40005)
### NXP LPC 54
- [LPCXpresso 54114](https://www.nxp.com/design/microcontrollers-developer-resources/lpcxpresso-boards/lpcxpresso54114-board:OM13089)
## NXP LPC55
- [Double M33 Express](https://www.crowdsupply.com/steiert-solutions/double-m33-express)
- [LPCXpresso 55s28 EVK](https://www.nxp.com/design/software/development-software/lpcxpresso55s28-development-board:LPC55S28-EVK)
- [LPCXpresso 55s69 EVK](https://www.nxp.com/design/development-boards/lpcxpresso-boards/lpcxpresso55s69-development-board:LPC55S69-EVK)
- [MCU-Link](https://www.nxp.com/design/development-boards/lpcxpresso-boards/mcu-link-debug-probe:MCU-LINK)
### Renesas RX
- [GR-CITRUS](https://www.renesas.com/us/en/products/gadget-renesas/boards/gr-citrus)
### Raspberry Pi RP2040
- [Adafruit Feather RP2040](https://www.adafruit.com/product/4884)
- [Adafruit ItsyBitsy RP2040](https://www.adafruit.com/product/4888)
- [Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
- [Raspberry Pi Pico](https://www.raspberrypi.org/products/raspberry-pi-pico/)
### Silabs
- [EFM32GG12 Thunderboard Kit (SLTB009A)](https://www.silabs.com/development-tools/thunderboard/thunderboard-gg12-kit)
### Sony
- [Sony Spresense CXD5602](https://developer.sony.com/develop/spresense)
### ST STM32
- [Adafruit Feather STM32F405](https://www.adafruit.com/product/4382)
- [Micro Python PyBoard v1.1](https://store.micropython.org/product/PYBv1.1)
- [STLink-V3 Mini](https://www.st.com/en/development-tools/stlink-v3mini.html)
- [STM32 L035c8 Discovery](https://www.st.com/en/evaluation-tools/32l0538discovery.html)
- [STM32 L4R5zi Nucleo](https://www.st.com/en/evaluation-tools/nucleo-l4r5zi.html)
- [STM32 F070rb Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f070rb.html)
- [STM32 F072 Evaluation](https://www.st.com/en/evaluation-tools/stm32072b-eval.html)
- [STM32 F072rb Discovery](https://www.st.com/en/evaluation-tools/32f072bdiscovery.html)
- STM32 F103c Blue Pill
- [STM32 F207zg Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f207zg.html)
- [STM32 F303vc Discovery](https://www.st.com/en/evaluation-tools/stm32f3discovery.html)
- STM32 F401cc Black Pill
- [STM32 F407vg Discovery](https://www.st.com/en/evaluation-tools/stm32f4discovery.html)
- [STM32 F411ce Black Pill](https://www.adafruit.com/product/4877)
- [STM32 F411ve Discovery](https://www.st.com/en/evaluation-tools/32f411ediscovery.html)
- [STM32 F412zg Discovery](https://www.st.com/en/evaluation-tools/32f412gdiscovery.html)
- [STM32 F723e Discovery](https://www.st.com/en/evaluation-tools/32f723ediscovery.html)
- [STM32 F746zg Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f746zg.html)
- [STM32 F746g Discovery](https://www.st.com/en/evaluation-tools/32f746gdiscovery.html)
- [STM32 F767zi Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f767zi.html)
- [STM32 F769i Discovery](https://www.st.com/en/evaluation-tools/32f769idiscovery.html)
- [STM32 H743zi Nucleo](https://www.st.com/en/evaluation-tools/nucleo-h743zi.html)
- [STM32 H743i Evaluation](https://www.st.com/en/evaluation-tools/stm32h743i-eval.html)
- [STM32 H745i Discovery](https://www.st.com/en/evaluation-tools/stm32h745i-disco.html)
### TI
- [MSP430F5529 USB LaunchPad Evaluation Kit](http://www.ti.com/tool/MSP-EXP430F5529LP)
### Tomu
- [Fomu](https://www.crowdsupply.com/sutajio-kosagi/fomu)
## Add your own board
If you don't possess any of supported board above. Don't worry you can easily implemented your own one by following this guide as long as the mcu is supported.
- Create new makefile for your board at `hw/bsp/<board name>/board.mk` and linker file as well if needed.
- Create new source file for your board at `hw/bsp/<board name>/<board name>.c` and implement following APIs
### Board APIs
#### board_init()
Is responsible for starting the MCU, setting up the USB clock and USB pins. It is also responsible for initializing LED and button pins.
One useful clock debugging technique is to set up a PWM output at a known value such as 500hz based on the USB clock so that you can verify it is correct with a logic probe or oscilloscope.
Setup your USB in a crystal-less mode when available. That makes the code easier to port across boards.
#### board_led_write()
Set the pin corresponding to the led to output a value that lights the LED when `state` is true.
#### board_button_read()
Return current state of button, a `1` means active (pressed), a `0` means inactive.
#### board_millis()
The function returns the elapsed number of milliseconds since startup. On ARM this is commonly done with SysTick or Timer. This provide examples a way to measure time to blink LED or delay properly. It is only required when run examples without RTOS `CFG_TUSB_OS == OPT_OS_NONE`.
#### board_uart_read()
Get characters from UART peripheral.
#### board_uart_write()
Send characters to UART peripheral.

41
docs/conf.py Normal file
View file

@ -0,0 +1,41 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# -- Project information -----------------------------------------------------
project = 'TinyUSB'
copyright = '2021, Ha Thach'
author = 'Ha Thach'
# -- General configuration ---------------------------------------------------
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx_autodoc_typehints',
]
templates_path = ['_templates']
exclude_patterns = ['_build']
# -- Options for HTML output -------------------------------------------------
html_theme = 'furo'
html_title = 'TinyUSB'
html_logo = 'assets/logo.svg'
html_favicon = 'assets/logo.svg'
html_theme_options = {
'sidebar_hide_name': True,
}
todo_include_todos = True

View file

@ -0,0 +1 @@
../../CODE_OF_CONDUCT.rst

View file

@ -0,0 +1,23 @@
************
Contributing
************
Contributing can be highly rewarding, but it can also be frustrating at times.
It takes time to review patches, and as this is an open source project, that
sometimes can take a while. The reviewing process depends on the availability
of the maintainers, who may not be always available. Please try to be
understanding through the process.
There a few guidelines you need to keep in mind when contributing. Please have
a look at them as that will make the contribution process easier for all
parties.
Index
=====
.. toctree::
:maxdepth: 2
code_of_conduct
structure
porting

View file

@ -1,4 +1,7 @@
# Porting
*******
Porting
*******
TinyUSB is designed to be a universal USB protocol stack for microcontrollers. It
handles most of the high level USB protocol and relies on the microcontroller's USB peripheral for
@ -8,129 +11,165 @@ for the microcontroller to other projects, especially those already using TinyUS
Below are instructions on how to get the cdc_msc device example running on a new microcontroller. Doing so includes adding the common code necessary for other uses while minimizing other extra code. Whenever you see a phrase or word in <> it should be replaced.
## Register defs
Register defs
-------------
The first step to adding support is including the register definitions and startup code for the
microcontroller in TinyUSB. We write the TinyUSB implementation against these structs instead of higher level functions to keep the code small and to prevent function name collisions in linking of larger projects. For ARM microcontrollers this is the CMSIS definitions. They should be
placed in the `hw/mcu/<vendor>/<chip_family>` directory.
placed in the ``hw/mcu/<vendor>/<chip_family>`` directory.
Once this is done, create a directory in `hw/bsp/<your board name>` for the specific board you are using to test the code. (Duplicating an existing board's directory is the best way to get started.) The board should be a readily available development board so that others can also test.
Once this is done, create a directory in ``hw/bsp/<your board name>`` for the specific board you are using to test the code. (Duplicating an existing board's directory is the best way to get started.) The board should be a readily available development board so that others can also test.
Build
-----
## Build
Now that those directories are in place, we can start our iteration process to get the example building successfully. To build, run from the root of TinyUSB:
`make -C examples/device/cdc_msc BOARD=<board>`
``make -C examples/device/cdc_msc BOARD=<board>``
Unless, you've read ahead, this will fail miserably. Now, lets get it to fail less by updating the files in the board directory. The code in the board's directory is responsible for setting up the microcontroller's clocks and pins so that USB works. TinyUSB itself only operates on the USB peripheral. The board directory also includes information what files are needed to build the example.
One of the first things to change is the `-DCFG_TUSB_MCU` cflag in the `board.mk` file. This is used to tell TinyUSB what platform is being built. So, add an entry to `src/tusb_option.h` and update the CFLAG to match.
One of the first things to change is the ``-DCFG_TUSB_MCU`` cflag in the ``board.mk`` file. This is used to tell TinyUSB what platform is being built. So, add an entry to ``src/tusb_option.h`` and update the CFLAG to match.
Update `board.mk`'s VENDOR and CHIP_FAMILY values when creating the directory for the struct files. Duplicate one of the other sources from `src/portable` into `src/portable/<vendor>/<chip_family>` and delete all of the implementation internals. We'll cover what everything there does later. For now, get it compiling.
Update ``board.mk``\ 's VENDOR and CHIP_FAMILY values when creating the directory for the struct files. Duplicate one of the other sources from ``src/portable`` into ``src/portable/<vendor>/<chip_family>`` and delete all of the implementation internals. We'll cover what everything there does later. For now, get it compiling.
## Implementation
At this point you should get an error due to an implementation issue and hopefully the build is setup for the new MCU. You will still need to modify the `board.mk` to include specific CFLAGS, the linker script, linker flags, source files, include directories. All file paths are relative to the top of the TinyUSB repo.
Implementation
--------------
At this point you should get an error due to an implementation issue and hopefully the build is setup for the new MCU. You will still need to modify the ``board.mk`` to include specific CFLAGS, the linker script, linker flags, source files, include directories. All file paths are relative to the top of the TinyUSB repo.
Board Support (BSP)
^^^^^^^^^^^^^^^^^^^
### Board Support (BSP)
The board support code is only used for self-contained examples and testing. It is not used when TinyUSB is part of a larger project. Its responsible for getting the MCU started and the USB peripheral clocked. It also optionally provides LED definitions that are used to blink an LED to show that the code is running.
It is located in `hw/bsp/<board name>/board_<board name>.c`.
It is located in ``hw/bsp/<board name>/board_<board name>.c``.
#### board_init
`board_init` is responsible for starting the MCU, setting up the USB clock and USB pins. It is also responsible for initializing LED pins.
board_init
~~~~~~~~~~
``board_init`` is responsible for starting the MCU, setting up the USB clock and USB pins. It is also responsible for initializing LED pins.
One useful clock debugging technique is to set up a PWM output at a known value such as 500hz based on the USB clock so that you can verify it is correct with a logic probe or oscilloscope.
Setup your USB in a crystal-less mode when available. That makes the code easier to port across boards.
#### board_led_write
Feel free to skip this until you want to verify your demo code is running. To implement, set the pin corresponding to the led to output a value that lights the LED when `state` is true.
board_led_write
~~~~~~~~~~~~~~~
### OS Abstraction Layer (OSAL)
Feel free to skip this until you want to verify your demo code is running. To implement, set the pin corresponding to the led to output a value that lights the LED when ``state`` is true.
The OS Abstraction Layer is responsible for providing basic data structures for TinyUSB that may allow for concurrency when used with an RTOS. Without an RTOS it simply handles concurrency issues between the main code and interrupts.
OS Abstraction Layer (OSAL)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
The code is almost entirely agnostic of MCU and lives in `src/osal`.
The OS Abstraction Layer is responsible for providing basic data structures for TinyUSB that may allow for concurrency when used with an RTOS. Without an RTOS it simply handles concurrency issues between the main code and interrupts. The code is almost entirely agnostic of MCU and lives in ``src/osal``.
### Device API
In RTOS configurations, tud_task()/tuh_task() blocks behind a synchronization structure when the event queue is empty, so that the scheduler may give the CPU to a different task. To take advantage of the library's capability to yield the CPU when there are no actionable USB device events, ensure that the `CFG_TUSB_OS` symbol is defined, e.g `OPT_OS_FREERTOS` enables the FreeRTOS scheduler to schedule other threads than that which calls `tud_task()/tuh_task()`.
After the USB device is setup, the USB device code works by processing events on the main thread (by calling `tud_task`). These events are queued by the USB interrupt handler. So, there are three parts to the device low-level API: device setup, endpoint setup and interrupt processing.
Device API
^^^^^^^^^^
All of the code for the low-level device API is in `src/portable/<vendor>/<chip family>/dcd_<chip family>.c`.
After the USB device is setup, the USB device code works by processing events on the main thread (by calling ``tud_task``\ ). These events are queued by the USB interrupt handler. So, there are three parts to the device low-level API: device setup, endpoint setup and interrupt processing.
#### Device Setup
All of the code for the low-level device API is in ``src/portable/<vendor>/<chip family>/dcd_<chip family>.c``.
##### dcd_init
Device Setup
~~~~~~~~~~~~
dcd_init
""""""""
Initializes the USB peripheral for device mode and enables it.
This function should enable internal D+/D- pull-up for enumeration.
##### dcd_int_enable / dcd_int_disable
dcd_int_enable / dcd_int_disable
""""""""""""""""""""""""""""""""
Enables or disables the USB device interrupt(s). May be used to prevent concurrency issues when mutating data structures shared between main code and the interrupt handler.
##### dcd_int_handler
dcd_int_handler
"""""""""""""""
Processes all the hardware generated events e.g Bus reset, new data packet from host etc ... It will be called by application in the MCU USB interrupt handler.
##### dcd_set_address
dcd_set_address
"""""""""""""""
Called when the device is given a new bus address.
If your peripheral automatically changes address during enumeration (like the nrf52) you may leave this empty and also no queue an event for the corresponding SETUP packet.
##### dcd_remote_wakeup
dcd_remote_wakeup
"""""""""""""""""
Called to remote wake up host when suspended (e.g hid keyboard)
##### dcd_connect / dcd_disconnect
dcd_connect / dcd_disconnect
""""""""""""""""""""""""""""
Connect or disconnect the data-line pull-up resistor. Define only if MCU has an internal pull-up. (BSP may define for MCU without internal pull-up.)
#### Special events
Special events
~~~~~~~~~~~~~~
You must let TinyUSB know when certain events occur so that it can continue its work. There are a few methods you can call to queue events for TinyUSB to process.
##### dcd_event_bus_signal
dcd_event_bus_signal
""""""""""""""""""""
There are a number of events that your peripheral may communicate about the state of the bus. Here is an overview of what they are. Events in **BOLD** must be provided for TinyUSB to work.
* **DCD_EVENT_RESET** - Triggered when the host resets the bus causing the peripheral to reset. Do any other internal reset you need from the interrupt handler such as resetting the control endpoint.
* DCD_EVENT_SOF - Signals the start of a new USB frame.
Calls to this look like:
.. code-block::
dcd_event_bus_signal(0, DCD_EVENT_BUS_RESET, true);
The first `0` is the USB peripheral number. Statically saying 0 is common for single USB device MCUs.
The `true` indicates the call is from an interrupt handler and will always be the case when porting in this way.
The first ``0`` is the USB peripheral number. Statically saying 0 is common for single USB device MCUs.
##### dcd_setup_received
The ``true`` indicates the call is from an interrupt handler and will always be the case when porting in this way.
SETUP packets are a special type of transaction that can occur at any time on the control endpoint, numbered `0`. Since they are unique, most peripherals have special handling for them. Their data is always 8 bytes in length as well.
dcd_setup_received
""""""""""""""""""
SETUP packets are a special type of transaction that can occur at any time on the control endpoint, numbered ``0``. Since they are unique, most peripherals have special handling for them. Their data is always 8 bytes in length as well.
Calls to this look like:
.. code-block::
dcd_event_setup_received(0, setup, true);
As before with `dcd_event_bus_signal` the first argument is the USB peripheral number and the third is true to signal its being called from an interrupt handler. The middle argument is byte array of length 8 with the contents of the SETUP packet. It can be stack allocated because it is copied into the queue.
#### Endpoints
As before with ``dcd_event_bus_signal`` the first argument is the USB peripheral number and the third is true to signal its being called from an interrupt handler. The middle argument is byte array of length 8 with the contents of the SETUP packet. It can be stack allocated because it is copied into the queue.
Endpoints
~~~~~~~~~
Endpoints are the core of the USB data transfer process. They come in a few forms such as control, isochronous, bulk, and interrupt. We won't cover the details here except with some caveats in open below. In general, data is transferred by setting up a buffer of a given length to be transferred on a given endpoint address and then waiting for an interrupt to signal that the transfer is finished. Further details below.
Endpoints within USB have an address which encodes both the number and direction of an endpoint. TinyUSB provides `tu_edpt_number` and `tu_edpt_dir` to unpack this data from the address. Here is a snippet that does it.
Endpoints within USB have an address which encodes both the number and direction of an endpoint. TinyUSB provides ``tu_edpt_number`` and ``tu_edpt_dir`` to unpack this data from the address. Here is a snippet that does it.
.. code-block::
uint8_t epnum = tu_edpt_number(ep_addr);
uint8_t dir = tu_edpt_dir(ep_addr);
##### dcd_edpt_open
dcd_edpt_open
"""""""""""""
Opening an endpoint is done for all non-control endpoints once the host picks a configuration that the device should use. At this point, the endpoint should be enabled in the peripheral and configured to match the endpoint descriptor. Pay special attention to the direction of the endpoint you can get from the helper methods above. It will likely change what registers you are setting.
Also make sure to enable endpoint specific interrupts.
##### dcd_edpt_close
dcd_edpt_close
""""""""""""""
Close an endpoint. his function is used for implementing alternate settings.
@ -138,16 +177,17 @@ After calling this, the device should not respond to any packets directed toward
Implementation is optional. Must be called from the USB task. Interrupts could be disabled or enabled during the call.
##### dcd_edpt_xfer
dcd_edpt_xfer
"""""""""""""
`dcd_edpt_xfer` is responsible for configuring the peripheral to send or receive data from the host. "xfer" is short for "transfer". **This is one of the core methods you must implement for TinyUSB to work (one other is the interrupt handler).** Data from the host is the OUT direction and data to the host is IN. It is used for all endpoints including the control endpoint 0. Make sure to handle the zero-length packet STATUS packet on endpoint 0 correctly. It may be a special transaction to the peripheral.
``dcd_edpt_xfer`` is responsible for configuring the peripheral to send or receive data from the host. "xfer" is short for "transfer". **This is one of the core methods you must implement for TinyUSB to work (one other is the interrupt handler).** Data from the host is the OUT direction and data to the host is IN. It is used for all endpoints including the control endpoint 0. Make sure to handle the zero-length packet STATUS packet on endpoint 0 correctly. It may be a special transaction to the peripheral.
Besides that, all other transactions are relatively straight-forward. The endpoint address provides the endpoint
number and direction which usually determines where to write the buffer info. The buffer and its length are usually
written to a specific location in memory and the peripheral is told the data is valid. (Maybe by writing a 1 to a
register or setting a counter register to 0 for OUT or length for IN.)
The transmit buffer alignment is determined by `CFG_TUSB_MEM_ALIGN`.
The transmit buffer alignment is determined by ``CFG_TUSB_MEM_ALIGN``.
One potential pitfall is that the buffer may be longer than the maximum endpoint size of one USB
packet. Some peripherals can handle transmitting multiple USB packets for a provided buffer (like the SAMD21).
@ -155,37 +195,47 @@ Others (like the nRF52) may need each USB packet queued individually. To make th
some state for yourself and queue up an intermediate USB packet from the interrupt handler.
Once the transaction is going, the interrupt handler will notify TinyUSB of transfer completion.
During transmission, the IN data buffer is guarenteed to remain unchanged in memory until the `dcd_xfer_complete` function is called.
During transmission, the IN data buffer is guaranteed to remain unchanged in memory until the ``dcd_xfer_complete`` function is called.
The dcd_edpt_xfer function must never add zero-length-packets (ZLP) on its own to a transfer. If a ZLP is required,
then it must be explicitly sent by the stack calling dcd_edpt_xfer(), by calling dcd_edpt_xfer() a second time with len=0.
For control transfers, this is automatically done in `usbd_control.c`.
For control transfers, this is automatically done in ``usbd_control.c``.
At the moment, only a single buffer can be transmitted at once. There is no provision for double-buffering. new dcd_edpt_xfer() will not
be called again on the same endpoint address until the driver calls dcd_xfer_complete() (except in cases of USB resets).
##### dcd_xfer_complete
dcd_xfer_complete
"""""""""""""""""
Once a transfer completes you must call dcd_xfer_complete from the USB interrupt handler to let TinyUSB know that a transaction has completed. Here is a sample call:
.. code-block::
dcd_event_xfer_complete(0, ep_addr, xfer->actual_len, XFER_RESULT_SUCCESS, true);
The arguments are:
* the USB peripheral number
* the endpoint address
* the actual length of the transfer. (OUT transfers may be smaller than the buffer given in `dcd_edpt_xfer`)
* the actual length of the transfer. (OUT transfers may be smaller than the buffer given in ``dcd_edpt_xfer``\ )
* the result of the transfer. Failure isn't handled yet.
* `true` to note the call is from an interrupt handler.
* ``true`` to note the call is from an interrupt handler.
##### dcd_edpt_stall / dcd_edpt_clear_stall
dcd_edpt_stall / dcd_edpt_clear_stall
"""""""""""""""""""""""""""""""""""""
Stalling is one way an endpoint can indicate failure such as when an unsupported command is transmitted. The pair of `dcd_edpt_stall`, `dcd_edpt_clear_stall` help manage the stall state of all endpoints.
Stalling is one way an endpoint can indicate failure such as when an unsupported command is transmitted. The pair of ``dcd_edpt_stall``\ , ``dcd_edpt_clear_stall`` help manage the stall state of all endpoints.
## Woohoo!
Woohoo!
-------
At this point you should have everything working! ;-) Of course, you may not write perfect code. Here are some tips and tricks for debugging.
Use [WireShark](https://www.wireshark.org/) or [a Beagle](https://www.totalphase.com/protocols/usb/) to sniff the USB traffic. When things aren't working its likely very early in the USB enumeration process. Figuring out where can help clue in where the issue is. For example:
Use `WireShark <https://www.wireshark.org/>`_ or `a Beagle <https://www.totalphase.com/protocols/usb/>`_ to sniff the USB traffic. When things aren't working its likely very early in the USB enumeration process. Figuring out where can help clue in where the issue is. For example:
* If the host sends a SETUP packet and its not ACKed then your USB peripheral probably isn't started correctly.
* If the peripheral is started correctly but it still didn't work, then verify your usb clock is correct. (You did output a PWM based on it right? ;-) )
* If the SETUP packet is ACKed but nothing is sent back then you interrupt handler isn't queueing the setup packet correctly. (Also, if you are using your own code instead of an example `tud_task` may not be called.) If thats OK, the `dcd_xfer_complete` may not be setting up the next transaction correctly.
* If the SETUP packet is ACKed but nothing is sent back then you interrupt handler isn't queueing the setup packet correctly. (Also, if you are using your own code instead of an example ``tud_task`` may not be called.) If that's OK, the ``dcd_xfer_complete`` may not be setting up the next transaction correctly.

View file

@ -0,0 +1,59 @@
*********
Structure
*********
Tree
====
::
.
├── docs
├── examples
├── hw
│   ├── bsp
│   └── mcu
├── lib
├── src
├── test
└── tools
docs
----
Documentation
examples
--------
Sample with Makefile build support
hw/bsp
------
Supported boards source files
hw/mcu
------
Low level mcu core & peripheral drivers
lib
---
Sources from 3rd party such as freeRTOS, fatfs ...
src
---
All sources files for TinyUSB stack itself.
test
----
Unit tests for the stack
tools
-----
Files used internally

View file

@ -1,137 +0,0 @@
# Getting Started #
## Add TinyUSB to your project
It is relatively simple to incorporate tinyusb to your (existing) project
- Copy or `git submodule` this repo into your project in a subfolder. Let's say it is *your_project/tinyusb*
- Add all the .c in the `tinyusb/src` folder to your project
- Add *your_project/tinyusb/src* to your include path. Also make sure your current include path also contains the configuration file tusb_config.h.
- Make sure all required macros are all defined properly in tusb_config.h (configure file in demo application is sufficient, but you need to add a few more such as CFG_TUSB_MCU, CFG_TUSB_OS since they are passed by IDE/compiler to maintain a unique configure for all boards).
- If you use the device stack, make sure you have created/modified usb descriptors for your own need. Ultimately you need to implement all **tud_descriptor_** callbacks for the stack to work.
- Add tusb_init() call to your reset initialization code.
- Call `tud_int_handler()` (device) and/or `tuh_int_handler()` (host) in your USB IRQ Handler
- Implement all enabled classes's callbacks.
- If you don't use any RTOSes at all, you need to continuously and/or periodically call tud_task()/tuh_task() function. All of the callbacks and functionality are handled and invoked within the call of that task runner.
~~~{.c}
int main(void)
{
your_init_code();
tusb_init(); // initialize tinyusb stack
while(1) // the mainloop
{
your_application_code();
tud_task(); // device task
tuh_task(); // host task
}
}
~~~
## Examples
For your convenience, TinyUSB contains a handful of examples for both host and device with/without RTOS to quickly test the functionality as well as demonstrate how API() should be used. Most examples will work on most of [the supported Boards](boards.md). Firstly we need to `git clone` if not already
```
$ git clone https://github.com/hathach/tinyusb tinyusb
$ cd tinyusb
```
Some TinyUSB examples also requires external submodule libraries in `/lib` such as FreeRTOS, Lightweight IP to build. Run following command to fetch them
```
$ git submodule update --init lib
```
In addition, MCU driver submodule is also needed to provide low-level MCU peripheral's driver. Luckily, it will be fetched if needed when you run the `make` to build your board.
Note: some examples especially those that uses Vendor class (e.g webUSB) may requires udev permission on Linux (and/or macOS) to access usb device. It depends on your OS distro, typically copy `/examples/device/99-tinyusb.rules` file to /etc/udev/rules.d/ then run `sudo udevadm control --reload-rules && sudo udevadm trigger` is good enough.
### Build
To build example, first change directory to an example folder.
```
$ cd examples/device/cdc_msc
```
Then compile with `make BOARD=[board_name] all`, for example
```
$ make BOARD=feather_nrf52840_express all
```
Note: `BOARD` can be found as directory name in `hw/bsp`, either in its family/boards or directly under bsp (no family).
#### Port Selection
If a board has several ports, one port is chosen by default in the individual board.mk file. Use option `PORT=x` To choose another port. For example to select the HS port of a STM32F746Disco board, use:
```
$ make BOARD=stm32f746disco PORT=1 all
```
#### Port Speed
A MCU can support multiple operational speed. By default, the example build system will use the fastest supported on the board. Use option `SPEED=full/high` e.g To force F723 operate at full instead of default high speed
```
$ make BOARD=stm32f746disco SPEED=full all
```
### Debug
To compile for debugging add `DEBUG=1`, for example
```
$ make BOARD=feather_nrf52840_express DEBUG=1 all
```
#### Log
Should you have an issue running example and/or submitting an bug report. You could enable TinyUSB built-in debug logging with optional `LOG=`. LOG=1 will only print out error message, LOG=2 print more information with on-going events. LOG=3 or higher is not used yet.
```
$ make BOARD=feather_nrf52840_express LOG=2 all
```
#### Logger
By default log message is printed via on-board UART which is slow and take lots of CPU time comparing to USB speed. If your board support on-board/external debugger, it would be more efficient to use it for logging. There are 2 protocols:
- `LOGGER=rtt`: use [Segger RTT protocol](https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/)
- Cons: requires jlink as the debugger.
- Pros: work with most if not all MCUs
- Software viewer is JLink RTT Viewer/Client/Logger which is bundled with JLink driver package.
- `LOGGER=swo`: Use dedicated SWO pin of ARM Cortex SWD debug header.
- Cons: only work with ARM Cortex MCUs minus M0
- Pros: should be compatible with more debugger that support SWO.
- Software viewer should be provided along with your debugger driver.
```
$ make BOARD=feather_nrf52840_express LOG=2 LOGGER=rtt all
$ make BOARD=feather_nrf52840_express LOG=2 LOGGER=swo all
```
### Flash
`flash` target will use the default on-board debugger (jlink/cmsisdap/stlink/dfu) to flash the binary, please install those support software in advance. Some board use bootloader/DFU via serial which is required to pass to make command
```
$ make BOARD=feather_nrf52840_express flash
$ make SERIAL=/dev/ttyACM0 BOARD=feather_nrf52840_express flash
```
Since jlink can be used with most of the boards, there is also `flash-jlink` target for your convenience.
```
$ make BOARD=feather_nrf52840_express flash-jlink
```
Some board use uf2 bootloader for drag & drop in to mass storage device, uf2 can be generated with `uf2` target
```
$ make BOARD=feather_nrf52840_express all uf2
```

25
docs/index.rst Normal file
View file

@ -0,0 +1,25 @@
:hide-toc:
*********
TinyUSB
*********
TinyUSB is an open-source cross-platform USB Host/Device stack for embedded systems,
designed to be memory-safe with no dynamic allocation and thread-safe with all interrupt events being deferred and then handled in the non-ISR task function.
.. toctree::
:caption: Index
:hidden:
Info <info/index>
Reference <reference/index>
Contributing <contributing/index>
.. toctree::
:caption: External Links
:hidden:
Source Code <https://github.com/hathach/tinyusb>
Issue Tracker <https://github.com/hathach/tinyusb/issues>
Discussions <https://github.com/hathach/tinyusb/discussions>

View file

@ -1,10 +1,323 @@
# TinyUSB Changelog
*********
Changelog
*********
## 0.10.1 - 2021.06.03
0.15.0
======
- Add codespell to detect typo
- Add support for fuzzing and bagde for oss-fuzz
- [osal]
- Allow the use of non-static allocation for FreeRTOS
- Fix FreeRTOS wrong task switch in some cases
- Fix tu_fifo memory overflown when repeatedly write to overwritable fifo (accumulated more than 2 depths)
- Better support for IAR (ARM) with ci build check for stm32 mcus.
- Fix Windows build for some mingw gnu make situations
Controller Driver (DCD & HCD)
-----------------------------
- Add new port support (WIP) for WCH CH32V307 USB Highspeed
- Add new port support (WIP) for PIC32MM/MX & PIC24
- [nRF]
- Fix endpoint internal state when closed
- Fix reception of large ISO packets
- [rp2040]
- [dcd] Implement workaround for Errata 15. This enable SOF when bulk-in endpoint is in use and reduce its bandwidth to only 80%
- [hcd] Fix shared irq slots filling up when hcd_init() is called multiple times
- [hcd] Support host bulk endpoint using hw "interrupt" endpoint. Note speed limit is 64KB/s
- [samd][dcd] Add support for ISO endpoint
- [dwc2][dcd] Add support for stm32u5xx
- [esp32sx] Fix Isochronous transfers only transmitted on even frame
- [lpc_ip3511][dcd] Add isochronous support and fix endpoint accidental write
- [ft90x] Improve and enhance support for FT9xx MCU, tested with more examples
Device Stack
------------
- [Video]
- Add support for MJPEG
- Fix probe on macOS
- [MIDI]
- Support port name strings
- fix MS Header wTotalLength computation
- [HID]
- Add FIDO descriptor template
- change length in tud_hid_report_complete_cb() from uint8 to uint16
- [CDC]
- Fix autoflush for FIFO < MPS
- Fix tx fifo memory overflown when DTR is not set and tud_cdc_write() is called repeatedly with large enough data
- [USBTMC] Fix packet size with highspeed
Host Stack
----------
- Retry a few times with transfers in enumeration since device can be unstable when starting up
- [MSC] Rework host masstorage API. Add new **host/msc_file_explorer** example
- [CDC]
- Add support for host cdc
- Fix host cdc with device without IAD e.g Arduino Due
0.14.0
======
- Improve compiler support for CCRX and IAR
- Add timeout to osal_queue_receive()
- Add tud_task_ext(timeout, in_isr) as generic version of tud_task(). Same as tuh_task_ext(), tuh_task()
- Enable more warnings -Wnull-dereference -Wuninitialized -Wunused -Wredundant-decls -Wconversion
- Add new examples
- host/bare_api to demonstrate generic (app-level) enumeration and endpoint transfer
- dual/host_hid_to_device_cdc to run both device and host stack concurrently, get HID report from host and print out to device CDC. This example only work with multiple-controller MCUs and rp2040 with the help of pio-usb as added controller.
Controller Driver (DCD & HCD)
-----------------------------
- Enhance rhports management to better support dual roles
- CFG_TUD_ENABLED/CFG_TUH_ENABLED, CFG_TUD_MAX_SPEED/CFG_TUH_MAX_SPEED can be used to replace CFG_TUSB_RHPORT0_MODE/CFG_TUSB_RHPORT1_MODE
- tud_init(rphort), tuh_init(rhport) can be used to init stack on specified roothub port (controller) instead of tusb_init(void)
- Add dcd/hcd port specific defines `TUP_` (stand for tinyusb port-specific)
- [dwc2]
- Update to support stm32 h72x, h73x with only 1 otg controller
- Fix overwrite with grstctl when disable endpoint
- [EHCI] Fix an issue with EHCI driver
- [msp430] Fix for possible bug in msp430-elf-gcc 9.3.0
- [nrf5x] Fix DMA access race condition using atomic function
- [pic32] Fix PIC32 santiy
- [rp2040]
- Add PICO-PIO-USB as controller (device/host) support for rp2040
- Use shared IRQ handlers, so user can also hook the USB IRQ
- Fix resumed signal not reported to device stack
- [stm32fsdev] Add support for stm32wb55
Device Stack
------------
- [Audio] Add support for feedback endpoint computation
- New API tud_audio_feedback_params_cb(), tud_audio_feedback_interval_isr().
- Supported computation method are: frequency with fixed/float or power of 2. Feedback with fifo count is not yet supported.
- Fix nitfs (should be 3) in TUD_AUDIO_HEADSET_STEREO_DESCRIPTOR
- Fix typo in audiod_rx_done_cb()
- [DFU] Fix coexistence with other interfaces BTH, RNDIS
- [MSC] Fix inquiry response additional length field
- [Venndor] Improve write performance
Host Stack
----------
- Add new API tuh_configure(rhport, cfg_id, cfg_param) for dynamnic port specific behavior configuration
- [HID] Open OUT endpoint if available
- [Hub] hub clear port and device interrupts
- [USBH] Major improvement
- Rework usbh control transfer with complete callback. New API tuh_control_xfer() though still only carry 1 usbh (no queueing) at a time.
- Add generic endpoint transfer with tuh_edpt_open(), tuh_edpt_xfer(). Require `CFG_TUH_API_EDPT_XFER=1`
- Support app-level enumeration with new APIs
- tuh_descriptor_get(), tuh_descriptor_get_device(), tuh_descriptor_get_configuration(), tuh_descriptor_get_hid_report()
- tuh_descriptor_get_string(), tuh_descriptor_get_manufacturer_string(), tuh_descriptor_get_product_string(), tuh_descriptor_get_serial_string()
- Also add _sync() as sync/blocking version for above APIs
0.13.0
======
- [tu_fifo] Fix locked mutex when full, and return type in peek_n()
Controller Driver (DCD & HCD)
-----------------------------
- [DWC2] Generalize synopsys dwc2 with synopsys/dwc2 which support both FS and HS phy (UTMI and ULPI) for various MCUs.
- Broadcom 28/27xx on raspberrypi SBC
- Silicon Labs EFM32
- Espressif ESP32 Sx
- GigaDevice GD32
- ST STM32
- Infineon XMC
- [KL25] Add new HCD for NXP KL25
- [MUSB] Add new DCD and HCD for Mentor musb with TI MSP432E4
- [F1C100s] Add new DCD for Allwinner F1C100s family
- [PIC32MZ] Add new DCD for PIC32MZ
- [nRF] Fix/Enhance various race condition with: EASY DMA, request HFXO, EPOUT
- [ChipIdea] rename Transdimension to more popular ChipIdea Highspeed,
- [RP2040] various update/fix for hcd/dcd
- [FT9XX] new DCD port for Bridgetek FT90x and FT93x devices
- [DA1469X] Fix resume
- [OHCI] Fix device array out of bound
Note: legacy drivers such as st/synopsys, nxp/transdimension are still present in this release but won't receive more update and could be removed in the future.
Device Stack
------------
- [Audio] Support disabling feedback format correction (16.16 <-> 10.14 format)
- [MSC] Add tud_msc_request_sense_cb() callback, change most default sense error to medium not present (0x02, 0x3A, 0x00)
- [Video] Fix video_capture example fails enumeration when 8FPS
Host Stack
----------
No notable changes
0.12.0
======
- add CFG_TUSB_OS_INC_PATH for os include path
Device Controller Driver (DCD)
------------------------------
- Getting device stack to pass USB Compliance Verification test (chapter9, HID, MSC). Ports are tested:
nRF, SAMD 21/51, rp2040, stm32f4, Renesas RX, iMXRT, ESP32-S2/3, Kinetic KL25/32, DA146xx
- Added dcd_edpt_close_all() for switching configuration
- [Transdimension] Support dcd_edpt_xfer_fifo() with auto wrap over if fifo buffer is 4K aligned and size is multiple of 4K.
- [DA146xx] Improve vbus, reset, suspend, resume detection, and remote wakeup.
Device Stack
------------
- Add new network driver Network Control Model (CDC-NCM), update net_lwip_webserver to work with NCM (need re-configure example)
- Add new USB Video Class UVC 1.5 driver and video_capture example ((work in progress)
- Fix potential buffer overflow for HID, bluetooth drivers
Host Controller Driver (HCD)
----------------------------
No notable changes
Host Stack
----------
No notable changes
0.11.0 (2021-08-29)
===================
- Add host/hid_controller example: only worked/tested with Sony PS4 DualShock controller
- Add device/hid_boot_interface example
- Add support for Renesas CCRX toolchain for RX mcu
Device Controller Driver (DCD)
------------------------------
- Add new DCD port for SAMx7x (E70, S70, V70, V71)
- Add new mcu K32L2Bxx
- Add new mcu GD32VF103
- Add new mcu STM32l151
- Add new mcu SAML21
- Add new mcu RX65n RX72n
- Fix NUC120/121/126 USBRAM can only be accessed in byte manner. Also improve set_address & disable sof
- Add Suspend/Resume handling for Renesas RX family.
- Fix DA1469x no VBUS startup
Synopsys
^^^^^^^^
- Fix Synopsys set address bug which could cause re-enumeration failed
- Fix dcd_synopsys driver integer overflow in HS mode (issue #968)
nRF5x
^^^^^
- Add nRF5x suspend, resume and remote wakeup
- Fix nRF5x race condition with TASKS_EP0RCVOUT
RP2040
^^^^^^
- Add RP2040 suspend & resume support
- Implement double buffer for both host and device (#891). However device EPOUT is still single buffered due to techinical issue with short packet
Device Stack
------------
USBD
^^^^
- Better support big endian mcu
- Add tuh_inited() and tud_inited(), will separate tusb_init/inited() to tud/tuh init/inited
- Add dcd_attr.h for defining common controller attribute such as max endpoints
Bluetooth
^^^^^^^^^
- Fix stridx error in descriptor template
DFU
^^^
- Enhance DFU implementation to support multiple alternate interface and better support bwPollTimeout
- Rename CFG_TUD_DFU_MODE to simply CFG_TUD_DFU
HID
^^^
- Fix newline usage keyboard (ENTER 0x28)
- Better support Hid Get/Set report
- Change max gamepad support from 16 to 32 buttons
MIDI
^^^^
- Fix midi available
- Fix midi data
- Fix an issue when calling midi API when not enumerated yet
UAC2
^^^^
- Fix bug and enhance of UAC2
Vendor
^^^^^^
- Fix vendor fifo deadlock in certain case
- Add tud_vendor_n_read_flush
Host Controller Driver (HCD)
----------------------------
RP2040
^^^^^^
- Implement double buffered to fix E4 errata and boost performance
- Lots of rp2040 update and enhancement
Host Stack
----------
- Major update and rework most of host stack, still needs more improvement
- Lots of improvement and update in parsing configuration and control
- Rework and major update to HID driver. Will default to enable boot interface if available
- Separate CFG_TUH_DEVICE_MAX and CFG_TUH_HUB for better management and reduce SRAM usage
0.10.1 (2021-06-03)
===================
- rework rp2040 examples and CMake build, allow better integration with pico-sdk
### Host Controller Driver (HCD)
Host Controller Driver (HCD)
----------------------------
- Fix rp2040 host driver: incorrect PID with low speed device with max packet size of 8 bytes
- Improve hub driver
@ -12,14 +325,16 @@
- Use hcd_frame_number() instead of micro frame
- Fix OHCI endpoint address and xferred_bytes in xfer complete event
## 0.10.0 - 2021.05.28
0.10.0 (2021-05-28)
===================
- Rework tu_fifo_t with separated mutex for read and write, better support DMA with read/write buffer info. And constant address mode
- Improve audio_test example and add audio_4_channel_mic example
- Add new dfu example
- Remove pico-sdk from submodule
### Device Controller Driver (DCD)
Device Controller Driver (DCD)
------------------------------
- Add new DCD port for Silabs EFM32GG12 with board Thunderboard Kit (SLTB009A)
- Add new DCD port Renesas RX63N, board GR-CITRUS
@ -32,11 +347,13 @@
- Add support for Espressif esp32s3
- nRF: fix race condition that could cause drop packet of Bulk OUT transfer
### USB Device Driver (USBD)
USB Device Driver (USBD)
------------------------
- Add new (optional) endpoint ADPI usbd_edpt_xfer_fifo
### Device Class Driver
Device Class Driver
-------------------
CDC
@ -50,6 +367,7 @@ HID
- Fix keyboard report descriptor template
- Add more hid keys constant from 0x6B to 0xA4
- [Breaking] rename API
- HID_PROTOCOL_NONE/KEYBOARD/MOUST to HID_ITF_PROTOCOL_NONE/KEYBOARD/MOUSE
- tud_hid_boot_mode() to tud_hid_get_protocol()
@ -58,29 +376,37 @@ HID
MIDI
- Fix MIDI buffer overflow issue
- [Breaking] rename API
- Rename tud_midi_read() to tud_midi_stream_read()
- Rename tud_midi_write() to tud_midi_stream_write()
- Rename tud_midi_receive() to tud_midi_packet_read()
- Rename tud_midi_send() to tud_midi_packet_write()
### Host Controller Driver (HCD)
Host Controller Driver (HCD)
----------------------------
- No noticable changes
- No noticeable changes
### USB Host Driver (USBH)
USB Host Driver (USBH)
----------------------
- No noticable changes
- No noticeable changes
### Host Class Driver
Host Class Driver
-----------------
- HID: Rework host hid driver, basically everything changes
## 0.9.0 - 2021.03.12
### Device Stack
0.9.0 (2021-03-12)
==================
#### Device Controller Driver (DCD)
Device Stack
------------
Device Controller Driver (DCD)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RP2040
@ -99,13 +425,15 @@ NXP Transdimention
- Update dcd_init() to reset controller to device mode
#### USB Device Driver (USBD)
USB Device Driver (USBD)
^^^^^^^^^^^^^^^^^^^^^^^^
- Fix issue with status zlp (tud_control_status) is returned by class driver with SET/CLEAR_FEATURE for endpoint.
- Correct endpoint size check for fullspeed bulk, can be 8, 16, 32, 64
- Ack SET_INTERFACE even if it is not implemented by class driver.
#### Device Class Driver
Device Class Driver
^^^^^^^^^^^^^^^^^^^
DFU Runtime
@ -119,40 +447,50 @@ CDC
HID
- [Breaking] Add itf argument to hid API to support multiple instances, follow API has signature changes
- tud_hid_descriptor_report_cb()
- tud_hid_get_report_cb()
- tud_hid_set_report_cb()
- tud_hid_boot_mode_cb()
- tud_hid_set_idle_cb()
- Add report complete callback tud_hid_report_complete_cb() API
- Add DPad/Hat support for HID Gamepad
- TUD_HID_REPORT_DESC_GAMEPAD() now support 16 buttons, 2 joysticks, 1 hat/dpad
- Add hid_gamepad_report_t along with GAMEPAD_BUTTON_ and GAMEPAD_HAT_ enum
- `TUD_HID_REPORT_DESC_GAMEPAD()` now support 16 buttons, 2 joysticks, 1 hat/dpad
- Add hid_gamepad_report_t along with `GAMEPAD_BUTTON_` and `GAMEPAD_HAT_` enum
- Add Gamepad to hid_composite / hid_composite_freertos example
MIDI
- Fix dropping MIDI sysex message when fifo is full
- Fix typo in tud_midi_write24(), make example less ambigous for cable and channel
- Fix typo in tud_midi_write24(), make example less ambiguous for cable and channel
- Fix incorrect endpoint descriptor length, MIDI v1 use Audio v1 which has 9-byte endpoint descriptor (instead of 7)
### Host Stack
Host Stack
----------
#### Host Controller Driver (HCD)
Host Controller Driver (HCD)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Add rhport to hcd_init()
- Improve EHCI/OHCI driver abstraction
- Move echi/ohci files to portable/
- Rename hcd_lpc18_43 to hcd_transdimension
- Sub hcd API with hcd_ehci_init(), hcd_ehci_register_addr()
- Update NXP transdimention hcd_init() to reset controller to host mode
- Ported hcd to rt10xx
#### USB Host Driver (USBH)
USB Host Driver (USBH)
^^^^^^^^^^^^^^^^^^^^^^
- No noticeable changes to usbh
#### Host Class Driver
Host Class Driver
^^^^^^^^^^^^^^^^^
MSC
@ -164,7 +502,8 @@ MSC
- Add tuh_msc_get_block_count(), tuh_msc_get_block_size()
- Add CFG_TUH_MSC_MAXLUN (default to 4) to hold lun capacities
### Others
Others
------
- Add basic support for rt-thread OS
- Change zero bitfield length to more explicit padding
@ -177,25 +516,33 @@ MSC
- LPCXpresso 55s28
- LPCXpresso 18s37
## 0.8.0 - 2021.02.05
### Device Controller Driver
0.8.0 (2021-02-05)
==================
Device Controller Driver
------------------------
- Added new device support for Raspberry Pi RP2040
- Added new device support for NXP Kinetis KL25ZXX
- Use dcd_event_bus_reset() with link speed to replace bus_signal
- ESP32-S2:
- Add bus suspend and wakeup support
- SAMD21:
- Fix (walkaround) samd21 setup_packet overflow by USB DMA
- STM32 Synopsys:
- Rework USB FIFO allocation scheme and allow RX FIFO size reduction
- Sony CXD56
- Update Update Spresense SDK to 2.0.2
- Fix dcd issues with setup packets
- Correct EP number for cdc_msc example
### USB Device
USB Device
----------
**USBD**
@ -207,13 +554,17 @@ MSC
- CDC
- Allow to transmit data, even if the host does not support control line states i.e set DTR
- HID
- change default CFG_TUD_HID_EP_BUFSIZE from 16 to 64
- MIDI
- Fix midi sysex sending bug
- MSC
- Invoke only scsi complete callback after status transaction is complete.
- Fix scsi_mode_sense6_t padding, which cause IAR compiler internal error.
- USBTMC
- Change interrupt endpoint example size to 8 instead of 2 for better compatibility with mcu
@ -222,11 +573,14 @@ MSC
- Support make from windows cmd.exe
- Add HID Consumer Control (media keys) to hid_composite & hid_composite_freertos examples
### USB Host
USB Host
--------
No noticeable changes to host stack
### New Boards
New Boards
----------
- NXP/Freescale Freedom FRDM-KL25Z
- Feather Double M33 express
@ -241,14 +595,18 @@ No noticeable changes to host stack
- Adafruit PyPortal
- Great Scott Gadgets' LUNA D11 & D21
## 0.7.0 - 2020.11.08
### Device Controller Driver
0.7.0 (2020-11-08)
==================
Device Controller Driver
------------------------
- Added new support for Espressif ESP32-S2
- Added new support for Dialog DA1469x
- Enhance STM32 Synopsys
- Support bus events disconnection/suspend/resume/wakeup
- Support bus events disconnection/suspend/resume/wakeup
- Improve transfer performance with optimizing xfer and fifo size
- Support Highspeed port (OTG_HS) with both internal and external PHY
- Support multiple usb ports with rhport=1 is highspeed on selected MCUs e.g H743, F23. It is possible to have OTG_HS to run on Fullspeed PHY (e.g lacking external PHY)
@ -256,23 +614,30 @@ No noticeable changes to host stack
- Fix FIFO flush during stall
- Implement dcd_edpt_close() API
- Support F105, F107
- Enhance STM32 fsdev
- Improve dcd fifo allocation
- Fix ISTR race condition
- Support remap USB IRQ on supported MCUs
- Implement dcd_edpt_close() API
- Enhance NUC 505: enhance set configure behavior
- Enhance SAMD
- Fix race condition with setup packet
- Add SAMD11 option `OPT_MCU_SAMD11`
- Add SAME5x option `OPT_MCU_SAME5X`
- Fix SAMG control data toggle and stall race condition
- Enhance nRF
- Fix hanged when tud_task() is called within critical section (disabled interrupt)
- Fix disconnect bus event not submitted
- Implement ISO transfer and dcd_edpt_close()
### USB Device
USB Device
----------
**USBD**
@ -289,10 +654,12 @@ No noticeable changes to host stack
- Add IAR compiler support
- Support multiple configuration descriptors. `TUD_CONFIG_DESCRIPTOR()` template has extra config_num as 1st argument
- Improve USB Highspeed support with actual link speed detection with `dcd_event_bus_reset()`
- Enhance class driver management
- `usbd_driver_open()` add max length argument, and return length of interface (0 for not supported). Return value is used for finding appropriate driver
- Add application implemented class driver via `usbd_app_driver_get_cb()`
- IAD is handled to assign driver id
- Added `tud_descriptor_device_qualifier_cb()` callback
- Optimize `tu_fifo` bulk write/read transfer
- Forward non-std control request to class driver
@ -303,43 +670,54 @@ No noticeable changes to host stack
- USBNET: remove ACM-EEM due to lack of support from host
- USBTMC: fix descriptors when INT EP is disabled
- CDC:
- Send zero length packet for end of data when needed
- Add `tud_cdc_tx_complete_cb()` callback
- Change tud_cdc_n_write_flush() return number of bytes forced to transfer, and flush when writing enough data to fifo
- MIDI:
- Add packet interface
- Add multiple jack descriptors
- Fix MIDI driver for sysex
- DFU Runtime: fix response to SET_INTERFACE and DFU_GETSTATUS request
- Rename some configure macro to make it clear that those are used directly for endpoint transfer
- CFG_TUD_HID_BUFSIZE to `CFG_TUD_HID_EP_BUFSIZE
- CFG_TUD_HID_BUFSIZE to CFG_TUD_HID_EP_BUFSIZE
- CFG_TUD_CDC_EPSIZE to CFG_TUD_CDC_EP_BUFSIZE
- CFG_TUD_MSC_BUFSIZE to CFG_TUD_MSC_EP_BUFSIZE
- CFG_TUD_MIDI_EPSIZE to CFG_TUD_MIDI_EP_BUFSIZE
- HID:
- Fix gamepad template descriptor
- Add multiple HID interface API
- Add extra comma to HID_REPORT_ID
### USB Host
USB Host
--------
- Rework USB host stack (still work in progress)
- Fix compile error with pipehandle
- Rework usbh control and enumeration as non-blocking
- Improve Hub, MSC, HID host driver
### Examples
Examples
--------
- Add new hid_composite_freertos
- Add new dynamic_configuration to demonstrate how to switch configuration descriptors
- Add new hid_multiple_interface
- Enhance `net_lwip_webserver` example
- Add multiple configuration: RNDIS for Windows, CDC-ECM for macOS (Linux will work with both)
- Update lwip to STABLE-2_1_2_RELEASE for net_lwip_webserver
- Added new Audio example: audio_test uac2_headsest
### New Boards
New Boards
----------
- Espressif ESP32-S2: saola_1, kaluga_1
- STM32: F746 Nucleo, H743 Eval, H743 Nucleo, F723 discovery, stlink v3 mini, STM32L4r5 Nucleo
@ -347,13 +725,16 @@ No noticeable changes to host stack
- Microchip: Great Scoot Gadgets' LUNA, samd11_xplained, D5035-01, atsamd21 xplained pro
- nRF: ItsyBitsy nRF52840
## 0.6.0 - 2020.03.30
Added **CONTRIBUTORS.md** to give proper credit for contributors to the stack. Special thanks to [Nathan Conrad](https://github.com/pigrew), [Peter Lawrence](https://github.com/majbthrd) and [William D. Jones](https://github.com/cr1901) and others for spending their precious time to add lots of features and ports for this release.
0.6.0 (2020-03-30)
==================
### Added
Added **CONTRIBUTORS.md** to give proper credit for contributors to the stack. Special thanks to `Nathan Conrad <https://github.com/pigrew>`__ , `Peter Lawrence <https://github.com/majbthrd>`__ , `William D. Jones <https://github.com/cr1901>`__ and `Sean Cross <https://github.com/xobs>`__ and others for spending their precious time to add lots of features and ports for this release.
**MCUs**
Added
-----
**MCU**
- Added support for Microchip SAMG55
- Added support for Nordic nRF52833
@ -389,62 +770,8 @@ Following examples are added:
- usbtmc
- webusb_serial
**Boards**
Following boards are added:
- adafruit_clue
- arduino_nano33_ble
- circuitplayground_bluefruit
- circuitplayground_express
- feather_m0_express
- feather_nrf52840_sense
- feather_stm32f405
- fomu
- itsybitsy_m0
- itsybitsy_m4
- lpcxpresso11u37
- lpcxpresso1549
- lpcxpresso51u68
- lpcxpresso54114
- lpcxpresso55s69
- mbed1768
- mimxrt1010_evk
- mimxrt1015_evk
- mimxrt1020_evk
- mimxrt1050_evkb
- mimxrt1060_evk
- mimxrt1064_evk
- msp_exp430f5529lp
- ngx4330
- nrf52840_mdk_dongle
- nutiny_nuc121s
- nutiny_nuc125s
- nutiny_nuc126v
- nutiny_sdk_nuc120
- nutiny_sdk_nuc505
- pca10059
- pca10100
- pyboardv11
- raytac_mdbt50q_rx
- samg55xplained
- seeeduino_xiao
- spresense
- stm32f070rbnucleo
- stm32f072disco
- stm32f103bluepill
- stm32f207nucleo
- stm32f401blackpill
- stm32f411blackpill
- stm32f411disco
- stm32f412disco
- stm32f767nucleo
- stm32h743nucleo
- stm32l0538disco
- stm32l476disco
- teensy_40
### Changed
Changed
-------
- Changed `tud_descriptor_string_cb()` to have additional Language ID argument
- Merged hal_nrf5x.c into dcd_nrf5x.c
@ -452,7 +779,7 @@ Following boards are added:
- Generalized dcd_stm32f4.c to dcd_synopsys.c
- Changed cdc_msc_hid to cdc_msc (drop hid) due to limited endpoints number of some MCUs
- Improved DCD SAMD stability, fix missing setup packet occasionally
- Improved usbd/usbd_control with proper hanlding of zero-length packet (ZLP)
- Improved usbd/usbd_control with proper handling of zero-length packet (ZLP)
- Improved STM32 DCD FSDev
- Improved STM32 DCD Synopsys
- Migrated CI from Travis to Github Action
@ -460,9 +787,12 @@ Following boards are added:
- Fixed mynewt osal queue definition
- Fixed cdc_msc_freertos example build for all MCUs
## 0.5.0 (Initial Release) - 2019.07.10
0.5.0 (2019-06)
===============
First release, device stack works great, host stack works but still need improvement.
- Special thanks to @adafruit team, especially @tannewt to help out immensely to rework device stack: simplify osal & control transfer, adding SAMD21/SAMD51 ports, writing porting docs, adding MIDI class support etc...
- Thanks to @cr1901 for adding STM32F4 port.
- Thanks to @PTS93 and @todbot for HID raw API

1
docs/info/contributors.rst Symbolic link
View file

@ -0,0 +1 @@
../../CONTRIBUTORS.rst

13
docs/info/index.rst Normal file
View file

@ -0,0 +1,13 @@
****
Info
****
Index
=====
.. toctree::
:maxdepth: 2
uses
changelog
contributors

17
docs/info/uses.rst Normal file
View file

@ -0,0 +1,17 @@
****
Uses
****
TinyUSB is currently used by these other projects:
- `Adafruit nRF52 Arduino <https://github.com/adafruit/Adafruit_nRF52_Arduino>`__
- `Adafruit nRF52 Bootloader <https://github.com/adafruit/Adafruit_nRF52_Bootloader>`__
- `Adafruit SAMD Arduino <https://github.com/adafruit/ArduinoCore-samd>`__
- `CircuitPython <https://github.com/adafruit/circuitpython>`__
- `Espressif IDF <https://github.com/espressif/esp-idf>`__
- `MicroPython <https://github.com/micropython/micropython>`__
- `mynewt <https://mynewt.apache.org>`__
- `openinput <https://github.com/openinput-fw/openinput>`__
- `Raspberry Pi Pico SDK <https://github.com/raspberrypi/pico-sdk>`__
- `TinyUF2 Bootloader <https://github.com/adafruit/tinyuf2>`__
- `TinyUSB Arduino Library <https://github.com/adafruit/Adafruit_TinyUSB_Arduino>`__

View file

@ -1,36 +1,42 @@
# Concurrency
***********
Concurrency
***********
The TinyUSB library is designed to operate on single-core MCUs with multi-threaded applications in mind. Interaction with interrupts is especially important to pay attention to.
It is compatible with optionally using a RTOS.
## General
General
-------
When writing code, keep in mind that the OS (if using a RTOS) may swap out your code at any time. Also, your code can be preempted by an interrupt at any time.
## Application Code
Application Code
----------------
The USB core does not execute application callbacks while in an interrupt context. Calls to application code are from within the USB core task context. Note that the application core will call class drivers from within their own task.
## Class Drivers
Class Drivers
-------------
Class driver code should never be called from an interrupt context by the USB core, though the application is allowed to call class driver functions from interrupts. USB core functions may be called simultaneously by multiple tasks. Use care that proper locking is used to guard the USBD core functions from this case.
Class drivers are allowed to call `usbd_*` functions, but not `dcd_*` functions.
Class drivers are allowed to call ``usbd_*`` functions, but not ``dcd_*`` functions.
## USB Core
USB Core
--------
All functions that may be called from an (USB core) interrupt context have a `bool in_isr` parameter to remind the implementer that special care must be taken.
All functions that may be called from an (USB core) interrupt context have a ``bool in_isr`` parameter to remind the implementer that special care must be taken.
Interrupt handlers must not directly call class driver code, they must pass a message to the USB core's task.
`usbd_*` functions may be called from interrupts without any notice. They may also be called simultaneously by multiple tasks.
``usbd_*`` functions may be called from interrupts without any notice. They may also be called simultaneously by multiple tasks.
## Device Drivers
Device Drivers
--------------
Much of the processing of the USB stack is done in an interrupt context, and care must be taken in order to ensure variables are handled in the appropriate ways by the compiler and optimizer.
In particular:
- Ensure that all memory-mapped registers (including packet memory) are marked as volatile. GCC's optimizer will even combine memory access (like two 16-bit to be a 32-bit) if you don't mark the pointers as volatile. On some architectures, this can use macros like `_I`, `_O`, or `_IO'.
- All defined global variables are marked as `static`.
* Ensure that all memory-mapped registers (including packet memory) are marked as volatile. GCC's optimizer will even combine memory access (like two 16-bit to be a 32-bit) if you don't mark the pointers as volatile. On some architectures, this can use macros like _I , _O , or _IO.
* All defined global variables are marked as ``static``.

View file

@ -0,0 +1,64 @@
************
Dependencies
************
MCU low-level peripheral driver and external libraries for building TinyUSB examples
======================================== ============================================================== ========================================
Path Project Commit
======================================== ============================================================== ========================================
hw/mcu/allwinner https://github.com/hathach/allwinner_driver.git 8e5e89e8e132c0fd90e72d5422e5d3d68232b756
hw/mcu/bridgetek/ft9xx/ft90x-sdk https://github.com/BRTSG-FOSS/ft90x-sdk.git 91060164afe239fcb394122e8bf9eb24d3194eb1
hw/mcu/broadcom https://github.com/adafruit/broadcom-peripherals.git 08370086080759ed54ac1136d62d2ad24c6fa267
hw/mcu/gd/nuclei-sdk https://github.com/Nuclei-Software/nuclei-sdk.git 7eb7bfa9ea4fbeacfafe1d5f77d5a0e6ed3922e7
hw/mcu/infineon/mtb-xmclib-cat3 https://github.com/Infineon/mtb-xmclib-cat3.git daf5500d03cba23e68c2f241c30af79cd9d63880
hw/mcu/microchip https://github.com/hathach/microchip_driver.git 9e8b37e307d8404033bb881623a113931e1edf27
hw/mcu/mindmotion/mm32sdk https://github.com/hathach/mm32sdk.git 0b79559eb411149d36e073c1635c620e576308d4
hw/mcu/nordic/nrfx https://github.com/NordicSemiconductor/nrfx.git 281cc2e178fd9a470d844b3afdea9eb322a0b0e8
hw/mcu/nuvoton https://github.com/majbthrd/nuc_driver.git 2204191ec76283371419fbcec207da02e1bc22fa
hw/mcu/nxp/lpcopen https://github.com/hathach/nxp_lpcopen.git 43c45c85405a5dd114fff0ea95cca62837740c13
hw/mcu/nxp/mcux-sdk https://github.com/NXPmicro/mcux-sdk.git ae2ab01d9d70ad00cd0e935c2552bd5f0e5c0294
hw/mcu/nxp/nxp_sdk https://github.com/hathach/nxp_sdk.git 845c8fc49b6fb660f06a5c45225494eacb06f00c
hw/mcu/raspberry_pi/Pico-PIO-USB https://github.com/sekigon-gonnoc/Pico-PIO-USB.git c3715ce94b6f6391856de56081d4d9b3e98fa93d
hw/mcu/renesas/fsp https://github.com/renesas/fsp.git 8dc14709f2a6518b43f71efad70d900b7718d9f1
hw/mcu/renesas/rx https://github.com/kkitayam/rx_device.git 706b4e0cf485605c32351e2f90f5698267996023
hw/mcu/silabs/cmsis-dfp-efm32gg12b https://github.com/cmsis-packs/cmsis-dfp-efm32gg12b.git f1c31b7887669cb230b3ea63f9b56769078960bc
hw/mcu/sony/cxd56/spresense-exported-sdk https://github.com/sonydevworld/spresense-exported-sdk.git 2ec2a1538362696118dc3fdf56f33dacaf8f4067
hw/mcu/st/cmsis_device_f0 https://github.com/STMicroelectronics/cmsis_device_f0.git 2fc25ee22264bc27034358be0bd400b893ef837e
hw/mcu/st/cmsis_device_f1 https://github.com/STMicroelectronics/cmsis_device_f1.git 6601104a6397299b7304fd5bcd9a491f56cb23a6
hw/mcu/st/cmsis_device_f2 https://github.com/STMicroelectronics/cmsis_device_f2.git 182fcb3681ce116816feb41b7764f1b019ce796f
hw/mcu/st/cmsis_device_f3 https://github.com/STMicroelectronics/cmsis_device_f3.git 5e4ee5ed7a7b6c85176bb70a9fd3c72d6eb99f1b
hw/mcu/st/cmsis_device_f4 https://github.com/STMicroelectronics/cmsis_device_f4.git 2615e866fa48fe1ff1af9e31c348813f2b19e7ec
hw/mcu/st/cmsis_device_f7 https://github.com/STMicroelectronics/cmsis_device_f7.git fc676ef1ad177eb874eaa06444d3d75395fc51f4
hw/mcu/st/cmsis_device_g0 https://github.com/STMicroelectronics/cmsis_device_g0.git 08258b28ee95f50cb9624d152a1cbf084be1f9a5
hw/mcu/st/cmsis_device_g4 https://github.com/STMicroelectronics/cmsis_device_g4.git ce822adb1dc552b3aedd13621edbc7fdae124878
hw/mcu/st/cmsis_device_h7 https://github.com/STMicroelectronics/cmsis_device_h7.git 60dc2c913203dc8629dc233d4384dcc41c91e77f
hw/mcu/st/cmsis_device_l0 https://github.com/STMicroelectronics/cmsis_device_l0.git 06748ca1f93827befdb8b794402320d94d02004f
hw/mcu/st/cmsis_device_l1 https://github.com/STMicroelectronics/cmsis_device_l1.git 7f16ec0a1c4c063f84160b4cc6bf88ad554a823e
hw/mcu/st/cmsis_device_l4 https://github.com/STMicroelectronics/cmsis_device_l4.git 6ca7312fa6a5a460b5a5a63d66da527fdd8359a6
hw/mcu/st/cmsis_device_l5 https://github.com/STMicroelectronics/cmsis_device_l5.git d922865fc0326a102c26211c44b8e42f52c1e53d
hw/mcu/st/cmsis_device_u5 https://github.com/STMicroelectronics/cmsis_device_u5.git bc00f3c9d8a4e25220f84c26d414902cc6bdf566
hw/mcu/st/cmsis_device_wb https://github.com/STMicroelectronics/cmsis_device_wb.git 9c5d1920dd9fabbe2548e10561d63db829bb744f
hw/mcu/st/stm32f0xx_hal_driver https://github.com/STMicroelectronics/stm32f0xx_hal_driver.git 0e95cd88657030f640a11e690a8a5186c7712ea5
hw/mcu/st/stm32f1xx_hal_driver https://github.com/STMicroelectronics/stm32f1xx_hal_driver.git 1dd9d3662fb7eb2a7f7d3bc0a4c1dc7537915a29
hw/mcu/st/stm32f2xx_hal_driver https://github.com/STMicroelectronics/stm32f2xx_hal_driver.git c75ace9b908a9aca631193ebf2466963b8ea33d0
hw/mcu/st/stm32f3xx_hal_driver https://github.com/STMicroelectronics/stm32f3xx_hal_driver.git 1761b6207318ede021706e75aae78f452d72b6fa
hw/mcu/st/stm32f4xx_hal_driver https://github.com/STMicroelectronics/stm32f4xx_hal_driver.git 04e99fbdabd00ab8f370f377c66b0a4570365b58
hw/mcu/st/stm32f7xx_hal_driver https://github.com/STMicroelectronics/stm32f7xx_hal_driver.git f7ffdf6bf72110e58b42c632b0a051df5997e4ee
hw/mcu/st/stm32g0xx_hal_driver https://github.com/STMicroelectronics/stm32g0xx_hal_driver.git 5b53e6cee664a82b16c86491aa0060e2110c00cb
hw/mcu/st/stm32g4xx_hal_driver https://github.com/STMicroelectronics/stm32g4xx_hal_driver.git 8b4518417706d42eef5c14e56a650005abf478a8
hw/mcu/st/stm32h7xx_hal_driver https://github.com/STMicroelectronics/stm32h7xx_hal_driver.git d8461b980b59b1625207d8c4f2ce0a9c2a7a3b04
hw/mcu/st/stm32l0xx_hal_driver https://github.com/STMicroelectronics/stm32l0xx_hal_driver.git fbdacaf6f8c82a4e1eb9bd74ba650b491e97e17b
hw/mcu/st/stm32l1xx_hal_driver https://github.com/STMicroelectronics/stm32l1xx_hal_driver.git 44efc446fa69ed8344e7fd966e68ed11043b35d9
hw/mcu/st/stm32l4xx_hal_driver https://github.com/STMicroelectronics/stm32l4xx_hal_driver.git aee3d5bf283ae5df87532b781bdd01b7caf256fc
hw/mcu/st/stm32l5xx_hal_driver https://github.com/STMicroelectronics/stm32l5xx_hal_driver.git 675c32a75df37f39d50d61f51cb0dcf53f07e1cb
hw/mcu/st/stm32u5xx_hal_driver https://github.com/STMicroelectronics/stm32u5xx_hal_driver.git 2e1d4cdb386e33391cb261dfff4fefa92e4aa35a
hw/mcu/st/stm32wbxx_hal_driver https://github.com/STMicroelectronics/stm32wbxx_hal_driver.git 2c5f06638be516c1b772f768456ba637f077bac8
hw/mcu/ti https://github.com/hathach/ti_driver.git 143ed6cc20a7615d042b03b21e070197d473e6e5
hw/mcu/wch/ch32v307 https://github.com/openwch/ch32v307.git 17761f5cf9dbbf2dcf665b7c04934188add20082
lib/CMSIS_5 https://github.com/ARM-software/CMSIS_5.git 20285262657d1b482d132d20d755c8c330d55c1f
lib/FreeRTOS-Kernel https://github.com/FreeRTOS/FreeRTOS-Kernel.git def7d2df2b0506d3d249334974f51e427c17a41c
lib/lwip https://github.com/lwip-tcpip/lwip.git 159e31b689577dbf69cf0683bbaffbd71fa5ee10
lib/sct_neopixel https://github.com/gsteiert/sct_neopixel.git e73e04ca63495672d955f9268e003cffe168fcd8
tools/uf2 https://github.com/microsoft/uf2.git 19615407727073e36d81bf239c52108ba92e7660
======================================== ============================================================== ========================================

View file

@ -0,0 +1,202 @@
***************
Getting Started
***************
Add TinyUSB to your project
---------------------------
It is relatively simple to incorporate tinyusb to your (existing) project
* Copy or ``git submodule`` this repo into your project in a subfolder. Let's say it is *your_project/tinyusb*
* Add all the .c in the ``tinyusb/src`` folder to your project
* Add *your_project/tinyusb/src* to your include path. Also make sure your current include path also contains the configuration file tusb_config.h.
* Make sure all required macros are all defined properly in tusb_config.h (configure file in demo application is sufficient, but you need to add a few more such as CFG_TUSB_MCU, CFG_TUSB_OS since they are passed by IDE/compiler to maintain a unique configure for all boards).
* If you use the device stack, make sure you have created/modified usb descriptors for your own need. Ultimately you need to implement all **tud descriptor** callbacks for the stack to work.
* Add tusb_init() call to your reset initialization code.
* Call ``tud_int_handler()`` (device) and/or ``tuh_int_handler()`` (host) in your USB IRQ Handler
* Implement all enabled classes's callbacks.
* If you don't use any RTOSes at all, you need to continuously and/or periodically call tud_task()/tuh_task() function. All of the callbacks and functionality are handled and invoked within the call of that task runner.
.. code-block::
int main(void)
{
your_init_code();
tusb_init(); // initialize tinyusb stack
while(1) // the mainloop
{
your_application_code();
tud_task(); // device task
tuh_task(); // host task
}
}
Examples
--------
For your convenience, TinyUSB contains a handful of examples for both host and device with/without RTOS to quickly test the functionality as well as demonstrate how API() should be used. Most examples will work on most of `the supported boards <supported.rst>`_. Firstly we need to ``git clone`` if not already
.. code-block::
$ git clone https://github.com/hathach/tinyusb tinyusb
$ cd tinyusb
Some ports will also require a port-specific SDK (e.g. RP2040) or binary (e.g. Sony Spresense) to build examples. They are out of scope for tinyusb, you should download/install it first according to its manufacturer guide.
Build
^^^^^
To build example, first change directory to an example folder.
.. code-block::
$ cd examples/device/cdc_msc
Before building, we firstly need to download dependencies such as: MCU low-level peripheral driver and external libraries e.g FreeRTOS (required by some examples). Run the ``get-deps`` target in one of the example folder as follow. You only need to do this once per mcu. Check out `complete list of dependencies and their designated path here <dependencies.rst>`_
.. code-block::
$ make BOARD=raspberry_pi_pico get-deps
Then compile with ``make BOARD=[board_name] all``\ , for example
.. code-block::
$ make BOARD=raspberry_pi_pico all
Note: ``BOARD`` can be found as directory name in ``hw/bsp``\ , either in its family/boards or directly under bsp (no family).
Note: some examples especially those that uses Vendor class (e.g webUSB) may requires udev permission on Linux (and/or macOS) to access usb device. It depends on your OS distro, typically copy ``99-tinyusb.rules`` and reload your udev is good to go
.. code-block::
$ cp examples/device/99-tinyusb.rules /etc/udev/rules.d/
$ sudo udevadm control --reload-rules && sudo udevadm trigger
Port Selection
~~~~~~~~~~~~~~
If a board has several ports, one port is chosen by default in the individual board.mk file. Use option ``PORT=x`` To choose another port. For example to select the HS port of a STM32F746Disco board, use:
.. code-block::
$ make BOARD=stm32f746disco PORT=1 all
Port Speed
~~~~~~~~~~
A MCU can support multiple operational speed. By default, the example build system will use the fastest supported on the board. Use option ``SPEED=full/high`` e.g To force F723 operate at full instead of default high speed
.. code-block::
$ make BOARD=stm32f746disco SPEED=full all
Size Analysis
~~~~~~~~~~~~~
First install `linkermap tool <https://github.com/hathach/linkermap>`_ then ``linkermap`` target can be used to analyze code size. You may want to compile with ``NO_LTO=1`` since -flto merges code across .o files and make it difficult to analyze.
.. code-block::
$ make BOARD=feather_nrf52840_express NO_LTO=1 all linkermap
Debug
^^^^^
To compile for debugging add ``DEBUG=1``\ , for example
.. code-block::
$ make BOARD=feather_nrf52840_express DEBUG=1 all
Log
~~~
Should you have an issue running example and/or submitting an bug report. You could enable TinyUSB built-in debug logging with optional ``LOG=``. LOG=1 will only print out error message, LOG=2 print more information with on-going events. LOG=3 or higher is not used yet.
.. code-block::
$ make BOARD=feather_nrf52840_express LOG=2 all
Logger
~~~~~~
By default log message is printed via on-board UART which is slow and take lots of CPU time comparing to USB speed. If your board support on-board/external debugger, it would be more efficient to use it for logging. There are 2 protocols:
* `LOGGER=rtt`: use `Segger RTT protocol <https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/>`_
* Cons: requires jlink as the debugger.
* Pros: work with most if not all MCUs
* Software viewer is JLink RTT Viewer/Client/Logger which is bundled with JLink driver package.
* ``LOGGER=swo``\ : Use dedicated SWO pin of ARM Cortex SWD debug header.
* Cons: only work with ARM Cortex MCUs minus M0
* Pros: should be compatible with more debugger that support SWO.
* Software viewer should be provided along with your debugger driver.
.. code-block::
$ make BOARD=feather_nrf52840_express LOG=2 LOGGER=rtt all
$ make BOARD=feather_nrf52840_express LOG=2 LOGGER=swo all
Flash
^^^^^
``flash`` target will use the default on-board debugger (jlink/cmsisdap/stlink/dfu) to flash the binary, please install those support software in advance. Some board use bootloader/DFU via serial which is required to pass to make command
.. code-block::
$ make BOARD=feather_nrf52840_express flash
$ make SERIAL=/dev/ttyACM0 BOARD=feather_nrf52840_express flash
Since jlink can be used with most of the boards, there is also ``flash-jlink`` target for your convenience.
.. code-block::
$ make BOARD=feather_nrf52840_express flash-jlink
Some board use uf2 bootloader for drag & drop in to mass storage device, uf2 can be generated with ``uf2`` target
.. code-block::
$ make BOARD=feather_nrf52840_express all uf2
IAR Support
^^^^^^^^^^^
IAR Project Connection files are provided to import TinyUSB stack into your project.
* A buldable project of your MCU need to be created in advance.
* Take example of STM32F0:
- You need `stm32l0xx.h`, `startup_stm32f0xx.s`, `system_stm32f0xx.c`.
- `STM32L0xx_HAL_Driver` is only needed to run examples, TinyUSB stack itself doesn't rely on MCU's SDKs.
* Open `Tools -> Configure Custom Argument Variables` (Switch to `Global` tab if you want to do it for all your projects)
Click `New Group ...`, name it to `TUSB`, Click `Add Variable ...`, name it to `TUSB_DIR`, change it's value to the path of your TinyUSB stack,
for example `C:\\tinyusb`
Import stack only
~~~~~~~~~~~~~~~~~
1. Open `Project -> Add project Connection ...`, click `OK`, choose `tinyusb\\tools\\iar_template.ipcf`.
Run examples
~~~~~~~~~~~~
1. (Python3 is needed) Run `iar_gen.py` to generate .ipcf files of examples:
.. code-block::
cd C:\tinyusb\tools
python iar_gen.py
2. Open `Project -> Add project Connection ...`, click `OK`, choose `tinyusb\\examples\\(.ipcf of example)`.
For example `C:\\tinyusb\\examples\\device\\cdc_msc\\iar_cdc_msc.ipcf`

60
docs/reference/index.rst Normal file
View file

@ -0,0 +1,60 @@
*********
Reference
*********
.. figure:: ../assets/stack.svg
:width: 1600px
:alt: stackup
representation of the TinyUSB stack.
Device Stack
============
Supports multiple device configurations by dynamically changing usb descriptors. Low power functions such like suspend, resume, and remote wakeup. Following device classes are supported:
- Audio Class 2.0 (UAC2)
- Bluetooth Host Controller Interface (BTH HCI)
- Communication Class (CDC)
- Device Firmware Update (DFU): DFU mode (WIP) and Runtinme
- Human Interface Device (HID): Generic (In & Out), Keyboard, Mouse, Gamepad etc ...
- Mass Storage Class (MSC): with multiple LUNs
- Musical Instrument Digital Interface (MIDI)
- Network with RNDIS, CDC-ECM (work in progress)
- USB Test and Measurement Class (USBTMC)
- Vendor-specific class support with generic In & Out endpoints. Can be used with MS OS 2.0 compatible descriptor to load winUSB driver without INF file.
- `WebUSB <https://github.com/WICG/webusb>`__ with vendor-specific class
If you have special need, `usbd_app_driver_get_cb()` can be used to write your own class driver without modifying the stack. Here is how RPi team add their reset interface `raspberrypi/pico-sdk#197 <https://github.com/raspberrypi/pico-sdk/pull/197>`__
Host Stack
==========
- Human Interface Device (HID): Keyboard, Mouse, Generic
- Mass Storage Class (MSC)
- Hub currently only supports 1 level of hub (due to my laziness)
OS Abstraction layer
====================
TinyUSB is completely thread-safe by pushing all ISR events into a central queue, then process it later in the non-ISR context task function. It also uses semaphore/mutex to access shared resources such as CDC FIFO. Therefore the stack needs to use some of OS's basic APIs. Following OSes are already supported out of the box.
- **No OS**
- **FreeRTOS**
- **Mynewt** Due to the newt package build system, Mynewt examples are better to be on its `own repo <https://github.com/hathach/mynewt-tinyusb-example>`__
License
=======
All TinyUSB sources in the `src` folder are licensed under MIT license. However, each file can be individually licensed especially those in `lib` and `hw/mcu` folder. Please make sure you understand all the license term for files you use in your project.
Index
=====
.. toctree::
:maxdepth: 2
supported
getting_started
dependencies
concurrency

View file

@ -0,0 +1,418 @@
*****************
Supported Devices
*****************
Supported MCUs
==============
+--------------+-----------------------+--------+------+-----------+-------------------+--------------+
| Manufacturer | Family | Device | Host | Highspeed | Driver | Note |
+==============+=======================+========+======+===========+===================+==============+
| Broadcom | BCM2711, BCM2837 | ✔ | | ✔ | dwc2 | |
+--------------+-----------------------+--------+------+-----------+-------------------+--------------+
| Dialog | DA1469x | ✔ | ✖ | ✖ | da146xx | |
+--------------+-----------------------+--------+------+-----------+-------------------+--------------+
| Espressif | ESP32 S2, S3 | ✔ | | ✖ | dwc2 or esp32sx | |
+--------------+-----------------------+--------+------+-----------+-------------------+--------------+
| GigaDevice | GD32VF103 | ✔ | | ✖ | dwc2 | |
+--------------+-----------------------+--------+------+-----------+-------------------+--------------+
| Infineon | XMC4500 | ✔ | | ✖ | dwc2 | |
+--------------+-----------------------+--------+------+-----------+-------------------+--------------+
| MicroChip | SAM D11, D21 | ✔ | | ✖ | samd | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | SAM D51, E5x | ✔ | | ✖ | samd | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | SAM G55 | ✔ | | ✖ | samg | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | SAM L21, L22 | ✔ | | ✖ | samd | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | SAM E70,S70,V70,V71 | ✔ | | ✔ | samx7x | |
+--------------+-----------------------+--------+------+-----------+-------------------+--------------+
| NordicSemi | nRF52833, nRF52840 | ✔ | ✖ | ✖ | nrf5x | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | nRF5340 | ✔ | ✖ | ✖ | nrf5x | |
+--------------+-----------------------+--------+------+-----------+-------------------+--------------+
| Nuvoton | NUC120 | ✔ | ✖ | ✖ | | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | NUC121/NUC125 | ✔ | ✖ | ✖ | | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | NUC126 | ✔ | ✖ | ✖ | | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | NUC505 | ✔ | | ✔ | | |
+--------------+---------+-------------+--------+------+-----------+-------------------+--------------+
| NXP | iMXRT | RT10xx | ✔ | ✔ | ✔ | ci_hs | |
| | +-------------+--------+------+-----------+-------------------+--------------+
| | | RT11xx | ✔ | ✔ | ✔ | ci_hs | |
| +---------+-------------+--------+------+-----------+-------------------+--------------+
| | Kinetis | KL25 | ✔ | ⚠ | ✖ | | |
| | +-------------+--------+------+-----------+-------------------+--------------+
| | | K32L2 | ✔ | | ✖ | | |
| +---------+-------------+--------+------+-----------+-------------------+--------------+
| | LPC | 11u, 13, 15 | ✔ | ✖ | ✖ | lpc_ip3511 | |
| | +-------------+--------+------+-----------+-------------------+--------------+
| | | 17, 40 | ✔ | ⚠ | ✖ | lpc17_40 | |
| | +-------------+--------+------+-----------+-------------------+--------------+
| | | 18, 43 | ✔ | ✔ | ✔ | ci_hs | |
| | +-------------+--------+------+-----------+-------------------+--------------+
| | | 51u | ✔ | ✖ | ✖ | lpc_ip3511 | |
| | +-------------+--------+------+-----------+-------------------+--------------+
| | | 54 | ✔ | | ✔ | lpc_ip3511 | |
| | +-------------+--------+------+-----------+-------------------+--------------+
| | | 55 | ✔ | | ✔ | lpc_ip3511 | |
+--------------+---------+-------------+--------+------+-----------+-------------------+--------------+
| Raspberry Pi | RP2040 | ✔ | ✔ | ✖ | rp2040, pio_usb | |
+--------------+-----+-----------------+--------+------+-----------+-------------------+--------------+
| Renesas | RX | 63N, 65N, 72N | ✔ | ✔ | ✖ | rusb2 | |
| +-----+-----------------+--------+------+-----------+-------------------+--------------+
| | RA | XXX | ✔ | ✔ | | rusb2 | |
+--------------+-----+-----------------+--------+------+-----------+-------------------+--------------+
| Silabs | EFM32GG12 | ✔ | | ✖ | dwc2 | |
+--------------+-----------------------+--------+------+-----------+-------------------+--------------+
| Sony | CXD56 | ✔ | ✖ | ✔ | cxd56 | |
+--------------+-----------------------+--------+------+-----------+-------------------+--------------+
| ST STM32 | F0 | ✔ | ✖ | ✖ | stm32_fsdev | |
| +----+------------------+--------+------+-----------+-------------------+--------------+
| | F1 | 102, 103 | ✔ | ✖ | ✖ | stm32_fsdev | |
| | +------------------+--------+------+-----------+-------------------+--------------+
| | | 105, 107 | ✔ | | ✖ | dwc2 | |
| +----+------------------+--------+------+-----------+-------------------+--------------+
| | F2 | ✔ | | ✔ | dwc2 | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | F3 | ✔ | ✖ | ✖ | stm32_fsdev | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | F4 | ✔ | | ✔ | dwc2 | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | F7 | ✔ | | ✔ | dwc2 | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | H7 | ✔ | | ✔ | dwc2 | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | G4 | ✔ | ✖ | ✖ | stm32_fsdev | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | L0, L1 | ✔ | ✖ | ✖ | stm32_fsdev | |
| +----+------------------+--------+------+-----------+-------------------+--------------+
| | L4 | 4x2, 4x3 | ✔ | ✖ | ✖ | stm32_fsdev | |
| | +------------------+--------+------+-----------+-------------------+--------------+
| | | 4x5, 4x6 | ✔ | | | dwc2 | |
| +----+------------------+--------+------+-----------+-------------------+--------------+
| | L4+ | ✔ | | | dwc2 | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | U5 | ⚠ | | | dwc2 | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | WBx5 | ✔ | | | stm32_fsdev | |
+--------------+-----------------------+--------+------+-----------+-------------------+--------------+
| TI | MSP430 | ✔ | ✖ | ✖ | msp430x5xx | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | MSP432E4 | ✔ | | ✖ | musb | |
| +-----------------------+--------+------+-----------+-------------------+--------------+
| | TM4C123 | ✔ | | ✖ | musb | |
+--------------+-----------------------+--------+------+-----------+-------------------+--------------+
| ValentyUSB | eptri | ✔ | ✖ | ✖ | eptri | |
+--------------+-----------------------+--------+------+-----------+-------------------+--------------+
| WCH | CH32V307 | ✔ | | ✔ | ch32v307 | |
+--------------+-----------------------+--------+------+-----------+-------------------+--------------+
Table Legend
------------
= ===================
✔ Supported
⚠ WIP/partial support
✖ Not supported
= ===================
Supported Boards
================
The board support code is only used for self-contained examples and testing. It is not used when TinyUSB is part of a larger project. It is responsible for getting the MCU started and the USB peripheral clocked with minimal of on-board devices
- One LED : for status
- One Button : to get input from user
- One UART : optional for device, but required for host examples
The following boards are supported (sorted alphabetically):
Broadcom
--------
- `Raspberry Pi CM4 <https://www.raspberrypi.com/products/compute-module-4>`__
Dialog DA146xx
--------------
- `DA14695 Development Kit USB <https://www.dialog-semiconductor.com/products/da14695-development-kit-usb>`__
- `DA1469x Development Kit Pro <https://www.dialog-semiconductor.com/products/da14695-development-kit-pro>`__
Espressif ESP32-S2
------------------
- `Adafruit Feather ESP32-S2 <https://www.adafruit.com/product/5000>`__
- `Adafruit Magtag 2.9" E-Ink WiFi Display <https://www.adafruit.com/product/4800>`__
- `Adafruit Metro ESP32-S2 <https://www.adafruit.com/product/4775>`__
- `ESP32-S2-Kaluga-1 <https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-esp32-s2-kaluga-1-kit.html>`__
- `ESP32-S2-Saola-1 <https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-saola-1-v1.2.html>`__
GigaDevice
----------
- `Sipeed Longan Nano <https://longan.sipeed.com/en/>`__
Infineon
---------
XMC4000
^^^^^^^
- `XMC4500 Relax (Lite) Kit <https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc45_relax_lite_v1/>`__
MicroChip
---------
SAMD11 & SAMD21
^^^^^^^^^^^^^^^
- `Adafruit Circuit Playground Express <https://www.adafruit.com/product/3333>`__
- `Adafruit Feather M0 Express <https://www.adafruit.com/product/3403>`__
- `Adafruit ItsyBitsy M0 Express <https://www.adafruit.com/product/3727>`__
- `Adafruit Metro M0 Express <https://www.adafruit.com/product/3505>`__
- `Great Scott Gadgets Cynthion <https://greatscottgadgets.com/cynthion/>`__
- `Microchip SAMD11 Xplained Pro <https://www.microchip.com/developmenttools/ProductDetails/atsamd11-xpro>`__
- `Microchip SAMD21 Xplained Pro <https://www.microchip.com/DevelopmentTools/ProductDetails/ATSAMD21-XPRO>`__
- `Seeeduino Xiao <https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html>`__
SAMD51 & SAME54
^^^^^^^^^^^^^^^
- `Adafruit Feather M4 Express <https://www.adafruit.com/product/3857>`__
- `Adafruit ItsyBitsy M4 Express <https://www.adafruit.com/product/3800>`__
- `Adafruit PyBadge <https://www.adafruit.com/product/4200>`__
- `Adafruit PyPortal <https://www.adafruit.com/product/4116>`__
- `Adafruit Metro M4 Express <https://www.adafruit.com/product/3382>`__
- `D5035-01 <https://github.com/RudolphRiedel/USB_CAN-FD>`__
- `Microchip SAME54 Xplained Pro <https://www.microchip.com/developmenttools/productdetails/atsame54-xpro>`__
SAME7x
^^^^^^
- `Microchip SAME70 Xplained <https://www.microchip.com/en-us/development-tool/ATSAME70-XPLD>`_
- `QMTECH ATSAME70N19 <https://www.aliexpress.com/item/1005003173783268.html>`_
SAMG
^^^^
- `Microchip SAMG55 Xplained Pro <https://www.microchip.com/DevelopmentTools/ProductDetails/PartNO/ATSAMG55-XPRO>`__
SAML2x
^^^^^^
- `SAML21 Xplaind Pro <https://www.microchip.com/DevelopmentTools/ProductDetails/ATSAML21-XPRO-B>`__
- `SAML22 Feather <https://github.com/joeycastillo/Feather-Projects/tree/main/SAML22%20Feather>`__
- `Sensor Watch <https://github.com/joeycastillo/Sensor-Watch>`__
Nordic nRF5x
------------
- `Adafruit Circuit Playground Bluefruit <https://www.adafruit.com/product/4333>`__
- `Adafruit CLUE <https://www.adafruit.com/product/4500>`__
- `Adafruit Feather nRF52840 Express <https://www.adafruit.com/product/4062>`__
- `Adafruit Feather nRF52840 Sense <https://www.adafruit.com/product/4516>`__
- `Adafruit ItsyBitsy nRF52840 Express <https://www.adafruit.com/product/4481>`__
- `Arduino Nano 33 BLE <https://store.arduino.cc/usa/nano-33-ble>`__
- `Arduino Nano 33 BLE Sense <https://store.arduino.cc/usa/nano-33-ble-sense>`__
- `Maker Diary nRF52840 MDK Dongle <https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle>`__
- `Nordic nRF52840 Development Kit (aka pca10056) <https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK>`__
- `Nordic nRF52840 Dongle (aka pca10059) <https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-Dongle>`__
- `Nordic nRF52833 Development Kit (aka pca10100) <https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52833-DK>`__
- `Raytac MDBT50Q-RX Dongle <https://www.raytac.com/product/ins.php?index_id=89>`__
Nuvoton
-------
- NuTiny SDK NUC120
- `NuTiny NUC121S <https://direct.nuvoton.com/en/nutiny-nuc121s>`__
- `NuTiny NUC125S <https://direct.nuvoton.com/en/nutiny-nuc125s>`__
- `NuTiny NUC126V <https://direct.nuvoton.com/en/nutiny-nuc126v>`__
- `NuTiny SDK NUC505Y <https://direct.nuvoton.com/en/nutiny-nuc505y>`__
NXP
---
iMX RT
^^^^^^
- `MIMX RT1010 Evaluation Kit <https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1010-evaluation-kit:MIMXRT1010-EVK>`__
- `MIMX RT1015 Evaluation Kit <https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1015-evaluation-kit:MIMXRT1015-EVK>`__
- `MIMX RT1020 Evaluation Kit <https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1020-evaluation-kit:MIMXRT1020-EVK>`__
- `MIMX RT1050 Evaluation Kit <https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1050-evaluation-kit:MIMXRT1050-EVK>`__
- `MIMX RT1060 Evaluation Kit <https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/mimxrt1060-evk-i.mx-rt1060-evaluation-kit:MIMXRT1060-EVK>`__
- `MIMX RT1064 Evaluation Kit <https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/mimxrt1064-evk-i.mx-rt1064-evaluation-kit:MIMXRT1064-EVK>`__
- `Teensy 4.0 Development Board <https://www.pjrc.com/store/teensy40.html>`__
- `Teensy 4.1 Development Board <https://www.pjrc.com/store/teensy41.html>`__
Kinetis
^^^^^^^
- `Freedom FRDM-KL25Z <https://www.nxp.com/design/development-boards/freedom-development-boards/mcu-boards/freedom-development-platform-for-kinetis-kl14-kl15-kl24-kl25-mcus:FRDM-KL25Z>`__
- `Freedom FRDM-K32L2A4S <https://www.nxp.com/design/development-boards/freedom-development-boards/mcu-boards/nxp-freedom-platform-for-k32-l2a-mcus:FRDM-K32L2A4S>`__
- `Freedom FRDM-K32L2B3 <https://www.nxp.com/design/development-boards/freedom-development-boards/mcu-boards/nxp-freedom-development-platform-for-k32-l2b-mcus:FRDM-K32L2B3>`__
- `KUIIC <https://github.com/nxf58843/kuiic>`__
LPC 11-13-15
^^^^^^^^^^^^
- `LPCXpresso 11u37 <https://www.nxp.com/design/microcontrollers-developer-resources/lpcxpresso-boards/lpcxpresso-board-for-lpc11u37h:OM13074>`__
- `LPCXpresso 11u68 <https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc11u68:OM13058>`__
- `LPCXpresso 1347 <https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc1347:OM13045>`__
- `LPCXpresso 1549 <https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1500-cortex-m3/lpcxpresso-board-for-lpc1549:OM13056>`__
LPC 17-40
^^^^^^^^^
- `ARM mbed LPC1768 <https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1700-cortex-m3/arm-mbed-lpc1768-board:OM11043>`__
- `Embedded Artists LPC4088 Quick Start board <https://www.embeddedartists.com/products/lpc4088-quickstart-board>`__
- `LPCXpresso 1769 <https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc1769:OM13000>`__
LPC 18-43
^^^^^^^^^
- `Embedded Artists LPC4357 Developer Kit <http://www.embeddedartists.com/products/kits/lpc4357_kit.php>`__
- `Keil MCB1800 Evaluation Board <http://www.keil.com/mcb1800>`__
- `LPCXpresso18S37 Development Board <https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc4000-cortex-m4/lpcxpresso18s37-development-board:OM13076>`__
- `NGX LPC4330-Xplorer <https://www.nxp.com/design/designs/lpc4330-xplorer-board:OM13027>`__
LPC 51
^^^^^^
- `LPCXpresso 51U68 <https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpcxpresso51u68-for-the-lpc51u68-mcus:OM40005>`__
LPC 54
^^^^^^
- `LPCXpresso 54114 <https://www.nxp.com/design/microcontrollers-developer-resources/lpcxpresso-boards/lpcxpresso54114-board:OM13089>`__
LPC55
^^^^^
- `Double M33 Express <https://www.crowdsupply.com/steiert-solutions/double-m33-express>`__
- `LPCXpresso 55s28 EVK <https://www.nxp.com/design/software/development-software/lpcxpresso55s28-development-board:LPC55S28-EVK>`__
- `LPCXpresso 55s69 EVK <https://www.nxp.com/design/development-boards/lpcxpresso-boards/lpcxpresso55s69-development-board:LPC55S69-EVK>`__
- `MCU-Link <https://www.nxp.com/design/development-boards/lpcxpresso-boards/mcu-link-debug-probe:MCU-LINK>`__
Renesas
-------
RA
^^
- `Evaluation Kit for RA4M1 <https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra4m1-evaluation-kit-ra4m1-mcu-group>`__
- `Evaluation Kit for RA4M3 <https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra4m3-evaluation-kit-ra4m3-mcu-group>`__
RX
^^
- `GR-CITRUS <https://www.renesas.com/us/en/products/gadget-renesas/boards/gr-citrus>`__
- `Renesas RX65N Target Board <https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rx-32-bit-performance-efficiency-mcus/rtk5rx65n0c00000br-target-board-rx65n>`__
Raspberry Pi RP2040
-------------------
- `Adafruit Feather RP2040 <https://www.adafruit.com/product/4884>`__
- `Adafruit ItsyBitsy RP2040 <https://www.adafruit.com/product/4888>`__
- `Adafruit QT Py RP2040 <https://www.adafruit.com/product/4900>`__
- `Raspberry Pi Pico <https://www.raspberrypi.org/products/raspberry-pi-pico/>`__
Silabs
------
- `EFM32GG12 Thunderboard Kit (SLTB009A) <https://www.silabs.com/development-tools/thunderboard/thunderboard-gg12-kit>`__
Sony
----
- `Sony Spresense CXD5602 <https://developer.sony.com/develop/spresense>`__
ST STM32
--------
F0
^^
- `STM32 F070rb Nucleo <https://www.st.com/en/evaluation-tools/nucleo-f070rb.html>`__
- `STM32 F072 Evaluation <https://www.st.com/en/evaluation-tools/stm32072b-eval.html>`__
- `STM32 F072rb Discovery <https://www.st.com/en/evaluation-tools/32f072bdiscovery.html>`__
F1
^^
- `STM32 F103c8 Blue Pill <https://stm32-base.org/boards/STM32F103C8T6-Blue-Pill>`__
- `STM32 F103rc Mini v2.0 <https://stm32-base.org/boards/STM32F103RCT6-STM32-Mini-V2.0>`__
F2
^^
- `STM32 F207zg Nucleo <https://www.st.com/en/evaluation-tools/nucleo-f207zg.html>`__
F3
^^
- `STM32 F303vc Discovery <https://www.st.com/en/evaluation-tools/stm32f3discovery.html>`__
F4
^^
- `Adafruit Feather STM32F405 <https://www.adafruit.com/product/4382>`__
- `Micro Python PyBoard v1.1 <https://store.micropython.org/product/PYBv1.1>`__
- `STM32 F401cc Black Pill <https://stm32-base.org/boards/STM32F401CCU6-WeAct-Black-Pill-V1.2>`__
- `STM32 F407vg Discovery <https://www.st.com/en/evaluation-tools/stm32f4discovery.html>`__
- `STM32 F411ce Black Pill <https://www.adafruit.com/product/4877>`__
- `STM32 F411ve Discovery <https://www.st.com/en/evaluation-tools/32f411ediscovery.html>`__
- `STM32 F412zg Discovery <https://www.st.com/en/evaluation-tools/32f412gdiscovery.html>`__
- `STM32 F412zg Nucleo <https://www.st.com/en/evaluation-tools/nucleo-f412zg.html>`__
- `STM32 F439zi Nucleo <https://www.st.com/en/evaluation-tools/nucleo-f439zi.html>`__
F7
^^
- `STLink-V3 Mini <https://www.st.com/en/development-tools/stlink-v3mini.html>`__
- `STM32 F723e Discovery <https://www.st.com/en/evaluation-tools/32f723ediscovery.html>`__
- `STM32 F746zg Nucleo <https://www.st.com/en/evaluation-tools/nucleo-f746zg.html>`__
- `STM32 F746g Discovery <https://www.st.com/en/evaluation-tools/32f746gdiscovery.html>`__
- `STM32 F767zi Nucleo <https://www.st.com/en/evaluation-tools/nucleo-f767zi.html>`__
- `STM32 F769i Discovery <https://www.st.com/en/evaluation-tools/32f769idiscovery.html>`__
H7
^^
- `STM32 H743zi Nucleo <https://www.st.com/en/evaluation-tools/nucleo-h743zi.html>`__
- `STM32 H743i Evaluation <https://www.st.com/en/evaluation-tools/stm32h743i-eval.html>`__
- `STM32 H745i Discovery <https://www.st.com/en/evaluation-tools/stm32h745i-disco.html>`__
- `Waveshare OpenH743I-C <https://www.waveshare.com/openh743i-c-standard.htm>`__
G4
^^
- `STM32 G474RE Nucleo <https://www.st.com/en/evaluation-tools/nucleo-g474re.html>`__
L0
^^
- `STM32 L035c8 Discovery <https://www.st.com/en/evaluation-tools/32l0538discovery.html>`__
L4
^^
- `STM32 L476vg Discovery <https://www.st.com/en/evaluation-tools/32l476gdiscovery.html>`__
- `STM32 L4P5zg Nucleo <https://www.st.com/en/evaluation-tools/nucleo-l4p5zg.html>`__
- `STM32 L4R5zi Nucleo <https://www.st.com/en/evaluation-tools/nucleo-l4r5zi.html>`__
WB
^^
- `STM32 WB55 Nucleo <https://www.st.com/en/evaluation-tools/p-nucleo-wb55.html>`__
TI
--
- `MSP430F5529 USB LaunchPad Evaluation Kit <http://www.ti.com/tool/MSP-EXP430F5529LP>`__
- `MSP-EXP432E401Y LaunchPad Evaluation Kit <https://www.ti.com/tool/MSP-EXP432E401Y>`__
- `TM4C123GXL LaunchPad Evaluation Kit <https://www.ti.com/tool/EK-TM4C123GXL>`__
Tomu
----
- `Fomu <https://www.crowdsupply.com/sutajio-kosagi/fomu>`__
WCH
---
- `CH32V307V-R1-1v0 <https://lcsc.com/product-detail/Development-Boards-Kits_WCH-Jiangsu-Qin-Heng-CH32V307V-EVT-R1_C2943980.html>`

4
docs/requirements.txt Normal file
View file

@ -0,0 +1,4 @@
sphinx>=5.0
furo>=2020.12.30.b24
sphinx-autodoc-typehints>=1.10
jinja2>=3.0.3

11
examples/CMakeLists.txt Normal file
View file

@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.17)
#set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include(${CMAKE_CURRENT_SOURCE_DIR}/../hw/bsp/family_support.cmake)
project(tinyusb_examples C CXX ASM)
add_subdirectory(device)
add_subdirectory(dual)
add_subdirectory(host)
add_subdirectory(typec)

View file

@ -12,3 +12,10 @@ ATTRS{idVendor}=="cafe", MODE="0666", GROUP="dialout"
# Rule to blacklist TinyUSB example from being manipulated by ModemManager.
SUBSYSTEMS=="usb", ATTRS{idVendor}=="cafe", ENV{ID_MM_DEVICE_IGNORE}="1"
# Xplained Pro SamG55 Device
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2111", MODE="0666", GROUP="users", ENV{ID_MM_DEVICE_IGNORE}="1"
SUBSYSTEMS=="tty", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2111", MODE="0666", GROUP="users", ENV{ID_MM_DEVICE_IGNORE}="1"
# TI Stellaris/Tiva-C Launchpad ICDI
SUBSYSTEM=="usb", ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="0666"

View file

@ -1,20 +1,23 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.17)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../hw/bsp/${FAMILY}/family.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../hw/bsp/family_support.cmake)
project(tinyusb_device_examples)
project(tinyusb_device_examples C CXX ASM)
family_initialize_project(tinyusb_device_examples ${CMAKE_CURRENT_LIST_DIR})
# family_add_subdirectory will filter what to actually add based on selected FAMILY
family_add_subdirectory(audio_4_channel_mic)
family_add_subdirectory(audio_test)
family_add_subdirectory(audio_test_multi_rate)
family_add_subdirectory(board_test)
family_add_subdirectory(cdc_dual_ports)
family_add_subdirectory(cdc_msc)
family_add_subdirectory(cdc_msc_freertos)
family_add_subdirectory(cdc_uac2)
family_add_subdirectory(dfu)
family_add_subdirectory(dfu_runtime)
family_add_subdirectory(dynamic_configuration)
family_add_subdirectory(hid_boot_interface)
family_add_subdirectory(hid_composite)
family_add_subdirectory(hid_composite_freertos)
family_add_subdirectory(hid_generic_inout)
@ -24,4 +27,5 @@ family_add_subdirectory(msc_dual_lun)
family_add_subdirectory(net_lwip_webserver)
family_add_subdirectory(uac2_headset)
family_add_subdirectory(usbtmc)
family_add_subdirectory(video_capture)
family_add_subdirectory(webusb_serial)

View file

@ -1,28 +1,38 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.17)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/${FAMILY}/family.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
# gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>)
family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR})
project(${PROJECT})
project(${PROJECT} C CXX ASM)
# Checks this example is valid for the family and initializes the project
family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR})
# Espressif has its own cmake build system
if(FAMILY STREQUAL "espressif")
return()
endif()
add_executable(${PROJECT})
# Example source
target_sources(${PROJECT} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c
${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c
)
)
# Example include
target_include_directories(${PROJECT} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
# Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT})
# Add libm for GCC
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_link_libraries(${PROJECT} PUBLIC m)
endif()
# Configure compilation flags and libraries for the example without RTOS.
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT} noos)

View file

@ -1,4 +1,3 @@
include ../../../tools/top.mk
include ../../make.mk
INC += \
@ -6,7 +5,10 @@ INC += \
$(TOP)/hw \
# Example source
EXAMPLE_SOURCE += $(wildcard src/*.c)
EXAMPLE_SOURCE += \
src/main.c \
src/usb_descriptors.c \
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk

View file

@ -0,0 +1,4 @@
mcu:SAMD11
mcu:SAME5X
mcu:SAMG
family:broadcom_64bit

View file

@ -34,17 +34,16 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "bsp/board.h"
#include "bsp/board_api.h"
#include "tusb.h"
#include "tusb_config.h"
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF PROTYPES
//--------------------------------------------------------------------+
#ifndef AUDIO_SAMPLE_RATE
#define AUDIO_SAMPLE_RATE 48000
#endif
#define AUDIO_SAMPLE_RATE CFG_TUD_AUDIO_FUNC_1_SAMPLE_RATE
/* Blink pattern
* - 250 ms : device not mounted
@ -70,8 +69,13 @@ uint8_t clkValid;
audio_control_range_2_n_t(1) volumeRng[CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX+1]; // Volume range state
audio_control_range_4_n_t(1) sampleFreqRng; // Sample frequency range state
// Audio test data
#if CFG_TUD_AUDIO_ENABLE_ENCODING
// Audio test data, each buffer contains 2 channels, buffer[0] for CH0-1, buffer[1] for CH1-2
uint16_t i2s_dummy_buffer[CFG_TUD_AUDIO_FUNC_1_N_TX_SUPP_SW_FIFO][CFG_TUD_AUDIO_FUNC_1_TX_SUPP_SW_FIFO_SZ/2]; // Ensure half word aligned
#else
// Audio test data, 4 channels muxed together, buffer[0] for CH0, buffer[1] for CH1, buffer[2] for CH2, buffer[3] for CH3
uint16_t i2s_dummy_buffer[CFG_TUD_AUDIO_EP_SZ_IN]; // Ensure half word aligned
#endif
void led_blinking_task(void);
void audio_task(void);
@ -81,7 +85,12 @@ int main(void)
{
board_init();
tusb_init();
// init device stack on configured roothub port
tud_init(BOARD_TUD_RHPORT);
if (board_init_after_tusb) {
board_init_after_tusb();
}
// Init values
sampFreq = AUDIO_SAMPLE_RATE;
@ -92,15 +101,51 @@ int main(void)
sampleFreqRng.subrange[0].bMax = AUDIO_SAMPLE_RATE;
sampleFreqRng.subrange[0].bRes = 0;
// Generate dummy data
#if CFG_TUD_AUDIO_ENABLE_ENCODING
uint16_t * p_buff = i2s_dummy_buffer[0];
uint16_t dataVal = 1;
for (uint16_t cnt = 0; cnt < AUDIO_SAMPLE_RATE/1000; cnt++)
{
// CH0 saw wave
*p_buff++ = dataVal;
// CH1 inverted saw wave
*p_buff++ = 60 + AUDIO_SAMPLE_RATE/1000 - dataVal;
dataVal++;
}
p_buff = i2s_dummy_buffer[1];
for (uint16_t cnt = 0; cnt < AUDIO_SAMPLE_RATE/1000; cnt++)
{
// CH3 square wave
*p_buff++ = cnt < (AUDIO_SAMPLE_RATE/1000/2) ? 120:170;
// CH4 sinus wave
float t = 2*3.1415f * cnt / (AUDIO_SAMPLE_RATE/1000);
*p_buff++ = (uint16_t)(sinf(t) * 25) + 200;
}
#else
uint16_t * p_buff = i2s_dummy_buffer;
uint16_t dataVal = 1;
for (uint16_t cnt = 0; cnt < AUDIO_SAMPLE_RATE/1000; cnt++)
{
// CH0 saw wave
*p_buff++ = dataVal;
// CH1 inverted saw wave
*p_buff++ = 60 + AUDIO_SAMPLE_RATE/1000 - dataVal;
dataVal++;
// CH3 square wave
*p_buff++ = cnt < (AUDIO_SAMPLE_RATE/1000/2) ? 120:170;
// CH4 sinus wave
float t = 2*3.1415f * cnt / (AUDIO_SAMPLE_RATE/1000);
*p_buff++ = (uint16_t)(sinf(t) * 25) + 200;
}
#endif
while (1)
{
tud_task(); // tinyusb device task
led_blinking_task();
audio_task();
}
return 0;
}
//--------------------------------------------------------------------+
@ -131,7 +176,7 @@ void tud_suspend_cb(bool remote_wakeup_en)
// Invoked when usb bus is resumed
void tud_resume_cb(void)
{
blink_interval_ms = BLINK_MOUNTED;
blink_interval_ms = tud_mounted() ? BLINK_MOUNTED : BLINK_NOT_MOUNTED;
}
//--------------------------------------------------------------------+
@ -141,7 +186,7 @@ void tud_resume_cb(void)
void audio_task(void)
{
// Yet to be filled - e.g. put meas data into TX FIFOs etc.
asm("nop");
// asm("nop");
}
//--------------------------------------------------------------------+
@ -220,7 +265,7 @@ bool tud_audio_set_req_entity_cb(uint8_t rhport, tusb_control_request_t const *
// Request uses format layout 2
TU_VERIFY(p_request->wLength == sizeof(audio_control_cur_2_t));
volume[channelNum] = ((audio_control_cur_2_t*) pBuff)->bCur;
volume[channelNum] = (uint16_t) ((audio_control_cur_2_t*) pBuff)->bCur;
TU_LOG2(" Set Volume: %d dB of channel: %u\r\n", volume[channelNum], channelNum);
return true;
@ -289,7 +334,7 @@ bool tud_audio_get_req_entity_cb(uint8_t rhport, tusb_control_request_t const *
// Those are dummy values for now
ret.bNrChannels = 1;
ret.bmChannelConfig = 0;
ret.bmChannelConfig = (audio_channel_config_t) 0;
ret.iChannelNames = 0;
TU_LOG2(" Get terminal connector\r\n");
@ -362,7 +407,8 @@ bool tud_audio_get_req_entity_cb(uint8_t rhport, tusb_control_request_t const *
{
case AUDIO_CS_REQ_CUR:
TU_LOG2(" Get Sample Freq.\r\n");
return tud_control_xfer(rhport, p_request, &sampFreq, sizeof(sampFreq));
// Buffered control transfer is needed for IN flow control to work
return tud_audio_buffer_and_schedule_control_xfer(rhport, p_request, &sampFreq, sizeof(sampFreq));
case AUDIO_CS_REQ_RANGE:
TU_LOG2(" Get Sample Freq. range\r\n");
@ -398,11 +444,24 @@ bool tud_audio_tx_done_pre_load_cb(uint8_t rhport, uint8_t itf, uint8_t ep_in, u
(void) ep_in;
(void) cur_alt_setting;
for (uint8_t cnt=0; cnt < CFG_TUD_AUDIO_FUNC_1_N_TX_SUPP_SW_FIFO; cnt++)
// In read world application data flow is driven by I2S clock,
// both tud_audio_tx_done_pre_load_cb() & tud_audio_tx_done_post_load_cb() are hardly used.
// For example in your I2S receive callback:
// void I2S_Rx_Callback(int channel, const void* data, uint16_t samples)
// {
// tud_audio_write_support_ff(channel, data, samples * N_BYTES_PER_SAMPLE * N_CHANNEL_PER_FIFO);
// }
#if CFG_TUD_AUDIO_ENABLE_ENCODING
// Write I2S buffer into FIFO
for (uint8_t cnt=0; cnt < 2; cnt++)
{
tud_audio_write_support_ff(cnt, i2s_dummy_buffer[cnt], AUDIO_SAMPLE_RATE/1000 * CFG_TUD_AUDIO_FUNC_1_N_BYTES_PER_SAMPLE_TX * CFG_TUD_AUDIO_FUNC_1_CHANNEL_PER_FIFO_TX);
}
#else
tud_audio_write(i2s_dummy_buffer, AUDIO_SAMPLE_RATE/1000 * CFG_TUD_AUDIO_FUNC_1_N_BYTES_PER_SAMPLE_TX * CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX);
#endif
return true;
}
@ -414,22 +473,6 @@ bool tud_audio_tx_done_post_load_cb(uint8_t rhport, uint16_t n_bytes_copied, uin
(void) ep_in;
(void) cur_alt_setting;
uint16_t dataVal;
// Generate dummy data
for (uint16_t cnt = 0; cnt < CFG_TUD_AUDIO_FUNC_1_N_TX_SUPP_SW_FIFO; cnt++)
{
uint16_t * p_buff = i2s_dummy_buffer[cnt]; // 2 bytes per sample
dataVal = 1;
for (uint16_t cnt2 = 0; cnt2 < AUDIO_SAMPLE_RATE/1000; cnt2++)
{
for (uint8_t cnt3 = 0; cnt3 < CFG_TUD_AUDIO_FUNC_1_CHANNEL_PER_FIFO_TX; cnt3++)
{
*p_buff++ = dataVal;
}
dataVal++;
}
}
return true;
}

View file

@ -10,11 +10,11 @@ if __name__ == '__main__':
# print(sd.query_devices())
fs = 48000 # Sample rate
duration = 100e-3 # Duration of recording
duration = 1 # Duration of recording
if platform.system() == 'Windows':
# WDM-KS is needed since there are more than one MicNode device APIs (at least in Windows)
device = 'Microphone (MicNode_4_Ch), Windows WDM-KS'
device = 'Microphone (MicNode_4_Ch), Windows WASAPI'
elif platform.system() == 'Darwin':
device = 'MicNode_4_Ch'
else:
@ -25,10 +25,13 @@ if __name__ == '__main__':
sd.wait() # Wait until recording is finished
print('Done!')
time = np.arange(0, duration, 1 / fs) # time vector
# strip starting zero
plt.plot(time, myrecording)
plt.xlabel('Time [s]')
plt.ylabel('Amplitude')
plt.title('MicNode 4 Channel')
plt.legend(['CH-1', 'CH-2', 'CH-3','CH-4'])
plt.show()

View file

@ -30,6 +30,20 @@
extern "C" {
#endif
//--------------------------------------------------------------------+
// Board Specific Configuration
//--------------------------------------------------------------------+
// RHPort number used for device can be defined by board.mk, default to port 0
#ifndef BOARD_TUD_RHPORT
#define BOARD_TUD_RHPORT 0
#endif
// RHPort max operational speed can defined by board.mk
#ifndef BOARD_TUD_MAX_SPEED
#define BOARD_TUD_MAX_SPEED OPT_MODE_DEFAULT_SPEED
#endif
//--------------------------------------------------------------------
// COMMON CONFIGURATION
//--------------------------------------------------------------------
@ -39,12 +53,6 @@ extern "C" {
#error CFG_TUSB_MCU must be defined
#endif
#if CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE | OPT_MODE_HIGH_SPEED)
#else
#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE
#endif
#ifndef CFG_TUSB_OS
#define CFG_TUSB_OS OPT_OS_NONE
#endif
@ -53,8 +61,11 @@ extern "C" {
#define CFG_TUSB_DEBUG 0
#endif
// CFG_TUSB_DEBUG is defined by compiler in DEBUG build
// #define CFG_TUSB_DEBUG 0
// Enable Device stack
#define CFG_TUD_ENABLED 1
// Default is max speed that hardware controller could support with on-chip PHY
#define CFG_TUD_MAX_SPEED BOARD_TUD_MAX_SPEED
/* USB DMA on some MCUs can only access a specific SRAM region with restriction on alignment.
* Tinyusb use follows macros to declare transferring memory so that they can be put
@ -80,11 +91,11 @@ extern "C" {
#endif
//------------- CLASS -------------//
#define CFG_TUD_AUDIO 1
#define CFG_TUD_CDC 0
#define CFG_TUD_MSC 0
#define CFG_TUD_HID 0
#define CFG_TUD_MIDI 0
#define CFG_TUD_AUDIO 1
#define CFG_TUD_VENDOR 0
//--------------------------------------------------------------------
@ -92,6 +103,7 @@ extern "C" {
//--------------------------------------------------------------------
// Have a look into audio_device.h for all configurations
#define CFG_TUD_AUDIO_FUNC_1_SAMPLE_RATE 48000
#define CFG_TUD_AUDIO_FUNC_1_DESC_LEN TUD_AUDIO_MIC_FOUR_CH_DESC_LEN
@ -101,15 +113,27 @@ extern "C" {
#define CFG_TUD_AUDIO_ENABLE_EP_IN 1
#define CFG_TUD_AUDIO_FUNC_1_N_BYTES_PER_SAMPLE_TX 2 // This value is not required by the driver, it parses this information from the descriptor once the alternate interface is set by the host - we use it for the setup
#define CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX 4 // This value is not required by the driver, it parses this information from the descriptor once the alternate interface is set by the host - we use it for the setup
#define CFG_TUD_AUDIO_EP_SZ_IN (48 + 1) * CFG_TUD_AUDIO_FUNC_1_N_BYTES_PER_SAMPLE_TX * CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX // 48 Samples (48 kHz) x 2 Bytes/Sample x CFG_TUD_AUDIO_N_CHANNELS_TX Channels - the Windows driver always needs an extra sample per channel of space more, otherwise it complains... found by trial and error
#define CFG_TUD_AUDIO_EP_SZ_IN TUD_AUDIO_EP_SIZE(CFG_TUD_AUDIO_FUNC_1_SAMPLE_RATE, CFG_TUD_AUDIO_FUNC_1_N_BYTES_PER_SAMPLE_TX, CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX)
#define CFG_TUD_AUDIO_ENABLE_ENCODING 1
#define CFG_TUD_AUDIO_EP_IN_FLOW_CONTROL 1
#if CFG_TUD_AUDIO_ENABLE_ENCODING
#define CFG_TUD_AUDIO_FUNC_1_EP_IN_SZ_MAX CFG_TUD_AUDIO_EP_SZ_IN
#define CFG_TUD_AUDIO_FUNC_1_EP_IN_SW_BUF_SZ CFG_TUD_AUDIO_EP_SZ_IN
#define CFG_TUD_AUDIO_ENABLE_ENCODING 1
#define CFG_TUD_AUDIO_ENABLE_TYPE_I_ENCODING 1
#define CFG_TUD_AUDIO_FUNC_1_CHANNEL_PER_FIFO_TX 2 // One I2S stream contains two channels, each stream is saved within one support FIFO - this value is currently fixed, the driver does not support a changing value
#define CFG_TUD_AUDIO_FUNC_1_N_TX_SUPP_SW_FIFO (CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX / CFG_TUD_AUDIO_FUNC_1_CHANNEL_PER_FIFO_TX)
#define CFG_TUD_AUDIO_FUNC_1_TX_SUPP_SW_FIFO_SZ (CFG_TUD_AUDIO_EP_SZ_IN / CFG_TUD_AUDIO_FUNC_1_N_TX_SUPP_SW_FIFO)
#define CFG_TUD_AUDIO_FUNC_1_TX_SUPP_SW_FIFO_SZ 4 * (CFG_TUD_AUDIO_EP_SZ_IN / CFG_TUD_AUDIO_FUNC_1_N_TX_SUPP_SW_FIFO) // Minimum 4*EP size is needed for flow control
#else
#define CFG_TUD_AUDIO_FUNC_1_EP_IN_SZ_MAX CFG_TUD_AUDIO_EP_SZ_IN
#define CFG_TUD_AUDIO_FUNC_1_EP_IN_SW_BUF_SZ 4 * CFG_TUD_AUDIO_EP_SZ_IN // Minimum 4*EP size is needed for flow control
#endif
#ifdef __cplusplus
}

View file

@ -23,6 +23,7 @@
*
*/
#include "bsp/board_api.h"
#include "tusb.h"
/* A combination of interfaces must have a unique product id, since PC will save device driver after the first plug.
@ -44,7 +45,7 @@ tusb_desc_device_t const desc_device =
.bDescriptorType = TUSB_DESC_DEVICE,
.bcdUSB = 0x0200,
// Use Interface Association Descriptor (IAD) for CDC
// Use Interface Association Descriptor (IAD) for Audio
// As required by USB Specs IAD's subclass must be common class (2) and protocol must be IAD (1)
.bDeviceClass = TUSB_CLASS_MISC,
.bDeviceSubClass = MISC_SUBCLASS_COMMON,
@ -81,18 +82,23 @@ enum
#define CONFIG_TOTAL_LEN (TUD_CONFIG_DESC_LEN + CFG_TUD_AUDIO * TUD_AUDIO_MIC_FOUR_CH_DESC_LEN)
#if CFG_TUSB_MCU == OPT_MCU_LPC175X_6X || CFG_TUSB_MCU == OPT_MCU_LPC177X_8X || CFG_TUSB_MCU == OPT_MCU_LPC40XX
// LPC 17xx and 40xx endpoint type (bulk/interrupt/iso) are fixed by its number
// 0 control, 1 In, 2 Bulk, 3 Iso, 4 In etc ...
#define EPNUM_AUDIO 0x03
#if TU_CHECK_MCU(OPT_MCU_LPC175X_6X, OPT_MCU_LPC177X_8X, OPT_MCU_LPC40XX)
// LPC 17xx and 40xx endpoint type (bulk/interrupt/iso) are fixed by its number
// 0 control, 1 In, 2 Bulk, 3 Iso, 4 In etc ...
#define EPNUM_AUDIO 0x03
#elif TU_CHECK_MCU(OPT_MCU_NRF5X)
// nRF5x ISO can only be endpoint 8
#define EPNUM_AUDIO 0x08
#else
#define EPNUM_AUDIO 0x01
#define EPNUM_AUDIO 0x01
#endif
uint8_t const desc_configuration[] =
{
// Interface count, string index, total length, attribute, power in mA
TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100),
// Config number, interface count, string index, total length, attribute, power in mA
TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, 0x00, 100),
// Interface number, string index, EP Out & EP In address, EP size
TUD_AUDIO_MIC_FOUR_CH_DESCRIPTOR(/*_itfnum*/ ITF_NUM_AUDIO_CONTROL, /*_stridx*/ 0, /*_nBytesPerSample*/ CFG_TUD_AUDIO_FUNC_1_N_BYTES_PER_SAMPLE_TX, /*_nBitsUsedPerSample*/ CFG_TUD_AUDIO_FUNC_1_N_BYTES_PER_SAMPLE_TX*8, /*_epin*/ 0x80 | EPNUM_AUDIO, /*_epsize*/ CFG_TUD_AUDIO_EP_SZ_IN)
@ -111,50 +117,63 @@ uint8_t const * tud_descriptor_configuration_cb(uint8_t index)
// String Descriptors
//--------------------------------------------------------------------+
// String Descriptor Index
enum {
STRID_LANGID = 0,
STRID_MANUFACTURER,
STRID_PRODUCT,
STRID_SERIAL,
};
// array of pointer to string descriptors
char const* string_desc_arr [] =
{
char const* string_desc_arr [] = {
(const char[]) { 0x09, 0x04 }, // 0: is supported language is English (0x0409)
"PaniRCorp", // 1: Manufacturer
"MicNode_4_Ch", // 2: Product
"123458", // 3: Serials, should use chip ID
NULL, // 3: Serials will use unique ID if possible
"UAC2", // 4: Audio Interface
};
static uint16_t _desc_str[32];
static uint16_t _desc_str[32 + 1];
// Invoked when received GET STRING DESCRIPTOR request
// Application return pointer to descriptor, whose contents must exist long enough for transfer to complete
uint16_t const* tud_descriptor_string_cb(uint8_t index, uint16_t langid)
{
uint16_t const *tud_descriptor_string_cb(uint8_t index, uint16_t langid) {
(void) langid;
size_t chr_count;
uint8_t chr_count;
if ( index == 0)
{
switch ( index ) {
case STRID_LANGID:
memcpy(&_desc_str[1], string_desc_arr[0], 2);
chr_count = 1;
}else
{
// Convert ASCII string into UTF-16
break;
if ( !(index < sizeof(string_desc_arr)/sizeof(string_desc_arr[0])) ) return NULL;
case STRID_SERIAL:
chr_count = board_usb_get_serial(_desc_str + 1, 32);
break;
const char* str = string_desc_arr[index];
default:
// Note: the 0xEE index string is a Microsoft OS 1.0 Descriptors.
// https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/microsoft-defined-usb-descriptors
if ( !(index < sizeof(string_desc_arr) / sizeof(string_desc_arr[0])) ) return NULL;
const char *str = string_desc_arr[index];
// Cap at max char
chr_count = strlen(str);
if ( chr_count > 31 ) chr_count = 31;
size_t const max_count = sizeof(_desc_str) / sizeof(_desc_str[0]) - 1; // -1 for string type
if ( chr_count > max_count ) chr_count = max_count;
for(uint8_t i=0; i<chr_count; i++)
{
_desc_str[1+i] = str[i];
// Convert ASCII string into UTF-16
for ( size_t i = 0; i < chr_count; i++ ) {
_desc_str[1 + i] = str[i];
}
break;
}
// first byte is length (including header), second byte is string type
_desc_str[0] = (TUSB_DESC_STRING << 8 ) | (2*chr_count + 2);
_desc_str[0] = (uint16_t) ((TUSB_DESC_STRING << 8) | (2 * chr_count + 2));
return _desc_str;
}

View file

@ -1,28 +1,33 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.17)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/${FAMILY}/family.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
# gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>)
family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR})
project(${PROJECT})
project(${PROJECT} C CXX ASM)
# Checks this example is valid for the family and initializes the project
family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR})
# Espressif has its own cmake build system
if(FAMILY STREQUAL "espressif")
return()
endif()
add_executable(${PROJECT})
# Example source
target_sources(${PROJECT} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c
${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c
)
)
# Example include
target_include_directories(${PROJECT} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src
)
)
# Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT})
# Configure compilation flags and libraries for the example without RTOS.
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT} noos)

View file

@ -1,4 +1,3 @@
include ../../../tools/top.mk
include ../../make.mk
INC += \

View file

@ -0,0 +1,3 @@
mcu:SAMD11
mcu:SAME5X
mcu:SAMG

View file

@ -35,7 +35,7 @@
#include <stdio.h>
#include <string.h>
#include "bsp/board.h"
#include "bsp/board_api.h"
#include "tusb.h"
//--------------------------------------------------------------------+
@ -71,7 +71,7 @@ audio_control_range_2_n_t(1) volumeRng[CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX+1];
audio_control_range_4_n_t(1) sampleFreqRng; // Sample frequency range state
// Audio test data
uint16_t test_buffer_audio[CFG_TUD_AUDIO_EP_SZ_IN/2];
uint16_t test_buffer_audio[(CFG_TUD_AUDIO_EP_SZ_IN - 2) / 2];
uint16_t startVal = 0;
void led_blinking_task(void);
@ -82,7 +82,12 @@ int main(void)
{
board_init();
tusb_init();
// init device stack on configured roothub port
tud_init(BOARD_TUD_RHPORT);
if (board_init_after_tusb) {
board_init_after_tusb();
}
// Init values
sampFreq = AUDIO_SAMPLE_RATE;
@ -99,9 +104,6 @@ int main(void)
led_blinking_task();
audio_task();
}
return 0;
}
//--------------------------------------------------------------------+
@ -132,7 +134,7 @@ void tud_suspend_cb(bool remote_wakeup_en)
// Invoked when usb bus is resumed
void tud_resume_cb(void)
{
blink_interval_ms = BLINK_MOUNTED;
blink_interval_ms = tud_mounted() ? BLINK_MOUNTED : BLINK_NOT_MOUNTED;
}
//--------------------------------------------------------------------+
@ -142,7 +144,7 @@ void tud_resume_cb(void)
void audio_task(void)
{
// Yet to be filled - e.g. put meas data into TX FIFOs etc.
asm("nop");
// asm("nop");
}
//--------------------------------------------------------------------+
@ -221,7 +223,7 @@ bool tud_audio_set_req_entity_cb(uint8_t rhport, tusb_control_request_t const *
// Request uses format layout 2
TU_VERIFY(p_request->wLength == sizeof(audio_control_cur_2_t));
volume[channelNum] = ((audio_control_cur_2_t*) pBuff)->bCur;
volume[channelNum] = (uint16_t) ((audio_control_cur_2_t*) pBuff)->bCur;
TU_LOG2(" Set Volume: %d dB of channel: %u\r\n", volume[channelNum], channelNum);
return true;
@ -290,7 +292,7 @@ bool tud_audio_get_req_entity_cb(uint8_t rhport, tusb_control_request_t const *
// Those are dummy values for now
ret.bNrChannels = 1;
ret.bmChannelConfig = 0;
ret.bmChannelConfig = (audio_channel_config_t) 0;
ret.iChannelNames = 0;
TU_LOG2(" Get terminal connector\r\n");
@ -399,7 +401,7 @@ bool tud_audio_tx_done_pre_load_cb(uint8_t rhport, uint8_t itf, uint8_t ep_in, u
(void) ep_in;
(void) cur_alt_setting;
tud_audio_write ((uint8_t *)test_buffer_audio, CFG_TUD_AUDIO_EP_SZ_IN);
tud_audio_write ((uint8_t *)test_buffer_audio, CFG_TUD_AUDIO_EP_SZ_IN - 2);
return true;
}
@ -412,7 +414,7 @@ bool tud_audio_tx_done_post_load_cb(uint8_t rhport, uint16_t n_bytes_copied, uin
(void) ep_in;
(void) cur_alt_setting;
for (size_t cnt = 0; cnt < CFG_TUD_AUDIO_EP_SZ_IN/2; cnt++)
for (size_t cnt = 0; cnt < (CFG_TUD_AUDIO_EP_SZ_IN - 2) / 2; cnt++)
{
test_buffer_audio[cnt] = startVal++;
}

View file

@ -2,6 +2,7 @@ import sounddevice as sd
import matplotlib.pyplot as plt
import numpy as np
import platform
import csv
if __name__ == '__main__':
@ -32,3 +33,5 @@ if __name__ == '__main__':
plt.title('MicNode')
plt.show()
samples = np.array(myrecording)
np.savetxt('Output.csv', samples, delimiter=",", fmt='%s')

View file

@ -30,6 +30,20 @@
extern "C" {
#endif
//--------------------------------------------------------------------+
// Board Specific Configuration
//--------------------------------------------------------------------+
// RHPort number used for device can be defined by board.mk, default to port 0
#ifndef BOARD_TUD_RHPORT
#define BOARD_TUD_RHPORT 0
#endif
// RHPort max operational speed can defined by board.mk
#ifndef BOARD_TUD_MAX_SPEED
#define BOARD_TUD_MAX_SPEED OPT_MODE_DEFAULT_SPEED
#endif
//--------------------------------------------------------------------
// COMMON CONFIGURATION
//--------------------------------------------------------------------
@ -39,12 +53,6 @@ extern "C" {
#error CFG_TUSB_MCU must be defined
#endif
#if CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE | OPT_MODE_HIGH_SPEED)
#else
#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE
#endif
#ifndef CFG_TUSB_OS
#define CFG_TUSB_OS OPT_OS_NONE
#endif
@ -53,6 +61,12 @@ extern "C" {
#define CFG_TUSB_DEBUG 0
#endif
// Enable Device stack
#define CFG_TUD_ENABLED 1
// Default is max speed that hardware controller could support with on-chip PHY
#define CFG_TUD_MAX_SPEED BOARD_TUD_MAX_SPEED
// CFG_TUSB_DEBUG is defined by compiler in DEBUG build
// #define CFG_TUSB_DEBUG 0
@ -80,11 +94,11 @@ extern "C" {
#endif
//------------- CLASS -------------//
#define CFG_TUD_AUDIO 1
#define CFG_TUD_CDC 0
#define CFG_TUD_MSC 0
#define CFG_TUD_HID 0
#define CFG_TUD_MIDI 0
#define CFG_TUD_AUDIO 1
#define CFG_TUD_VENDOR 0
//--------------------------------------------------------------------
@ -100,7 +114,7 @@ extern "C" {
#define CFG_TUD_AUDIO_ENABLE_EP_IN 1
#define CFG_TUD_AUDIO_FUNC_1_N_BYTES_PER_SAMPLE_TX 2 // Driver gets this info from the descriptors - we define it here to use it to setup the descriptors and to do calculations with it below
#define CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX 1 // Driver gets this info from the descriptors - we define it here to use it to setup the descriptors and to do calculations with it below - be aware: for different number of channels you need another descriptor!
#define CFG_TUD_AUDIO_EP_SZ_IN 48 * CFG_TUD_AUDIO_FUNC_1_N_BYTES_PER_SAMPLE_TX * CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX // 48 Samples (48 kHz) x 2 Bytes/Sample x 1 Channel
#define CFG_TUD_AUDIO_EP_SZ_IN (48 + 1) * CFG_TUD_AUDIO_FUNC_1_N_BYTES_PER_SAMPLE_TX * CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX // 48 Samples (48 kHz) x 2 Bytes/Sample x CFG_TUD_AUDIO_N_CHANNELS_TX Channels - One extra sample is needed for asynchronous transfer adjustment, see feedback EP
#define CFG_TUD_AUDIO_FUNC_1_EP_IN_SZ_MAX CFG_TUD_AUDIO_EP_SZ_IN // Maximum EP IN size for all AS alternate settings used
#define CFG_TUD_AUDIO_FUNC_1_EP_IN_SW_BUF_SZ CFG_TUD_AUDIO_EP_SZ_IN + 1

View file

@ -23,6 +23,7 @@
*
*/
#include "bsp/board_api.h"
#include "tusb.h"
/* A combination of interfaces must have a unique product id, since PC will save device driver after the first plug.
@ -44,7 +45,7 @@ tusb_desc_device_t const desc_device =
.bDescriptorType = TUSB_DESC_DEVICE,
.bcdUSB = 0x0200,
// Use Interface Association Descriptor (IAD) for CDC
// Use Interface Association Descriptor (IAD) for Audio
// As required by USB Specs IAD's subclass must be common class (2) and protocol must be IAD (1)
.bDeviceClass = TUSB_CLASS_MISC,
.bDeviceSubClass = MISC_SUBCLASS_COMMON,
@ -82,17 +83,22 @@ enum
#define CONFIG_TOTAL_LEN (TUD_CONFIG_DESC_LEN + CFG_TUD_AUDIO * TUD_AUDIO_MIC_ONE_CH_DESC_LEN)
#if CFG_TUSB_MCU == OPT_MCU_LPC175X_6X || CFG_TUSB_MCU == OPT_MCU_LPC177X_8X || CFG_TUSB_MCU == OPT_MCU_LPC40XX
// LPC 17xx and 40xx endpoint type (bulk/interrupt/iso) are fixed by its number
// 0 control, 1 In, 2 Bulk, 3 Iso, 4 In etc ...
#define EPNUM_AUDIO 0x03
// LPC 17xx and 40xx endpoint type (bulk/interrupt/iso) are fixed by its number
// 0 control, 1 In, 2 Bulk, 3 Iso, 4 In etc ...
#define EPNUM_AUDIO 0x03
#elif TU_CHECK_MCU(OPT_MCU_NRF5X)
// nRF5x ISO can only be endpoint 8
#define EPNUM_AUDIO 0x08
#else
#define EPNUM_AUDIO 0x01
#define EPNUM_AUDIO 0x01
#endif
uint8_t const desc_configuration[] =
{
// Interface count, string index, total length, attribute, power in mA
TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100),
// Config number, interface count, string index, total length, attribute, power in mA
TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, 0x00, 100),
// Interface number, string index, EP Out & EP In address, EP size
TUD_AUDIO_MIC_ONE_CH_DESCRIPTOR(/*_itfnum*/ ITF_NUM_AUDIO_CONTROL, /*_stridx*/ 0, /*_nBytesPerSample*/ CFG_TUD_AUDIO_FUNC_1_N_BYTES_PER_SAMPLE_TX, /*_nBitsUsedPerSample*/ CFG_TUD_AUDIO_FUNC_1_N_BYTES_PER_SAMPLE_TX*8, /*_epin*/ 0x80 | EPNUM_AUDIO, /*_epsize*/ CFG_TUD_AUDIO_EP_SZ_IN)
@ -111,50 +117,65 @@ uint8_t const * tud_descriptor_configuration_cb(uint8_t index)
// String Descriptors
//--------------------------------------------------------------------+
// String Descriptor Index
enum {
STRID_LANGID = 0,
STRID_MANUFACTURER,
STRID_PRODUCT,
STRID_SERIAL,
};
// array of pointer to string descriptors
char const* string_desc_arr [] =
{
(const char[]) { 0x09, 0x04 }, // 0: is supported language is English (0x0409)
"PaniRCorp", // 1: Manufacturer
"MicNode", // 2: Product
"123456", // 3: Serials, should use chip ID
NULL, // 3: Serials will use unique ID if possible
"UAC2", // 4: Audio Interface
};
static uint16_t _desc_str[32];
static uint16_t _desc_str[32 + 1];
// Invoked when received GET STRING DESCRIPTOR request
// Application return pointer to descriptor, whose contents must exist long enough for transfer to complete
uint16_t const* tud_descriptor_string_cb(uint8_t index, uint16_t langid)
{
uint16_t const *tud_descriptor_string_cb(uint8_t index, uint16_t langid) {
(void) langid;
size_t chr_count;
uint8_t chr_count;
if ( index == 0)
{
switch ( index ) {
case STRID_LANGID:
memcpy(&_desc_str[1], string_desc_arr[0], 2);
chr_count = 1;
}else
{
// Convert ASCII string into UTF-16
break;
if ( !(index < sizeof(string_desc_arr)/sizeof(string_desc_arr[0])) ) return NULL;
case STRID_SERIAL:
chr_count = board_usb_get_serial(_desc_str + 1, 32);
break;
const char* str = string_desc_arr[index];
default:
// Note: the 0xEE index string is a Microsoft OS 1.0 Descriptors.
// https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/microsoft-defined-usb-descriptors
if ( !(index < sizeof(string_desc_arr) / sizeof(string_desc_arr[0])) ) return NULL;
const char *str = string_desc_arr[index];
// Cap at max char
chr_count = strlen(str);
if ( chr_count > 31 ) chr_count = 31;
size_t const max_count = sizeof(_desc_str) / sizeof(_desc_str[0]) - 1; // -1 for string type
if ( chr_count > max_count ) chr_count = max_count;
for(uint8_t i=0; i<chr_count; i++)
{
_desc_str[1+i] = str[i];
// Convert ASCII string into UTF-16
for ( size_t i = 0; i < chr_count; i++ ) {
_desc_str[1 + i] = str[i];
}
break;
}
// first byte is length (including header), second byte is string type
_desc_str[0] = (TUSB_DESC_STRING << 8 ) | (2*chr_count + 2);
_desc_str[0] = (uint16_t) ((TUSB_DESC_STRING << 8) | (2 * chr_count + 2));
return _desc_str;
}

View file

@ -0,0 +1,33 @@
cmake_minimum_required(VERSION 3.17)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
# gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>)
family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR})
project(${PROJECT} C CXX ASM)
# Checks this example is valid for the family and initializes the project
family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR})
# Espressif has its own cmake build system
if(FAMILY STREQUAL "espressif")
return()
endif()
add_executable(${PROJECT})
# Example source
target_sources(${PROJECT} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c
${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c
)
# Example include
target_include_directories(${PROJECT} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src
)
# Configure compilation flags and libraries for the example without RTOS.
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT} noos)

View file

@ -0,0 +1,11 @@
include ../../make.mk
INC += \
src \
$(TOP)/hw \
# Example source
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk

View file

@ -0,0 +1,3 @@
mcu:SAMD11
mcu:SAME5X
mcu:SAMG

View file

@ -0,0 +1,525 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2020 Reinhard Panhuber
* Copyright (c) 2022 HiFiPhile
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
/* plot_audio_samples.py requires following modules:
* $ sudo apt install libportaudio
* $ pip3 install sounddevice matplotlib
*
* Then run
* $ python3 plot_audio_samples.py
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "bsp/board_api.h"
#include "tusb.h"
#include "usb_descriptors.h"
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF PROTYPES
//--------------------------------------------------------------------+
/* Blink pattern
* - 250 ms : device not mounted
* - 1000 ms : device mounted
* - 2500 ms : device is suspended
*/
enum {
BLINK_NOT_MOUNTED = 250,
BLINK_MOUNTED = 1000,
BLINK_SUSPENDED = 2500,
};
static uint32_t blink_interval_ms = BLINK_NOT_MOUNTED;
// Audio controls
// Current states
bool mute[CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX + 1]; // +1 for master channel 0
uint16_t volume[CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX + 1]; // +1 for master channel 0
uint32_t sampFreq;
uint8_t bytesPerSample;
uint8_t clkValid;
// Range states
// List of supported sample rates
static const uint32_t sampleRatesList[] =
{
32000, 48000, 96000
};
#define N_sampleRates TU_ARRAY_SIZE(sampleRatesList)
// Bytes per format of every Alt settings
static const uint8_t bytesPerSampleAltList[CFG_TUD_AUDIO_FUNC_1_N_FORMATS] =
{
CFG_TUD_AUDIO_FUNC_1_FORMAT_1_N_BYTES_PER_SAMPLE_TX,
CFG_TUD_AUDIO_FUNC_1_FORMAT_2_N_BYTES_PER_SAMPLE_TX,
};
audio_control_range_2_n_t(1) volumeRng[CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX+1]; // Volume range state
// Audio test data
CFG_TUSB_MEM_ALIGN uint8_t test_buffer_audio[CFG_TUD_AUDIO_FUNC_1_EP_IN_SZ_MAX];
uint16_t startVal = 0;
void led_blinking_task(void);
void audio_task(void);
/*------------- MAIN -------------*/
int main(void)
{
board_init();
// init device stack on configured roothub port
tud_init(BOARD_TUD_RHPORT);
if (board_init_after_tusb) {
board_init_after_tusb();
}
// Init values
sampFreq = sampleRatesList[0];
clkValid = 1;
while (1)
{
tud_task(); // tinyusb device task
led_blinking_task();
audio_task();
}
return 0;
}
//--------------------------------------------------------------------+
// Device callbacks
//--------------------------------------------------------------------+
// Invoked when device is mounted
void tud_mount_cb(void)
{
blink_interval_ms = BLINK_MOUNTED;
}
// Invoked when device is unmounted
void tud_umount_cb(void)
{
blink_interval_ms = BLINK_NOT_MOUNTED;
}
// Invoked when usb bus is suspended
// remote_wakeup_en : if host allow us to perform remote wakeup
// Within 7ms, device must draw an average of current less than 2.5 mA from bus
void tud_suspend_cb(bool remote_wakeup_en)
{
(void) remote_wakeup_en;
blink_interval_ms = BLINK_SUSPENDED;
}
// Invoked when usb bus is resumed
void tud_resume_cb(void)
{
blink_interval_ms = tud_mounted() ? BLINK_MOUNTED : BLINK_NOT_MOUNTED;
}
//--------------------------------------------------------------------+
// AUDIO Task
//--------------------------------------------------------------------+
void audio_task(void)
{
// Yet to be filled - e.g. put meas data into TX FIFOs etc.
// asm("nop");
}
//--------------------------------------------------------------------+
// Application Callback API Implementations
//--------------------------------------------------------------------+
// Invoked when set interface is called, typically on start/stop streaming or format change
bool tud_audio_set_itf_cb(uint8_t rhport, tusb_control_request_t const * p_request)
{
(void)rhport;
//uint8_t const itf = tu_u16_low(tu_le16toh(p_request->wIndex));
uint8_t const alt = tu_u16_low(tu_le16toh(p_request->wValue));
// Clear buffer when streaming format is changed
if(alt != 0)
{
bytesPerSample = bytesPerSampleAltList[alt-1];
}
return true;
}
// Invoked when audio class specific set request received for an EP
bool tud_audio_set_req_ep_cb(uint8_t rhport, tusb_control_request_t const * p_request, uint8_t *pBuff)
{
(void) rhport;
(void) pBuff;
// We do not support any set range requests here, only current value requests
TU_VERIFY(p_request->bRequest == AUDIO_CS_REQ_CUR);
// Page 91 in UAC2 specification
uint8_t channelNum = TU_U16_LOW(p_request->wValue);
uint8_t ctrlSel = TU_U16_HIGH(p_request->wValue);
uint8_t ep = TU_U16_LOW(p_request->wIndex);
(void) channelNum; (void) ctrlSel; (void) ep;
return false; // Yet not implemented
}
// Invoked when audio class specific set request received for an interface
bool tud_audio_set_req_itf_cb(uint8_t rhport, tusb_control_request_t const * p_request, uint8_t *pBuff)
{
(void) rhport;
(void) pBuff;
// We do not support any set range requests here, only current value requests
TU_VERIFY(p_request->bRequest == AUDIO_CS_REQ_CUR);
// Page 91 in UAC2 specification
uint8_t channelNum = TU_U16_LOW(p_request->wValue);
uint8_t ctrlSel = TU_U16_HIGH(p_request->wValue);
uint8_t itf = TU_U16_LOW(p_request->wIndex);
(void) channelNum; (void) ctrlSel; (void) itf;
return false; // Yet not implemented
}
// Invoked when audio class specific set request received for an entity
bool tud_audio_set_req_entity_cb(uint8_t rhport, tusb_control_request_t const * p_request, uint8_t *pBuff)
{
(void) rhport;
// Page 91 in UAC2 specification
uint8_t channelNum = TU_U16_LOW(p_request->wValue);
uint8_t ctrlSel = TU_U16_HIGH(p_request->wValue);
uint8_t itf = TU_U16_LOW(p_request->wIndex);
uint8_t entityID = TU_U16_HIGH(p_request->wIndex);
(void) itf;
// We do not support any set range requests here, only current value requests
TU_VERIFY(p_request->bRequest == AUDIO_CS_REQ_CUR);
// If request is for our feature unit
if ( entityID == UAC2_ENTITY_FEATURE_UNIT )
{
switch ( ctrlSel )
{
case AUDIO_FU_CTRL_MUTE:
// Request uses format layout 1
TU_VERIFY(p_request->wLength == sizeof(audio_control_cur_1_t));
mute[channelNum] = ((audio_control_cur_1_t*) pBuff)->bCur;
TU_LOG2(" Set Mute: %d of channel: %u\r\n", mute[channelNum], channelNum);
return true;
case AUDIO_FU_CTRL_VOLUME:
// Request uses format layout 2
TU_VERIFY(p_request->wLength == sizeof(audio_control_cur_2_t));
volume[channelNum] = (uint16_t) ((audio_control_cur_2_t*) pBuff)->bCur;
TU_LOG2(" Set Volume: %d dB of channel: %u\r\n", volume[channelNum], channelNum);
return true;
// Unknown/Unsupported control
default:
TU_BREAKPOINT();
return false;
}
}
// Clock Source unit
if ( entityID == UAC2_ENTITY_CLOCK )
{
switch ( ctrlSel )
{
case AUDIO_CS_CTRL_SAM_FREQ:
TU_VERIFY(p_request->wLength == sizeof(audio_control_cur_4_t));
sampFreq = (uint32_t)((audio_control_cur_4_t *)pBuff)->bCur;
TU_LOG2("Clock set current freq: %lu\r\n", sampFreq);
return true;
break;
// Unknown/Unsupported control
default:
TU_BREAKPOINT();
return false;
}
}
return false; // Yet not implemented
}
// Invoked when audio class specific get request received for an EP
bool tud_audio_get_req_ep_cb(uint8_t rhport, tusb_control_request_t const * p_request)
{
(void) rhport;
// Page 91 in UAC2 specification
uint8_t channelNum = TU_U16_LOW(p_request->wValue);
uint8_t ctrlSel = TU_U16_HIGH(p_request->wValue);
uint8_t ep = TU_U16_LOW(p_request->wIndex);
(void) channelNum; (void) ctrlSel; (void) ep;
// return tud_control_xfer(rhport, p_request, &tmp, 1);
return false; // Yet not implemented
}
// Invoked when audio class specific get request received for an interface
bool tud_audio_get_req_itf_cb(uint8_t rhport, tusb_control_request_t const * p_request)
{
(void) rhport;
// Page 91 in UAC2 specification
uint8_t channelNum = TU_U16_LOW(p_request->wValue);
uint8_t ctrlSel = TU_U16_HIGH(p_request->wValue);
uint8_t itf = TU_U16_LOW(p_request->wIndex);
(void) channelNum; (void) ctrlSel; (void) itf;
return false; // Yet not implemented
}
// Invoked when audio class specific get request received for an entity
bool tud_audio_get_req_entity_cb(uint8_t rhport, tusb_control_request_t const * p_request)
{
(void) rhport;
// Page 91 in UAC2 specification
uint8_t channelNum = TU_U16_LOW(p_request->wValue);
uint8_t ctrlSel = TU_U16_HIGH(p_request->wValue);
// uint8_t itf = TU_U16_LOW(p_request->wIndex); // Since we have only one audio function implemented, we do not need the itf value
uint8_t entityID = TU_U16_HIGH(p_request->wIndex);
// Input terminal (Microphone input)
if (entityID == UAC2_ENTITY_INPUT_TERMINAL)
{
switch ( ctrlSel )
{
case AUDIO_TE_CTRL_CONNECTOR:
{
// The terminal connector control only has a get request with only the CUR attribute.
audio_desc_channel_cluster_t ret;
// Those are dummy values for now
ret.bNrChannels = 1;
ret.bmChannelConfig = 0;
ret.iChannelNames = 0;
TU_LOG2(" Get terminal connector\r\n");
return tud_audio_buffer_and_schedule_control_xfer(rhport, p_request, (void*) &ret, sizeof(ret));
}
break;
// Unknown/Unsupported control selector
default:
TU_BREAKPOINT();
return false;
}
}
// Feature unit
if (entityID == UAC2_ENTITY_FEATURE_UNIT)
{
switch ( ctrlSel )
{
case AUDIO_FU_CTRL_MUTE:
// Audio control mute cur parameter block consists of only one byte - we thus can send it right away
// There does not exist a range parameter block for mute
TU_LOG2(" Get Mute of channel: %u\r\n", channelNum);
return tud_control_xfer(rhport, p_request, &mute[channelNum], 1);
case AUDIO_FU_CTRL_VOLUME:
switch ( p_request->bRequest )
{
case AUDIO_CS_REQ_CUR:
TU_LOG2(" Get Volume of channel: %u\r\n", channelNum);
return tud_control_xfer(rhport, p_request, &volume[channelNum], sizeof(volume[channelNum]));
case AUDIO_CS_REQ_RANGE:
TU_LOG2(" Get Volume range of channel: %u\r\n", channelNum);
// Copy values - only for testing - better is version below
audio_control_range_2_n_t(1)
ret;
ret.wNumSubRanges = 1;
ret.subrange[0].bMin = -90; // -90 dB
ret.subrange[0].bMax = 30; // +30 dB
ret.subrange[0].bRes = 1; // 1 dB steps
return tud_audio_buffer_and_schedule_control_xfer(rhport, p_request, (void*) &ret, sizeof(ret));
// Unknown/Unsupported control
default:
TU_BREAKPOINT();
return false;
}
break;
// Unknown/Unsupported control
default:
TU_BREAKPOINT();
return false;
}
}
// Clock Source unit
if ( entityID == UAC2_ENTITY_CLOCK )
{
switch ( ctrlSel )
{
case AUDIO_CS_CTRL_SAM_FREQ:
// channelNum is always zero in this case
switch ( p_request->bRequest )
{
case AUDIO_CS_REQ_CUR:
TU_LOG2(" Get Sample Freq.\r\n");
return tud_control_xfer(rhport, p_request, &sampFreq, sizeof(sampFreq));
case AUDIO_CS_REQ_RANGE:
{
TU_LOG2(" Get Sample Freq. range\r\n");
audio_control_range_4_n_t(N_sampleRates) rangef =
{
.wNumSubRanges = tu_htole16(N_sampleRates)
};
TU_LOG1("Clock get %d freq ranges\r\n", N_sampleRates);
for(uint8_t i = 0; i < N_sampleRates; i++)
{
rangef.subrange[i].bMin = (int32_t)sampleRatesList[i];
rangef.subrange[i].bMax = (int32_t)sampleRatesList[i];
rangef.subrange[i].bRes = 0;
TU_LOG1("Range %d (%d, %d, %d)\r\n", i, (int)rangef.subrange[i].bMin, (int)rangef.subrange[i].bMax, (int)rangef.subrange[i].bRes);
}
return tud_audio_buffer_and_schedule_control_xfer(rhport, p_request, &rangef, sizeof(rangef));
}
// Unknown/Unsupported control
default:
TU_BREAKPOINT();
return false;
}
break;
case AUDIO_CS_CTRL_CLK_VALID:
// Only cur attribute exists for this request
TU_LOG2(" Get Sample Freq. valid\r\n");
return tud_control_xfer(rhport, p_request, &clkValid, sizeof(clkValid));
// Unknown/Unsupported control
default:
TU_BREAKPOINT();
return false;
}
}
TU_LOG2(" Unsupported entity: %d\r\n", entityID);
return false; // Yet not implemented
}
bool tud_audio_tx_done_pre_load_cb(uint8_t rhport, uint8_t itf, uint8_t ep_in, uint8_t cur_alt_setting)
{
(void) rhport;
(void) itf;
(void) ep_in;
(void) cur_alt_setting;
tud_audio_write((uint8_t *)test_buffer_audio, (uint16_t)(sampFreq / (TUD_OPT_HIGH_SPEED ? 8000 : 1000) * bytesPerSample));
return true;
}
bool tud_audio_tx_done_post_load_cb(uint8_t rhport, uint16_t n_bytes_copied, uint8_t itf, uint8_t ep_in, uint8_t cur_alt_setting)
{
(void) rhport;
(void) n_bytes_copied;
(void) itf;
(void) ep_in;
(void) cur_alt_setting;
// 16bit
if(bytesPerSample == 2)
{
uint16_t* pData_16 = (uint16_t*)((void*)test_buffer_audio);
for (size_t cnt = 0; cnt < sampFreq / (TUD_OPT_HIGH_SPEED ? 8000 : 1000); cnt++)
{
pData_16[cnt] = startVal++;
}
}
// 24bit in 32bit slot
else if(bytesPerSample == 4)
{
uint32_t* pData_32 = (uint32_t*)((void*)test_buffer_audio);
for (size_t cnt = 0; cnt < sampFreq / (TUD_OPT_HIGH_SPEED ? 8000 : 1000); cnt++)
{
pData_32[cnt] = (uint32_t)startVal++ << 16U;
}
}
return true;
}
bool tud_audio_set_itf_close_EP_cb(uint8_t rhport, tusb_control_request_t const * p_request)
{
(void) rhport;
(void) p_request;
startVal = 0;
return true;
}
//--------------------------------------------------------------------+
// BLINKING TASK
//--------------------------------------------------------------------+
void led_blinking_task(void)
{
static uint32_t start_ms = 0;
static bool led_state = false;
// Blink every interval ms
if ( board_millis() - start_ms < blink_interval_ms) return; // not enough time
start_ms += blink_interval_ms;
board_led_write(led_state);
led_state = 1 - led_state; // toggle
}

View file

@ -0,0 +1,37 @@
import sounddevice as sd
import matplotlib.pyplot as plt
import numpy as np
import platform
import csv
if __name__ == '__main__':
# If you got "ValueError: No input device matching", that is because your PC name example device
# differently from tested list below. Uncomment the next line to see full list and try to pick correct one
# print(sd.query_devices())
fs = 96000 # Sample rate
duration = 100e-3 # Duration of recording
if platform.system() == 'Windows':
# MME is needed since there are more than one MicNode device APIs (at least in Windows)
device = 'Microphone (MicNode) MME'
elif platform.system() == 'Darwin':
device = 'MicNode'
else:
device ='default'
myrecording = sd.rec(int(duration * fs), samplerate=fs, channels=1, dtype='int16', device=device)
print('Waiting...')
sd.wait() # Wait until recording is finished
print('Done!')
time = np.arange(0, duration, 1 / fs) # time vector
plt.plot(time, myrecording)
plt.xlabel('Time [s]')
plt.ylabel('Amplitude')
plt.title('MicNode')
plt.show()
samples = np.array(myrecording)
np.savetxt('Output.csv', samples, delimiter=",", fmt='%s')

View file

@ -0,0 +1,141 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 Ha Thach (tinyusb.org)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
#ifndef _TUSB_CONFIG_H_
#define _TUSB_CONFIG_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "usb_descriptors.h"
//--------------------------------------------------------------------+
// Board Specific Configuration
//--------------------------------------------------------------------+
// RHPort number used for device can be defined by board.mk, default to port 0
#ifndef BOARD_TUD_RHPORT
#define BOARD_TUD_RHPORT 0
#endif
// RHPort max operational speed can defined by board.mk
#ifndef BOARD_TUD_MAX_SPEED
#define BOARD_TUD_MAX_SPEED OPT_MODE_DEFAULT_SPEED
#endif
//--------------------------------------------------------------------
// COMMON CONFIGURATION
//--------------------------------------------------------------------
// defined by compiler flags for flexibility
#ifndef CFG_TUSB_MCU
#error CFG_TUSB_MCU must be defined
#endif
#ifndef CFG_TUSB_OS
#define CFG_TUSB_OS OPT_OS_NONE
#endif
#ifndef CFG_TUSB_DEBUG
#define CFG_TUSB_DEBUG 0
#endif
// Enable Device stack
#define CFG_TUD_ENABLED 1
// Default is max speed that hardware controller could support with on-chip PHY
#define CFG_TUD_MAX_SPEED BOARD_TUD_MAX_SPEED
// CFG_TUSB_DEBUG is defined by compiler in DEBUG build
// #define CFG_TUSB_DEBUG 0
/* USB DMA on some MCUs can only access a specific SRAM region with restriction on alignment.
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif
#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#endif
//--------------------------------------------------------------------
// DEVICE CONFIGURATION
//--------------------------------------------------------------------
#ifndef CFG_TUD_ENDPOINT0_SIZE
#define CFG_TUD_ENDPOINT0_SIZE 64
#endif
//------------- CLASS -------------//
#define CFG_TUD_AUDIO 1
#define CFG_TUD_CDC 0
#define CFG_TUD_MSC 0
#define CFG_TUD_HID 0
#define CFG_TUD_MIDI 0
#define CFG_TUD_VENDOR 0
//--------------------------------------------------------------------
// AUDIO CLASS DRIVER CONFIGURATION
//--------------------------------------------------------------------
#define CFG_TUD_AUDIO_FUNC_1_MAX_SAMPLE_RATE 96000
// How many formats are used, need to adjust USB descriptor if changed
#define CFG_TUD_AUDIO_FUNC_1_N_FORMATS 2
// 16bit in 16bit slots
#define CFG_TUD_AUDIO_FUNC_1_FORMAT_1_N_BYTES_PER_SAMPLE_TX 2
#define CFG_TUD_AUDIO_FUNC_1_FORMAT_1_RESOLUTION_RX 16
// 24bit in 32bit slots
#define CFG_TUD_AUDIO_FUNC_1_FORMAT_2_N_BYTES_PER_SAMPLE_TX 4
#define CFG_TUD_AUDIO_FUNC_1_FORMAT_2_RESOLUTION_RX 24
// Have a look into audio_device.h for all configurations
#define CFG_TUD_AUDIO_FUNC_1_DESC_LEN TUD_AUDIO_MIC_ONE_CH_2_FORMAT_DESC_LEN
#define CFG_TUD_AUDIO_FUNC_1_N_AS_INT 1 // Number of Standard AS Interface Descriptors (4.9.1) defined per audio function - this is required to be able to remember the current alternate settings of these interfaces - We restrict us here to have a constant number for all audio functions (which means this has to be the maximum number of AS interfaces an audio function has and a second audio function with less AS interfaces just wastes a few bytes)
#define CFG_TUD_AUDIO_FUNC_1_CTRL_BUF_SZ 64 // Size of control request buffer
#define CFG_TUD_AUDIO_ENABLE_EP_IN 1
#define CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX 1 // Driver gets this info from the descriptors - we define it here to use it to setup the descriptors and to do calculations with it below - be aware: for different number of channels you need another descriptor!
#define CFG_TUD_AUDIO_FUNC_1_FORMAT_1_EP_SZ_IN TUD_AUDIO_EP_SIZE(CFG_TUD_AUDIO_FUNC_1_MAX_SAMPLE_RATE, CFG_TUD_AUDIO_FUNC_1_FORMAT_1_N_BYTES_PER_SAMPLE_TX, CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX)
#define CFG_TUD_AUDIO_FUNC_1_FORMAT_2_EP_SZ_IN TUD_AUDIO_EP_SIZE(CFG_TUD_AUDIO_FUNC_1_MAX_SAMPLE_RATE, CFG_TUD_AUDIO_FUNC_1_FORMAT_2_N_BYTES_PER_SAMPLE_TX, CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX)
#define CFG_TUD_AUDIO_FUNC_1_EP_IN_SZ_MAX TU_MAX(CFG_TUD_AUDIO_FUNC_1_FORMAT_1_EP_SZ_IN, CFG_TUD_AUDIO_FUNC_1_FORMAT_2_EP_SZ_IN) // Maximum EP IN size for all AS alternate settings used
#define CFG_TUD_AUDIO_FUNC_1_EP_IN_SW_BUF_SZ CFG_TUD_AUDIO_FUNC_1_EP_IN_SZ_MAX
#ifdef __cplusplus
}
#endif
#endif /* _TUSB_CONFIG_H_ */

Some files were not shown because too many files have changed in this diff Show more