add ncm.h for magic number
mostly clean up magic number
This commit is contained in:
		@@ -827,16 +827,16 @@ TU_ATTR_WEAK bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb
 | 
			
		||||
  5, TUSB_DESC_CS_INTERFACE, CDC_FUNC_DESC_HEADER, U16_TO_U8S_LE(0x0110),\
 | 
			
		||||
  /* CDC-NCM Union */\
 | 
			
		||||
  5, TUSB_DESC_CS_INTERFACE, CDC_FUNC_DESC_UNION, _itfnum, (uint8_t)((_itfnum) + 1),\
 | 
			
		||||
  /* CDC-ECM Functional Descriptor */\
 | 
			
		||||
  /* CDC-NCM Functional Descriptor */\
 | 
			
		||||
  13, TUSB_DESC_CS_INTERFACE, CDC_FUNC_DESC_ETHERNET_NETWORKING, _mac_stridx, 0, 0, 0, 0, U16_TO_U8S_LE(_maxsegmentsize), U16_TO_U8S_LE(0), 0, \
 | 
			
		||||
  /* CDC-ECM Functional Descriptor */\
 | 
			
		||||
  /* CDC-NCM Functional Descriptor */\
 | 
			
		||||
  6, TUSB_DESC_CS_INTERFACE, CDC_FUNC_DESC_NCM, U16_TO_U8S_LE(0x0100), 0, \
 | 
			
		||||
  /* Endpoint Notification */\
 | 
			
		||||
  7, TUSB_DESC_ENDPOINT, _ep_notif, TUSB_XFER_INTERRUPT, U16_TO_U8S_LE(_ep_notif_size), 50,\
 | 
			
		||||
  /* CDC Data Interface (default inactive) */\
 | 
			
		||||
  9, TUSB_DESC_INTERFACE, (uint8_t)((_itfnum)+1), 0, 0, TUSB_CLASS_CDC_DATA, 0, 1, 0,\
 | 
			
		||||
  9, TUSB_DESC_INTERFACE, (uint8_t)((_itfnum)+1), 0, 0, TUSB_CLASS_CDC_DATA, 0, NCM_DATA_PROTOCOL_NETWORK_TRANSFER_BLOCK, 0,\
 | 
			
		||||
  /* CDC Data Interface (alternative active) */\
 | 
			
		||||
  9, TUSB_DESC_INTERFACE, (uint8_t)((_itfnum)+1), 1, 2, TUSB_CLASS_CDC_DATA, 0, 1, 0,\
 | 
			
		||||
  9, TUSB_DESC_INTERFACE, (uint8_t)((_itfnum)+1), 1, 2, TUSB_CLASS_CDC_DATA, 0, NCM_DATA_PROTOCOL_NETWORK_TRANSFER_BLOCK, 0,\
 | 
			
		||||
  /* Endpoint In */\
 | 
			
		||||
  7, TUSB_DESC_ENDPOINT, _epin, TUSB_XFER_BULK, U16_TO_U8S_LE(_epsize), 0,\
 | 
			
		||||
  /* Endpoint Out */\
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user