summaryrefslogtreecommitdiffstats
path: root/daemon/usb.h
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/usb.h')
-rw-r--r--daemon/usb.h66
1 files changed, 0 insertions, 66 deletions
diff --git a/daemon/usb.h b/daemon/usb.h
deleted file mode 100644
index 9884d7f..0000000
--- a/daemon/usb.h
+++ /dev/null
@@ -1,66 +0,0 @@
1/*
2 usbmuxd - iPhone/iPod Touch USB multiplex server daemon
3
4Copyright (C) 2009 Hector Martin "marcan" <hector@marcansoft.com>
5Copyright (C) 2009 Nikias Bassen <nikias@gmx.li>
6Copyright (C) 2009 Martin Szulecki <opensuse@sukimashita.com>
7
8This program is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation, either version 2 or version 3.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program; if not, write to the Free Software
19Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
21*/
22
23#ifndef __USB_H__
24#define __USB_H__
25
26#include <stdint.h>
27#include "utils.h"
28
29#define INTERFACE_CLASS 255
30#define INTERFACE_SUBCLASS 254
31#define INTERFACE_PROTOCOL 2
32
33// libusb fragments packets larger than this (usbfs limitation)
34// on input, this creates race conditions and other issues
35#define USB_MRU 16384
36
37// max transmission packet size
38// libusb fragments these too, but doesn't send ZLPs so we're safe
39// but we need to send a ZLP ourselves at the end (see usb-linux.c)
40// we're using 3 * 16384 to optimize for the fragmentation
41// this results in three URBs per full transfer, 32 USB packets each
42// if there are ZLP issues this should make them show up easily too
43#define USB_MTU (3 * 16384)
44
45#define USB_PACKET_SIZE 512
46
47#define VID_APPLE 0x5ac
48#define PID_RANGE_LOW 0x1290
49#define PID_RANGE_MAX 0x129f
50
51struct usb_device;
52
53int usb_init(void);
54void usb_shutdown(void);
55const char *usb_get_serial(struct usb_device *dev);
56uint32_t usb_get_location(struct usb_device *dev);
57uint16_t usb_get_pid(struct usb_device *dev);
58void usb_get_fds(struct fdlist *list);
59int usb_get_timeout(void);
60int usb_send(struct usb_device *dev, const unsigned char *buf, int length);
61int usb_discover(void);
62void usb_autodiscover(int enable);
63int usb_process(void);
64int usb_process_timeout(int msec);
65
66#endif