#include <fibril.h>
#include <ddi.h>
#include <usb/host/device_keeper.h>
#include <usb/host/usb_endpoint_manager.h>
#include <usb/host/batch.h>
#include "transfer_list.h"
Go to the source code of this file.
Data Structures | |
struct | hc |
Main OHCI drier structure. More... | |
struct | uhci_regs |
UHCI I/O registers layout. More... | |
Defines | |
#define | UHCI_ALLOWED_HW_FAIL 5 |
#define | UHCI_CMD_CONFIGURE (1 << 6) |
#define | UHCI_CMD_DEBUG (1 << 5) |
#define | UHCI_CMD_FORCE_GLOBAL_RESUME (1 << 4) |
#define | UHCI_CMD_FORCE_GLOBAL_SUSPEND (1 << 3) |
#define | UHCI_CMD_GLOBAL_RESET (1 << 2) |
#define | UHCI_CMD_HCRESET (1 << 1) |
#define | UHCI_CMD_MAX_PACKET (1 << 7) |
#define | UHCI_CMD_RUN_STOP (1 << 0) |
#define | UHCI_DEBUGER_TIMEOUT 5000000 |
#define | UHCI_FRAME_LIST_COUNT 1024 |
#define | UHCI_INT_EMULATOR_TIMEOUT 10000 |
#define | UHCI_INTR_COMPLETE (1 << 2) |
#define | UHCI_INTR_CRC (1 << 0) |
#define | UHCI_INTR_RESUME (1 << 1) |
#define | UHCI_INTR_SHORT_PACKET (1 << 3) |
#define | UHCI_NEEDED_IRQ_COMMANDS 5 |
#define | UHCI_STATUS_ERROR_INTERRUPT (1 << 1) |
#define | UHCI_STATUS_HALTED (1 << 5) |
#define | UHCI_STATUS_INTERRUPT (1 << 0) |
#define | UHCI_STATUS_NM_INTERRUPTS (UHCI_STATUS_PROCESS_ERROR | UHCI_STATUS_SYSTEM_ERROR) |
#define | UHCI_STATUS_PROCESS_ERROR (1 << 4) |
#define | UHCI_STATUS_RESUME (1 << 2) |
#define | UHCI_STATUS_SYSTEM_ERROR (1 << 3) |
Typedefs | |
typedef hc | hc_t |
Main UHCI driver structure. | |
typedef uhci_regs | regs_t |
UHCI I/O registers layout. | |
Functions | |
static hc_t * | fun_to_hc (ddf_fun_t *fun) |
Get and cast pointer to the driver data. | |
static void | hc_fini (hc_t *instance) |
Safely dispose host controller internal structures. | |
int | hc_init (hc_t *instance, void *regs, size_t reg_size, bool interrupts) |
Initialize UHCI hc driver structure. | |
void | hc_interrupt (hc_t *instance, uint16_t status) |
Take action based on the interrupt cause. | |
int | hc_schedule (hc_t *instance, usb_transfer_batch_t *batch) |
Add USB transfer to the schedule. |
Definition in file hc.h.