Embedded Xinu Operating System
An ongoing research project and educational operating system.
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
Macros | Functions | Variables
usbcore.c File Reference
#include <memory.h>
#include <stdlib.h>
#include <semaphore.h>
#include <usb_core_driver.h>
#include <usb_hcdi.h>
#include <usb_hub_driver.h>
#include <usb_std_defs.h>
#include <usb_subsystem.h>

Macros

#define MAX_NUSBDEV   32
 
#define MAX_NUSBDRV   16
 

Functions

void usb_init_xfer_request (struct usb_xfer_request *req)
 
struct usb_xfer_request * usb_alloc_xfer_request (uint bufsize)
 
void usb_free_xfer_request (struct usb_xfer_request *req)
 
usb_status_t usb_submit_xfer_request (struct usb_xfer_request *req)
 
void usb_complete_xfer (struct usb_xfer_request *req)
 
usb_status_t usb_control_msg (struct usb_device *dev, const struct usb_endpoint_descriptor *endpoint_desc, uint8_t bRequest, uint8_t bmRequestType, uint16_t wValue, uint16_t wIndex, void *data, uint16_t wLength)
 
usb_status_t usb_get_descriptor (struct usb_device *dev, uint8_t bRequest, uint8_t bmRequestType, uint16_t wValue, uint16_t wIndex, void *buf, uint16_t buflen)
 
struct usb_device * usb_alloc_device (struct usb_device *parent)
 
void usb_free_device (struct usb_device *dev)
 
usb_status_t usb_attach_device (struct usb_device *dev)
 
void usb_lock_bus (void)
 
void usb_unlock_bus (void)
 
usb_status_t usb_register_device_driver (const struct usb_device_driver *drv)
 
syscall usbinit (void)
 

Variables

struct usb_device usb_devices [MAX_NUSBDEV]
 
struct usb_device * usb_root_hub = NULL
 

Detailed Description

This file contains the USB (Universal Serial Bus) core driver.

Macro Definition Documentation

#define MAX_NUSBDEV   32

Maximum number of simultaneous USB devices supported.

#define MAX_NUSBDRV   16

Maximum number of simultaneous USB device drivers supported.

Variable Documentation

struct usb_device usb_devices[MAX_NUSBDEV]

Table of USB device structures that can be dynamically assigned to actual devices as needed.

struct usb_device* usb_root_hub = NULL

Pointer to the root hub, or NULL if the USB subsystem has not yet been successfully initialized.