diff options
| author | MasterPhi <[email protected]> | 2021-07-17 13:48:21 +0200 |
|---|---|---|
| committer | MasterPhi <[email protected]> | 2021-07-17 13:48:21 +0200 |
| commit | 7e3e41952fe4c83a182dfe39e5bab89e65120485 (patch) | |
| tree | 3be63300b87d135e787e7c219b3e17e07ea412bc /src | |
| parent | b194aa240bba9211e01dd9eaf4562e00a7215666 (diff) | |
Fix ISO support.
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/microchip/samx7x/dcd_samx7x.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/portable/microchip/samx7x/dcd_samx7x.c b/src/portable/microchip/samx7x/dcd_samx7x.c index 0299d12b9..2a534b95b 100644 --- a/src/portable/microchip/samx7x/dcd_samx7x.c +++ b/src/portable/microchip/samx7x/dcd_samx7x.c @@ -83,11 +83,8 @@ typedef struct { static tusb_speed_t get_speed(void); static void dcd_transmit_packet(xfer_ctl_t * xfer, uint8_t ep_ix); -// DMA descriptors shouldn't be placed in ITCM -#if defined(USB_DMA_DESC_SECTION) -TU_ATTR_SECTION(TU_XSTRING(USB_DMA_DESC_SECTION)) -#endif -dma_desc_t dma_desc[6]; +// DMA descriptors shouldn't be placed in ITCM ! +CFG_TUSB_MEM_SECTION dma_desc_t dma_desc[6]; xfer_ctl_t xfer_status[EP_MAX+1]; @@ -531,6 +528,17 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * ep_desc) } } +void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr) +{ + uint8_t const epnum = tu_edpt_number(ep_addr); + uint8_t const dir = tu_edpt_dir(ep_addr); + + // Disable endpoint interrupt + USBHS->USBHS_DEVIDR = 1 << (USBHS_DEVIDR_PEP_0_Pos + epnum); + // Disable EP + USBHS->USBHS_DEVEPT &=~(1 << (USBHS_DEVEPT_EPEN0_Pos + epnum)); +} + static void dcd_transmit_packet(xfer_ctl_t * xfer, uint8_t ep_ix) { uint16_t len = (uint16_t)(xfer->total_len - xfer->queued_len); |
