summaryrefslogtreecommitdiff
path: root/src/device/usbd.h
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2021-07-17 12:10:35 +0200
committerGitHub <[email protected]>2021-07-17 12:10:35 +0200
commitb194aa240bba9211e01dd9eaf4562e00a7215666 (patch)
treeb9ef8962f6fdac517e7fc8575526f6cdec8467c1 /src/device/usbd.h
parent475742984f4d0f2b95c9c78dfff71814117feb90 (diff)
parent21bfd11683c4bb6e0996130bd1061a97d3049121 (diff)
Merge branch 'master' into dcd_same70
Diffstat (limited to 'src/device/usbd.h')
-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 0a0f0bf00..2de6a5cfd 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