Commit Graph

5991 Commits

Author SHA1 Message Date
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
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
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