summaryrefslogtreecommitdiff
path: root/src/portable
AgeCommit message (Collapse)Author
2020-10-24Move into if statementJacob Potter
2020-10-24CR feedback: compare CFG_TUSB_RHPORT1_MODE instead of using new macroJacob Potter
2020-10-18Allow use of internal FS PHY on OTG_HS interfaceJacob Potter
Some ST parts (like STM32F74xxx / STM32F75xxx) allow the USB_OTG_HS core to be used with either an external high-speed ULPI PHY or an internal full-speed-only (12mbps) PHY. Currently the code assumes than an ULPI PHY is used unless the chip has an internal high-speed PHY (`#if defined(USB_HS_PHYC)`), with no provision to use the internal FS PHY.
2020-10-11Merge pull request #525 from kasjer/kasjer/da1469x-isoHa Thach
da1469x iso support
2020-10-11Merge pull request #520 from salkinium/feature/misc_enhancementsHa Thach
STM32F3 IRQ remap option and some minor improvements
2020-10-10Merge pull request #521 from PanRe/uac2Ha Thach
Uac2
2020-10-10Dynamically check STM32F3 IRQ remap optionNiklas Hauser
2020-10-09Revert dcd_alloc_mem_for_conf() but keep changes from @kasjer for ISO EPReinhard Panhuber
Add tud_audio_set_itf_close_EP_cb()
2020-10-08DA146xx: Allow transmitting of packets larger then 64 bytesJerzy Kasenberg
FIFO is limited to 64 bytes yet MCU is capable of transmitting larger packets provided that FIFO will be filled on the fly and USB_USB_TXCx_REG_USB_LAST_Msk bit is set after FIFO is filled with all the data that should be transmitted. This change allows to use FIFO level warning interrupt to fill FIFO. When DMA is available it will be used instead of interrupts. Some function names were changed to better reflect what each function does.
2020-10-08DA146xx: Add support for ISO endpointsJerzy Kasenberg
Few changes were needed to have working ISO endpoints.
2020-10-08DA146xx: Add dcd_edpt_closeJerzy Kasenberg
Closing endpoints can be important when there are alternate instances. This adds functionality of closing endpoints similar to what exists in other drivers.
2020-10-08DA146xx: Allow receiving of packets larger then 64 bytesJerzy Kasenberg
Internal FIFO for each endpoint is limited to 64 bytes. It is possible to have longer packets if respective FIFO is read during actual packet transmission. This change updates receive data path to allow packets (and endpoint size) larger then 64 bytes. If DMA is not used yet DMA is setup for reception of big packets. If DMA is already assigned to some transfer, code enables FIFO level warning interrupts and tries to read data before FIFO is filled up.
2020-10-07Merge pull request #529 from gh2o/stm32-raceHa Thach
stm32 fsdev: fix ISTR and CTR_RX/TX race conditions
2020-10-06stm32: fix ISTR and CTR_RX/TX race conditionsGavin Li
2020-10-06Merge branch 'uac2' of https://github.com/PanRe/tinyusb into PanRe-uac2hathach
2020-10-01nrf5x: Add support for ISO endpointsJerzy Kasenberg
ISO endpoints were not covered so far by the driver code. This adds support for ISO IN and OUT endpoint handling. Registers for ISO IN(OUT) endpoints are placed just after normal IN(OUT) so in some cases common code could be used for handling all type of transfers. Generally code synchronizes ISO endpoint handling to SOF interrupt. This code does not change the way of how non-ISO endpoints are treated. Code uses strategy outlined in nRF52840 Produce Specification v1.0 sections 6.35.11.1 and 6.35.11.2.
2020-10-01nrf5x: Increase size of mps to 16 bitsJerzy Kasenberg
msp stores max packet size. For ISO endpoints 8 bits is not enough so it's changed to 16 bits.
2020-10-01nrf5x: Add dcd_edpt_closeJerzy Kasenberg
Closing endpoints can be important when there are alternate instances. This adds functionality of closing endpoints similar to what exists in other drivers.
2020-09-28Fix minor issue.Reinhard Panhuber
- Change set_EP0_max_pkt_size() to set_EP0_max_pkt_size(void).
2020-09-28Cleanup for PR.Reinhard Panhuber
2020-09-28Merge remote-tracking branch 'upstream/master' into uac2Reinhard Panhuber
2020-09-28synopsys: Fix odd/even frame handling for ISOJerzy Kasenberg
Current implementation always sets odd/even bit for ISO transactions. This is a good strategy only if interval is 1. For ISO endpoint interval in (micro)frames is computed as 2^(interval-1), which means that odd/frame number should stay same for interval values > 1. With this change only when interval is 1 odd/even bit is modified.
2020-09-28synopsys: Remove compilation warning in dcd_edpt_closeJerzy Kasenberg
dcd_edpt_close() no longer modifies FIFO distribution. Code that that was commented out is removed along with variables that are no longer used. FIFO distribution among endpoints is handled upfront and does not need to be modified in open and close endpoint functions.
2020-09-28synopsys: Fix fifo allocation schemaJerzy Kasenberg
Recommended FIFO allocation schema includes 2 maximum endpoint sizes. Comment suggested that this is the case while it would work according to this description only in checked endpoints were ascending sizes. Also two same size endpoints would be counted as one. That is fixed by way sz is filled. Calculation used too much modulo operation while single division was enough to account for odd FIFO sizes. Extra space that is evenly distributed between Bulk and control endpoints was incorrectly calculated it could prevent allocation of ISO endpoint FIFO when bulk endpoints existed with smaller endpoint numbers. Minimum endpoint FIFO size is 16 32bit words, FIFO space requirement is now observed.
2020-09-15nrf52: Fix edpt_dma_start() wrong condition checkJerzy Kasenberg
Operator < used in while condition was obviously incorrect. Loop starts with checking if unsigned variable is less then 0. This condition is always false. This reverses condition to follow intention of of the code.
2020-09-06Start of sampling works.Reinhard Panhuber
2020-09-04Merge remote-tracking branch 'upstream/master' into uac2Reinhard Panhuber
2020-08-24Merge pull request #486 from kasjer/kasjer/add-endpoint-close-to-synopsysHa Thach
Add dcd_edpt_close() to synopsys
2020-08-22add OPT_MCU_SAMD11hathach
skip ci build for example that need more ROM/RAM could fit into SAMD11
2020-08-20Fix formatting, get rid of all tabs.Reinhard Panhuber
2020-08-19Commit before sharing.Reinhard Panhuber
Setup a test example - UNTESTED! Missing: Start transmitting audio data in set_interface.
2020-08-16Merge remote-tracking branch 'upstream/master' into uac2Reinhard Panhuber
Conflicts: src/device/usbd.c src/device/usbd.h src/portable/st/synopsys/dcd_synopsys.c
2020-08-16Add EP close. Fix bug in set_interface within audio.Reinhard Panhuber
2020-08-14Add dcd_edpt_close() to synopsysJerzy Kasenberg
Endpoint close was implemented only in one driver so far. This function is needed for interfaces with several alternate settings. The way FIFO is allocated in dcd_edpt_open() allows to correctly close only one IN endpoint (the one that was opened last).
2020-08-12Fix synopsys fifo flush during stallJerzy Kasenberg
Wrong FIFO was flushed in dcd_edpt_stall(). (epnum - 1) should only be used when accessing DIEPTXF registers. For DIEPCTL and GRSTCTL epnum is correct index.
2020-08-05Merge pull request #476 from kasjer/kasjer/fix-synopsys-fix-iso-frame-bitHa Thach
Fix synopsys odd/even frame bit for IN ISO endpoints
2020-08-04Fix synopsys odd/even frame bit for IN ISO endpointsJerzy Kasenberg
For ISO endpoint driver has to specify when data is to be transmitted (odd or even frame). Currently code was not updating this bit resulting in data being sent every other frame. If interval was 1ms full data packed was sent every 2ms, and ZLP was sent in between.
2020-08-04manually submit unplugged event for nrf dcd_disconnect()hathach
2020-08-04Merge pull request #478 from hathach/move-dcdconnect-to-dcdinitHa Thach
Move pull-up enabling to dcd_init() instead of usbd
2020-08-03Implement dynamic FIFO RAM allocation according to configuration desc.Reinhard Panhuber
2020-08-02Merge pull request #472 from hathach/fix-msp430-warningHa Thach
fix msp430 gcc 9.2.0 warning
2020-08-01enable pull-up in dcd_init() instead of usbdhathach
2020-08-01Merge pull request #477 from hathach/fix-nrf-unplugg-isr-eventHa Thach
correct isr context for nrf DCD_EVENT_UNPLUGGED
2020-08-01correct isr context for nrf DCD_EVENT_UNPLUGGEDhathach
also rename debug lookup to prevent conflict
2020-07-31Fix synopsys size check for ISO endpointJerzy Kasenberg
Constraint was incorrect for ISO endpoint as stated in TODO.
2020-07-29fix nested extern declaration of 'SystemCoreClock' [-Werror=nested-externs]hathach
2020-07-29fix strict prototypehathach
2020-07-28Merge pull request #454 from me-no-dev/esp32-s2-fifosHa Thach
ESP32-S2: Handle the fact that available EP IN FIFOs are less than the number of available EP INs
2020-07-28Update dcd_esp32s2.cme-no-dev
2020-07-28fix msp430 gcc 9.2.0 warning in #465hathach