Generally enable ISO xfer.
This commit is contained in:
parent
ef2f17a514
commit
cece59df22
|
@ -885,11 +885,9 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc
|
||||||
case TUSB_XFER_CONTROL:
|
case TUSB_XFER_CONTROL:
|
||||||
wType = USB_EP_CONTROL;
|
wType = USB_EP_CONTROL;
|
||||||
break;
|
break;
|
||||||
#if defined(ISOCHRONOUS_DOUBLEBUFFER)
|
|
||||||
case TUSB_XFER_ISOCHRONOUS:
|
case TUSB_XFER_ISOCHRONOUS:
|
||||||
wType = USB_EP_ISOCHRONOUS;
|
wType = USB_EP_ISOCHRONOUS;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case TUSB_XFER_BULK:
|
case TUSB_XFER_BULK:
|
||||||
wType = USB_EP_CONTROL;
|
wType = USB_EP_CONTROL;
|
||||||
break;
|
break;
|
||||||
|
@ -914,20 +912,13 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc
|
||||||
* use the same buffer as the double buffer, essentially disabling double buffering */
|
* use the same buffer as the double buffer, essentially disabling double buffering */
|
||||||
pma_addr = dcd_pma_alloc(p_endpoint_desc->bEndpointAddress, buffer_size);
|
pma_addr = dcd_pma_alloc(p_endpoint_desc->bEndpointAddress, buffer_size);
|
||||||
|
|
||||||
#if defined(ISOCHRONOUS_DOUBLEBUFFER)
|
|
||||||
if( (dir == TUSB_DIR_IN) || (wType == USB_EP_ISOCHRONOUS) )
|
if( (dir == TUSB_DIR_IN) || (wType == USB_EP_ISOCHRONOUS) )
|
||||||
#else
|
|
||||||
if(dir == TUSB_DIR_IN)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
*pcd_ep_tx_address_ptr(USB, epnum) = pma_addr;
|
*pcd_ep_tx_address_ptr(USB, epnum) = pma_addr;
|
||||||
pcd_clear_tx_dtog(USB, epnum);
|
pcd_clear_tx_dtog(USB, epnum);
|
||||||
}
|
}
|
||||||
#if defined(ISOCHRONOUS_DOUBLEBUFFER)
|
|
||||||
if( (dir == TUSB_DIR_OUT) || (wType == USB_EP_ISOCHRONOUS) )
|
if( (dir == TUSB_DIR_OUT) || (wType == USB_EP_ISOCHRONOUS) )
|
||||||
#else
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
*pcd_ep_rx_address_ptr(USB, epnum) = pma_addr;
|
*pcd_ep_rx_address_ptr(USB, epnum) = pma_addr;
|
||||||
pcd_set_ep_rx_bufsize(USB, epnum, buffer_size);
|
pcd_set_ep_rx_bufsize(USB, epnum, buffer_size);
|
||||||
|
@ -1035,7 +1026,7 @@ bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t
|
||||||
uint8_t const dir = tu_edpt_dir(ep_addr);
|
uint8_t const dir = tu_edpt_dir(ep_addr);
|
||||||
|
|
||||||
xfer->buffer = buffer;
|
xfer->buffer = buffer;
|
||||||
xfer->ff = NULL; // TODO support dcd_edpt_xfer_fifo API
|
xfer->ff = NULL;
|
||||||
xfer->total_len = total_bytes;
|
xfer->total_len = total_bytes;
|
||||||
xfer->queued_len = 0;
|
xfer->queued_len = 0;
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,6 @@
|
||||||
defined(STM32F373xC)
|
defined(STM32F373xC)
|
||||||
#include "stm32f3xx.h"
|
#include "stm32f3xx.h"
|
||||||
#define PMA_LENGTH (512u)
|
#define PMA_LENGTH (512u)
|
||||||
#define ISOCHRONOUS_DOUBLEBUFFER
|
|
||||||
// NO internal Pull-ups
|
// NO internal Pull-ups
|
||||||
// *B, and *C: 1 x 16 bits/word
|
// *B, and *C: 1 x 16 bits/word
|
||||||
// PMA dedicated to USB (no sharing with CAN)
|
// PMA dedicated to USB (no sharing with CAN)
|
||||||
|
@ -76,7 +75,6 @@
|
||||||
defined(STM32F303xD) || defined(STM32F303xE)
|
defined(STM32F303xD) || defined(STM32F303xE)
|
||||||
#include "stm32f3xx.h"
|
#include "stm32f3xx.h"
|
||||||
#define PMA_LENGTH (1024u)
|
#define PMA_LENGTH (1024u)
|
||||||
#define ISOCHRONOUS_DOUBLEBUFFER
|
|
||||||
// NO internal Pull-ups
|
// NO internal Pull-ups
|
||||||
// *6, *8, *D, and *E: 2 x 16 bits/word LPM Support
|
// *6, *8, *D, and *E: 2 x 16 bits/word LPM Support
|
||||||
// When CAN clock is enabled, USB can use first 768 bytes ONLY.
|
// When CAN clock is enabled, USB can use first 768 bytes ONLY.
|
||||||
|
|
Loading…
Reference in New Issue