use class driver open() for interface support detection
tested with dfu_runtime
This commit is contained in:
@@ -61,8 +61,8 @@ bool dfu_rtd_open(uint8_t rhport, tusb_desc_interface_t const * itf_desc, uint16
|
||||
(void) rhport;
|
||||
|
||||
// Ensure this is DFU Runtime
|
||||
TU_ASSERT(itf_desc->bInterfaceSubClass == TUD_DFU_APP_SUBCLASS);
|
||||
TU_ASSERT(itf_desc->bInterfaceProtocol == DFU_PROTOCOL_RT);
|
||||
TU_VERIFY(itf_desc->bInterfaceSubClass == TUD_DFU_APP_SUBCLASS);
|
||||
TU_VERIFY(itf_desc->bInterfaceProtocol == DFU_PROTOCOL_RT);
|
||||
|
||||
uint8_t const * p_desc = tu_desc_next( itf_desc );
|
||||
(*p_length) = sizeof(tusb_desc_interface_t);
|
||||
|
||||
@@ -58,7 +58,7 @@ typedef enum
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// Invoked when received new data
|
||||
TU_ATTR_WEAK void tud_dfu_rt_reboot_to_dfu(void);
|
||||
TU_ATTR_WEAK void tud_dfu_rt_reboot_to_dfu(void); // TODO rename to _cb convention
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Internal Class Driver API
|
||||
|
||||
Reference in New Issue
Block a user