summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2021-07-06 22:57:48 +0700
committerGitHub <[email protected]>2021-07-06 22:57:48 +0700
commitecb100a62fa99335fc41dca3d7c85a3903a7df65 (patch)
tree8f2cfdf71afd0eb4b1783c79859acd7857409a1f /src/device
parent4468b14580009cccb4e62e3a52ffbd4cb65468d2 (diff)
parent72f916423e85083a090186ecc05a6a5b8962685a (diff)
Merge pull request #938 from HiFiPhile/uac_example
Bug fix and Enhancements of UAC2
Diffstat (limited to 'src/device')
-rw-r--r--src/device/usbd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/device/usbd.h b/src/device/usbd.h
index 3857295d7..45aefe53b 100644
--- a/src/device/usbd.h
+++ b/src/device/usbd.h
@@ -542,6 +542,11 @@ TU_ATTR_WEAK bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb
/* Standard AS Isochronous Feedback Endpoint Descriptor(4.10.2.1) */\
TUD_AUDIO_DESC_STD_AS_ISO_FB_EP(/*_ep*/ _epfb, /*_interval*/ 1)\
+// Calculate wMaxPacketSize of Endpoints
+#define TUD_AUDIO_EP_SIZE(_maxFrequency, _nBytesPerSample, _nChannels) \
+ ((((_maxFrequency + ((CFG_TUSB_RHPORT0_MODE & OPT_MODE_HIGH_SPEED) ? 7999 : 999)) / ((CFG_TUSB_RHPORT0_MODE & OPT_MODE_HIGH_SPEED) ? 8000 : 1000)) + 1) * _nBytesPerSample * _nChannels)
+
+
//------------- TUD_USBTMC/USB488 -------------//
#define TUD_USBTMC_APP_CLASS (TUSB_CLASS_APPLICATION_SPECIFIC)
#define TUD_USBTMC_APP_SUBCLASS 0x03u