Skip to content

Commit 905a0b2

Browse files
committed
correct bulk size for highspeed endpoint in dynamic_configuration and usbtmc exmaples
1 parent 8012130 commit 905a0b2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/device/dynamic_configuration/src/usb_descriptors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ uint8_t const desc_configuration_0[] =
163163
TUD_CONFIG_DESCRIPTOR(1, ITF_0_NUM_TOTAL, 0, CONFIG_0_TOTAL_LEN, 0x00, 100),
164164

165165
// Interface number, string index, EP notification address and size, EP data address (out, in) and size.
166-
TUD_CDC_DESCRIPTOR(ITF_0_NUM_CDC, 0, EPNUM_0_CDC_NOTIF, 8, EPNUM_0_CDC_OUT, EPNUM_0_CDC_IN, 64),
166+
TUD_CDC_DESCRIPTOR(ITF_0_NUM_CDC, 0, EPNUM_0_CDC_NOTIF, 8, EPNUM_0_CDC_OUT, EPNUM_0_CDC_IN, TUD_OPT_HIGH_SPEED ? 512 : 64),
167167

168168
// Interface number, string index, EP Out & EP In address, EP size
169169
TUD_MIDI_DESCRIPTOR(ITF_0_NUM_MIDI, 0, EPNUM_0_MIDI_OUT, EPNUM_0_MIDI_IN, TUD_OPT_HIGH_SPEED ? 512 : 64),

src/class/usbtmc/usbtmc_device.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
// USB spec says that full-speed must be 8,16,32, or 64.
3939
// However, this driver implementation requires it to be >=32
40-
#define USBTMCD_MAX_PACKET_SIZE (64u)
40+
#define USBTMCD_MAX_PACKET_SIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
4141

4242
/***********************************************
4343
* Functions to be implemeted by the class implementation

0 commit comments

Comments
 (0)