Skip to content

Commit 071da47

Browse files
author
Sebastien COUDREAU
committed
Correct interrupt polling interval in descriptor
Use macro argument instead of 0x16 constant value. At least Linux kernel was complaining about this value: "config 1 interface 0 altsetting 0 endpoint 0x82 has an invalid bInterval 22, changing to 8" (warning obtained using usbtmc device config)
1 parent d4620d9 commit 071da47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/device/usbd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ TU_ATTR_WEAK bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb
603603
/* optional interrupt endpoint */ \
604604
// _int_pollingInterval : for LS/FS, expressed in frames (1ms each). 16 may be a good number?
605605
#define TUD_USBTMC_INT_DESCRIPTOR(_ep_interrupt, _ep_interrupt_size, _int_pollingInterval ) \
606-
7, TUSB_DESC_ENDPOINT, _ep_interrupt, TUSB_XFER_INTERRUPT, U16_TO_U8S_LE(_ep_interrupt_size), 0x16
606+
7, TUSB_DESC_ENDPOINT, _ep_interrupt, TUSB_XFER_INTERRUPT, U16_TO_U8S_LE(_ep_interrupt_size), _int_pollingInterval
607607

608608
#define TUD_USBTMC_INT_DESCRIPTOR_LEN (7u)
609609

0 commit comments

Comments
 (0)