|
| Dm9601 (UsbDevice *pDev) |
|
virtual void | initialiseDriver () |
| Implemented by the driver class, initialises driver-specific stuff. More...
|
|
virtual void | getName (String &str) |
|
virtual bool | send (size_t nBytes, uintptr_t buffer) |
|
virtual bool | setStationInfo (const StationInfo &info) |
|
virtual const StationInfo & | getStationInfo () |
|
| UsbDevice (UsbHub *pHub, uint8_t nPort, UsbSpeed speed) |
| Default constructor.
|
|
| UsbDevice (UsbDevice *pDev) |
| Copy constructor.
|
|
virtual | ~UsbDevice () |
| Destructor.
|
|
void | initialise (uint8_t nAddress) |
| Initialises the device at the given address. More...
|
|
virtual void | getUsbDeviceName (String &str) |
|
uint8_t | getAddress () |
| Returns the current address of the device.
|
|
uint8_t | getPort () |
| Returns the number of the port on which the device is connected.
|
|
UsbSpeed | getSpeed () |
| Returns the speed at which the device operates.
|
|
UsbState | getUsbState () |
| Returns the current state of the device.
|
|
DeviceDescriptor * | getDescriptor () |
| Returns the device descriptor of the device.
|
|
ConfigDescriptor * | getConfiguration () |
| Returns the configuration in use.
|
|
Interface * | getInterface () |
| Returns the interface in use.
|
|
void | useConfiguration (uint8_t nConfig) |
| Switches to the given configuration.
|
|
void | useInterface (uint8_t nInterface) |
| Switches to the given interface.
|
|
UsbDeviceContainer * | getContainer () const |
| Gets our Device container, for replacing parents on hubs etc.
|
|
virtual bool | hasSubtree () const |
| Do we expose our own Device tree?
|
|
virtual Device * | getDevice () |
|
| Network (Network *pDev) |
|
virtual Type | getType () |
|
virtual void | dump (String &str) |
|
virtual bool | isConnected () |
|
virtual void | gotPacket () |
|
virtual void | droppedPacket () |
| Called when a packet is dropped by the system.
|
|
virtual void | badPacket () |
|
| Device (Device *p) |
|
Device * | getParent () const |
|
void | setParent (Device *p) |
|
virtual String | getSpecificType () |
|
virtual void | setSpecificType (String str) |
|
void | setPciPosition (uint32_t bus, uint32_t device, uint32_t func) |
|
void | setPciIdentifiers (uint8_t classCode, uint8_t subclassCode, uint16_t vendorId, uint16_t deviceId, uint8_t progIf) |
|
void | setPciConfigHeader (const PciBus::ConfigSpace &space) |
|
PciBus::ConfigSpace | getPciConfigHeader () const |
|
uint8_t | getPciClassCode () |
|
uint8_t | getPciSubclassCode () |
|
uint16_t | getPciVendorId () |
|
uint16_t | getPciDeviceId () |
|
uint8_t | getPciProgInterface () |
|
uint32_t | getPciBusPosition () |
|
uint32_t | getPciDevicePosition () |
|
uint32_t | getPciFunctionNumber () |
|
virtual Vector< Address * > & | addresses () |
|
virtual uintptr_t | getInterruptNumber () |
|
virtual void | setInterruptNumber (uintptr_t n) |
|
void | addChild (Device *pDevice) |
|
Device * | getChild (size_t n) |
|
size_t | getNumChildren () |
|
void | removeChild (size_t n) |
|
void | removeChild (Device *d) |
|
void | replaceChild (Device *src, Device *dest) |
|
|
enum | VendorRequests {
ReadRegister = 0,
WriteRegister = 1,
ReadMemory = 2,
WriteRegister1 = 3,
WriteMemory = 5,
WriteMemory1 = 7
} |
|
enum | Registers {
NetworkControl = 0,
NetworkStatus = 1,
TxControl = 2,
TxStatus1 = 3,
TxStatus2 = 4,
RxControl = 5,
RxStatus = 6,
RxOverflowCount = 7,
BackPressThreshold = 8,
FlowControl = 9,
RxFlowControl = 10,
PhyControl = 11,
PhyAddress = 12,
PhyLowByte = 13,
PhyHighByte = 14,
WakeUpControl = 15,
PhysicalAddress = 16,
MulticastAddress = 22,
GeneralPurposeCtl = 30,
GeneralPurpose = 31,
TxWriteAddressLo = 32,
TxWriteAddressHi = 33,
TxReadAddressLo = 34,
TxReadAddressHi = 35,
RxWriteAddressLo = 36,
RxWriteAddressHi = 37,
RxReadAddressLo = 38,
RxReadAddressHi = 39,
Vendor = 40,
Product = 42,
Chip = 44,
UsbAddress = 0xF0,
RxCounter = 0xF1,
TxCount = 0xF2,
UsbStatus = 0xF2,
UsbControl = 0xF4
} |
|
|
void | receiveThread () NORETURN |
|
void | receiveLoop () NORETURN |
|
void | doReceive () |
|
ssize_t | readRegister (uint8_t reg, uintptr_t buffer, size_t nBytes) |
| Reads data from a register into a buffer.
|
|
ssize_t | writeRegister (uint8_t reg, uintptr_t buffer, size_t nBytes) |
| Writes data from a buffer to a register.
|
|
ssize_t | writeRegister (uint8_t reg, uint8_t data) |
| Writes a single 8-bit value to a register.
|
|
ssize_t | readMemory (uint16_t offset, uintptr_t buffer, size_t nBytes) |
| Reads data from device memory into a buffer.
|
|
ssize_t | writeMemory (uint16_t offset, uintptr_t buffer, size_t nBytes) |
| Writes data from a buffer into device memory.
|
|
ssize_t | writeMemory (uint16_t offset, uint8_t data) |
| Writes a single 8-bit value into device memory.
|
|
uint16_t | readEeprom (uint8_t offset) |
| Reads a 16-bit value from the device EEPROM. More...
|
|
void | writeEeprom (uint8_t offset, uint16_t data) |
| Writes a 16-bit value to the device EEPROM. More...
|
|
uint16_t | readMii (uint8_t offset) |
| Reads a 16-bit value from the external MII. More...
|
|
void | writeMii (uint8_t offset, uint16_t data) |
| Writes a 16-bit value to the external MII. More...
|
|
| Dm9601 (const Dm9601 &) |
|
void | operator= (const Dm9601 &) |
|
|
enum | UsbState {
Connected = 0,
Addressed,
HasDescriptors,
Configured,
HasInterface,
HasDriver
} |
| Possible states for an USB device.
|
|
enum | Type {
Generic,
Root,
Disk,
Bus,
Display,
Network,
Sound,
Console,
Mouse,
Controller,
UsbController,
UsbGeneric,
UsbContainer
} |
|
typedef Device *(* | Callback) (Device *) |
|
static EXPORTED_PUBLIC uint32_t | convertToIpv4 (uint8_t a, uint8_t b, uint8_t c, uint8_t d) |
|
static EXPORTED_PUBLIC IpAddress | convertToIpv6 (uint8_t a, uint8_t b=0, uint8_t c=0, uint8_t d=0, uint8_t e=0, uint8_t f=0, uint8_t g=0, uint8_t h=0, uint8_t i=0, uint8_t j=0, uint8_t k=0, uint8_t l=0, uint8_t m=0, uint8_t n=0, uint8_t o=0, uint8_t p=0) |
|
static EXPORTED_PUBLIC uint16_t | calculateChecksum (uintptr_t buffer, size_t nBytes) |
|
static void | foreach (Callback callback, Device *root=0) |
|
template<class F , class... Args> |
static void | foreach (pedigree_std::Callable< F > &callback, Device *root, Args...args) |
|
static void | addToRoot (Device *device) |
|
static void | searchByVendorId (uint16_t vendorId, void(*callback)(Device *), Device *root=0) |
|
static void | searchByVendorIdAndDeviceId (uint16_t vendorId, uint16_t deviceId, void(*callback)(Device *), Device *root=0) |
|
static void | searchByClass (uint16_t classCode, void(*callback)(Device *), Device *root=0) |
|
static void | searchByClassAndSubclass (uint16_t classCode, uint16_t subclassCode, void(*callback)(Device *), Device *root=0) |
|
static void | searchByClassSubclassAndProgInterface (uint16_t classCode, uint16_t subclassCode, uint8_t progInterface, void(*callback)(Device *), Device *root=0) |
|
struct UsbDevice::Setup | PACKED |
|
struct UsbDevice::DeviceQualifier | PACKED |
|
ssize_t | doSync (Endpoint *pEndpoint, UsbPid pid, uintptr_t pBuffer, size_t nBytes, size_t timeout) |
|
ssize_t | syncIn (Endpoint *pEndpoint, uintptr_t pBuffer, size_t nBytes, size_t timeout=5000) |
|
ssize_t | syncOut (Endpoint *pEndpoint, uintptr_t pBuffer, size_t nBytes, size_t timeout=5000) |
|
void | addInterruptInHandler (Endpoint *pEndpoint, uintptr_t pBuffer, uint16_t nBytes, void(*pCallback)(uintptr_t, ssize_t), uintptr_t pParam=0) |
|
bool | controlRequest (uint8_t nRequestType, uint8_t nRequest, uint16_t nValue, uint16_t nIndex, uint16_t nLength=0, uintptr_t pBuffer=0) |
| Performs an USB control request.
|
|
uint16_t | getStatus () |
| Gets device's current status.
|
|
bool | clearEndpointHalt (Endpoint *pEndpoint) |
| Clears a halt on the given endpoint.
|
|
void * | getDescriptor (uint8_t nDescriptorType, uint8_t nDescriptorIndex, uint16_t nBytes, uint8_t requestType=0) |
| Gets a descriptor from the device. More...
|
|
uint8_t | getDescriptorLength (uint8_t nDescriptorType, uint8_t nDescriptorIndex, uint8_t requestType=0) |
| Gets a descriptor's length from the device. More...
|
|
String | getString (uint8_t nString) |
| Gets a string. More...
|
|
| NOT_COPYABLE_OR_ASSIGNABLE (Device) |
|
static Device & | root () |
|
uint8_t | m_nAddress |
| The current address of the device.
|
|
uint8_t | m_nPort |
| The number of the port on which the device is connected.
|
|
UsbSpeed | m_Speed |
| The speed at which the device operates.
|
|
UsbState | m_UsbState |
| The current state of the device.
|
|
DeviceDescriptor * | m_pDescriptor |
| Device descriptor for this device.
|
|
ConfigDescriptor * | m_pConfiguration |
| Configuration in use.
|
|
Interface * | m_pInterface |
| Interface in use.
|
|
UsbHub * | m_pHub |
| Parent USB hub.
|
|
UsbDeviceContainer * | m_pContainer |
| Our current container.
|
|
StationInfo | m_StationInfo |
|
Vector< Address * > | m_Addresses |
|
Vector< Device * > | m_Children |
|
Device * | m_pParent |
|
uintptr_t | m_InterruptNumber |
|
String | m_SpecificType |
|
PciBus::ConfigSpace | m_ConfigHeader |
|
uint8_t | m_ClassCode |
|
uint8_t | m_SubclassCode |
|
uint16_t | m_VendorId |
|
uint16_t | m_DeviceId |
|
uint8_t | m_ProgInterface |
|
uint32_t | m_PciBusPos |
|
uint32_t | m_PciDevicePos |
|
uint32_t | m_PciFunctionNum |
|
static Device | m_Root |
|
static Mutex | m_TreeLock |
|
Definition at line 34 of file Dm9601.h.