Home |
Function RTUResetDevice |
Function RTUResetDeviceRTUResetDevice resets a device or device tree: void RTUResetDevice(RTUDeviceHandle Device); ParametersDeviceDevice handle of the device to reset. If Device references a hub, the hub and all devices connected below it are affected. If Device is NULL, all virtual root hubs are reset. By default, this function places the port the respective device is connected on in the Port Reset state (as defined by the USB specification) for 100 milliseconds. Alternatively, RTUResetDevice can be instructed to simulate disconnecting and reconnecting the device by setting RTUSBConfig flag RTU_RESET_WITH_DISABLE. In this case, the respective port is disabled and then re-enabled. In either case, the detachment callback(s) are called, if required. Then, the device is initialized again and all currently installed attachment callbacks are called. If the specified parameter references a hub or a virtual root hub, that hub as well as all devices connected to that hub will be affected. If NULL is specified, all devices will be reset It is not required or recommended to call RTUSuspendHubs before and after calling this function. If the given device has already been disconnected, this function does nothing. RTUResetDevice merely sends a message to the RTUSB-32 internal hub task which will perform the actual processing. When this function returns, the reset and reinitialization processes have been started but most likely not been completed yet. This function is useful if a device's properties or a driver's configuration has changed, requiring the device to be reinitialized under program control. It can also be used as a last-resort mechanism to reinitialize a device to bring it into a known state.
|