Kaynağa Gözat

rename TUD_DFU_MODE_DESCRIPTOR to TUD_DFU_DESCRIPTOR

hathach 4 yıl önce
ebeveyn
işleme
2916cd4575

+ 1 - 1
examples/device/dfu/src/tusb_config.h

@@ -83,7 +83,7 @@
 
 
 // Count of all alt settings, typically it's the partition count (Flash, EEPROM, etc.)
 // Count of all alt settings, typically it's the partition count (Flash, EEPROM, etc.)
 #define CFG_TUD_DFU_ALT_COUNT               2
 #define CFG_TUD_DFU_ALT_COUNT               2
-// DFU buffer size, it has to be set to the buffer size used in TUD_DFU_MODE_DESCRIPTOR
+// DFU buffer size, it has to be set to the buffer size used in TUD_DFU_DESCRIPTOR
 #define CFG_TUD_DFU_TRANSFER_BUFFER_SIZE    4096
 #define CFG_TUD_DFU_TRANSFER_BUFFER_SIZE    4096
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus

+ 1 - 1
examples/device/dfu/src/usb_descriptors.c

@@ -97,7 +97,7 @@ uint8_t const desc_configuration[] =
   TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100),
   TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100),
 
 
   // Interface number, attributes, detach timeout, transfer size, string index 0, [string index 1 ... string index n]
   // Interface number, attributes, detach timeout, transfer size, string index 0, [string index 1 ... string index n]
-  TUD_DFU_MODE_DESCRIPTOR(ITF_NUM_DFU_MODE, FUNC_ATTRS, 1000, CFG_TUD_DFU_TRANSFER_BUFFER_SIZE, 4, 5),
+  TUD_DFU_DESCRIPTOR(ITF_NUM_DFU_MODE, FUNC_ATTRS, 1000, CFG_TUD_DFU_TRANSFER_BUFFER_SIZE, 4, 5),
 };
 };
 
 
 // Invoked when received GET CONFIGURATION DESCRIPTOR
 // Invoked when received GET CONFIGURATION DESCRIPTOR

+ 1 - 1
src/class/dfu/dfu_device.c

@@ -200,7 +200,7 @@ uint16_t dfu_moded_open(uint8_t rhport, tusb_desc_interface_t const * itf_desc,
 
 
   _dfu_state_ctx.attrs = func_desc->bAttributes;
   _dfu_state_ctx.attrs = func_desc->bAttributes;
 
 
-  // CFG_TUD_DFU_TRANSFER_BUFFER_SIZE has to be set to the buffer size used in TUD_DFU_MODE_DESCRIPTOR
+  // CFG_TUD_DFU_TRANSFER_BUFFER_SIZE has to be set to the buffer size used in TUD_DFU_DESCRIPTOR
   uint16_t const transfer_size = tu_le16toh( tu_unaligned_read16(&func_desc->wTransferSize) );
   uint16_t const transfer_size = tu_le16toh( tu_unaligned_read16(&func_desc->wTransferSize) );
   TU_ASSERT(transfer_size <= CFG_TUD_DFU_TRANSFER_BUFFER_SIZE, drv_len);
   TU_ASSERT(transfer_size <= CFG_TUD_DFU_TRANSFER_BUFFER_SIZE, drv_len);
 
 

+ 1 - 1
src/class/dfu/dfu_device.h

@@ -38,7 +38,7 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 
 
 #if !defined(CFG_TUD_DFU_TRANSFER_BUFFER_SIZE)
 #if !defined(CFG_TUD_DFU_TRANSFER_BUFFER_SIZE)
-  #error "CFG_TUD_DFU_TRANSFER_BUFFER_SIZE must be defined, it has to be set to the buffer size used in TUD_DFU_MODE_DESCRIPTOR"
+  #error "CFG_TUD_DFU_TRANSFER_BUFFER_SIZE must be defined, it has to be set to the buffer size used in TUD_DFU_DESCRIPTOR"
 #endif
 #endif
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+

+ 1 - 1
src/device/usbd.h

@@ -646,7 +646,7 @@ TU_ATTR_WEAK bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb
   TU_XSTRCAT(TUD_DFU_MODE_ALT_, CFG_TUD_DFU_ALT_COUNT)(_itfnum, __VA_ARGS__)
   TU_XSTRCAT(TUD_DFU_MODE_ALT_, CFG_TUD_DFU_ALT_COUNT)(_itfnum, __VA_ARGS__)
 
 
 // Interface number, attributes, detach timeout, transfer size, string index 0, [string index 1, string index n]
 // Interface number, attributes, detach timeout, transfer size, string index 0, [string index 1, string index n]
-#define TUD_DFU_MODE_DESCRIPTOR(_itfnum, _attr, _timeout, _xfer_size, _stridx, ...) \
+#define TUD_DFU_DESCRIPTOR(_itfnum, _attr, _timeout, _xfer_size, _stridx, ...) \
   TUD_DFU_MODE_ALTS(_itfnum, _TUD_DFU_COMBINE(_stridx, __VA_ARGS__)) \
   TUD_DFU_MODE_ALTS(_itfnum, _TUD_DFU_COMBINE(_stridx, __VA_ARGS__)) \
   TUD_DFU_MODE_FUNC(_attr, _timeout, _xfer_size)
   TUD_DFU_MODE_FUNC(_attr, _timeout, _xfer_size)