/* Callback when an address is assigned to the device.  */
static void address_assigned(const usbh_transfer *transfer, usbh_transfer_status status, usbh_urb_id urb_id)
/* Callback when an address is assigned to the device.  */
static void address_assigned(const usbh_transfer *transfer, usbh_transfer_status status, usbh_urb_id urb_id)
{
	(void) urb_id;
	usbh_device *dev = transfer->device;
	if (status != USBH_SUCCESS) {
		LOG_LN("failed to set address to device");
		enum_failed(dev);
		return;
	}
	LOG_LN("succeeded in set address to device");
	dev->address = transfer->setup.wValue;
	LOG_LN("trying to read partial device descriptor from device");
	usbh_ctrlreq_read_dev_desc(dev, dev->host->buffer, 8, got_partial_dev_desc);
}