Lines Matching refs:newInstance

1032     usb_host_device_instance_t *newInstance;  in USB_HostAttachDevice()  local
1072newInstance = (usb_host_device_instance_t *)OSA_MemoryAllocate(sizeof(usb_host_device_instance_t)); in USB_HostAttachDevice()
1073 if (newInstance == NULL) in USB_HostAttachDevice()
1084 newInstance->hostHandle = hostHandle; in USB_HostAttachDevice()
1085 newInstance->speed = speed; in USB_HostAttachDevice()
1086 newInstance->stallRetries = USB_HOST_CONFIG_ENUMERATION_MAX_STALL_RETRIES; in USB_HostAttachDevice()
1087 newInstance->enumRetries = USB_HOST_CONFIG_ENUMERATION_MAX_RETRIES; in USB_HostAttachDevice()
1088 newInstance->setAddress = 0; in USB_HostAttachDevice()
1089 newInstance->deviceAttachState = (uint8_t)kStatus_device_Attached; in USB_HostAttachDevice()
1091 newInstance->deviceDescriptor = in USB_HostAttachDevice()
1094newInstance->deviceDescriptor = (usb_descriptor_device_t *)OSA_MemoryAllocate(sizeof(usb_descripto… in USB_HostAttachDevice()
1096 if (newInstance->deviceDescriptor == NULL) in USB_HostAttachDevice()
1102 SDK_Free(newInstance->deviceDescriptor); in USB_HostAttachDevice()
1104 OSA_MemoryFree(newInstance->deviceDescriptor); in USB_HostAttachDevice()
1106 OSA_MemoryFree(newInstance); in USB_HostAttachDevice()
1111newInstance->enumBuffer = (uint8_t *)((uint8_t *)newInstance->deviceDescriptor + sizeof(usb_descri… in USB_HostAttachDevice()
1113 newInstance->hubNumber = hubNumber; in USB_HostAttachDevice()
1114 newInstance->portNumber = portNumber; in USB_HostAttachDevice()
1115 newInstance->level = level; in USB_HostAttachDevice()
1119 newInstance->hsHubNumber = (uint8_t)USB_HostHubGetHsHubNumber(hostHandle, hubNumber); in USB_HostAttachDevice()
1120newInstance->hsHubPort = (uint8_t)USB_HostHubGetHsHubPort(hostHandle, hubNumber, portNumber); in USB_HostAttachDevice()
1124 newInstance->hsHubNumber = hubNumber; in USB_HostAttachDevice()
1125 newInstance->hsHubPort = portNumber; in USB_HostAttachDevice()
1139 SDK_Free(newInstance->deviceDescriptor); in USB_HostAttachDevice()
1141 OSA_MemoryFree(newInstance->deviceDescriptor); in USB_HostAttachDevice()
1143 OSA_MemoryFree(newInstance); in USB_HostAttachDevice()
1148 newInstance->allocatedAddress = address; in USB_HostAttachDevice()
1150 newInstance->next = (usb_host_device_instance_t *)hostInstance->deviceList; in USB_HostAttachDevice()
1151 hostInstance->deviceList = newInstance; in USB_HostAttachDevice()
1152 newInstance->state = (uint8_t)kStatus_DEV_Initial; in USB_HostAttachDevice()
1156 pipeInit.devInstance = newInstance; in USB_HostAttachDevice()
1164 if (USB_HostOpenPipe(hostHandle, &newInstance->controlPipe, &pipeInit) != kStatus_USB_Success) in USB_HostAttachDevice()
1167 *deviceHandle = newInstance; in USB_HostAttachDevice()
1169 SDK_Free(newInstance->deviceDescriptor); in USB_HostAttachDevice()
1171 OSA_MemoryFree(newInstance->deviceDescriptor); in USB_HostAttachDevice()
1173 OSA_MemoryFree(newInstance); in USB_HostAttachDevice()
1180 newInstance->state = (uint8_t)kStatus_DEV_GetDes8; in USB_HostAttachDevice()
1182 if (USB_HostProcessState(newInstance) != kStatus_USB_Success) in USB_HostAttachDevice()
1184 … (void)USB_HostNotifyDevice(hostInstance, newInstance, (uint32_t)kUSB_HostEventEnumerationFail, in USB_HostAttachDevice()
1188 *deviceHandle = newInstance; in USB_HostAttachDevice()