diff options
author | Mikkel Kamstrup Erlandsen | 2014-03-19 21:28:29 +0100 |
---|---|---|
committer | Martin Szulecki | 2014-03-24 17:01:30 +0100 |
commit | d06ea10f14a806f2770507cd179b62c0d4eda6a2 (patch) | |
tree | 66211f7e5314664e92f5bb2d5a97b788ecd87da9 /src | |
parent | 427da9b898ad6d6d6b091b375f9fc38f155b4813 (diff) | |
download | usbmuxd-d06ea10f14a806f2770507cd179b62c0d4eda6a2.tar.gz usbmuxd-d06ea10f14a806f2770507cd179b62c0d4eda6a2.tar.bz2 |
usb-linux: add some explanatory comments to usb-linux.c
Diffstat (limited to 'src')
-rw-r--r-- | src/usb-linux.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/usb-linux.c b/src/usb-linux.c index 127446a..94db8f2 100644 --- a/src/usb-linux.c +++ b/src/usb-linux.c @@ -93,6 +93,7 @@ static void usb_disconnect(struct usb_device *dev) free(dev); } +// Callback from write operation static void tx_callback(struct libusb_transfer *xfer) { struct usb_device *dev = xfer->user_data; @@ -162,6 +163,9 @@ int usb_send(struct usb_device *dev, const unsigned char *buf, int length) return 0; } +// Callback from read operation +// Under normal operation this issues a new read transfer request immediately, +// doing a kind of read-callback loop static void rx_callback(struct libusb_transfer *xfer) { struct usb_device *dev = xfer->user_data; @@ -206,6 +210,7 @@ static void rx_callback(struct libusb_transfer *xfer) } } +// Start a read-callback loop for this device static int start_rx(struct usb_device *dev) { int res; |