phunix/include/minix/devman.h
Ben Gras 2fe8fb192f Full switch to clang/ELF. Drop ack. Simplify.
There is important information about booting non-ack images in
docs/UPDATING. ack/aout-format images can't be built any more, and
booting clang/ELF-format ones is a little different. Updating to the
new boot monitor is recommended.

Changes in this commit:

	. drop boot monitor -> allowing dropping ack support
	. facility to copy ELF boot files to /boot so that old boot monitor
	  can still boot fairly easily, see UPDATING
	. no more ack-format libraries -> single-case libraries
	. some cleanup of OBJECT_FMT, COMPILER_TYPE, etc cases
	. drop several ack toolchain commands, but not all support
	  commands (e.g. aal is gone but acksize is not yet).
	. a few libc files moved to netbsd libc dir
	. new /bin/date as minix date used code in libc/
	. test compile fix
	. harmonize includes
	. /usr/lib is no longer special: without ack, /usr/lib plays no
	  kind of special bootstrapping role any more and bootstrapping
	  is done exclusively through packages, so releases depend even
	  less on the state of the machine making them now.
	. rename nbsd_lib* to lib*
	. reduce mtree
2012-02-14 14:52:02 +01:00

73 lines
2.0 KiB
C

#ifndef MINIX_LIBDEVMAN_H
#define MINIX_LIBDEVMAN_H
#include <minix/com.h>
#include <minix/ipc.h>
#include <minix/usb_ch9.h>
/* used for serializing */
struct devman_device_info {
int count;
int parent_dev_id;
unsigned name_offset;
unsigned subsystem_offset;
};
struct devman_device_info_entry {
unsigned type;
unsigned name_offset;
unsigned data_offset;
unsigned req_nr;
};
#ifndef DEVMAN_SERVER
struct devman_usb_bind_cb_data {
int dev_id;
int interface;
};
struct devman_usb_interface {
struct devman_dev *dev;
struct devman_usb_dev *usb_dev;
usb_interface_descriptor_t *desc;
/* used by the lib */
struct devman_usb_bind_cb_data cb_data;
};
struct devman_usb_dev {
struct devman_dev *dev;
int dev_id; /* The ID identifying the device
on server side */
usb_device_descriptor_t *desc;
int configuration; /* the configuration used for this
device */
char *manufacturer;
char *product;
char *serial;
int intf_count; /* the number of interfaces in the current
configuration */
struct devman_usb_interface interfaces[32];
/* used by the lib */
struct devman_usb_bind_cb_data cb_data;
};
typedef int (*devman_usb_bind_cb_t)(struct devman_usb_bind_cb_data *data, endpoint_t ep);
_PROTOTYPE( int devman_add_device, (struct devman_dev *dev));
_PROTOTYPE( int devman_del_device, (struct devman_dev *dev));
_PROTOTYPE( int devman_init, (void));
_PROTOTYPE( struct devman_usb_dev* devman_usb_device_new, (int dev_id));
_PROTOTYPE( int devman_usb_device_add, (struct devman_usb_dev *dev));
_PROTOTYPE( int devman_usb_device_remove, (struct devman_usb_dev *dev));
_PROTOTYPE( void devman_usb_device_delete, (struct devman_usb_dev *udev));
_PROTOTYPE( int devman_handle_msg, (message *m));
_PROTOTYPE( void devman_usb_init, (devman_usb_bind_cb_t bind_cb,
devman_usb_bind_cb_t unbind_cb) );
#endif
#endif