mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
USB: Store device descriptor on enumeration
We now store the device descriptor obtained from the device during enumeration in the device's object in memory instead of exposing all of the different members contained within it.
This commit is contained in:
parent
7b42146f33
commit
71c9572e74
Notes:
sideshowbarker
2024-07-18 12:05:41 +09:00
Author: https://github.com/Quaker762 Commit: https://github.com/SerenityOS/serenity/commit/71c9572e744 Pull-request: https://github.com/SerenityOS/serenity/pull/7944 Reviewed-by: https://github.com/alimpfard
2 changed files with 3 additions and 1 deletions
|
@ -94,6 +94,7 @@ KResult Device::enumerate()
|
|||
VERIFY(transfer_length > 0);
|
||||
m_address = s_next_usb_address++;
|
||||
|
||||
memcpy(&m_device_descriptor, &dev_descriptor, sizeof(USBDeviceDescriptor));
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,8 @@ public:
|
|||
|
||||
u8 address() const { return m_address; }
|
||||
|
||||
private:
|
||||
const USBDeviceDescriptor& device_descriptor() const { return m_device_descriptor; }
|
||||
|
||||
private:
|
||||
PortNumber m_device_port; // What port is this device attached to
|
||||
DeviceSpeed m_device_speed; // What speed is this device running at
|
||||
|
|
Loading…
Reference in a new issue