dev_Disconnect()
Disconnect all layers in the device.
#include "device.h" LResult dev_Disconnect ( LDevice device );
device | device to disconnect |
dev_Disconnect() disconnects each layer in the device from the top down.
If successful, dev_Disconnect() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
if (dataTransferDone) { if ((result = dev_Disconnect(device)) < 0) { LOG("Disconnect failure", dev_ErrorMessage(result)); dev_Reopen(device); } }