csu: restore crt1.o symlink
[minix.git] / include / minix / devman.h
blob1c010687e1007eca7f730283669e6e1204bd8a6c
1 #ifndef MINIX_LIBDEVMAN_H
2 #define MINIX_LIBDEVMAN_H
3 #include <minix/com.h>
4 #include <minix/ipc.h>
5 #include <minix/usb_ch9.h>
7 /* used for serializing */
8 struct devman_device_info {
9 int count;
10 int parent_dev_id;
11 unsigned name_offset;
12 unsigned subsystem_offset;
15 struct devman_device_info_entry {
16 unsigned type;
17 unsigned name_offset;
18 unsigned data_offset;
19 unsigned req_nr;
22 #ifndef DEVMAN_SERVER
23 struct devman_usb_bind_cb_data {
24 int dev_id;
25 int interface;
28 struct devman_usb_interface {
29 struct devman_dev *dev;
30 struct devman_usb_dev *usb_dev;
31 usb_interface_descriptor_t *desc;
32 /* used by the lib */
33 struct devman_usb_bind_cb_data cb_data;
36 struct devman_usb_dev {
37 struct devman_dev *dev;
38 int dev_id; /* The ID identifying the device
39 on server side */
40 usb_device_descriptor_t *desc;
42 int configuration; /* the configuration used for this
43 device */
45 char *manufacturer;
46 char *product;
47 char *serial;
49 int intf_count; /* the number of interfaces in the current
50 configuration */
52 struct devman_usb_interface interfaces[32];
53 /* used by the lib */
54 struct devman_usb_bind_cb_data cb_data;
57 typedef int (*devman_usb_bind_cb_t)(struct devman_usb_bind_cb_data *data, endpoint_t ep);
59 int devman_add_device(struct devman_dev *dev);
60 int devman_del_device(struct devman_dev *dev);
61 int devman_init(void);
62 struct devman_usb_dev* devman_usb_device_new(int dev_id);
63 int devman_usb_device_add(struct devman_usb_dev *dev);
64 int devman_usb_device_remove(struct devman_usb_dev *dev);
65 void devman_usb_device_delete(struct devman_usb_dev *udev);
66 int devman_handle_msg(message *m);
67 void devman_usb_init(devman_usb_bind_cb_t bind_cb, devman_usb_bind_cb_t
68 unbind_cb);
70 #endif
72 #endif