From cb8ceba3dd55030731e7372080218a9fd7f44431 Mon Sep 17 00:00:00 2001 From: charkster Date: Thu, 28 Jan 2021 13:12:54 -0700 Subject: [PATCH 1/3] fix #558 --- examples/device/usbtmc/src/usb_descriptors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/device/usbtmc/src/usb_descriptors.c b/examples/device/usbtmc/src/usb_descriptors.c index 50545676..14500b1e 100644 --- a/examples/device/usbtmc/src/usb_descriptors.c +++ b/examples/device/usbtmc/src/usb_descriptors.c @@ -80,10 +80,10 @@ uint8_t const * tud_descriptor_device_cb(void) TUD_USBTMC_BULK_DESCRIPTORS(/* OUT = */0x01, /* IN = */ 0x81, /* packet size = */USBTMCD_MAX_PACKET_SIZE) #if CFG_TUD_USBTMC_ENABLE_INT_EP -// Interrupt endpoint should be 2 bytes on a FS USB link +// Interrupt endpoint should be 2 bytes on a FS USB link, but some microcontrollers only allow 8, 16, 32 or 64 for FS # define TUD_USBTMC_DESC(_itfnum) \ TUD_USBTMC_DESC_MAIN(_itfnum, /* _epCount = */ 3), \ - TUD_USBTMC_INT_DESCRIPTOR(/* INT ep # */ 0x82, /* epMaxSize = */ 2, /* bInterval = */16u ) + TUD_USBTMC_INT_DESCRIPTOR(/* INT ep # */ 0x82, /* epMaxSize = */ 8, /* bInterval = */16u ) # define TUD_USBTMC_DESC_LEN (TUD_USBTMC_IF_DESCRIPTOR_LEN + TUD_USBTMC_BULK_DESCRIPTORS_LEN + TUD_USBTMC_INT_DESCRIPTOR_LEN) #else From 4f988b792cf8f176c95f3dc52fb5a8217633e890 Mon Sep 17 00:00:00 2001 From: charkster Date: Thu, 28 Jan 2021 18:15:49 -0700 Subject: [PATCH 2/3] fix #558 --- examples/device/usbtmc/src/usb_descriptors.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/device/usbtmc/src/usb_descriptors.c b/examples/device/usbtmc/src/usb_descriptors.c index 14500b1e..f1ed1db7 100644 --- a/examples/device/usbtmc/src/usb_descriptors.c +++ b/examples/device/usbtmc/src/usb_descriptors.c @@ -80,7 +80,8 @@ uint8_t const * tud_descriptor_device_cb(void) TUD_USBTMC_BULK_DESCRIPTORS(/* OUT = */0x01, /* IN = */ 0x81, /* packet size = */USBTMCD_MAX_PACKET_SIZE) #if CFG_TUD_USBTMC_ENABLE_INT_EP -// Interrupt endpoint should be 2 bytes on a FS USB link, but some microcontrollers only allow 8, 16, 32 or 64 for FS +// USBTMC Interrupt xfer always has length of 2, but we use epMaxSize=8 here for compatibility +// with microcontrollers that only allow 8, 16, 32 or 64 for FS endpoints # define TUD_USBTMC_DESC(_itfnum) \ TUD_USBTMC_DESC_MAIN(_itfnum, /* _epCount = */ 3), \ TUD_USBTMC_INT_DESCRIPTOR(/* INT ep # */ 0x82, /* epMaxSize = */ 8, /* bInterval = */16u ) From effd82fd9c7e698b6b75521da7a109c5526700a1 Mon Sep 17 00:00:00 2001 From: charkster Date: Thu, 28 Jan 2021 18:34:58 -0700 Subject: [PATCH 3/3] fix #558 third attempt --- examples/device/usbtmc/src/usb_descriptors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/device/usbtmc/src/usb_descriptors.c b/examples/device/usbtmc/src/usb_descriptors.c index f1ed1db7..2336266b 100644 --- a/examples/device/usbtmc/src/usb_descriptors.c +++ b/examples/device/usbtmc/src/usb_descriptors.c @@ -80,8 +80,8 @@ uint8_t const * tud_descriptor_device_cb(void) TUD_USBTMC_BULK_DESCRIPTORS(/* OUT = */0x01, /* IN = */ 0x81, /* packet size = */USBTMCD_MAX_PACKET_SIZE) #if CFG_TUD_USBTMC_ENABLE_INT_EP -// USBTMC Interrupt xfer always has length of 2, but we use epMaxSize=8 here for compatibility -// with microcontrollers that only allow 8, 16, 32 or 64 for FS endpoints +// USBTMC Interrupt xfer always has length of 2, but we use epMaxSize=8 for +// compatibility with mcus that only allow 8, 16, 32 or 64 for FS endpoints # define TUD_USBTMC_DESC(_itfnum) \ TUD_USBTMC_DESC_MAIN(_itfnum, /* _epCount = */ 3), \ TUD_USBTMC_INT_DESCRIPTOR(/* INT ep # */ 0x82, /* epMaxSize = */ 8, /* bInterval = */16u )