23 #include "modules/system/usb/UsbDevice.h" 24 #include "pedigree/kernel/Spinlock.h" 25 #include "pedigree/kernel/compiler.h" 26 #include "pedigree/kernel/machine/Network.h" 27 #include "pedigree/kernel/process/Mutex.h" 28 #include "pedigree/kernel/process/Semaphore.h" 29 #include "pedigree/kernel/processor/types.h" 30 #include "pedigree/kernel/utilities/List.h" 31 #include "pedigree/kernel/utilities/String.h" 32 #include "pedigree/kernel/utilities/new" 48 virtual bool send(
size_t nBytes, uintptr_t buffer);
55 static int recvTrampoline(
void *p)
NORETURN;
57 static int trampoline(
void *p)
NORETURN;
85 BackPressThreshold = 8,
94 MulticastAddress = 22,
95 GeneralPurposeCtl = 30,
97 TxWriteAddressLo = 32,
98 TxWriteAddressHi = 33,
100 TxReadAddressHi = 35,
101 RxWriteAddressLo = 36,
102 RxWriteAddressHi = 37,
103 RxReadAddressLo = 38,
104 RxReadAddressHi = 39,
118 uint8_t networkStatus;
122 uint8_t rxOverflowCounter;
129 ssize_t
readRegister(uint8_t reg, uintptr_t buffer,
size_t nBytes);
132 ssize_t
writeRegister(uint8_t reg, uintptr_t buffer,
size_t nBytes);
138 ssize_t
readMemory(uint16_t offset, uintptr_t buffer,
size_t nBytes);
141 ssize_t
writeMemory(uint16_t offset, uintptr_t buffer,
size_t nBytes);
144 ssize_t
writeMemory(uint16_t offset, uint8_t data);
153 uint16_t
readMii(uint8_t offset);
156 void writeMii(uint8_t offset, uint16_t data);
184 void operator=(
const Dm9601 &);
virtual void initialiseDriver()
Implemented by the driver class, initialises driver-specific stuff.
virtual void getName(String &str)
Semaphore m_IncomingPackets
ssize_t readMemory(uint16_t offset, uintptr_t buffer, size_t nBytes)
Reads data from device memory into a buffer.
ssize_t writeRegister(uint8_t reg, uintptr_t buffer, size_t nBytes)
Writes data from a buffer to a register.
void writeMii(uint8_t offset, uint16_t data)
Writes a 16-bit value to the external MII.
uint16_t readMii(uint8_t offset)
Reads a 16-bit value from the external MII.
ssize_t writeMemory(uint16_t offset, uintptr_t buffer, size_t nBytes)
Writes data from a buffer into device memory.
virtual bool setStationInfo(const StationInfo &info)
virtual const StationInfo & getStationInfo()
void writeEeprom(uint8_t offset, uint16_t data)
Writes a 16-bit value to the device EEPROM.
uint16_t readEeprom(uint8_t offset)
Reads a 16-bit value from the device EEPROM.
ssize_t readRegister(uint8_t reg, uintptr_t buffer, size_t nBytes)
Reads data from a register into a buffer.
virtual bool send(size_t nBytes, uintptr_t buffer)
Endpoint * m_pOutEndpoint