XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs
usbhub.h File Reference
#include "uspi/macros.h"
Include dependency graph for usbhub.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TUSBHubDescriptor
 
struct  TUSBHubStatus
 
struct  TUSBPortStatus
 

Macros

#define USB_HUB_MAX_PORTS   8
 
#define USB_DEVICE_CLASS_HUB   9
 
#define RESET_TT   9
 
#define DESCRIPTOR_HUB   0x29
 
#define PORT_RESET   4
 
#define PORT_POWER   8
 
#define HUB_POWER_MODE(reg)   ((reg) & 3)
 
#define HUB_POWER_MODE_GANGED   0
 
#define HUB_POWER_MODE_INDIVIDUAL   1
 
#define HUB_TT_THINK_TIME(reg)   (((reg) >> 5) & 3)
 
#define HUB_LOCAL_POWER_LOST__MASK   (1 << 0)
 
#define HUB_OVER_CURRENT__MASK   (1 << 1)
 
#define C_HUB_LOCAL_POWER_LOST__MASK   (1 << 0)
 
#define C_HUB_OVER_CURRENT__MASK   (1 << 1)
 
#define PORT_CONNECTION__MASK   (1 << 0)
 
#define PORT_ENABLE__MASK   (1 << 1)
 
#define PORT_OVER_CURRENT__MASK   (1 << 3)
 
#define PORT_RESET__MASK   (1 << 4)
 
#define PORT_POWER__MASK   (1 << 8)
 
#define PORT_LOW_SPEED__MASK   (1 << 9)
 
#define PORT_HIGH_SPEED__MASK   (1 << 10)
 

Typedefs

typedef struct TUSBHubDescriptor TUSBHubDescriptor
 
typedef struct TUSBHubStatus TUSBHubStatus
 
typedef struct TUSBPortStatus TUSBPortStatus
 

Macro Definition Documentation

◆ C_HUB_LOCAL_POWER_LOST__MASK

#define C_HUB_LOCAL_POWER_LOST__MASK   (1 << 0)

◆ C_HUB_OVER_CURRENT__MASK

#define C_HUB_OVER_CURRENT__MASK   (1 << 1)

◆ DESCRIPTOR_HUB

#define DESCRIPTOR_HUB   0x29

◆ HUB_LOCAL_POWER_LOST__MASK

#define HUB_LOCAL_POWER_LOST__MASK   (1 << 0)

◆ HUB_OVER_CURRENT__MASK

#define HUB_OVER_CURRENT__MASK   (1 << 1)

◆ HUB_POWER_MODE

#define HUB_POWER_MODE (   reg)    ((reg) & 3)

◆ HUB_POWER_MODE_GANGED

#define HUB_POWER_MODE_GANGED   0

◆ HUB_POWER_MODE_INDIVIDUAL

#define HUB_POWER_MODE_INDIVIDUAL   1

◆ HUB_TT_THINK_TIME

#define HUB_TT_THINK_TIME (   reg)    (((reg) >> 5) & 3)

◆ PORT_CONNECTION__MASK

#define PORT_CONNECTION__MASK   (1 << 0)

◆ PORT_ENABLE__MASK

#define PORT_ENABLE__MASK   (1 << 1)

◆ PORT_HIGH_SPEED__MASK

#define PORT_HIGH_SPEED__MASK   (1 << 10)

◆ PORT_LOW_SPEED__MASK

#define PORT_LOW_SPEED__MASK   (1 << 9)

◆ PORT_OVER_CURRENT__MASK

#define PORT_OVER_CURRENT__MASK   (1 << 3)

◆ PORT_POWER

#define PORT_POWER   8

◆ PORT_POWER__MASK

#define PORT_POWER__MASK   (1 << 8)

◆ PORT_RESET

#define PORT_RESET   4

◆ PORT_RESET__MASK

#define PORT_RESET__MASK   (1 << 4)

◆ RESET_TT

#define RESET_TT   9

◆ USB_DEVICE_CLASS_HUB

#define USB_DEVICE_CLASS_HUB   9

◆ USB_HUB_MAX_PORTS

#define USB_HUB_MAX_PORTS   8

Typedef Documentation

◆ TUSBHubDescriptor

◆ TUSBHubStatus

typedef struct TUSBHubStatus TUSBHubStatus

◆ TUSBPortStatus