23 #include "modules/system/usb/Usb.h" 24 #include "pedigree/kernel/compiler.h" 25 #include "pedigree/kernel/machine/Device.h" 26 #include "pedigree/kernel/process/Semaphore.h" 27 #include "pedigree/kernel/processor/types.h" 28 #include "pedigree/kernel/utilities/ExtensibleBitmap.h" 41 virtual void addTransferToTransaction(
42 uintptr_t pTransaction,
bool bToggle, UsbPid pid, uintptr_t pBuffer,
46 virtual uintptr_t createTransaction(
UsbEndpoint endpointInfo) = 0;
51 uintptr_t pTransaction,
void (*pCallback)(uintptr_t, ssize_t) = 0,
52 uintptr_t pParam = 0) = 0;
55 virtual void addInterruptInHandler(
56 UsbEndpoint endpointInfo, uintptr_t pBuffer, uint16_t nBytes,
57 void (*pCallback)(uintptr_t, ssize_t), uintptr_t pParam = 0) = 0;
60 bool deviceConnected(uint8_t nPort, UsbSpeed speed);
63 void deviceDisconnected(uint8_t nPort);
67 ssize_t doSync(uintptr_t nTransaction, uint32_t timeout = 5000);
80 virtual bool portReset(uint8_t nPort,
bool bErrorResponse =
false) = 0;
88 m_IgnoredPorts.set(nPort);
90 m_IgnoredPorts.clear(nPort);
97 inline SyncParam() : semaphore(0), nResult(-1), timedOut(
false)
108 static void syncCallback(uintptr_t pParam, ssize_t ret);
ExtensibleBitmap m_UsedAddresses
Structure used synchronous transactions.
ExtensibleBitmap m_IgnoredPorts
Bitmap of ports to ignore connection changes on.
void ignoreConnectionChanges(uint8_t nPort, bool bIgnore=true)