1 #ifndef MINIX_LIBDEVMAN_H
2 #define MINIX_LIBDEVMAN_H
5 #include <minix/usb_ch9.h>
7 /* used for serializing */
8 struct devman_device_info
{
12 unsigned subsystem_offset
;
15 struct devman_device_info_entry
{
23 struct devman_usb_bind_cb_data
{
28 struct devman_usb_interface
{
29 struct devman_dev
*dev
;
30 struct devman_usb_dev
*usb_dev
;
31 usb_interface_descriptor_t
*desc
;
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
40 usb_device_descriptor_t
*desc
;
42 int configuration
; /* the configuration used for this
49 int intf_count
; /* the number of interfaces in the current
52 struct devman_usb_interface interfaces
[32];
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