Skip to content

Commit

Permalink
Merge pull request #1597 from kasjer/kasjer/dfu-coexistence
Browse files Browse the repository at this point in the history
dfu: Allow DFU coexistence with other interfaces (BTH, RNDIS, future one)
  • Loading branch information
hathach committed Aug 10, 2022
2 parents 7ade0d0 + c7469ce commit 8a28e7c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/class/dfu/dfu_device.c
Expand Up @@ -167,6 +167,8 @@ uint16_t dfu_moded_open(uint8_t rhport, tusb_desc_interface_t const * itf_desc,
uint8_t alt_count = 0;

uint16_t drv_len = 0;
TU_VERIFY(itf_desc->bInterfaceSubClass == TUD_DFU_APP_SUBCLASS && itf_desc->bInterfaceProtocol == DFU_PROTOCOL_DFU, 0);

while(itf_desc->bInterfaceSubClass == TUD_DFU_APP_SUBCLASS && itf_desc->bInterfaceProtocol == DFU_PROTOCOL_DFU)
{
TU_ASSERT(max_len > drv_len, 0);
Expand Down

0 comments on commit 8a28e7c

Please sign in to comment.