Embedded Xinu Operating System
An ongoing research project and educational operating system.
|
#include <stdlib.h>
#include <thread.h>
#include <usb_core_driver.h>
#include <usb_hub_defs.h>
#include <usb_hub_driver.h>
#include <usb_std_defs.h>
#include <core.h>
Data Structures | |
struct | usb_port |
struct | usb_hub |
Macros | |
#define | HUB_MAX_PORTS 16 |
#define | MAX_NUSBHUBS 16 |
#define | HUB_THREAD_STACK_SIZE 8192 |
#define | HUB_THREAD_PRIORITY 60 |
#define | HUB_THREAD_NAME "USB hub thread" |
#define | USB_PORT_RESET_TIMEOUT 800 |
#define | USB_PORT_RESET_DELAY 10 |
Functions | |
void | usb_hub_for_device_in_tree (struct usb_device *dev, usb_status_t(*callback)(struct usb_device *)) |
Variables | |
struct usb_device_driver | usb_hub_driver |
This file contains the USB (Universal Serial Bus) hub device driver.
#define HUB_MAX_PORTS 16 |
Maximum number of ports per hub supported by this driver. (USB 2.0 theoretically allows up to 255 ports per hub.)
#define HUB_THREAD_NAME "USB hub thread" |
Name of USB hub thread.
#define HUB_THREAD_PRIORITY 60 |
Priority of USB hub thread. This should be fairly high so that changes in USB connectivity can be responded to quickly.
#define HUB_THREAD_STACK_SIZE 8192 |
Stack size of USB hub thread. This shouldn't need to be very large, but the hub thread can call into USB device drivers' bind_device and unbind_device callbacks.
#define MAX_NUSBHUBS 16 |
Maximum number of USB hubs that can be attached to the USB at the same time.
#define USB_PORT_RESET_DELAY 10 |
Milliseconds between each status check on the port while waiting for it to finish being reset (Linux uses several values, but 10 in the default case).
#define USB_PORT_RESET_TIMEOUT 800 |
Maximum milliseconds to wait for a port to reset (800 is the same value that Linux uses).