mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-21 03:40:52 +00:00
Move endpoint alloc define to tusb_mcu.h
This commit is contained in:
parent
60acb990b6
commit
db28437218
@ -96,13 +96,6 @@
|
|||||||
#define USE_LINEAR_BUFFER 1
|
#define USE_LINEAR_BUFFER 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Temporarily put the check here
|
|
||||||
#if defined(TUP_USBIP_FSDEV) || defined(TUP_USBIP_DWC2)
|
|
||||||
#define USE_ISO_EP_ALLOCATION 1
|
|
||||||
#else
|
|
||||||
#define USE_ISO_EP_ALLOCATION 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Declaration of buffers
|
// Declaration of buffers
|
||||||
|
|
||||||
// Check for maximum supported numbers
|
// Check for maximum supported numbers
|
||||||
@ -1476,7 +1469,7 @@ uint16_t audiod_open(uint8_t rhport, tusb_desc_interface_t const * itf_desc, uin
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if USE_ISO_EP_ALLOCATION
|
#ifdef TUP_DCD_EDPT_ISO_ALLOC
|
||||||
{
|
{
|
||||||
#if CFG_TUD_AUDIO_ENABLE_EP_IN
|
#if CFG_TUD_AUDIO_ENABLE_EP_IN
|
||||||
uint8_t ep_in = 0;
|
uint8_t ep_in = 0;
|
||||||
@ -1552,7 +1545,7 @@ uint16_t audiod_open(uint8_t rhport, tusb_desc_interface_t const * itf_desc, uin
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif // USE_ISO_EP_ALLOCATION
|
#endif // TUP_DCD_EDPT_ISO_ALLOC
|
||||||
|
|
||||||
#if CFG_TUD_AUDIO_ENABLE_EP_IN && CFG_TUD_AUDIO_EP_IN_FLOW_CONTROL
|
#if CFG_TUD_AUDIO_ENABLE_EP_IN && CFG_TUD_AUDIO_EP_IN_FLOW_CONTROL
|
||||||
{
|
{
|
||||||
@ -1674,7 +1667,7 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *
|
|||||||
if (audio->ep_in_as_intf_num == itf)
|
if (audio->ep_in_as_intf_num == itf)
|
||||||
{
|
{
|
||||||
audio->ep_in_as_intf_num = 0;
|
audio->ep_in_as_intf_num = 0;
|
||||||
#if !USE_ISO_EP_ALLOCATION
|
#ifndef TUP_DCD_EDPT_ISO_ALLOC
|
||||||
usbd_edpt_close(rhport, audio->ep_in);
|
usbd_edpt_close(rhport, audio->ep_in);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1705,7 +1698,7 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *
|
|||||||
if (audio->ep_out_as_intf_num == itf)
|
if (audio->ep_out_as_intf_num == itf)
|
||||||
{
|
{
|
||||||
audio->ep_out_as_intf_num = 0;
|
audio->ep_out_as_intf_num = 0;
|
||||||
#if !USE_ISO_EP_ALLOCATION
|
#ifndef TUP_DCD_EDPT_ISO_ALLOC
|
||||||
usbd_edpt_close(rhport, audio->ep_out);
|
usbd_edpt_close(rhport, audio->ep_out);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1726,7 +1719,7 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *
|
|||||||
|
|
||||||
// Close corresponding feedback EP
|
// Close corresponding feedback EP
|
||||||
#if CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
|
#if CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
|
||||||
#if !USE_ISO_EP_ALLOCATION
|
#ifndef TUP_DCD_EDPT_ISO_ALLOC
|
||||||
usbd_edpt_close(rhport, audio->ep_fb);
|
usbd_edpt_close(rhport, audio->ep_fb);
|
||||||
#endif
|
#endif
|
||||||
audio->ep_fb = 0;
|
audio->ep_fb = 0;
|
||||||
@ -1758,7 +1751,7 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *
|
|||||||
if (tu_desc_type(p_desc) == TUSB_DESC_ENDPOINT)
|
if (tu_desc_type(p_desc) == TUSB_DESC_ENDPOINT)
|
||||||
{
|
{
|
||||||
tusb_desc_endpoint_t const* desc_ep = (tusb_desc_endpoint_t const *) p_desc;
|
tusb_desc_endpoint_t const* desc_ep = (tusb_desc_endpoint_t const *) p_desc;
|
||||||
#if USE_ISO_EP_ALLOCATION
|
#ifdef TUP_DCD_EDPT_ISO_ALLOC
|
||||||
TU_ASSERT(usbd_edpt_iso_activate(rhport, desc_ep));
|
TU_ASSERT(usbd_edpt_iso_activate(rhport, desc_ep));
|
||||||
#else
|
#else
|
||||||
TU_ASSERT(usbd_edpt_open(rhport, desc_ep));
|
TU_ASSERT(usbd_edpt_open(rhport, desc_ep));
|
||||||
|
@ -434,4 +434,8 @@
|
|||||||
#define TU_ATTR_FAST_FUNC
|
#define TU_ATTR_FAST_FUNC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(TUP_USBIP_DWC2) || defined(TUP_USBIP_FSDEV)
|
||||||
|
#define TUP_DCD_EDPT_ISO_ALLOC
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user