Skip to content

Commit 8a28e7c

Browse files
authored
Merge pull request hathach#1597 from kasjer/kasjer/dfu-coexistence
dfu: Allow DFU coexistence with other interfaces (BTH, RNDIS, future one)
2 parents 7ade0d0 + c7469ce commit 8a28e7c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/class/dfu/dfu_device.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ uint16_t dfu_moded_open(uint8_t rhport, tusb_desc_interface_t const * itf_desc,
167167
uint8_t alt_count = 0;
168168

169169
uint16_t drv_len = 0;
170+
TU_VERIFY(itf_desc->bInterfaceSubClass == TUD_DFU_APP_SUBCLASS && itf_desc->bInterfaceProtocol == DFU_PROTOCOL_DFU, 0);
171+
170172
while(itf_desc->bInterfaceSubClass == TUD_DFU_APP_SUBCLASS && itf_desc->bInterfaceProtocol == DFU_PROTOCOL_DFU)
171173
{
172174
TU_ASSERT(max_len > drv_len, 0);

0 commit comments

Comments
 (0)