mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:38:10 +00:00
Kernel/USB: Refactor USB Pipe
Decompose the current monolithic USBD Pipe interface into several subclasses, one for each pair of endpoint type & direction. This is to make it more clear what data and functionality belongs to which Pipe type, and prevent nonsensical things like trying to execute a control transfer on a non-control pipe. This is important, because the Pipe class is the interface by which USB device drivers will interact with the HCD, so the clearer and more explicit this interface is the better.
This commit is contained in:
parent
1304575190
commit
bf3c99ef23
6 changed files with 179 additions and 69 deletions
|
@ -96,9 +96,9 @@ public:
|
|||
|
||||
private:
|
||||
// Root Hub constructor
|
||||
Hub(NonnullLockRefPtr<USBController>, DeviceSpeed, NonnullOwnPtr<Pipe> default_pipe);
|
||||
Hub(NonnullLockRefPtr<USBController>, DeviceSpeed, NonnullOwnPtr<ControlPipe> default_pipe);
|
||||
|
||||
Hub(Device const&, NonnullOwnPtr<Pipe> default_pipe);
|
||||
Hub(Device const&, NonnullOwnPtr<ControlPipe> default_pipe);
|
||||
|
||||
USBHubDescriptor m_hub_descriptor {};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue