File: dummy.c

package info (click to toggle)
libusb 2%3A0.1.12-25
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,312 kB
  • ctags: 1,345
  • sloc: sh: 8,374; ansic: 3,271; cpp: 960; makefile: 226
file content (119 lines) | stat: -rw-r--r-- 2,039 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*
 * dummy USB support
 *
 * Derived from BSD version by Samuel Thibault
 *
 * This library is covered by the LGPL, read LICENSE for details.
 */

#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <assert.h>
#include <sys/time.h>
#include <sys/ioctl.h>

#include "usbi.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

int usb_os_open(usb_dev_handle *dev)
{
  return 0;
}

int usb_os_close(usb_dev_handle *dev)
{
  return 0;
}

int usb_set_configuration(usb_dev_handle *dev, int configuration)
{
  return 0;
}

int usb_claim_interface(usb_dev_handle *dev, int interface)
{
  return 0;
}

int usb_release_interface(usb_dev_handle *dev, int interface)
{
  return 0;
}

int usb_set_altinterface(usb_dev_handle *dev, int alternate)
{
  return 0;
}

int usb_bulk_write(usb_dev_handle *dev, int ep, const char *bytes, int size,
                   int timeout)
{
  return -ENOSYS;
}

int usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, int size,
                  int timeout)
{
  return -ENOSYS;
}

int usb_interrupt_write(usb_dev_handle *dev, int ep, const char *bytes, int size,
                        int timeout)
{
  return -ENOSYS;
}

int usb_interrupt_read(usb_dev_handle *dev, int ep, char *bytes, int size,
                       int timeout)
{
  return -ENOSYS;
}

int usb_control_msg(usb_dev_handle *dev, int requesttype, int request,
                     int value, int index, char *bytes, int size, int timeout)
{
  return -ENOSYS;
}

int usb_os_find_busses(struct usb_bus **busses)
{
  *busses = NULL;
  return 0;
}

int usb_os_find_devices(struct usb_bus *bus, struct usb_device **devices)
{
  *devices = NULL;
  return 0;
}

int usb_os_determine_children(struct usb_bus *bus)
{
  return -ENOSYS;
}

void usb_os_init(void)
{
}

int usb_resetep(usb_dev_handle *dev, unsigned int ep)
{
  return -ENOSYS;
}

int usb_clear_halt(usb_dev_handle *dev, unsigned int ep)
{
  return -ENOSYS;
}

int usb_reset(usb_dev_handle *dev)
{
  return -ENOSYS;
}