summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2022-08-10 12:45:22 +0700
committerGitHub <[email protected]>2022-08-10 12:45:22 +0700
commit8a28e7cd75b6bba4f84188f7e1dcf52f9da29edc (patch)
tree1b4ee85dfd4f0e447ce5d927271fa8f73bcb1037 /src
parent7ade0d0ce41deeed701f27709445a75ff0cf784e (diff)
parentc7469ce986b495ccd3777e542df31bd90f4134f2 (diff)
Merge pull request #1597 from kasjer/kasjer/dfu-coexistence
dfu: Allow DFU coexistence with other interfaces (BTH, RNDIS, future one)
Diffstat (limited to 'src')
-rw-r--r--src/class/dfu/dfu_device.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/class/dfu/dfu_device.c b/src/class/dfu/dfu_device.c
index 8d859d2ee..aa5891ca9 100644
--- a/src/class/dfu/dfu_device.c
+++ b/src/class/dfu/dfu_device.c
@@ -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);