diff options
author | thompsa <thompsa@FreeBSD.org> | 2010-01-29 02:44:06 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2010-01-29 02:44:06 +0000 |
commit | 3aae590108131671c7d107d8d69744a7ba5da770 (patch) | |
tree | 2391978b0a29215f8e39ca3810313d7efcd63dca /lib/libusb/libusb20.3 | |
parent | 38252fbed45c05861eafac4bee6cce077316851a (diff) | |
download | FreeBSD-src-3aae590108131671c7d107d8d69744a7ba5da770.zip FreeBSD-src-3aae590108131671c7d107d8d69744a7ba5da770.tar.gz |
Add a function to check if the usb devices is still connected.
Submitted by: Hans Petter Selasky
Diffstat (limited to 'lib/libusb/libusb20.3')
-rw-r--r-- | lib/libusb/libusb20.3 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/libusb/libusb20.3 b/lib/libusb/libusb20.3 index 5404013..7896e8f0 100644 --- a/lib/libusb/libusb20.3 +++ b/lib/libusb/libusb20.3 @@ -143,6 +143,8 @@ USB access library (libusb -lusb) .Ft int .Fn libusb20_dev_reset "struct libusb20_device *pdev" .Ft int +.Fn libusb20_dev_check_connected "struct libusb20_device *pdev" +.Ft int .Fn libusb20_dev_set_power_mode "struct libusb20_device *pdev" "uint8_t power_mode" .Ft uint8_t .Fn libusb20_dev_get_power_mode "struct libusb20_device *pdev" @@ -677,6 +679,15 @@ the last set USB configuration. This function returns zero on success else a LIBUSB20_ERROR value is returned. . +. +.Pp +. +.Fn libusb20_dev_check_connected +will check if an opened USB device is still connected. +. +This function returns zero if the device is still connected else a LIBUSB20_ERROR value is returned. +. +. .Pp . .Fn libusb20_dev_set_power_mode |