Rev 846 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#include <kernel/kern.h>
extern int usb_init(void);
extern void usb_exit(void);
extern int ohci_hcd_pci_init (void);
extern void ohci_hcd_pci_cleanup (void);
extern int uhci_hcd_init(void);
extern void uhci_hcd_cleanup(void);
extern int ehci_hcd_init(void);
extern void ehci_hcd_cleanup(void);
extern int usb_mouse_init(void);
extern void usb_mouse_exit(void);
extern int usb_kbd_init(void);
extern void usb_kbd_exit(void);
extern int hid_init(void);
extern void hid_exit(void);
static int usb_installed = FALSE;
/* to do: return error code */
int USB26_init()
{
if (usb_installed == TRUE)
return 0;
usb_init();
ehci_hcd_init();
ohci_hcd_pci_init();
uhci_hcd_init();
usb_mouse_init();
usb_kbd_init();
hid_init();
usb_installed = TRUE;
return 0;
}
/* to do : add all usb closing functions ?*/
int USB26_close()
{
if (usb_installed == FALSE)
return -1;
ehci_hcd_cleanup();
ohci_hcd_pci_cleanup();
uhci_hcd_cleanup();
usb_mouse_exit();
usb_kbd_exit();
hid_exit();
usb_exit();
usb_installed = FALSE;
return 0;
}